From 757dd50397f14ca834ec3e7f13079baf9a432b80 Mon Sep 17 00:00:00 2001 From: Naud Loomans <38351577+naudloomans@users.noreply.github.com> Date: Thu, 13 Nov 2025 18:57:43 +0100 Subject: [PATCH 1/8] update pbl data loader --- Zero_Interface-Loader.alpx | 2 +- .../Agents/Zero_Interface/Code/Functions.java | 18 +- _alp/Agents/Zero_Loader/Code/Functions.java | 156 +++++++++++------- _alp/Agents/Zero_Loader/Code/Functions.xml | 24 ++- _alp/Classes/Class.Building_data.java | 3 + 5 files changed, 131 insertions(+), 72 deletions(-) diff --git a/Zero_Interface-Loader.alpx b/Zero_Interface-Loader.alpx index 3667bcb..7b2fb64 100644 --- a/Zero_Interface-Loader.alpx +++ b/Zero_Interface-Loader.alpx @@ -1,7 +1,7 @@ 1658477103134 diff --git a/_alp/Agents/Zero_Interface/Code/Functions.java b/_alp/Agents/Zero_Interface/Code/Functions.java index c81d3ae..6a02deb 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.java +++ b/_alp/Agents/Zero_Interface/Code/Functions.java @@ -731,26 +731,26 @@ public void write(int b) { double f_setColorsBasedOnConsumptionProfileHouseholds(GIS_Object gis_area) {/*ALCODESTART::1718263685462*/ -double yearlyEnergyConsumption = 0; +double electricityConsumption_kwpa = 0; for( GridConnection gc : gis_area.c_containedGridConnections){ if(gc.v_rapidRunData != null){ - yearlyEnergyConsumption += gc.v_rapidRunData.getTotalElectricityConsumed_MWh(); + electricityConsumption_kwpa += gc.v_rapidRunData.getTotalElectricityConsumed_MWh() * 1000; } else{ for ( J_EAConsumption consumptionAsset : gc.c_consumptionAssets){ if( consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND ){ - yearlyEnergyConsumption += consumptionAsset.yearlyDemand_kWh; + electricityConsumption_kwpa += consumptionAsset.yearlyDemand_kWh; } } } } -if ( yearlyEnergyConsumption == 0) { gis_area.f_style( v_unknownConsumptionColor, null, null, null );} -else if ( yearlyEnergyConsumption < 1500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} -else if ( yearlyEnergyConsumption < 2500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} -else if ( yearlyEnergyConsumption < 4000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} -else if ( yearlyEnergyConsumption < 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} -else if ( yearlyEnergyConsumption > 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} +if ( electricityConsumption_kwpa == 0) { gis_area.f_style( v_unknownConsumptionColor, null, null, null );} +else if ( electricityConsumption_kwpa < 1500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} +else if ( electricityConsumption_kwpa < 2500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} +else if ( electricityConsumption_kwpa < 4000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} +else if ( electricityConsumption_kwpa < 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} +else if ( electricityConsumption_kwpa > 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} /*ALCODEEND*/} diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index 92dc821..968c76b 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -3194,8 +3194,16 @@ List f_getChargerProfile() return chargerProfile; /*ALCODEEND*/} -double f_addCookingAsset(GCHouse gc,OL_EnergyAssetType CookingType,double yearlyCookingDemand_kWh) +double f_addCookingAsset(GCHouse gc,OL_EnergyAssetType CookingType,double cookingDemand_kwhpa) {/*ALCODESTART::1749726189312*/ +double yearlyCookingDemand_kWh = cookingDemand_kwhpa; + +if(cookingDemand_kwhpa == 0){ + //yearlyCookingDemand_kWh = uniform_discr(200,600); //way to high compared to referentiewoningen + yearlyCookingDemand_kWh = uniform_discr(70,130); + // traceln("Cooking demand unknown"); +} + switch(CookingType){ case ELECTRIC_HOB: @@ -3210,23 +3218,25 @@ List f_getChargerProfile() } /*ALCODEEND*/} -double f_addHotWaterDemand(GCHouse houseGC,double surface_m2) +double f_addHotWaterDemand(GCHouse houseGC,double surface_m2,double hotWaterDemand_kwhpa) {/*ALCODESTART::1749726279652*/ -int aantalBewoners; -if( surface_m2 > 150){ - aantalBewoners = uniform_discr(2,6); -} -else if (surface_m2 > 50){ - aantalBewoners = uniform_discr(1,4); -} -else { - aantalBewoners = uniform_discr(1,2); +double yearlyHWD_kWh = hotWaterDemand_kwhpa; +if(hotWaterDemand_kwhpa == 0){ + int aantalBewoners; + if( surface_m2 > 150){ + aantalBewoners = uniform_discr(2,6); + } + else if (surface_m2 > 50){ + aantalBewoners = uniform_discr(1,4); + } + else { + aantalBewoners = uniform_discr(1,2); + } + + yearlyHWD_kWh = 1000 + aantalBewoners * 150; //Aangepast Naud 13-11-2025 omdat waardes van PBL totaal niet aansloten bij oude aantal bewoners * 600 //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix } - -double yearlyHWD_kWh = aantalBewoners * 600; //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix - //TEST -yearlyHWD_kWh += 0; +//yearlyHWD_kWh += 0; J_EAConsumption hotwaterDemand = new J_EAConsumption( houseGC, OL_EnergyAssetType.HOT_WATER_CONSUMPTION, "default_house_hot_water_demand_fr", yearlyHWD_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, null); @@ -3239,7 +3249,7 @@ else if (surface_m2 > 50){ } /*ALCODEEND*/} -double f_addBuildingHeatModel(GridConnection parentGC,double floorArea_m2) +double f_addBuildingHeatModel(GridConnection parentGC,double floorArea_m2,double heatDemand_kwhpa) {/*ALCODESTART::1749727623536*/ double maxPowerHeat_kW = 1000; //Dit is hoeveel vermogen het huis kan afgeven/opnemen, mag willekeurige waarden hebben. Wordt alleen gebruikt in rekenstap van ratio of capacity double lossfactor_WpK; //Dit is wat bepaalt hoeveel warmte het huis verliest/opneemt per tijdstap per delta_T @@ -3247,37 +3257,42 @@ else if (surface_m2 > 50){ double heatCapacity_JpK; //hoeveel lucht zit er in je huis dat je moet verwarmen? double solarAbsorptionFactor_m2; //hoeveel m2 effectieve dak en muur oppervlakte er is dat opwarmt door zonneinstraling -switch (parentGC.p_energyLabel){ - case A: - lossfactor_WpK = 0.35 * floorArea_m2; - break; - case B: - lossfactor_WpK = 0.45 * floorArea_m2; - break; - case C: - lossfactor_WpK = 0.65 * floorArea_m2; - break; - case D: - lossfactor_WpK = 0.85 * floorArea_m2; - break; - case E: - lossfactor_WpK = 1.05 * floorArea_m2; - break; - case F: - lossfactor_WpK = 1.25 * floorArea_m2; - break; - case G: - lossfactor_WpK = 1.45 * floorArea_m2; - break; - case NONE: - default: - lossfactor_WpK = uniform (0.85, 1.2) * floorArea_m2; +//Heat demand from PBL referentiewoningen used for HeatCapacity and lossFactor_WpK +if(heatDemand_kwhpa > 0){ //Not missing in data + lossfactor_WpK = heatDemand_kwhpa / 63; // = manually calibrated value tested on 3 neighborhoods +} +else{ + switch (parentGC.p_energyLabel){ + case A: + lossfactor_WpK = 0.35 * floorArea_m2; + break; + case B: + lossfactor_WpK = 0.45 * floorArea_m2; + break; + case C: + lossfactor_WpK = 0.65 * floorArea_m2; + break; + case D: + lossfactor_WpK = 0.85 * floorArea_m2; + break; + case E: + lossfactor_WpK = 1.05 * floorArea_m2; + break; + case F: + lossfactor_WpK = 1.25 * floorArea_m2; + break; + case G: + lossfactor_WpK = 1.45 * floorArea_m2; + break; + case NONE: + default: + lossfactor_WpK = uniform (0.85, 1.2) * floorArea_m2; + } } - lossfactor_WpK = roundToDecimal(lossfactor_WpK,2); solarAbsorptionFactor_m2 = floorArea_m2 * 0.01; //solar irradiance [W/m2] -heatCapacity_JpK = floorArea_m2 * 50000; +heatCapacity_JpK = floorArea_m2 * 50000; //What is the 5000 based upon? parentGC.p_BuildingThermalAsset = new J_EABuilding( parentGC, maxPowerHeat_kW, lossfactor_WpK, energyModel.p_timeStep_h, initialTemp, heatCapacity_JpK, solarAbsorptionFactor_m2 ); energyModel.c_ambientDependentAssets.add( parentGC.p_BuildingThermalAsset ); @@ -3353,17 +3368,17 @@ List f_getBuildingsInSubScope(List initialBuilding GCH.p_eigenOprit = houseBuildingData.has_private_parking() != null ? houseBuildingData.has_private_parking() : false; //Nageisoleerd - if (houseBuildingData.energy_label() != null) { + if (houseBuildingData.energy_label() != null){ // && houseBuildingData.energy_label() != OL_GridConnectionIsolationLabel.NONE) { GCH.p_energyLabel = houseBuildingData.energy_label(); } else { if (GCH.p_bouwjaar < 1980) { GCH.p_energyLabel = OL_GridConnectionIsolationLabel.D; } - else if (GCH.p_bouwjaar < 2000) { + else if (GCH.p_bouwjaar < 1996) { GCH.p_energyLabel = OL_GridConnectionIsolationLabel.C; } - else if (GCH.p_bouwjaar < 2015) { + else if (GCH.p_bouwjaar < 2008) { GCH.p_energyLabel = OL_GridConnectionIsolationLabel.B; } else { @@ -3427,27 +3442,48 @@ else if (GCH.p_bouwjaar < 2015) { GCH.p_floorSurfaceArea_m2 = houseBuildingData.address_floor_surface_m2(); //Instantiate energy assets - double jaarlijksElectriciteitsVerbruik; - double jaarlijksGasVerbruik; + double annualElectricityConsumption_kwhpa; + double annualNaturalGasConsumption_kwhpa; + double annualSpaceHeatingConsumption_kwhpa; + double annualDHWConsumption_kwhpa; + double annualCookingConsumption_kwhpa; try { - jaarlijksElectriciteitsVerbruik = houseBuildingData.electricity_consumption_kwhpa(); + annualElectricityConsumption_kwhpa = houseBuildingData.electricity_consumption_kwhpa(); } catch (NullPointerException e){ - jaarlijksElectriciteitsVerbruik = Double.valueOf(uniform_discr(1200, 3800)); + annualElectricityConsumption_kwhpa = Double.valueOf(uniform_discr(1200, 3800)); } try { - jaarlijksGasVerbruik = houseBuildingData.gas_consumption_kwhpa(); + annualNaturalGasConsumption_kwhpa = houseBuildingData.gas_consumption_kwhpa(); } catch (NullPointerException e){ - jaarlijksGasVerbruik = Double.valueOf(uniform_discr(600, 2000)); + annualNaturalGasConsumption_kwhpa = Double.valueOf(uniform_discr(600, 2000)); + } + try { + annualSpaceHeatingConsumption_kwhpa = houseBuildingData.space_heating_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualSpaceHeatingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.85; //assumed share gas space heating + traceln("DOESTHISHAPPEN??"); + } + try { + annualDHWConsumption_kwhpa = houseBuildingData.dhw_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualDHWConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.1; //assumed share gas dhw heating + } + try { + annualCookingConsumption_kwhpa = houseBuildingData.cooking_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualCookingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.05; //assumed share gas cooking } - //GCH.p_initialPVpanels = houseBuildingData.pv_default(); GCH.v_liveAssetsMetaData.initialPV_kW = houseBuildingData.pv_installed_kwp() != null ? houseBuildingData.pv_installed_kwp() : 0; GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.v_liveAssetsMetaData.initialPV_kW > 0 ? GCH.v_liveAssetsMetaData.initialPV_kW : houseBuildingData.pv_potential_kwp(); // To prevent sliders from changing outcomes // TODO: Above we load in data of gas use, but the houses always have a thermal model?? - f_addEnergyAssetsToHouses(GCH, jaarlijksElectriciteitsVerbruik ); + f_addEnergyAssetsToHouses(GCH, annualElectricityConsumption_kwhpa, annualSpaceHeatingConsumption_kwhpa, annualDHWConsumption_kwhpa, annualCookingConsumption_kwhpa ); i ++; } @@ -3462,16 +3498,17 @@ else if (GCH.p_bouwjaar < 2015) { /*ALCODEEND*/} -double f_addEnergyAssetsToHouses(GCHouse house,double jaarlijksElectriciteitsVerbruik) +double f_addEnergyAssetsToHouses(GCHouse house,double electricityDemand_kwhpa,double spaceHeatingDemand_kwhpa,double dhwDemand_kwhpa,double cookingDemand_kwhpa) {/*ALCODESTART::1749728889986*/ //Add generic electricity demand profile GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals( house.p_parentNodeElectricID)); + if ( ! gn.p_hasProfileData ){ - f_addElectricityDemandProfile(house, jaarlijksElectriciteitsVerbruik, null, false, "default_house_electricity_demand_fr"); + f_addElectricityDemandProfile(house, electricityDemand_kwhpa, null, false, "default_house_electricity_demand_fr"); } //Add building heat model and asset -f_addBuildingHeatModel(house, house.p_floorSurfaceArea_m2); +f_addBuildingHeatModel(house, house.p_floorSurfaceArea_m2, spaceHeatingDemand_kwhpa); //Determine required heating capacity for the heating asset double maximalTemperatureDifference_K = 30.0; // Approximation @@ -3485,9 +3522,8 @@ else if (GCH.p_bouwjaar < 2015) { house.p_heatingManagement.setHeatingPreferences(f_getHouseHeatingPreferences()); //Add hot water and cooking demand -f_addHotWaterDemand(house, house.p_floorSurfaceArea_m2); -double yearlyCookingDemand_kWh = uniform_discr(200,600); -f_addCookingAsset(house, OL_EnergyAssetType.GAS_PIT, yearlyCookingDemand_kWh); +f_addHotWaterDemand(house, house.p_floorSurfaceArea_m2, dhwDemand_kwhpa); +f_addCookingAsset(house, OL_EnergyAssetType.GAS_PIT, cookingDemand_kwhpa); //Add pv diff --git a/_alp/Agents/Zero_Loader/Code/Functions.xml b/_alp/Agents/Zero_Loader/Code/Functions.xml index 8d4de22..1e2947f 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.xml +++ b/_alp/Agents/Zero_Loader/Code/Functions.xml @@ -1389,7 +1389,7 @@ verbruik = levering + productie - teruglevering]]> - + @@ -1416,6 +1416,10 @@ verbruik = levering + productie - teruglevering]]> + + + + @@ -1440,6 +1444,10 @@ verbruik = levering + productie - teruglevering]]> + + + + @@ -1499,7 +1507,19 @@ verbruik = levering + productie - teruglevering]]> - + + + + + + + + + + + + + diff --git a/_alp/Classes/Class.Building_data.java b/_alp/Classes/Class.Building_data.java index 2dafa6b..a0c14f9 100644 --- a/_alp/Classes/Class.Building_data.java +++ b/_alp/Classes/Class.Building_data.java @@ -25,6 +25,9 @@ public class Building_data { Double contracted_capacity_kw; Double electricity_consumption_kwhpa; Double gas_consumption_kwhpa; + Double space_heating_consumption_kwhpa; + Double dhw_consumption_kwhpa; + Double cooking_consumption_kwhpa; Double pv_installed_kwp; Double pv_potential_kwp; OL_GridConnectionIsolationLabel energy_label; From d7ceb772faa35963d38ecb1d66b7aa3d97849cd9 Mon Sep 17 00:00:00 2001 From: Naud Loomans <38351577+naudloomans@users.noreply.github.com> Date: Fri, 14 Nov 2025 16:44:14 +0100 Subject: [PATCH 2/8] Functions set to public to access from project interface --- _alp/Agents/Zero_Interface/Code/Functions.java | 15 ++++++++++----- _alp/Agents/Zero_Interface/Code/Functions.xml | 2 +- _alp/Agents/tabHeating/Code/Functions.xml | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/_alp/Agents/Zero_Interface/Code/Functions.java b/_alp/Agents/Zero_Interface/Code/Functions.java index 58ff532..12600b1 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.java +++ b/_alp/Agents/Zero_Interface/Code/Functions.java @@ -758,7 +758,10 @@ public void write(int b) { double f_updateMainInterfaceSliders() {/*ALCODESTART::1718288402102*/ uI_Tabs.f_updateSliders(); -uI_EnergyHub.uI_Tabs.f_updateSliders(); +if (uI_EnergyHub != null && uI_EnergyHub.uI_Tabs != null) { + uI_EnergyHub.uI_Tabs.f_updateSliders(); +} + /*ALCODEEND*/} double f_selectCharger(GCPublicCharger charger,GIS_Object objectGIS) @@ -3393,8 +3396,9 @@ else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ double f_setScenario_Future() {/*ALCODESTART::1761119479231*/ -f_setCompaniesScenario(c_scenarioMap_Future); - +if(c_scenarioMap_Future != null){ + f_setCompaniesScenario(c_scenarioMap_Future); +} //Set specifc assets active/non-active f_projectSpecificScenarioSettings("Future"); @@ -3404,8 +3408,9 @@ else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ double f_setScenario_Current() {/*ALCODESTART::1761119479233*/ -f_setCompaniesScenario(c_scenarioMap_Current); - +if(c_scenarioMap_Current != null){ + f_setCompaniesScenario(c_scenarioMap_Current); +} //Reset sliders for households if(project_data.project_type() == OL_ProjectType.RESIDENTIAL && p_residentialScenario_Current != null){ f_setResidentialScenario_Current(); diff --git a/_alp/Agents/Zero_Interface/Code/Functions.xml b/_alp/Agents/Zero_Interface/Code/Functions.xml index fb0fefe..82c1b4d 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.xml +++ b/_alp/Agents/Zero_Interface/Code/Functions.xml @@ -2570,7 +2570,7 @@ true - + VOID double 1762775121080 diff --git a/_alp/Agents/tabHeating/Code/Functions.xml b/_alp/Agents/tabHeating/Code/Functions.xml index 35bc221..5056c9d 100644 --- a/_alp/Agents/tabHeating/Code/Functions.xml +++ b/_alp/Agents/tabHeating/Code/Functions.xml @@ -138,7 +138,7 @@ - + RETURNS_VALUE double 1749116448649 @@ -477,7 +477,7 @@ - + VOID double 1760368810352 From f9651316f4e6725e429c3ceca64f8a24c2238183 Mon Sep 17 00:00:00 2001 From: Naud Loomans <38351577+naudloomans@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:12:38 +0100 Subject: [PATCH 3/8] Create Building_data.java --- _alp/Classes/Building_data.java | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 _alp/Classes/Building_data.java diff --git a/_alp/Classes/Building_data.java b/_alp/Classes/Building_data.java new file mode 100644 index 0000000..a0c14f9 --- /dev/null +++ b/_alp/Classes/Building_data.java @@ -0,0 +1,39 @@ +/** + * Building_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Building_data { + //Database column name + String address_id; + String building_id; + String streetname; + Integer house_number; + String house_letter; + String house_addition; + String postalcode; + String city; + Integer build_year; + String status; + String purpose; + Double address_floor_surface_m2; + Double polygon_area_m2; + String gc_id; + String annotation; + String extra_info; + Double contracted_capacity_kw; + Double electricity_consumption_kwhpa; + Double gas_consumption_kwhpa; + Double space_heating_consumption_kwhpa; + Double dhw_consumption_kwhpa; + Double cooking_consumption_kwhpa; + Double pv_installed_kwp; + Double pv_potential_kwp; + OL_GridConnectionIsolationLabel energy_label; + Boolean has_private_parking; + String gridnode_id; + Double latitude; + Double longitude; + String polygon; +} \ No newline at end of file From 63c15305c4410b54d8cbcbdd621520c4771be97d Mon Sep 17 00:00:00 2001 From: Naud Loomans <38351577+naudloomans@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:33:27 +0100 Subject: [PATCH 4/8] Error in commit --- Zero_Interface-Loader.alpx.tmp | 65945 +++++++++++++++++++++++++++++++ 1 file changed, 65945 insertions(+) create mode 100644 Zero_Interface-Loader.alpx.tmp diff --git a/Zero_Interface-Loader.alpx.tmp b/Zero_Interface-Loader.alpx.tmp new file mode 100644 index 0000000..ebe62b8 --- /dev/null +++ b/Zero_Interface-Loader.alpx.tmp @@ -0,0 +1,65945 @@ + + + + 1658477103134 + Zero_Interface-Loader + 6 + zerointerfaceloader + Hour + + + 1658478100573 + OL_FilterOptionsGC + + + + + + + + + + + + + + + + 1660743989698 + OL_GISBuildingTypes + + + + + + + 1660743989798 + OL_ProjectType + + + + + 1667742453792 + OL_UNUSED3 + true + + + 1675025163072 + OL_UNUSED4 + true + + + 1709718356700 + EnergyDemandTab + + + + + + + + 1726584216682 + OL_SurveyType + + + + + + 1753086929090 + OL_MapOverlayTypes + + + + + + + + + + + + 1754045642067 + Tabs + + + 1754045666929 + Dashboards + + + 1754045711603 + DatabasePackages + + + 1761915047244 + DataClasses + + + + + 1726584205528 + AVGC_data + false + + 1726584205523 + 1726584205523 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089981 + true + 1710835200000 + + 0 + HOUR + + + 1 + HOUR + + + + 1726584205524 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1726584205534 + 1726584205728 + + + 1726584205532 + hourOfYearPerMonth + Hour of year per month (not leap year) --> Houdt dit rekening met zomer/winter tijd? + 1070 + 150 + + false + true + true + + int[] + + new int[] {0, 744, 1392, 2136, 2856, 3600, 4320, 5064, 5808, 6528, 7272, 7992} + + + + + 1726584205579 + p_avgHouseConnectionCapacity_kW + https://www.enexis.nl/aansluitingen/welke-aansluiting-heb-ik-nodig +3*25 A --> 3*25*230 = 17.25 kW + 50 + 150 + + false + true + true + + double + NONE + false + + 17.25 + + + 1726584205577 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205582 + p_avgHouseHeatingMethod + 50 + 168.976 + + false + true + true + + OL_GridConnectionHeatingType + NONE + false + + OL_GridConnectionHeatingType.GAS_BURNER + + + 1726584205580 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205585 + p_avgUtilityConnectionCapacity_kW + https://www.enexis.nl/aansluitingen/welke-aansluiting-heb-ik-nodig +-> 17.25 -> set to 17, to prevent slider errors (stepsize cant be double, otherwise to small for user experience) + +--> 17.25 is way to small -> 3x80 is taken : 55 kW + 50 + 330 + + false + true + true + + double + NONE + false + + 55 + + + 1726584205583 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205588 + p_avgUtilityHeatingMethod + 50 + 310 + + false + true + true + + OL_GridConnectionHeatingType + NONE + false + + OL_GridConnectionHeatingType.GAS_BURNER + + + 1726584205586 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205591 + p_avgHouseElectricityConsumption_kWh_yr + - https://www.milieucentraal.nl/energie-besparen/inzicht-in-je-energierekening/gemiddeld-energieverbruik/ +- https://www.overstappen.nl/energie/gemiddeld-energieverbruik/ +--> 2479 kWh/yr is the average of NL +--> Overwrite if numbers are available in the project selection agent + + 50 + 128.976 + + false + true + true + + double + NONE + false + + 2479 + + + 1726584205589 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205594 + p_avgHouseGasConsumption_m3_yr + - https://www.overstappen.nl/energie/gemiddeld-energieverbruik/ +- https://www.milieucentraal.nl/energie-besparen/inzicht-in-je-energierekening/gemiddeld-energieverbruik/ + --> 1169 m3 is the average of NL +--> Overwrite if numbers are available in the project selection agent + + 50 + 108.976 + + false + true + true + + double + NONE + false + + 1169 + + + 1726584205592 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205597 + p_shareOfElectricVehicleOwnership + share of EVs in the netherlands. --> 5% (feb 2024). + +https://www.rvo.nl/onderwerpen/elektrisch-vervoer/stand-van-zaken + 50 + 188.976 + + false + true + true + + double + NONE + false + + 0.05 + + + 1726584205595 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205600 + p_ratioHouseInstalledPV + How many houses have installed PV in The Netherlands: 25% (end of 2022) +https://solarmagazine.nl/nieuws-zonne-energie/i34591/de-harde-cijfers-drenthe-verstevigt-koppositie-38-procent-woningen-heeft-zonnepanelen + 50 + 210 + + false + true + true + + double + NONE + false + + 0.25 + + + 1726584205598 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205603 + p_avgHousePVInstallationPower_kWp + volgens gegevens van het CBS (Centraal Bureau voor de Statistiek) en RVO (Rijksdienst voor Ondernemend Nederland), was het gemiddelde geïnstalleerde piekvermogen van residentiële zonnepanelen in Nederland in 2020 ongeveer 4 kilowatt piek (kWp) per huishouden. --> 4kWp + 50 + 230 + + false + true + true + + double + NONE + false + + 4 + + + 1726584205601 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205606 + p_avgEVStorageCar_kWh + -https://www.eonenergy.com/electric-vehicle-charging/running-costs-and-benefits/battery-capacity-and-lifespan.html + +-https://www.edi.be/blog/laadstation-3/hoe-is-het-gesteld-met-de-autonomie-van-de-elektrische-auto-in-2023-12 + +40 kWh (kleine autos) + +50-80 kWh (middel grote autos) + +80-100 kWh (grote autos) + +Minimaal: 116 kWh minimum nodig, anders soms negatieve SOC. + 570 + 220 + + false + true + true + + double + NONE + false + + 116 + + + 1726584205604 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205609 + p_avgEVMaxChargePowerCar_kW + Bron??? + 570 + 150 + + false + true + true + + double + NONE + false + + 11 + + + 1726584205607 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205612 + p_avgEVStorageVan_kWh + ???? + 570 + 240 + + false + true + true + + double + NONE + false + + 200 + + + 1726584205610 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205615 + p_avgEVStorageTruck_kWh + ?? + 570 + 260 + + false + true + true + + double + NONE + false + + 500 + + + 1726584205613 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205618 + p_avgEVMaxChargePowerVan_kW + Bron??? + 570 + 170 + + false + true + true + + double + NONE + false + + 11 + + + 1726584205616 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205621 + p_avgEVMaxChargePowerTruck_kW + Bron??? + 570 + 190 + + false + true + true + + double + NONE + false + + 200 + + + 1726584205619 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205624 + p_avgEVEnergyConsumptionCar_kWhpkm + https://ev-database.org/nl/auto/1555/Tesla-Model-3: 0.142 kWh/km + +https://www.vattenfall.nl/elektrische-auto/verbruik/ + +--> Tesla model 3: 15.1 kWh per 100 km --> 0.151 kWh/km +--> Kia niro: 17.1 kWh per 100 km --> 0.171 kWh/km +--> taking 0.16 kWh/km as the average + 570 + 290 + + false + true + true + + double + NONE + false + + 0.16 + + + 1726584205622 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205627 + p_avgEVEnergyConsumptionVan_kWhpkm + praktijkverbruik van 26,9 kWh per 100 kilometer: +https://www.debedrijfswagenadviseurs.nl/praktijkverbruik-elektrische-bedrijfswagen/ + 570 + 310 + + false + true + true + + double + NONE + false + + 0.269 + + + 1726584205625 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205630 + p_avgEVEnergyConsumptionTruck_kWhpkm + https://www.elektrischevrachtwagen.nl/post/hoe-ver-kan-een-elektrische-vrachtwagen-rijden, https://topsectorlogistiek.nl/wp-content/uploads/2024/06/20240126_Stappenplan-ZE-vrachtwagens.pdf +0.9 - 1.7 kWh/km +--> pak gemiddelde: 1.3 + 570 + 330 + + false + true + true + + double + NONE + false + + 1.3 + + + 1726584205628 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205633 + p_gas_kWhpm3 + - https://www.greenchoice.nl/stroom-en-gas/bosgecompenseerd-gas/hoeveel-is-1-kuub-gas/ +- https://econvice.nl/op-gas-of-elektra-verwarmen-wat-is-gunstig/ +- https://www.joostdevree.nl/shtmls/calorische_waarde.shtml + 1070 + 230 + + false + true + true + + double + NONE + false + + 9.77 + + + 1726584205631 + + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205636 + p_hydrogenEnergyDensity_kWh_Nm3 + https://www.enapter.com/kb_post/what-is-the-energy-content-of-hydrogen + +LHV = 3.00 kWh/Nm3 +HHV = 3.54 kWh/Nm3 + 1590 + 160 + + false + true + true + + double + NONE + false + + 3.00 + + + 1726584205634 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205639 + p_hydrogenDensity_kg_Nm3 + https://keengas.com/gases/hydrogen/ + 1590 + 210 + + false + true + true + + double + NONE + false + + 0.08988 + + + 1726584205637 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205642 + p_oxygenDensity_kg_Nm3 + http://www.uigi.com/o2_conv.html + 1590 + 230 + + false + true + true + + double + NONE + false + + 1.4291 + + + 1726584205640 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205645 + p_oxygenProduction_kgO2pkgH2 + H20 = 2H + O +MM H = 1.008 g/mol +MM O = 16 g/mol +--> 1.008*2/16 = 0.126. +0.126 g waterstof per g water conversie. +1-0.126 = 0.874 g zuurstof per gram water conversie. + +--> 1/0.126 =7.9365 gram zuurstof productie per gram waterstof productie. + 1590 + 260 + + false + true + true + + double + NONE + false + + 7.9365 + + + 1726584205643 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205648 + p_hydrogenSpecificEnergy_kWh_kg + https://www.cenex.co.uk/app/uploads/2021/05/Intro-to-hydrogen-1.pdf --> 33.6 + 1590 + 180 + + false + true + true + + double + NONE + false + + 33.6 + + + 1726584205646 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205651 + p_diesel_kWhpl + https://www.joostdevree.nl/shtmls/calorische_waarde.shtml + 1070 + 250 + + false + true + true + + double + NONE + false + + 10 + + + 1726584205649 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205654 + p_avgDieselConsumptionCar_kmpl + https://www.unitedconsumers.com/blog/auto/zuinig-rijden.jsp + 570 + 400 + + false + true + true + + double + NONE + false + + 21 + + + 1726584205652 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205657 + p_avgGasolineConsumptionCar_kmpl + https://www.unitedconsumers.com/blog/auto/zuinig-rijden.jsp + 570 + 420 + + false + true + true + + double + NONE + false + + 15 + + + 1726584205655 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205660 + p_gasoline_kWhpl + https://www.joostdevree.nl/shtmls/calorische_waarde.shtml + 1070 + 270 + + false + true + true + + double + NONE + false + + 8.8 + + + 1726584205658 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205663 + p_avgDieselConsumptionCar_kWhpkm + 570 + 450 + + false + true + true + + double + NONE + false + + p_diesel_kWhpl/p_avgDieselConsumptionCar_kmpl + + + 1726584205661 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205666 + p_avgGasolineConsumptionCar_kWhpkm + 570 + 470 + + false + true + true + + double + NONE + false + + p_gasoline_kWhpl/p_avgGasolineConsumptionCar_kmpl + + + 1726584205664 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205669 + p_avgDieselConsumptionVan_kmpl + https://www.webfleet.com/nl_nl/webfleet/blog/hoeveel-diesel-verbruikt-een-vrachtwagen-per-kilometer/ + +11 liter per 100 km = 9.1 km per liter. + + 570 + 510 + + false + true + true + + double + NONE + false + + 9.1 + + + 1726584205667 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205672 + p_avgDieselConsumptionVan_kWhpkm + 570 + 530 + + false + true + true + + double + NONE + false + + p_diesel_kWhpl/p_avgDieselConsumptionVan_kmpl + + + 1726584205670 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205675 + p_avgDieselConsumptionTruck_kmpl + https://www.webfleet.com/nl_nl/webfleet/blog/hoeveel-diesel-verbruikt-een-vrachtwagen-per-kilometer/ + +--> 25 - 30 - 40 liter per 100 km. = 4 - 3.33 - 2.5 km per l +Heavely dependend on load, city/highway, etc. +For now: Picking 3.33 km per l + 570 + 560 + + false + true + true + + double + NONE + false + + 3.33 + + + 1726584205673 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205678 + p_avgDieselConsumptionTruck_kWhpkm + 570 + 580 + + false + true + true + + double + NONE + false + + p_diesel_kWhpl/p_avgDieselConsumptionTruck_kmpl + + + 1726584205676 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205681 + p_avgCOPHeatpump + https://www.vaillant.be/consumenten/ons-advies/blog/het-rendement-van-een-warmtepomp/ + +Gemiddelde COP is 4. + 70 + 520 + + false + true + true + + double + NONE + false + + 4 + + + 1726584205679 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205684 + p_avgUtilityPVPower_kWp + FIND SOURCE!!! ???????? + 50 + 350 + + false + true + true + + double + NONE + false + + 1 + + + 1726584205682 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205687 + p_ratioElectricTrucks + Ratio of how many trucks are electric vs diesel. +??? +https://nos.nl/artikel/2483604-elektrische-vrachtwagens-blijven-achter-door-complexe-serie-aan-uitdagingen --> 'volgens cbs nog geen half procent.' + 50 + 370 + + false + true + true + + double + NONE + false + + 0.005 + + + 1726584205685 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205690 + p_avgCompanyHeatingMethod + Source?? --> Should definatly be still the case in 2024 + 50 + 390 + + false + true + true + + OL_GridConnectionHeatingType + NONE + false + + OL_GridConnectionHeatingType.GAS_BURNER + + + 1726584205688 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205693 + p_avgPVPower_kWpm2 + https://hallostroom.nl/zonnepanelen/opbrengst/per-m2/ --> 177 W/m2 +https://www.zonneplan.nl/kenniscentrum/zonnepanelen/vermogen --> 212 W/m2 +https://www.zonnepanelennoord.nl/vermogen-zonnepanelen/ --> 215 W/m2 + 50 + 1020 + + false + true + true + + double + NONE + false + + 0.2 + + + 1726584205691 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205696 + p_avgRatioBatteryCapacity_v_Power + Average ratio of battery capacity over battery power. +--> If battery capacity (in kWh) is twice the battery power (in kW) --> ratio = 2. + 50 + 1120 + + false + true + true + + double + NONE + false + + 2 + + + 1726584205694 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205699 + p_avgHydrogenConsumptionCar_kWhpkm + https://magnuscmd.com/hydrogen-fuel-cell-vehicles-a-threat-to-the-electric-car/ + +--> avg: 29 kWh per 100 km --> 0.29 kWh/km + + 570 + 640 + + false + true + true + + double + NONE + false + + 0.29 + + + 1726584205697 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205702 + p_avgHydrogenConsumptionVan_kWhpkm + https://www.huiskes-kokkeler.nl/bedrijfswagens/volkswagen-bedrijfswagens/modellen/crafter-hymotion-concept +--> 1.4 kg Waterstof per 100 km = 0.014 kg/km +--> 0.014 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 0.47 kWh/kg + 570 + 660 + + false + true + true + + double + NONE + false + + 0.47 + + + 1726584205700 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205705 + p_avgHydrogenConsumptionTruck_kWhpkm + https://transportenmilieu.nl/nieuwsarchief/item/hyundai-op-waterstof-voor-havi-zwitserland +--> 6.6 kg Waterstof per 100 km = 0.066 kg/km +--> 0.066 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 2.22 kWh/kg + 570 + 680 + + false + true + true + + double + NONE + false + + 2.22 + + + 1726584205703 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205708 + p_avgRatioRoofPotentialPV + value for the ratio of the avg Usable Roof Area For PV fr + 50 + 1040 + + false + true + true + + double + NONE + false + + 0.5 + + + 1726584205706 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205711 + p_avgEfficiencyHeatpump_fr + Efficiency (eta_r) used to calculate the COP in the energy asset based on temperature differences. + +'0.5' comes from old code, no source found for it yet. + 70 + 540 + + false + true + true + + double + NONE + false + + 0.5 + + + 1726584205709 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205714 + p_avgOutputTemperatureElectricHeatpump_degC + https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/?utm_source=chatgpt.com - max 45-55 +https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 graden afgifte bij -10 graden. + +-> Voor nu gemiddeld 40 genomen. + 70 + 580 + + false + true + true + + double + NONE + false + + 40 + + + 1726584205712 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205717 + p_avgEfficiencyGasBurner_fr + Average heating efficiency of a gas burner. +https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas energy density of 8.8 kWh/m3 (lower heating value), we use higher heating value: 9.77 -> 8.8*1.04/9.77 = 0.94 + 70 + 650 + + false + true + true + + double + NONE + false + + 0.94 + + + 1726584205715 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205720 + p_avgOutputTemperatureGasBurner_degC + Average output temperature of a gas burner unit in degC. + +--> Source? + 70 + 670 + + false + true + true + + double + NONE + false + + 90 + + + 1726584205718 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205723 + p_avgEfficiencyHydrogenBurner_fr + Average heating efficiency of a hydrogen burner. + +- https://h2sciencecoalition.com/blog/hydrogen-for-heating-a-comparison-with-heat-pumps-part-1/ + +- https://www.csrf.ac.uk/blog/hydrogen-for-heating/ + 70 + 740 + + false + true + true + + double + NONE + false + + 0.90 + + + 1726584205721 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726584205726 + p_avgOutputTemperatureHydrogenBurner_degC + Average output temperature of a hydrogen burner unit in degC. + +--> Source? + 70 + 760 + + false + true + true + + double + NONE + false + + 90 + + + 1726584205724 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1726746753360 + p_avgVehiclesPerChargePoint + 50 + 1190 + + false + true + true + + int + NONE + false + + 5 + + + 1726746753358 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1728032263201 + p_avgAnnualTravelDistanceVan_km + https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-bestelautos -> 4 jaar oude bestlbussen gemiddeld 22.2 duizend km in een jaar. + 570 + 790 + + false + true + true + + double + NONE + false + + 22200 + + + 1728032263199 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1728032304301 + p_avgAnnualTravelDistanceCompanyCar_km + https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-personenautos + 570 + 770 + + false + true + true + + double + NONE + false + + 20500 + + + 1728032304299 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1728032305440 + p_avgAnnualTravelDistanceTruck_km + https://www.cbs.nl/nl-nl/cijfers/detail/84651NED + 570 + 810 + + false + true + true + + double + NONE + false + + 54505 + + + 1728032305438 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1728034204646 + p_avgFullLoadHoursPV_hr + Parameter used to estimate the total solar production in a year in a function like: +p_avgFullLoadHoursPV_hr * kWp_of_PV_panels = XXX kWh pv production in a year. + 50 + 1060 + + false + true + true + + double + NONE + false + + 920 + + + 1728034204644 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1728390983761 + p_avgCompanyElectricityConsumption_kWhpm2 + https://www.odyssee-mure.eu/publications/efficiency-by-sector/services/offices-specific-energy-and-electricity-consumption.html + +--> 188 kWh/m2 for offices in NL + 50 + 410 + + false + true + true + + double + NONE + false + + 188 + + + 1728390983759 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1728391035656 + p_avgCompanyGasConsumption_m3pm2 + https://publications.tno.nl/publication/34629408/3xJn98/e16056.pdf -> page 28 + +9 m3 p m2 for label A +12 m3 p m2 for label B +to 18 m3 p m2 for label G + +--> take 7 for now. + 50 + 430 + + false + true + true + + double + NONE + false + + 7 + + + 1728391035654 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1728394646404 + p_avgCompanyHeatConsumption_kWhpm2 + https://www.wearepossible.org/parks-toolkit/5-investigating-heat-demand + +--> estimated benchmark 100 kWh/m2 + 50 + 450 + + false + true + true + + double + NONE + false + + 100 + + + 1728394646402 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1733155392379 + p_avgSolarFieldPower_kWppha + 1000 + 50 + 1080 + + false + true + true + + double + NONE + false + + 1000 + + + 1733155392377 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1745316053417 + p_avgEfficiencyCHP_thermal_fr + 50% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) +Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf + 70 + 830 + + false + true + true + + double + NONE + false + + 0.5 + + + 1745316053415 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1745316110677 + p_avgEfficiencyCHP_electric_fr + 42% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) +Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf + 70 + 850 + + false + true + true + + double + NONE + false + + 0.42 + + + 1745316110675 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1745326622582 + p_avgOutputTemperatureCHP_degC + Average output temperature of a hydrogen burner unit in degC. + +--> Source? + 70 + 870 + + false + true + true + + double + NONE + false + + 90 + + + 1745326622580 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1747314895126 + p_avgEfficiencyDistrictHeatingDeliverySet_fr + Average heating efficiency of a district heating delivery set + + 70 + 920 + + false + true + true + + double + NONE + false + + 0.99 + + + 1747314895124 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1747314895129 + p_avgOutputTemperatureDistrictHeatingDeliverySet_degC + Average output temperature of a districtheating delivery set in degC. + +70 -> https://www.nplw.nl/warmtenet/warmtetechnieken/middentemperatuur-warmtenet + 70 + 940 + + false + true + true + + double + NONE + false + + 70 + + + 1747314895127 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1749653366667 + p_v2gProbability + SOURCE!?!?!?! + 570 + 125 + + false + true + true + + double + NONE + false + + 0.2 + + + 1749653366665 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1750246849611 + p_v1gProbability + SOURCE!?!?!?! + 570 + 105 + + false + true + true + + double + NONE + false + + 0.8 + + + 1750246849609 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1750341289733 + p_avgEVsPerPublicCharger + TODO: Determine this value + 570 + 860 + + false + true + true + + int + NONE + false + + 2 + + + 1750341289731 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1751893521012 + p_avgPTPower_kWpm2 + 570 + 930 + + false + true + true + + double + NONE + false + + 0.5 + + + 1751893521010 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1751893540583 + p_avgHeatBufferWaterVolumePerHPPower_m3pkW + https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 25 liter per kW warmtepomp vermogen = 0.025 m3/kW + 570 + 1080 + + false + true + true + + double + NONE + false + + 0.025 + + + 1751893540581 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1751893810778 + p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 + https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 50 liter per m2 zonnecollector = 0.050 m3/m2 + 570 + 1060 + + false + true + true + + double + NONE + false + + 0.05 + + + 1751893810776 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1751896032002 + p_waterHeatCapacity_JpkgK + https://www.engineeringtoolbox.com/water-thermal-properties-d_162.html -> 4185 J/kg K bij 20 *C + +-> Verschilt eigenlijk met temperatuur, weer net iets lager bij 40 graden (4180), weer 4185 bij 60*C en net iets hoger bij 80 graden. (4197 bij 80 *C). + +Voor nu gekozen voor 4185. + + 1070 + 290 + + false + true + true + + double + NONE + false + + 4185 + + + 1751896032000 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1751905820546 + p_waterDensity_kgpm3 + https://www.sigmaaldrich.com/NL/en/substance/densitystandard998kgm318027732185 --> 998 kg/m3 + 1070 + 310 + + false + true + true + + double + NONE + false + + 998 + + + 1751905820544 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1751906112800 + p_avgMaxHeatBufferTemperature_degC + ??? + 570 + 1010 + + false + true + true + + double + NONE + false + + 85 + + + 1751906112798 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1751906126857 + p_avgMinHeatBufferTemperature_degC + 570 + 1030 + + false + true + true + + double + NONE + false + + 60 + + + 1751906126855 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1753950741783 + p_avgPTPanelSize_m2 + https://www.econo.nl/m24hpcpc-400-h2-heatpipe-zonnecollector-prisma-pro-24-cpc -> +- 4 m2 + 570 + 950 + + false + true + true + + double + NONE + false + + 4 + + + 1753950741781 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1754309475986 + p_avgRatioHouseBatteryStorageCapacity_v_PVPower + https://www.essent.nl/thuisbatterij/capaciteit-thuisbatterij : Essent: "Over het algemeen kun je ervan uitgaan dat een thuisbatterij zo'n 1 à 1,5 kWh capaciteit nodig heeft per kWp zonnepanelen vermogen. " + 50 + 1140 + + false + true + true + + double + NONE + false + + 1.25 + + + 1754309475984 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1755767836354 + p_avgNrOfCarsPerHouse + https://opendata.cbs.nl/#/CBS/nl/dataset/85039NED/table?searchKeywords=motorvoertuigen -> 1.1 + 50 + 250 + + false + true + true + + double + NONE + false + + 1.1 + + + 1755767836352 + + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1755873729807 + p_avgAnnualTravelDistancePrivateCar_km + https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-personenautos + 570 + 730 + + false + true + true + + double + NONE + false + + 11200 + + + 1755873729805 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1755874747343 + p_avgAnnualTravelDistanceSecondVSFirstCar_fr + Scaling factor used to scale down the average annual travel distance of the additional cars for households that have multiple cars. SOURCE!??? + 570 + 750 + + false + true + true + + double + NONE + false + + 0.6 + + + 1755874747341 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1759233211509 + map_yearlySummerWinterTimeStartHour + Map that contains data, with key per year, and value a pair where pair.getFirst() == summertimeStartHour and pair.getSecond() == winterTimeStartHour. + 1070 + 400 + + false + true + true + + Map<Integer, Pair<Double, Double>> + NONE + false + + Map.of( +2023, new Pair<>(2018.0, 7247.0), +2024, new Pair<>(2162.0, 7203.0), +2025, new Pair<>(2114.0, 7131.0) +) + + + 1759233211507 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760435457613 + p_minHeatpumpElectricCapacity_kW + https://comfortklimaat.nl/collectie/warmtepompen -> Thermisch vermogen is minimaal 4. +https://www.bluesolid.nl/warmtepomp-monoblock-9-kw-1ph.html -> Thermisch vermogen van minimaal 5. +https://www.dewarmte.nl/all-electric-warmtepomp/ -> thermisch vermogen van 2-8 kW. + +-> (4+5+2)/3 -> Gemiddeld ongeveer 3.6 thermisch-> 3.6/3 = 1.2 elektrisch + 70 + 600 + + false + true + true + + double + NONE + false + + 1.2 + + + 1760435457611 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760435475991 + p_minGasBurnerOutputCapacity_kW + https://www.warmteservice.nl/Verwarming/CV-ketel/HR-Combiketel/c/163 -> Minimum ranged van 4 - 7.8 -> gekozen voor 6 + 70 + 690 + + false + true + true + + double + NONE + false + + 6 + + + 1760435475989 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760435486680 + p_minHydrogenBurnerOutputCapacity_kW + Zelfde gekozen als gasbrander. + 70 + 780 + + false + true + true + + double + NONE + false + + 6 + + + 1760435486678 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760435497667 + p_minDistrictHeatingDeliverySetOutputCapacity_kW + 25 kw is a default set: https://www.acm.nl/nl/energie/warmte-en-koude/warmtetarieven/tarieven-warmte-en-koude + 70 + 960 + + false + true + true + + double + NONE + false + + 25 + + + 1760435497665 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1763396237774 + p_avgOutputTemperatureHybridHeatpump_degC + https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/?utm_source=chatgpt.com - max 45-55 +https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 graden afgifte bij -10 graden. + +-> Voor nu gemiddeld 40 genomen. + 70 + 560 + + false + true + true + + double + NONE + false + + 40 + + + 1763396237772 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + + + VOID + double + 1726584205530 + f_setAVGC_data + 30 + 50 + + false + true + true + J_AVGC_data dataAVGC = new J_AVGC_data(); +zero_Loader.energyModel.avgc_data = dataAVGC; + +dataAVGC.p_avgHouseGasConsumption_m3_yr = p_avgHouseGasConsumption_m3_yr; +dataAVGC.p_avgHouseElectricityConsumption_kWh_yr = p_avgHouseElectricityConsumption_kWh_yr; +dataAVGC.p_avgEVMaxChargePowerVan_kW = p_avgEVMaxChargePowerVan_kW; +dataAVGC.p_avgHouseConnectionCapacity_kW = p_avgHouseConnectionCapacity_kW; +dataAVGC.p_avgHouseHeatingMethod = p_avgHouseHeatingMethod; +dataAVGC.p_avgNrOfCarsPerHouse = p_avgNrOfCarsPerHouse; +dataAVGC.p_ratioEVHousePersonalCars = p_shareOfElectricVehicleOwnership; +dataAVGC.p_avgEVMaxChargePowerCar_kW = p_avgEVMaxChargePowerCar_kW; +dataAVGC.p_avgEVMaxChargePowerTruck_kW = p_avgEVMaxChargePowerTruck_kW; +dataAVGC.p_avgEVStorageCar_kWh = p_avgEVStorageCar_kWh; +dataAVGC.p_avgEVStorageVan_kWh = p_avgEVStorageVan_kWh; +dataAVGC.p_avgHousePVInstallationPower_kWp = p_avgHousePVInstallationPower_kWp; +dataAVGC.p_avgEVStorageTruck_kWh = p_avgEVStorageTruck_kWh; +dataAVGC.p_ratioHouseInstalledPV = p_ratioHouseInstalledPV; +dataAVGC.p_gas_kWhpm3 = p_gas_kWhpm3; +dataAVGC.p_diesel_kWhpl = p_diesel_kWhpl; +dataAVGC.p_gasoline_kWhpl = p_gasoline_kWhpl; +dataAVGC.p_waterHeatCapacity_JpkgK = p_waterHeatCapacity_JpkgK; +dataAVGC.p_waterDensity_kgpm3 = p_waterDensity_kgpm3; +dataAVGC.p_avgUtilityHeatingMethod = p_avgUtilityHeatingMethod; +dataAVGC.p_avgUtilityConnectionCapacity_kW = p_avgUtilityConnectionCapacity_kW; +dataAVGC.p_avgUtilityPVPower_kWp = p_avgUtilityPVPower_kWp; +dataAVGC.p_ratioElectricTrucks = p_ratioElectricTrucks; +dataAVGC.p_avgCompanyHeatingMethod = p_avgCompanyHeatingMethod; +dataAVGC.p_avgEVEnergyConsumptionCar_kWhpkm = p_avgEVEnergyConsumptionCar_kWhpkm; +dataAVGC.p_avgEVEnergyConsumptionVan_kWhpkm = p_avgEVEnergyConsumptionVan_kWhpkm; +dataAVGC.p_avgEVEnergyConsumptionTruck_kWhpkm = p_avgEVEnergyConsumptionTruck_kWhpkm; +dataAVGC.p_hydrogenEnergyDensity_kWh_Nm3 = p_hydrogenEnergyDensity_kWh_Nm3; +dataAVGC.p_avgDieselConsumptionCar_kmpl = p_avgDieselConsumptionCar_kmpl; +dataAVGC.p_avgGasolineConsumptionCar_kmpl = p_avgGasolineConsumptionCar_kmpl; +dataAVGC.p_hydrogenSpecificEnergy_kWh_kg = p_hydrogenSpecificEnergy_kWh_kg; +dataAVGC.p_hydrogenDensity_kg_Nm3 = p_hydrogenDensity_kg_Nm3; +dataAVGC.p_oxygenDensity_kg_Nm3 = p_oxygenDensity_kg_Nm3; +dataAVGC.p_avgCOPHeatpump = p_avgCOPHeatpump; +dataAVGC.p_avgEfficiencyHeatpump_fr = p_avgEfficiencyHeatpump_fr; +dataAVGC.p_avgDieselConsumptionCar_kWhpkm = p_avgDieselConsumptionCar_kWhpkm; +dataAVGC.p_oxygenProduction_kgO2pkgH2 = p_oxygenProduction_kgO2pkgH2; +dataAVGC.p_avgGasolineConsumptionCar_kWhpkm = p_avgGasolineConsumptionCar_kWhpkm; +dataAVGC.p_avgDieselConsumptionVan_kmpl = p_avgDieselConsumptionVan_kmpl; +dataAVGC.p_avgDieselConsumptionVan_kWhpkm = p_avgDieselConsumptionVan_kWhpkm; +dataAVGC.p_avgDieselConsumptionTruck_kmpl = p_avgDieselConsumptionTruck_kmpl; +dataAVGC.p_avgDieselConsumptionTruck_kWhpkm = p_avgDieselConsumptionTruck_kWhpkm; +dataAVGC.p_avgOutputTemperatureElectricHeatpump_degC = p_avgOutputTemperatureElectricHeatpump_degC; +dataAVGC.p_avgOutputTemperatureHybridHeatpump_degC = p_avgOutputTemperatureHybridHeatpump_degC; +dataAVGC.p_avgHydrogenConsumptionCar_kWhpkm = p_avgHydrogenConsumptionCar_kWhpkm; +dataAVGC.p_avgEfficiencyGasBurner_fr = p_avgEfficiencyGasBurner_fr; +dataAVGC.p_avgHydrogenConsumptionVan_kWhpkm = p_avgHydrogenConsumptionVan_kWhpkm; +dataAVGC.p_avgHydrogenConsumptionTruck_kWhpkm = p_avgHydrogenConsumptionTruck_kWhpkm; +dataAVGC.p_avgOutputTemperatureGasBurner_degC = p_avgOutputTemperatureGasBurner_degC; +dataAVGC.p_avgEfficiencyHydrogenBurner_fr = p_avgEfficiencyHydrogenBurner_fr; +dataAVGC.p_avgOutputTemperatureHydrogenBurner_degC = p_avgOutputTemperatureHydrogenBurner_degC; +dataAVGC.p_minHeatpumpElectricCapacity_kW = p_minHeatpumpElectricCapacity_kW; +dataAVGC.p_minGasBurnerOutputCapacity_kW = p_minGasBurnerOutputCapacity_kW; +dataAVGC.p_minHydrogenBurnerOutputCapacity_kW = p_minHydrogenBurnerOutputCapacity_kW; +dataAVGC.p_minDistrictHeatingDeliverySetOutputCapacity_kW = p_minDistrictHeatingDeliverySetOutputCapacity_kW; +dataAVGC.p_avgPVPower_kWpm2= p_avgPVPower_kWpm2; +dataAVGC.p_avgRatioRoofPotentialPV = p_avgRatioRoofPotentialPV; +dataAVGC.p_avgRatioBatteryCapacity_v_Power = p_avgRatioBatteryCapacity_v_Power; +dataAVGC.p_avgRatioHouseBatteryStorageCapacity_v_PVPower = p_avgRatioHouseBatteryStorageCapacity_v_PVPower; +dataAVGC.p_avgSolarFieldPower_kWppha = p_avgSolarFieldPower_kWppha; +dataAVGC.p_avgEfficiencyCHP_thermal_fr = p_avgEfficiencyCHP_thermal_fr; +dataAVGC.p_avgEfficiencyCHP_electric_fr = p_avgEfficiencyCHP_thermal_fr; +dataAVGC.p_avgOutputTemperatureCHP_degC = p_avgEfficiencyCHP_thermal_fr; +dataAVGC.p_avgEfficiencyDistrictHeatingDeliverySet_fr = p_avgEfficiencyDistrictHeatingDeliverySet_fr; +dataAVGC.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC = p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; +dataAVGC.p_v1gProbability = p_v1gProbability; +dataAVGC.p_v2gProbability = p_v2gProbability; +dataAVGC.p_avgEVsPerPublicCharger = p_avgEVsPerPublicCharger; +dataAVGC.p_avgPTPower_kWpm2 = p_avgPTPower_kWpm2; +dataAVGC.p_avgPTPanelSize_m2 = p_avgPTPanelSize_m2; +dataAVGC.p_avgMaxHeatBufferTemperature_degC = p_avgMaxHeatBufferTemperature_degC; +dataAVGC.p_avgMinHeatBufferTemperature_degC = p_avgMinHeatBufferTemperature_degC; +dataAVGC.p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 = p_avgHeatBufferWaterVolumePerPTSurface_m3pm2; +dataAVGC.p_avgHeatBufferWaterVolumePerHPPower_m3pkW = p_avgHeatBufferWaterVolumePerHPPower_m3pkW; +dataAVGC.p_avgAnnualTravelDistancePrivateCar_km = p_avgAnnualTravelDistancePrivateCar_km; +dataAVGC.p_avgAnnualTravelDistanceCompanyCar_km = p_avgAnnualTravelDistanceCompanyCar_km; +dataAVGC.p_avgAnnualTravelDistanceVan_km = p_avgAnnualTravelDistanceVan_km; +dataAVGC.p_avgAnnualTravelDistanceTruck_km = p_avgAnnualTravelDistanceTruck_km; + + + + + 1726584205728 + connections + 50 + -50 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1726584830548 + zero_Loader + 50 + -100 + + false + true + true + + zerointerfaceloader + Zero_Loader + + + + + + 1726584205534 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1726584205536 + rect_constants + 1020 + 0 + + false + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 896.894 + 1400 + 0.0 + -1 + null + + + 1726584205538 + rect_avg + 0.737 + 0 + + false + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 1019.263 + 1400 + 0.0 + -1 + null + + + 1726584205540 + txt_houses + 40 + 80 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Average values for houses + + SansSerif + 12 + + + LEFT + + + 1726584205542 + txt_avgCompanies + 40 + 280 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Average values for companies/utilities + + SansSerif + 12 + + + LEFT + + + 1726584205544 + txt_avgEV + 560 + 75 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Average values for Electric Vehicles + + SansSerif + 12 + + + LEFT + + + 1726584205546 + text3 + 1440 + 40 + + false + true + false + true + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Constants + + SansSerif + 24 + + + CENTER + + + 1726584205548 + text4 + 1060 + 200 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energy conversion constants + + SansSerif + 12 + + + LEFT + + + 1726584205550 + text5 + 480 + 40 + + false + true + false + true + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Averages + + SansSerif + 24 + + + CENTER + + + 1726584205552 + rect_hydrogenC + 1560 + 100 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16711681 + null + SOLID + 340 + 200 + 0.0 + -1 + null + + + 1726584205554 + txt_hydrogenC + 1580 + 120 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Hydrogen constants + + SansSerif + 14 + + + LEFT + + + 1726584205556 + txt_avgFossil + 560 + 360 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Average values for Fossil fueled vehicles + + SansSerif + 12 + + + LEFT + + + 1726584205558 + txt_Heatassets + 40 + 470 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Heat assets + + SansSerif + 12 + + + LEFT + + + 1726584205560 + txt_avgPV + 40 + 990 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + PV panels + + SansSerif + 12 + + + LEFT + + + 1726584205562 + txt_avgBat + 40 + 1095 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Batteries + + SansSerif + 12 + + + LEFT + + + 1726584205564 + txt_avgFCV + 560 + 610 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Average values for Hydrogen vehicles + + SansSerif + 12 + + + LEFT + + + 1726584205566 + txt_heatpumps + 60 + 490 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Heatpumps + + SansSerif + 12 + + + LEFT + + + 1726584205568 + txt_gasburners + 60 + 620 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Gasburners + + SansSerif + 12 + + + LEFT + + + 1726584205570 + txt_hydrogenburners + 60 + 710 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Hydrogenburners + + SansSerif + 12 + + + LEFT + + + 1726584205572 + rect_sendToEngine + 10 + 10 + + false + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -65536 + null + SOLID + 170 + 60 + 0.0 + -1 + null + + + 1726584205574 + txt_valuesToEngine + 20 + 20 + + true + true + false + true + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Send values to Engine + + SansSerif + 12 + + + LEFT + + + 1726584205576 + txt_timeC + 1060 + 120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Time constants + + SansSerif + 14 + + + LEFT + + + 1726743791200 + text + 40 + 1160 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Chargingcentres + + SansSerif + 12 + + + LEFT + + + 1728032240347 + txt_avgTravelDistances + 560 + 700 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Average travel distances per vehicle type + + SansSerif + 12 + + + LEFT + + + 1745316061345 + txt_CHP + 60 + 800 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + CHP + + SansSerif + 12 + + + LEFT + + + 1747314897311 + txt_districtHeatingDeliverySet + 60 + 890 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + District Heating delivery set + + SansSerif + 12 + + + LEFT + + + 1751906160194 + txt_avgHeatBuffer + 560 + 980 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Heat Buffer + + SansSerif + 12 + + + LEFT + + + 1751906173848 + txt_avgPT + 560 + 900 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + PT panels + + SansSerif + 12 + + + LEFT + + + 1759233222368 + txt_timeConstants + 1060 + 370 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Time constants + + SansSerif + 12 + + + LEFT + + + + + + + 1709049506453 + tabArea + 1754045642067 + false + + 1709049506461 + 1709049506461 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089980 + true + 1709107200000 + + 0 + HOUR + + + 1 + HOUR + + + + 1709049506456 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1709049506460 + 1709049506454 + + + 1709049506454 + connections + 50 + -50 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1709049506460 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + + + 1722253463895 + tabEHub + public ShapeGroup getGroupHubSliders() { + return this.gr_hubSliders; +} + +public ShapeButton getButton_remove_nfato() { + return this.button_remove_nfato; +} + +public ShapeButton getButton_createEnergyHub() { + return this.button_createEnergyHub; +} + 1754045642067 + + zerointerfaceloader + tabArea + + false + + 1722253463901 + 1722253463901 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089979 + true + 1722326400000 + + 0 + HOUR + + + 1 + HOUR + + + + 1722253463898 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1722253463902 + 1722253463896 + + + 1722256365490 + b_NFATOListener + 740 + 915 + + false + true + true + + boolean + + + + 1722256365499 + v_nfatoFirstGC + 740 + 855 + + false + true + true + + GridConnection + + + + 1722256365507 + v_nfatoSecondGC + 740 + 875 + + false + true + true + + GridConnection + + + + 1722256365515 + b_nfatoWeekendDistinction + 740 + 895 + + false + true + true + + boolean + + false + + + + + + + VOID + boolean + 1722256365452 + f_setNFATO + Sets the relevant parameters in the engine for the NFATO. The first selected GC will receive capacity from the second GC. + 740 + 790 + + false + true + true + + weekCapacities + double[] + + + weekendCapacities + double[] + + GridConnection gc1 = v_nfatoFirstGC; +GridConnection gc2 = v_nfatoSecondGC; + +// Reset the GC Capacities if they already had a NF-ATO +gc1.f_nfatoSetConnectionCapacity(true); +gc2.f_nfatoSetConnectionCapacity(true); + +switch (rb_deliveryOrFeedin.getValue()) { + case 0: // Delivery + // Set the variables of the GCs + for (int i = 0; i < 24; i++) { + gc1.v_nfatoWeekDeliveryCapacity_kW[i] += weekCapacities[i]; + gc2.v_nfatoWeekDeliveryCapacity_kW[i] += -weekCapacities[i]; + gc1.v_nfatoWeekendDeliveryCapacity_kW[i] += weekendCapacities[i]; + gc2.v_nfatoWeekendDeliveryCapacity_kW[i] += -weekendCapacities[i]; + } + break; + + case 1: // Feed In + // Set the variables of the GCs + for (int i = 0; i < 24; i++) { + gc1.v_nfatoWeekFeedinCapacity_kW[i] += weekCapacities[i]; + gc2.v_nfatoWeekFeedinCapacity_kW[i] += -weekCapacities[i]; + gc1.v_nfatoWeekendFeedinCapacity_kW[i] += weekendCapacities[i]; + gc2.v_nfatoWeekendFeedinCapacity_kW[i] += -weekendCapacities[i]; + } + break; + + case 2: // Both + // Set the variables of the GCs + for (int i = 0; i < 24; i++) { + gc1.v_nfatoWeekDeliveryCapacity_kW[i] += weekCapacities[i]; + gc2.v_nfatoWeekDeliveryCapacity_kW[i] += -weekCapacities[i]; + gc1.v_nfatoWeekendDeliveryCapacity_kW[i] += weekendCapacities[i]; + gc2.v_nfatoWeekendDeliveryCapacity_kW[i] += -weekendCapacities[i]; + + gc1.v_nfatoWeekFeedinCapacity_kW[i] += weekCapacities[i]; + gc2.v_nfatoWeekFeedinCapacity_kW[i] += -weekCapacities[i]; + gc1.v_nfatoWeekendFeedinCapacity_kW[i] += weekendCapacities[i]; + gc2.v_nfatoWeekendFeedinCapacity_kW[i] += -weekendCapacities[i]; + } + break; + + default: + throw new IllegalStateException("Invalid Setting in rb_deliveryOrFeedin"); +} + +// Update the Connection Capacity if it is needed at the current time +gc1.f_nfatoSetConnectionCapacity(false); +gc2.f_nfatoSetConnectionCapacity(false); + +gc1.v_enableNFato = true; +gc2.v_enableNFato = true; + + + VOID + double + 1722256365459 + f_checkGISRegion + When b_NFATOListener is true checks wether the selected coordinates are a valid GC for the NFATO. If so saves the GC and updates the text fields + 740 + 700 + + false + true + true + + clickx + double + + + clicky + double + + //Check if click was on Building +for ( GIS_Building b : zero_Interface.energyModel.pop_GIS_Buildings ){ + if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ + if (b.gisRegion.isVisible()) { + GridConnection GC = b.c_containedGridConnections.get(0); + if (GC != null && GC != v_nfatoFirstGC) { + // found a valid GC + // Check if it is the first GC + if (v_nfatoFirstGC == null) { + t_nfatoFirstBuilding.setText(GC.p_ownerID + " zal ontvangen"); + t_nfatoSecondBuilding.setText("Klik op een gebouw dat zijn capaciteit gaat afstaan"); + v_nfatoFirstGC = GC; + //for (GIS_Building b : GC.c_connectedBuildings) { + //b.gisRegion.setFillColor(v_selectionColorAddBuildings); + //} + } + else { + v_nfatoSecondGC = GC; + t_nfatoSecondBuilding.setText(GC.p_ownerID + " zal leveren"); + //for (GIS_Building b : GC.c_connectedBuildings) { + //b.gisRegion.setFillColor(v_selectionColorAddBuildings); + //} + // We found two buildings, return to the default clicking functionality + b_NFATOListener = false; + } + } + } + } +} + + + RETURNS_VALUE + boolean + 1722256365466 + f_checkNFATO + Checks if the current NFATO settings could generate a valid contract. Returns true if NFATO is possible. + 740 + 760 + + false + true + true + + weekCapacities + double[] + + + weekendCapacities + double[] + + GridConnection gc1 = v_nfatoFirstGC; +GridConnection gc2 = v_nfatoSecondGC; + +if (gc1 == null || gc2 == null || gc1 == gc2) { + throw new IllegalStateException("Invalid Non-Firm ATO Settings, Please select two gridconnections"); +} + +double[] weekTestDelivery = new double[24]; +double[] weekendTestDelivery = new double[24]; +double[] weekTestFeedin = new double[24]; +double[] weekendTestFeedin = new double[24]; + +double maxDeliveryCapacity_kW; +double maxFeedinCapacity_kW; + +switch (rb_deliveryOrFeedin.getValue()) { + case 0: // Delivery + for (int i = 0; i < 24; i++) { + weekTestDelivery[i] = weekCapacities[i] - gc2.v_nfatoWeekDeliveryCapacity_kW[i]; + weekendTestDelivery[i] = weekendCapacities[i] - gc2.v_nfatoWeekendDeliveryCapacity_kW[i]; + } + maxDeliveryCapacity_kW = max(max(weekTestDelivery), max(weekendTestDelivery)); + // Reset the GC Capacity in case they already had a NF-ATO + gc2.f_nfatoSetConnectionCapacity(true); + // Check if gc2 has enough capacity with the original connection capacity + if ( maxDeliveryCapacity_kW > gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); + } + else { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + return true; + } + + case 1: // Feed In + for (int i = 0; i < 24; i++) { + weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; + weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; + } + maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); + // Reset the GC Capacity in case they already had a NF-ATO + gc2.f_nfatoSetConnectionCapacity(true); + // Check if gc2 has enough capacity with the original connection capacity + if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); + } + else { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + return true; + } + + case 2: // Both + for (int i = 0; i < 24; i++) { + weekTestDelivery[i] = weekCapacities[i] - gc2.v_nfatoWeekDeliveryCapacity_kW[i]; + weekendTestDelivery[i] = weekendCapacities[i] - gc2.v_nfatoWeekendDeliveryCapacity_kW[i]; + } + for (int i = 0; i < 24; i++) { + weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; + weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; + } + + maxDeliveryCapacity_kW = max(max(weekTestDelivery), max(weekendTestDelivery)); + maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); + // Reset the GC Capacity in case they already had a NF-ATO + gc2.f_nfatoSetConnectionCapacity(true); + // Check if gc2 has enough capacity with the original connection capacity + if ( maxDeliveryCapacity_kW > gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); + } + else if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); + } + else { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + return true; + } + + default: + throw new IllegalStateException("Invalid Setting in rb_deliveryOrFeedin"); +} + + + RETURNS_VALUE + double[][] + 1722256365474 + f_constructNFATOArrays + Uses the NFATO slider values to construct two arrays of the change in capacity at every hour. One array for weekdays, one for weekends + 740 + 730 + + false + true + true + // Construct arrays from slider values +// Week +int weekStart_h = (int) sl_nfatoWeekStartTime.getValue(); +int weekEnd_h = (int) sl_nfatoWeekEndTime.getValue(); +int weekCapacity_kW = (int) sl_nfatoWeekCapacity.getValue(); + +double[] weekCapacities = new double[24]; +double[] weekendCapacities = new double[24]; + +if (weekStart_h < weekEnd_h) { + for (int i = 0; i < weekStart_h; i++) { + weekCapacities[i] = 0; + } + for (int j = weekStart_h; j < weekEnd_h; j ++) { + weekCapacities[j] = weekCapacity_kW; + } + for (int k = weekEnd_h; k < 24; k ++) { + weekCapacities[k] = 0; + } +} +else { // If the start time is higher than the end time we share capacity at night + for (int i = 0; i < weekEnd_h; i++) { + weekCapacities[i] = weekCapacity_kW; + } + for (int j = weekEnd_h; j < weekStart_h ; j ++) { + weekCapacities[j] = 0; + } + for (int k = weekStart_h; k < 24; k ++) { + weekCapacities[k] = weekCapacity_kW; + } +} + +if (b_nfatoWeekendDistinction) { + // repeat above code for weekend + int weekendStart_h = (int) sl_nfatoWeekendStartTime.getValue(); + int weekendEnd_h = (int) sl_nfatoWeekendEndTime.getValue(); + int weekendCapacity_kW = (int) sl_nfatoWeekendCapacity.getValue(); + + + if (weekendStart_h < weekendEnd_h) { + for (int i = 0; i < weekendStart_h; i++) { + weekendCapacities[i] = 0; + } + for (int j = weekendStart_h; j < weekendEnd_h; j ++) { + weekendCapacities[j] = weekendCapacity_kW; + } + for (int k = weekendEnd_h; k < 24; k ++) { + weekendCapacities[k] = 0; + } + } + else { // If the start time is higher than the end time we share capacity at night + for (int i = 0; i < weekendEnd_h; i++) { + weekendCapacities[i] = weekendCapacity_kW; + } + for (int j = weekendEnd_h; j < weekendStart_h; j ++) { + weekendCapacities[j] = 0; + } + for (int k = weekendStart_h; k < 24; k ++) { + weekendCapacities[k] = weekendCapacity_kW; + } + } +} +else { + // no distinction means the settings are the same during the weekend + weekendCapacities = weekCapacities; +} + +double[][] arr = {weekCapacities, weekendCapacities}; +return arr; + + + VOID + double + 1722256365483 + f_resetNFATOSettings + Resets the group of NFATO Settings after a contract is added or canceled. + 740 + 820 + + false + true + true + t_nfatoFirstBuilding.setText("Klik op een gebouw dat capaciteit gaat ontvangen"); +t_nfatoSecondBuilding.setText(""); +v_nfatoFirstGC = null; +v_nfatoSecondGC = null; +b_NFATOListener = false; + + + VOID + double + 1722256998182 + f_setTab + Function that ensures the correct tab is visible + 460 + 710 + + false + true + true + + selectedTabType + EnergyDemandTab + + if (selectedTabType == EnergyDemandTab.NFATO) { + gr_nfatoSettings.setVisible(true); + gr_hubSliders.setVisible(false); +} +else { + gr_nfatoSettings.setVisible(false); + gr_hubSliders.setVisible(true); +} + + + VOID + double + 1754923608234 + f_updateSliders_EHub + 460 + 740 + + false + true + true + //Function that can be used to update sliders/buttons to the engine state +//--> empty for now + + + + + 1722253463896 + connections + 50 + -50 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1722253479511 + uI_Tabs + 50 + -100 + + false + true + true + + zerointerfaceloader + UI_Tabs + + + + 1722253479513 + zero_Interface + 150 + -100 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + 1753694295449 + uI_EnergyHub + 310 + -100 + + false + true + true + + zerointerfaceloader + UI_EnergyHub + + + + + + 1722253463902 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1722344806530 + rect_generalFunctions + 430 + 650 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 230 + 170 + 0.0 + -1 + null + + + 1722344586686 + rect_nfatoFunctions + 700 + 650 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16711936 + null + SOLID + 300 + 300 + 0.0 + -1 + null + + + 1722253487925 + gr_hubSliders + 0 + 0 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1722253487927 + rect_hubSliders + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + + null + SOLID + 370 + 350 + 0.0 + -3736634 + null + + + false + 1722253487949 + button_add_nfato + 20 + 45 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + //!zero_Interface.settings.isPublicModel() + true + !zero_Interface.settings.isPublicModel() + /* +if (v_NFATOListener) { + // This should not be reachable anymore + traceln("Quitting NF ATO settings"); + v_NFATOListener = false; + return; +} +*/ + +if (zero_Interface.v_clickedObjectType != null && zero_Interface.v_clickedObjectType == OL_GISObjectType.BUILDING && zero_Interface.c_selectedGridConnections.size() != 0) { + v_nfatoFirstGC = zero_Interface.c_selectedGridConnections.get(0); + t_nfatoFirstBuilding.setText(v_nfatoFirstGC.p_ownerID + " zal ontvangen"); + t_nfatoSecondBuilding.setText("Klik op een gebouw dat zijn capaciteit gaat afstaan"); +} + +// When this boolean is true clicking on the GIS Map will select another building for the NF ATO +b_NFATOListener = true; +f_setTab(NFATO); + + +if (b_nfatoWeekendDistinction) { + t_nfatoWeek.setVisible(true); + t_nfatoWeekend.setVisible(true); + sl_nfatoWeekendStartTime.setVisible(true); + sl_nfatoWeekendEndTime.setVisible(true); + sl_nfatoWeekendCapacity.setVisible(true); +} +else { + t_nfatoWeek.setVisible(false); + t_nfatoWeekend.setVisible(false); + sl_nfatoWeekendStartTime.setVisible(false); + sl_nfatoWeekendEndTime.setVisible(false); + sl_nfatoWeekendCapacity.setVisible(false); +} + + +// TODO: Color the companies on the GIS Map (e.g. according to grid topology) + + + + Voeg Non-Firm ATO toe + + + + false + 1722253487951 + button_remove_nfato + 190 + 45 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + !zero_Interface.settings.isPublicModel() + true + for (GridConnection GC : zero_Interface.energyModel.f_getActiveGridConnections()) { + GC.f_nfatoSetConnectionCapacity(true); + GC.v_enableNFato = false; + GC.v_nfatoWeekDeliveryCapacity_kW = new double[24]; + GC.v_nfatoWeekendDeliveryCapacity_kW = new double[24]; + GC.v_nfatoWeekFeedinCapacity_kW = new double[24]; + GC.v_nfatoWeekendFeedinCapacity_kW = new double[24]; +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +button_remove_nfato.setEnabled(false); + +zero_Interface.f_resetSettings(); + + + + Verwijder alle NF ATOs + + + + false + 1753434467432 + button_createEnergyHub + 40 + 130 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + zero_Interface.f_startEnergyHubConfiguration(); + + + + Creeër je eigen Energie Hub + + + + 1754990508102 + txt_NonFirmAtoOptions + 185 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Non-Firm ATO opties + + SansSerif + 14 + + + CENTER + + + 1754990563477 + txt_energyHubOptions + 185 + 105 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energie Hub + + SansSerif + 14 + + + CENTER + + + false + 1762248467148 + button_loadScenario + 40 + 260 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + // First check if there are any save files, if there are none we display an error screen + +zero_Interface.uI_EnergyHub.f_initializeUserSavedScenarios(zero_Interface.uI_EnergyHub.combobox_selectScenario); +if (zero_Interface.uI_EnergyHub.combobox_selectScenario.getItems().length == 0) { + zero_Interface.f_setErrorScreen("Er zijn nog geen scenario's opgeslagen.", 0, 0); + return; +} + +zero_Interface.f_setLoadingScreen(true, 0, 0); + +new Thread( () -> { + // Opens the filter menu on the main interface + zero_Interface.f_startEnergyHubConfiguration(); + + // Add a manual select to the filter with all (active) gridconnections + // We should follow the usual procedure of creating an E-Hub so that the user could cancel and reconfigure + zero_Interface.f_setFilter("Handmatige selectie"); + zero_Interface.c_selectedGridConnections = zero_Interface.energyModel.f_getActiveGridConnections(); + zero_Interface.f_applyFilter(OL_FilterOptionsGC.MANUAL_SELECTION, ""); + + zero_Interface.f_setLoadingScreen(false, 0, 0); + + // Create a coop with the selection + zero_Interface.f_finalizeEnergyHubConfiguration(); + + // Select load scenario in the E-Hub configurator + zero_Interface.uI_EnergyHub.button_loadScenario.action(); + +}).start(); + + + + + Laad een opgeslagen scenario in + + + + 1762248467153 + txt_loadScenario + 180 + 230 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Opgeslagen Scenario's + + SansSerif + 14 + + + CENTER + + + + + 1722253509588 + gr_nfatoSettings + 0 + 410 + + true + false + false + SHAPE_DRAW_2D3D + 0 + 0 + false + 0 + 0.0 + + + 1722253509590 + rect_nfatoSettings + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + + null + SOLID + 370 + 350 + 0.0 + -3736634 + null + + + 1722253509592 + t_nfatoFirstBuilding + 25 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Klik op een gebouw dat capaciteit gaat ontvangen + + Dialog + 14 + + + LEFT + + + 1722253509594 + t_nfatoSecondBuilding + 25 + 50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + + + Dialog + 14 + + + LEFT + + + false + 1722253509596 + sl_nfatoWeekStartTime + 125 + 180 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + + + 8 + HORIZONTAL + 0 + 24 + 1 + false + + + + false + 1722253509598 + cb_nfatoWeekendDistinction + 25 + 75 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if (b_nfatoWeekendDistinction) { + t_nfatoWeek.setVisible(true); + t_nfatoWeekend.setVisible(true); + sl_nfatoWeekendStartTime.setVisible(true); + sl_nfatoWeekendEndTime.setVisible(true); + sl_nfatoWeekendCapacity.setVisible(true); +} +else { + t_nfatoWeek.setVisible(false); + t_nfatoWeekend.setVisible(false); + sl_nfatoWeekendStartTime.setVisible(false); + sl_nfatoWeekendEndTime.setVisible(false); + sl_nfatoWeekendCapacity.setVisible(false); +} + + + + verschil week & weekend + true + b_nfatoWeekendDistinction + + + + false + 1722253509600 + sl_nfatoWeekEndTime + 125 + 210 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + + + 20 + HORIZONTAL + 0 + 24 + 1 + false + + + + false + 1722253509602 + sl_nfatoWeekCapacity + 125 + 245 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + + + 100 + HORIZONTAL + 0 + 2000 + 10 + false + + + + false + 1722253509604 + button_confirm_nfato + 45 + 285 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if (sl_nfatoWeekStartTime.getValue() == sl_nfatoWeekEndTime.getValue()) { + traceln("Week start time is the same as end time"); +} +else if (sl_nfatoWeekendStartTime.getValue() == sl_nfatoWeekendEndTime.getValue()) { + traceln("Weekend start time is the same as end time"); +} +else { + double[][] arr = f_constructNFATOArrays(); + //traceln("f_constructNFATOArraysFromSliders: " + Arrays.toString(arr[0])); + //traceln("f_constructNFATOArraysFromSliders: " + Arrays.toString(arr[1])); + + double[] weekCapacities = arr[0]; + double[] weekendCapacities = arr[1]; + + if (f_checkNFATO(weekCapacities, weekendCapacities)) { + f_setNFATO(weekCapacities, weekendCapacities); + f_setTab(HUB); + // reset the nfato settings + f_resetNFATOSettings(); + zero_Interface.f_resetSettings(); + + button_remove_nfato.setEnabled(true); + + //Update variable to change to custom scenario + if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); + } + } +} + + + + + + Voeg Non-Firm ATO toe + + + + false + 1722253509606 + button_cancel_nfato + 275 + 285 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_setTab(HUB); +f_resetNFATOSettings(); + + + + cancel + + + + 1722253509608 + t_nfatoWeekStartTime + 20 + 185 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Start tijd (uur) + + Dialog + 14 + + + LEFT + + + 1722253509610 + t_nfatoWeekEndTime + 20 + 215 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Eind tijd (uur) + + Dialog + 14 + + + LEFT + + + 1722253509612 + t_nfatoWeekStartTime2 + 10 + 250 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Capaciteit (kW) + + Dialog + 14 + + + LEFT + + + 1722253509614 + t_nfatoWeek + 155 + 155 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Week + + + Dialog + 14 + + + LEFT + + + 1722253509616 + t_nfatoWeekend + 265 + 155 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Weekend + + + Dialog + 14 + + + LEFT + + + false + 1722253509618 + sl_nfatoWeekendStartTime + 247 + 180 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + + + 8 + HORIZONTAL + 0 + 24 + 1 + false + + + + false + 1722253509620 + sl_nfatoWeekendEndTime + 247 + 210 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + + + 20 + HORIZONTAL + 0 + 24 + 1 + false + + + + false + 1722253509622 + sl_nfatoWeekendCapacity + 247 + 245 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + + + 100 + HORIZONTAL + 0 + 2000 + 10 + false + + + + false + 1725970287541 + rb_deliveryOrFeedin + 25 + 105 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + + + + 2 + VERTICAL + + + + false + + + + + + 1722256365442 + t_nfatoFunctionsDescription + 850 + 655 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + NF ATO Functions + + Dialog + 18 + + + CENTER + + + 1722344870135 + t_generalFunctionsDescription + 460 + 660 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + General Functions + + SansSerif + 18 + + + LEFT + + + + + + + 1722247653561 + tabElectricity + // Default Sliders +public ShapeGroup getGroupElectricityDemandSliders() { + return this.gr_electricitySliders_default; +} + +public ShapeGroup getGroupElectricityDemandSliders_Businesspark() { + return this.gr_electricitySliders_businesspark; +} + +public ShapeGroup getGroupElectricityDemandSliders_ResidentialArea() { + return this.gr_electricitySliders_residential; +} +public ShapeSlider getSliderElectricityDemandReduction_pct() { + return this.sl_electricityDemandReduction_pct; +} + +public ShapeSlider getSliderRooftopPVCompanies_pct(){ + return this.sl_rooftopPVCompanies_pct; +} + +public ShapeSlider getSliderLargeScalePV_ha(){ + return this.sl_largeScalePV_ha; +} + +public ShapeSlider getSliderLargeScalePV_ha_Businesspark(){ + return this.sl_largeScalePV_ha_Businesspark; +} + +public ShapeSlider getSliderRooftopPVHouses_pct(){ + return this.sl_rooftopPVHouses_pct; +} + +public ShapeSlider getWindSlider(){ + return this.sl_largeScaleWind_MW; +} + + 1754045642067 + import zeroPackage.ZeroMath; + + zerointerfaceloader + tabArea + + false + + 1722247653567 + 1722247653567 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089978 + true + 1722326400000 + + 0 + HOUR + + + 1 + HOUR + + + + 1722247653564 + scale + 0 + -240 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1722247653568 + 1722247653562 + + + 1745483322704 + p_currentPVOnLand_ha + 50 + 1270 + + false + true + true + + double + NONE + false + + 0 + + + 1745483322702 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1745483371462 + p_currentWindTurbines_MW + 50 + 1290 + + false + true + true + + double + NONE + false + + 0 + + + 1745483371460 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + + + VOID + double + 1722256117103 + f_setPVOnLand + Function that changes the electric capacity of the energy asset of the "Solar field". Takes an area size in hectares as a parameter and assumes that 1 MWp of solarpannels fits on 1 ha. The variables for amount of installed PV are updated automatically in the zero_engine. The function also modifies the connection capacity of the energy production site to match the new installed PV Power. + 70 + 840 + + false + true + true + + hectare + double + + + gcListProduction + List<GCEnergyProduction> + + // TODO: Change to work for multiple solar fields in one model. +// to do so it should probably first calculate the total installed pv in all solar fields +for ( GCEnergyProduction GCEP : gcListProduction) { + for(J_EAProduction j_ea : GCEP.c_productionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC && GCEP.p_isSliderGC) { + if (!GCEP.v_isActive) { + GCEP.f_setActive(true); + } + + double solarFieldPower = (double)roundToInt(hectare * zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha); + j_ea.setCapacityElectric_kW(solarFieldPower); + GCEP.v_liveConnectionMetaData.physicalCapacity_kW = solarFieldPower; + GCEP.v_liveConnectionMetaData.contractedFeedinCapacity_kW = solarFieldPower; + + if(hectare == 0){ + GCEP.f_setActive(false); + } + + break; + } + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1722256142375 + f_setPVSystemHouses + Function that adds or removes photovoltaic production assets to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a PV asset. If a new asset is created it takes as its electric capacity a random value between 3 and 6 kW. The variables for amount of installed PV are updated automatically in the zero_engine. + + 70 + 810 + + false + true + true + + gcList + List<GCHouse> + + + PV_pct + double + + ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedPVSystemsHouses.stream().filter(gcList::contains).toList()); +int nbHouses = houses.size(); +int nbHousesWithPV = count(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); +int nbHousesWithPVGoal = roundToInt(PV_pct / 100.0 * nbHouses); + +while ( nbHousesWithPVGoal < nbHousesWithPV ) { // remove excess PV systems + GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); + J_EA pvAsset = findFirst(house.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); + if (pvAsset != null) { + pvAsset.removeEnergyAsset(); + houses.remove(house); + zero_Interface.c_orderedPVSystemsHouses.remove(house); + zero_Interface.c_orderedPVSystemsHouses.add(0, house); + nbHousesWithPV --; + + if(house.p_batteryAsset != null ){ + house.p_batteryAsset.removeEnergyAsset(); + house.f_setBatteryManagement(null); + } + } + else { + traceln(" cant find PV asset in house that should have PV asset in f_setPVHouses (Interface)"); + } +} + +while ( nbHousesWithPVGoal > nbHousesWithPV ) { + GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) == false); + if (house == null){ + traceln("No gridconnection without PV panels found! Current PVsystems count: %s", nbHousesWithPV); + break; + } + else { + String assetName = "Rooftop PV"; + double capacityHeat_kW = 0.0; + double yearlyProductionHydrogen_kWh = 0.0; + double yearlyProductionMethane_kWh = 0.0; + double installedPVCapacity_kW = house.v_liveAssetsMetaData.PVPotential_kW;//roundToDecimal(uniform(3,6),2); + + //Compensate for pt if it is present + if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)){ + installedPVCapacity_kW = max(0, installedPVCapacity_kW-zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); //For now just 1 panel + } + J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOVOLTAIC, assetName, OL_EnergyCarriers.ELECTRICITY, installedPVCapacity_kW, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); + houses.remove(house); + zero_Interface.c_orderedPVSystemsHouses.remove(house); + zero_Interface.c_orderedPVSystemsHouses.add(0, house); + nbHousesWithPV ++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1722256248965 + f_setWindTurbines + Function that changes the electric capacity of the energy asset of the "Wind Farm". Takes an amount of MW as a parameter. The variables for amount of installed Wind are updated automatically in the zero_engine. The function also modifies the connection capacity of the energy production site to match the new installed Wind Power. + 70 + 870 + + false + true + true + + AllocatedWindPower_MW + double + + + gcListProduction + List<GCEnergyProduction> + + // TODO: Change to work for multiple wind farms in one model. +// to do so it should probably first calculate the total installed wind power in all wind farms + +for ( GCEnergyProduction GCEP : gcListProduction) { + for(J_EAProduction j_ea : GCEP.c_productionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL && GCEP.p_isSliderGC) { + if (!GCEP.v_isActive) { + GCEP.f_setActive(true); + } + j_ea.setCapacityElectric_kW(roundToInt(1000*AllocatedWindPower_MW)); + GCEP.v_liveConnectionMetaData.physicalCapacity_kW = (double)roundToInt(1000*AllocatedWindPower_MW); + GCEP.v_liveConnectionMetaData.contractedFeedinCapacity_kW = (double)roundToInt(1000*AllocatedWindPower_MW); + + if(AllocatedWindPower_MW == 0){ + GCEP.f_setActive(false); + } + break; + } + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1722335253834 + f_setDemandReduction + Function that reduces the electricity demand of all consumption assets. Takes as an argument a percentage to reduce by compared to the default value of the consumption assets. + 60 + 590 + + false + true + true + + gcList + List<GridConnection> + + + demandReduction_pct + double + + double scalingFactor = 1 - demandReduction_pct/100; + +for (GridConnection gc : gcList) { + // Set Consumption Assets + for (J_EAConsumption j_ea : gc.c_consumptionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.ELECTRICITY_DEMAND) { + j_ea.setConsumptionScaling_fr( scalingFactor ); + } + } + // Set Profile Assets + for (J_EAProfile j_ea : gc.c_profileAssets) { + if (j_ea.energyCarrier == OL_EnergyCarriers.ELECTRICITY) { + j_ea.setProfileScaling_fr( scalingFactor ); + } + } +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1745483988251 + f_getCurrentPVOnLandAndWindturbineValues + 30 + 1250 + + false + true + true + for(GCEnergyProduction GCProd : uI_Tabs.f_getAllSliderGridConnections_production()){ + if(!GCProd.p_isSliderGC && GCProd.v_isActive){ + for(J_EAProduction ea : GCProd.c_productionAssets){ + if(ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC){ + p_currentPVOnLand_ha += ea.getCapacityElectric_kW()/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha; + } + else if(ea.energyAssetType == OL_EnergyAssetType.WINDMILL){ + p_currentWindTurbines_MW += ea.getCapacityElectric_kW()/1000; + } + } + } +} + + + RETURNS_VALUE + Pair<Double, Double> + 1747294812333 + f_getPVSystemPercentage + Calculates the amount of installed PV compared to the total potential based on roof surface area. Assumes that 50% of the roof surface is available for PV. If a GridConnection already has more than this installed it takes the installed capacity instead. + 90 + 780 + + false + true + true + + gcList + List<GridConnection> + + double installedPV_kWp = 0.0; +double PVPotential_kWp = 0.0; +double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; + +for (GridConnection gc : gcList ) { + double gcInstalledPV_kWp = 0.0; + if ( gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ) { + for ( J_EAProduction j_ea : gc.c_productionAssets ) { + if ( j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC ) { + gcInstalledPV_kWp += j_ea.getCapacityElectric_kW(); + } + } + } + installedPV_kWp += gcInstalledPV_kWp; + PVPotential_kWp += max( gcInstalledPV_kWp, max(0.1, gc.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2) ); +} + +return new Pair(installedPV_kWp, PVPotential_kWp); + + + VOID + double + 1747297871195 + f_setPVSystemCompanies + Adds or removes photovoltaic production assets to GridConnections. Takes as arguments a list of Gridconnections and a target percentage. It runs untill that list of GCs has that percentage of PV installed, compared to the total potential PV. If a new asset is created it determines its electric capacity by the total roof area of all the buildings connected to the GC. The function also updates the PV slider in the company UI if the GC is a company. The variables in the engine that keep track of the amount of installed PV are updated automatically. + 70 + 720 + + false + false + true + + gcList + List<GCUtility> + + + target_pct + double + + + slider + ShapeSlider + + List<GCUtility> activeGCs = new ArrayList<GCUtility>(zero_Interface.c_orderedPVSystemsCompanies.stream().filter(x -> x.v_isActive).filter(gcList::contains).toList()); +Pair<Double, Double> pair = f_getPVSystemPercentage( new ArrayList<GridConnection>(activeGCs) ); +double remaining_kWp = target_pct / 100 * pair.getSecond() - pair.getFirst(); +double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; +if ( remaining_kWp > 0 ) { + // add more PV + for ( GCUtility company : new ArrayList<GCUtility>(activeGCs) ) { + double remainingPotential_kWp = min( remaining_kWp, company.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2 - company.v_liveAssetsMetaData.totalInstalledPVPower_kW ); + + if ( remainingPotential_kWp > 0 ) { + remaining_kWp -= remainingPotential_kWp; + f_addPVSystem( company, remainingPotential_kWp ); + } + + if ( remaining_kWp <= 0 ) { + // Update variable to change to custom scenario + if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); + } + zero_Interface.f_resetSettings(); + return; + } + } +} +else { + // remove pv + for ( GCUtility company : new ArrayList<GCUtility>(activeGCs) ) { + if ( company.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ) { + // find companyUI to check if the company already has PV on model startup + remaining_kWp += company.v_liveAssetsMetaData.totalInstalledPVPower_kW; + f_removePVSystem( company ); + double PVAtStartup_kWp = zero_Interface.c_scenarioMap_Current.get(company.p_uid).getCurrentPV_kW(); + if (PVAtStartup_kWp != 0) { + f_addPVSystem( company, PVAtStartup_kWp ); + remaining_kWp -= PVAtStartup_kWp; + } + } + if ( remaining_kWp >= 0 ) { + // removed slightly too much pv + f_addPVSystem( company, remaining_kWp ); + + // Update variable to change to custom scenario + if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); + } + + zero_Interface.f_resetSettings(); + return; + } + } + // All companies are at the starting PV amount. Set slider to corresponding value. + pair = f_getPVSystemPercentage( new ArrayList<GridConnection>( activeGCs ) ); + int installed_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); + slider.setValue(installed_pct, false); +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1747306690517 + f_addPVSystem + Takes as an argument a GridConnection and a capacity. If the GC already has a solar panel, it adds the capacity to the existing one. Otherwise it creates a new energy asset. If the GridConnection is a GCUtility it also updates the companyUI if it exists. + 90 + 740 + + false + true + true + + gc + GridConnection + + + capacity_kWp + double + + J_EAProduction pvAsset = findFirst(gc.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); +if (pvAsset != null) { + capacity_kWp += pvAsset.getCapacityElectric_kW(); + pvAsset.setCapacityElectric_kW( capacity_kWp ); +} +else { + // Create a new asset + OL_EnergyAssetType assetType = OL_EnergyAssetType.PHOTOVOLTAIC; + String assetName = "Rooftop PV"; + double capacityHeat_kW = 0.0; + double yearlyProductionMethane_kWh = 0.0; + double yearlyProductionHydrogen_kWh = 0.0; + double outputTemperature_degC = 0.0; + + J_EAProduction productionAsset = new J_EAProduction ( gc, assetType, assetName, OL_EnergyCarriers.ELECTRICITY, capacity_kWp, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); +} + +// Update the ordered collection +if ( gc instanceof GCHouse ) { + zero_Interface.c_orderedPVSystemsHouses.remove(gc); + zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); +} +else if ( gc instanceof GCUtility ) { + zero_Interface.c_orderedPVSystemsCompanies.remove(gc); + zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); +} +else { + throw new RuntimeException("Unknown GridConnection type passed to f_addPVSystem."); +} + + + VOID + double + 1747306699629 + f_removePVSystem + 90 + 760 + + false + true + true + + gc + GridConnection + + J_EAProduction pvAsset = findFirst(gc.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); +if ( pvAsset != null ) { + pvAsset.removeEnergyAsset(); + + if ( gc instanceof GCHouse ) { + zero_Interface.c_orderedPVSystemsHouses.remove(gc); + zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); + } + else if ( gc instanceof GCUtility ) { + zero_Interface.c_orderedPVSystemsCompanies.remove(gc); + zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); + } +} + + + VOID + double + 1750063382310 + f_setResidentialBatteries + 90 + 1020 + + false + true + true + + homeBatteries_pct + double + + + gcListHouses + List<GCHouse> + + // Setting houseBatteries +double nbHouseBatteries = count(gcListHouses, h -> h.p_batteryAsset != null); //f_getEnergyAssets(), p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC && p.getParentAgent() instanceof GCHouse); +double nbHousesWithPV = count(gcListHouses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); //count(energyModel.f_getGridConnections(), p->p instanceof GCHouse); +double nbHousesWithBatteryGoal = roundToInt(nbHousesWithPV * homeBatteries_pct / 100); + +if( nbHousesWithPV > 0 ){ + while ( nbHouseBatteries > nbHousesWithBatteryGoal ) { + GCHouse house = findFirst(gcListHouses, p -> p.p_batteryAsset != null ); + house.p_batteryAsset.removeEnergyAsset(); + house.f_setBatteryManagement(null); + nbHouseBatteries--; + } + while ( nbHouseBatteries < nbHousesWithBatteryGoal) { + GCHouse house = findFirst(gcListHouses, p -> p.p_batteryAsset == null && p.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); + + double batteryStorageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgRatioHouseBatteryStorageCapacity_v_PVPower*house.v_liveAssetsMetaData.totalInstalledPVPower_kW; + double batteryCapacity_kW = batteryStorageCapacity_kWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; + double batteryStateOfCharge = 0.5; + + new J_EAStorageElectric(house, batteryCapacity_kW, batteryStorageCapacity_kWh, batteryStateOfCharge, zero_Interface.energyModel.p_timeStep_h ); + house.f_setBatteryManagement(new J_BatteryManagementSelfConsumption( house )); + nbHouseBatteries++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1750063382312 + f_setGridBatteries_residential + 90 + 1000 + + false + true + true + + storageCapacity_kWh + double + + + gcListGridBatteries + List<GCGridBattery> + + for ( GCGridBattery battery : gcListGridBatteries) { + if(battery.p_isSliderGC){ + for(J_EAStorage j_ea : battery.c_storageAssets) { + J_EAStorageElectric batteryAsset = ((J_EAStorageElectric)j_ea); + if (!battery.v_isActive) { + battery.f_setActive(true); + } + double capacity_kW = storageCapacity_kWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; + batteryAsset.setCapacityElectric_kW( capacity_kW ); + batteryAsset.setStorageCapacity_kWh( storageCapacity_kWh ); + battery.v_liveConnectionMetaData.physicalCapacity_kW = capacity_kW; + battery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = capacity_kW; + battery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = capacity_kW; + } + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1750063382324 + f_setElectricCooking + 60 + 640 + + false + true + true + + gcListHouses + List<GCHouse> + + + electricCookingGoal_pct + double + + int nbHousesWithElectricCooking = findAll(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC).size(); +int nbHousesWithElectricCookingGoal = roundToInt(electricCookingGoal_pct / 100 * gcListHouses.size()); + + +while ( nbHousesWithElectricCooking > nbHousesWithElectricCookingGoal ) { // remove excess cooking systems + GCHouse house = randomWhere(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); + J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_HOB ); + if (cookingAsset != null) { + double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; + cookingAsset.removeEnergyAsset(); + + new J_EAConsumption(house, OL_EnergyAssetType.GAS_PIT, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.METHANE, zero_Interface.energyModel.p_timeStep_h, null); + house.p_cookingMethod = OL_HouseholdCookingMethod.GAS; + nbHousesWithElectricCooking --; + } + else { + throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); + } +} + +while ( nbHousesWithElectricCooking < nbHousesWithElectricCookingGoal) { + GCHouse house = randomWhere(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.GAS); + if (house == null){ + throw new RuntimeException("No gridconnection without GAS cooking asset found! Current electric cooking count: " + nbHousesWithElectricCooking); + } + else { + J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.GAS_PIT ); + if (cookingAsset != null) { + double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; + cookingAsset.removeEnergyAsset(); + + new J_EAConsumption(house, OL_EnergyAssetType.ELECTRIC_HOB, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.ELECTRICITY, zero_Interface.energyModel.p_timeStep_h, null); + house.p_cookingMethod = OL_HouseholdCookingMethod.ELECTRIC; + nbHousesWithElectricCooking ++; + } + else { + throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); + } + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1750326729005 + f_setDemandIncrease + 60 + 610 + + false + true + true + + gcList + List<GridConnection> + + + demandReduction_pct + double + + f_setDemandReduction(gcList, -demandReduction_pct); + + + VOID + double + 1754926103683 + f_updateSliders_Electricity + -350 + 70 + + false + true + true + if(gr_electricitySliders_default.isVisible()){ + f_updateElectricitySliders_default(); +} +else if(gr_electricitySliders_businesspark.isVisible()){ + f_updateElectricitySliders_businesspark(); +} +else if(gr_electricitySliders_residential.isVisible()){ + f_updateElectricitySliders_residential(); +} +else{ + f_updateElectricitySliders_custom(); +} + + + VOID + double + 1754926103685 + f_updateElectricitySliders_default + -330 + 90 + + false + true + true + List<GridConnection> allConsumerGridConnections = uI_Tabs.f_getActiveSliderGridConnections_consumption(); + + +//Savings +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GridConnection GC : allConsumerGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + } +} + +double electricitySavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; +sl_electricityDemandReduction_pct.setValue(roundToInt(electricitySavings_pct), false); + + +//Companies rooftop PV +List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); + +List<GridConnection> utilityGridConnections_GC = new ArrayList<>(utilityGridConnections); +Pair<Double, Double> pair = f_getPVSystemPercentage( utilityGridConnections_GC ); +int PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); +sl_rooftopPVCompanies_pct.setValue(PV_pct, false); + +//Houses rooftop PV +List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); + +List<GridConnection> houseGridConnections_GC = new ArrayList<>(utilityGridConnections); +pair = f_getPVSystemPercentage( houseGridConnections_GC ); +PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); +sl_rooftopPVHouses_pct.setValue(PV_pct, false); + +//Large scale EA production systems (PV on land And Wind) +double totalPVOnLand_kW = 0; +double totalWind_kW = 0; + +for(GCEnergyProduction productionGC : uI_Tabs.f_getAllSliderGridConnections_production()){ + if(productionGC.v_isActive && productionGC.p_isSliderGC){ + if(productionGC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + for(J_EAProduction productionEA : productionGC.c_productionAssets){ + if(productionEA.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC){ + totalPVOnLand_kW += productionEA.getCapacityElectric_kW(); + } + } + } + else if(productionGC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ + for(J_EAProduction productionEA : productionGC.c_productionAssets){ + if(productionEA.getEAType() == OL_EnergyAssetType.WINDMILL){ + totalWind_kW += productionEA.getCapacityElectric_kW(); + } + } + } + } +} + +sl_largeScalePV_ha.setValue((totalPVOnLand_kW/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha) + p_currentPVOnLand_ha, false); +sl_largeScaleWind_MW.setValue((totalWind_kW/1000) + p_currentWindTurbines_MW, false); + +//Curtailment +boolean curtailment = true; +for(GridConnection GC : allConsumerGridConnections){ + if(!GC.v_enableCurtailment){ + curtailment = false; + break; + } +} +cb_curtailment_default.setSelected(curtailment, false); + + +//Large scale battery systems +double totalBatteryStorage_kWh = 0; +for(GCGridBattery batteryGC : uI_Tabs.f_getAllSliderGridConnections_gridBatteries()){ + if(batteryGC.v_isActive && batteryGC.p_isSliderGC){ + totalBatteryStorage_kWh += batteryGC.p_batteryAsset.getStorageCapacity_kWh(); + } +} + +sl_collectiveBattery_MWh_default.setValue(totalBatteryStorage_kWh/1000, false); + + + + VOID + double + 1754926103687 + f_updateElectricitySliders_residential + -330 + 130 + + false + true + true + List<GCHouse> houseGridConnections = new ArrayList<>(); +List<GCGridBattery> gridBatteryGridConnections = new ArrayList<>(); + +for (GridConnection GC : uI_Tabs.f_getActiveSliderGridConnections_all()) { + if(GC instanceof GCHouse){ + houseGridConnections.add((GCHouse)GC); + } + else if(GC instanceof GCGridBattery){ + gridBatteryGridConnections.add((GCGridBattery)GC); + } +} + +int nbHouses = houseGridConnections.size(); +int nbHousesWithPV = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); +double pv_pct = 100.0 * nbHousesWithPV / nbHouses; +sl_householdPVResidentialArea_pct.setValue(roundToInt(pv_pct), false); + +if ( nbHousesWithPV != 0 ) { + int nbHousesWithHomeBattery = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) && x.p_batteryAsset != null); + double battery_pct = 100.0 * nbHousesWithHomeBattery / nbHousesWithPV; + sl_householdBatteriesResidentialArea_pct.setValue(roundToInt(battery_pct), false); +} + +//Electric cooking +int nbHousesWithElectricCooking = count(houseGridConnections, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); +double cooking_pct = 100.0 * nbHousesWithElectricCooking / nbHouses; +sl_householdElectricCookingResidentialArea_pct.setValue(roundToInt(cooking_pct), false); + +//Consumption growth +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GCHouse GC : houseGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + } +} + +double electricityDemandIncrease_pct = totalBaseConsumption_kWh > 0 ? ( (- totalSavedConsumption_kWh)/totalBaseConsumption_kWh * 100) : 0; +sl_electricityDemandIncreaseResidentialArea_pct.setValue(roundToInt(electricityDemandIncrease_pct), false); + + +//Gridbatteries +double averageNeighbourhoodBatterySize_kWh = 0; +for (GCGridBattery gc : gridBatteryGridConnections) { + averageNeighbourhoodBatterySize_kWh += gc.p_batteryAsset.getStorageCapacity_kWh()/gridBatteryGridConnections.size(); +} +sl_gridBatteriesResidentialArea_kWh.setValue(averageNeighbourhoodBatterySize_kWh, false); + + + + VOID + double + 1754926103689 + f_updateElectricitySliders_businesspark + -330 + 110 + + false + true + true + //Get the utility connections +List<GridConnection> utilityGridConnections = new ArrayList<>(uI_Tabs.f_getActiveSliderGridConnections_utilities()); + + +//Savings +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GridConnection GC : utilityGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + } +} + +double electricitySavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; +sl_electricityDemandReduction_pct_Businesspark.setValue(roundToInt(electricitySavings_pct), false); + +// Rooftop PV SYSTEMS: +Pair<Double, Double> pair = f_getPVSystemPercentage( utilityGridConnections ); +int PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); +sl_rooftopPVCompanies_pct_Businesspark.setValue(PV_pct, false); + +//Large scale EA production systems (PV on land And Wind) +double totalPVOnLand_kW = 0; +double totalWind_kW = 0; + +for(GCEnergyProduction productionGC : uI_Tabs.f_getAllSliderGridConnections_production()){ + if(productionGC.v_isActive && productionGC.p_isSliderGC){ + if(productionGC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + for(J_EAProduction productionEA : productionGC.c_productionAssets){ + if(productionEA.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC){ + totalPVOnLand_kW += productionEA.getCapacityElectric_kW(); + } + } + } + else if(productionGC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ + for(J_EAProduction productionEA : productionGC.c_productionAssets){ + if(productionEA.getEAType() == OL_EnergyAssetType.WINDMILL){ + totalWind_kW += productionEA.getCapacityElectric_kW(); + } + } + } + } +} + +sl_largeScalePV_ha_Businesspark.setValue((totalPVOnLand_kW/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha) + p_currentPVOnLand_ha, false); +sl_largeScaleWind_MW_Businesspark.setValue((totalWind_kW/1000) + p_currentWindTurbines_MW, false); + +//Curtailment +boolean curtailment = true; +for(GridConnection GC : utilityGridConnections){ + if(!GC.v_enableCurtailment){ + curtailment = false; + break; + } +} +cb_curtailment_businesspark.setSelected(curtailment, false); + + +//Large scale battery systems +double totalBatteryStorage_kWh = 0; +for(GCGridBattery batteryGC : uI_Tabs.f_getAllSliderGridConnections_gridBatteries()){ + if(batteryGC.v_isActive && batteryGC.p_isSliderGC){ + totalBatteryStorage_kWh += batteryGC.p_batteryAsset.getStorageCapacity_kWh(); + } +} + +sl_collectiveBattery_MWh_businesspark.setValue(totalBatteryStorage_kWh/1000, false); + + + + + VOID + double + 1754926103691 + f_updateElectricitySliders_custom + -330 + 150 + + false + true + true + //If you have a custom tab, +//override this function to make it update automatically +traceln("Forgot to override the update custom electricity sliders functionality"); + + + VOID + double + 1754985710087 + f_setGridBatteries + Function that takes a capacity in MWh as a parameter and sets the first GCGridBattery to this capacity, with the default ratio of storage to electric capacity from the AVGC data. + 89 + 981 + + false + true + true + + capacity_MWh + double + + + gcListGridBatteries + List<GCGridBattery> + + // TODO: make this work nicer with the new pause function (when setting capacity to 0 pause again?) + +if ( gcListGridBatteries.size() > 0 ){ + GCGridBattery GC = findFirst(gcListGridBatteries, GB -> GB.p_isSliderGC); + if(GC == null){ + traceln("WARNING: no specified slider grid battery in the model: random grid battery selected"); + GC = zero_Interface.energyModel.GridBatteries.get(0); + } + + if (!GC.v_isActive) { + GC.f_setActive(true); + } + GC.p_batteryAsset.setStorageCapacity_kWh(1000*capacity_MWh); + double capacityElectric_kW = 1000*capacity_MWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; + GC.p_batteryAsset.setCapacityElectric_kW(capacityElectric_kW); + GC.v_liveConnectionMetaData.physicalCapacity_kW = capacityElectric_kW; + GC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = capacityElectric_kW; + GC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = capacityElectric_kW; +} +else { + throw new IllegalStateException("Model does not contain any GCGridBattery agent"); +} + + + VOID + double + 1754986167346 + f_setCurtailment + 70 + 900 + + false + true + true + + activateCurtailment + boolean + + + gcList + List<GridConnection> + + for (GridConnection GC : gcList) { + GC.v_enableCurtailment = activateCurtailment; +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1756302457919 + f_initializeTab_Electricity + -350 + 30 + + false + true + true + f_getCurrentPVOnLandAndWindturbineValues(); + + + + + 1722247653562 + connections + 50 + -50 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1744962391299 + uI_Tabs + 50 + -100 + + false + true + true + + zerointerfaceloader + UI_Tabs + + + + 1744962391306 + zero_Interface + 150 + -100 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + 1753694295451 + uI_EnergyHub + 300 + -100 + + false + true + true + + zerointerfaceloader + UI_EnergyHub + + + + + + 1722247653568 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1722349953637 + rect_genericFunctions + 10 + 480 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -4144960 + null + SOLID + 370 + 730 + 0.0 + -1 + null + + + 1722328776701 + gr_electricitySliders_default + -10 + 0 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1722328776703 + rect_electricityDemandSliders + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + + null + SOLID + 370 + 350 + 0.0 + -32 + null + + + 1722328776711 + t_electricityDemandReduction_pct + 230 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_electricityDemandReduction_pct.getIntValue() + "%" + + Dialog + 14 + + + RIGHT + + + false + 1722328776713 + sl_electricityDemandReduction_pct + 260 + 15 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricityDemandReduction_pct.getValue() ); + + + 0 + HORIZONTAL + -50 + 50 + 1 + false + + + + 1722328776715 + t_electricityDemandReductionDescription + 10 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing verbruik + + Dialog + 14 + + + LEFT + + + 1722328776717 + txt_productionDescription + 15 + 55 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Opwek + + Calibri + 18 + + + LEFT + + + 1722328776719 + t_rooftopPVCompanies_pct + 230 + 80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_rooftopPVCompanies_pct.getIntValue() + "%" + + Dialog + 14 + + + RIGHT + + + false + 1722328776721 + sl_rooftopPVCompanies_pct + 260 + 75 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPVSystemCompanies( uI_Tabs.f_getActiveSliderGridConnections_utilities(), sl_rooftopPVCompanies_pct.getValue(), sl_rooftopPVCompanies_pct ); + +if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); +} + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722328776723 + t_rooftopPVCompaniesDescription + 15 + 80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zon op dak bedrijven + + Dialog + 14 + + + LEFT + + + 1722328776725 + t_largeScalePV_ha + 230 + 145 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_largeScalePV_ha.getValue() + " ha" + + Dialog + 14 + + + RIGHT + + + false + 1722328776727 + sl_largeScalePV_ha + 260 + 140 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPVOnLand(sl_largeScalePV_ha.getValue() - p_currentPVOnLand_ha, uI_Tabs.f_getAllSliderGridConnections_production()); + + + 0 + HORIZONTAL + p_currentPVOnLand_ha + p_currentPVOnLand_ha + 50 + 0.1 + false + + + + 1722328776729 + t_largeScalePVDescription + 15 + 145 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zon op land + + Dialog + 14 + + + LEFT + + + 1722328776731 + txt_batteryDescription_default + 15 + 250 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Batterijen + + Calibri + 18 + + + LEFT + + + false + 1722328776737 + sl_largeScaleWind_MW + 260 + 170 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setWindTurbines( sl_largeScaleWind_MW.getValue() - p_currentWindTurbines_MW, uI_Tabs.f_getAllSliderGridConnections_production()); + + + 0 + HORIZONTAL + p_currentWindTurbines_MW + p_currentWindTurbines_MW + 10 + 0.1 + false + + + + 1722328776739 + t_largeScaleWindDescription + 15 + 175 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Wind op land + + Dialog + 14 + + + LEFT + + + 1722328776741 + t_largeScaleWind_MW + 230 + 175 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_largeScaleWind_MW.getValue() + " MW" + + Dialog + 14 + + + RIGHT + + + 1722329161559 + t_rooftopPVHouses_pct + 230 + 110 + + true + true + false + SHAPE_DRAW_2D + sl_rooftopPVHouses_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_rooftopPVHouses_pct.getIntValue() + "%" + + Dialog + 14 + + + RIGHT + + + false + 1722329161561 + sl_rooftopPVHouses_pct + 260 + 105 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPVSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_rooftopPVHouses_pct.getValue() ); + +if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); +} + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722329161563 + t_rooftopPVHousesDescription + 15 + 110 + + true + true + false + SHAPE_DRAW_2D + sl_rooftopPVHouses_pct.isVisible() + false + 0 + 0.0 + -16777216 + Zon op dak huizen + + Dialog + 14 + + + LEFT + + + 1746091167061 + i_householdPV + 160 + 110 + + true + true + false + SHAPE_DRAW_2D3D + sl_rooftopPVHouses_pct.isVisible() + zero_Interface.f_setInfoText(i_householdPV, zero_Interface.v_infoText.householdRooftopPV, i_householdPV.getX() + uI_Tabs.v_presentationXOffset, i_householdPV.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746091167075 + i_landPV + 160 + 145 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_landPV, zero_Interface.v_infoText.landPV, i_landPV.getX() + uI_Tabs.v_presentationXOffset, i_landPV.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746091167087 + i_companyPV + 160 + 80 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyPV, zero_Interface.v_infoText.companyRooftopPV, i_companyPV.getX() + uI_Tabs.v_presentationXOffset, i_companyPV.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746091167099 + i_electricityReduction + 160 + 20 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_electricityReduction, zero_Interface.v_infoText.electricityDemandReduction, i_electricityReduction.getX() + uI_Tabs.v_presentationXOffset, i_electricityReduction.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746091167111 + i_landWind + 160 + 175 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_landWind, zero_Interface.v_infoText.landWind, i_landWind.getX() + uI_Tabs.v_presentationXOffset, i_landWind.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1754984198964 + t_collectiveBatteries_default + 230 + 275 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_collectiveBattery_MWh_default.getIntValue() + " MWh" + + Dialog + 14 + + + RIGHT + + + false + 1754984198968 + sl_collectiveBattery_MWh_default + 255 + 270 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setGridBatteries(sl_collectiveBattery_MWh_default.getValue(), uI_Tabs.f_getAllSliderGridConnections_gridBatteries()); + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + 0 + HORIZONTAL + 0 + 50 + 1 + false + + + + 1754984198970 + txt_curtailmentDescription_default + 15 + 210 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Curtailment opwek + + Dialog + 14 + + + LEFT + + + 1754984198972 + txt_collectiveBatteryDescription_default + 15 + 275 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Collectieve batterijen + + Dialog + 14 + + + LEFT + + + false + 1754984198974 + cb_curtailment_default + 300 + 202 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_setCurtailment(cb_curtailment_default.isSelected(), uI_Tabs.f_getActiveSliderGridConnections_consumption()); + + + + + false + + + + 1754984362078 + i_curtailment_default + 160 + 210 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_curtailment_default, zero_Interface.v_infoText.curtailment, i_curtailment_default.getX() + uI_Tabs.v_presentationXOffset, i_curtailment_default.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1754984365522 + i_collectiveBatteries_default + 160 + 275 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_collectiveBatteries_default, zero_Interface.v_infoText.gridBattery_default, i_collectiveBatteries_default.getX() + uI_Tabs.v_presentationXOffset, i_collectiveBatteries_default.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1722334503404 + rect_PVFunctions + 40 + 670 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -10496 + null + SOLID + 310 + 250 + 0.0 + -1 + null + + + 1722334611918 + txt_ProductionFunctionsDescription + 190 + 680 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Production Functions + + SansSerif + 18 + + + CENTER + + + 1722335253828 + rect_demandFunctions + 40 + 540 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -8355840 + null + SOLID + 310 + 120 + 0.0 + -1 + null + + + 1722335253832 + t_demandFunctionsDescription + 190 + 550 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Demand Functions + + SansSerif + 18 + + + CENTER + + + 1722349990233 + t_genericFunctions + 100 + 500 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Generic Functions + + SansSerif + 22 + + + LEFT + + + 1728384392418 + gr_electricitySliders_businesspark + 400 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + false + 0 + 0.0 + + + 1728384392420 + rect_electricityDemandSliders_Businesspark + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + + null + SOLID + 370 + 350 + 0.0 + -32 + null + + + 1728384392422 + t_electricityDemandReduction_pct_Businesspark + 230 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_electricityDemandReduction_pct_Businesspark.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + false + 1728384392424 + sl_electricityDemandReduction_pct_Businesspark + 260 + 15 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricityDemandReduction_pct_Businesspark.getValue() ); + + + 0 + HORIZONTAL + -50 + 50 + 1 + false + + + + 1728384392426 + txt_electricityDemandReductionDescription_Businesspark + 10 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing verbruik + + Dialog + 14 + + + LEFT + + + 1728384392428 + txt_productionDescription_Businesspark + 15 + 55 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Opwek + + Calibri + 18 + + + LEFT + + + 1728384392430 + t_rooftopPVCompanies_pct_Businesspark + 230 + 80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_rooftopPVCompanies_pct_Businesspark.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + false + 1728384392432 + sl_rooftopPVCompanies_pct_Businesspark + 260 + 75 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPVSystemCompanies( uI_Tabs.f_getActiveSliderGridConnections_utilities(), sl_rooftopPVCompanies_pct_Businesspark.getValue(), sl_rooftopPVCompanies_pct_Businesspark ); + +//If on pv map overlay, adjust colouring +if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); +} + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1728384392434 + txt_rooftopPVCompaniesDescription_Businesspark + 15 + 80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zon op dak bedrijven + + Dialog + 14 + + + LEFT + + + 1728384392436 + t_largeScalePV_ha_Businesspark + 230 + 115 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_largeScalePV_ha_Businesspark.getIntValue() + " ha" + + Dialog + 14 + + + CENTER + + + false + 1728384392438 + sl_largeScalePV_ha_Businesspark + 260 + 110 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPVOnLand(sl_largeScalePV_ha_Businesspark.getValue()- p_currentPVOnLand_ha, uI_Tabs.f_getAllSliderGridConnections_production()); + + + 0 + HORIZONTAL + p_currentPVOnLand_ha + p_currentPVOnLand_ha + 50 + 0.1 + false + + + + 1728384392440 + txt_largeScalePVDescription_Businesspark + 15 + 115 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zon op land + + Dialog + 14 + + + LEFT + + + 1728384392442 + txt_batteryDescription_businesspark + 15 + 230 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Batterijen + + Calibri + 18 + + + LEFT + + + false + 1728384392444 + sl_largeScaleWind_MW_Businesspark + 260 + 145 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setWindTurbines( sl_largeScaleWind_MW_Businesspark.getValue() - p_currentWindTurbines_MW, uI_Tabs.f_getAllSliderGridConnections_production()); + + + 0 + HORIZONTAL + p_currentWindTurbines_MW + p_currentWindTurbines_MW + 10 + 0.1 + false + + + + 1728384392446 + txt_largeScaleWindDescription_Businesspark + 15 + 150 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Wind op land + + Dialog + 14 + + + LEFT + + + 1728384392448 + t_largeScaleWind_MW_Businesspark + 230 + 150 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_largeScaleWind_MW_Businesspark.getIntValue() + " MW" + + Dialog + 14 + + + CENTER + + + 1746091438812 + i_landPV_Businesspark + 160 + 115 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_landPV_Businesspark, zero_Interface.v_infoText.landPV, i_landPV_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_landPV_Businesspark.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746091438857 + i_companyPV_Businesspark + 160 + 80 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyPV_Businesspark, zero_Interface.v_infoText.companyRooftopPV, i_companyPV_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_companyPV_Businesspark.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746091438909 + i_electricityReduction_Businesspark + 160 + 20 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_electricityReduction_Businesspark, zero_Interface.v_infoText.electricityDemandReduction, i_electricityReduction_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_electricityReduction_Businesspark.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746091438954 + i_landWind_Businesspark + 160 + 150 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_landWind_Businesspark, zero_Interface.v_infoText.landWind, i_landWind_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_landWind_Businesspark.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1754985531354 + txt_curtailmentDescription_businesspark + 15 + 185 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Curtailment opwek + + Dialog + 14 + + + LEFT + + + false + 1754985531358 + cb_curtailment_businesspark + 300 + 177 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_setCurtailment(cb_curtailment_businesspark.isSelected(), new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities())); + + + + + false + + + + 1754985531361 + i_curtailment_businesspark + 160 + 185 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_curtailment_businesspark, zero_Interface.v_infoText.curtailment, i_curtailment_businesspark.getX() + uI_Tabs.v_presentationXOffset, i_curtailment_businesspark.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1754985653985 + i_collectiveBatteries_businesspark + 160 + 260 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_collectiveBatteries_businesspark, zero_Interface.v_infoText.gridBattery_default, i_collectiveBatteries_businesspark.getX() + uI_Tabs.v_presentationXOffset, i_collectiveBatteries_businesspark.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1754985653994 + txt_collectiveBatteryDescription_businesspark + 15 + 260 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Collectieve batterijen + + Dialog + 14 + + + LEFT + + + 1754985653996 + t_collectiveBatteries_businesspark + 230 + 260 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_collectiveBattery_MWh_businesspark.getIntValue() + " MWh" + + Dialog + 14 + + + RIGHT + + + false + 1754985653998 + sl_collectiveBattery_MWh_businesspark + 255 + 255 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setGridBatteries(sl_collectiveBattery_MWh_businesspark.getValue(), uI_Tabs.f_getAllSliderGridConnections_gridBatteries()); + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + 0 + HORIZONTAL + 0 + 50 + 1 + false + + + + + + 1750063382217 + gr_electricitySliders_residential + 800 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + false + 0 + 0.0 + + + 1750063382219 + rect_electricityDemandSlidersResidentialArea + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 5 + + null + SOLID + 370 + 350 + 0.0 + -32 + null + + + 1750063382221 + t_electricityDemandIncreaseResidentialArea_pct + 235 + 165 + + true + true + false + SHAPE_DRAW_2D + sl_electricityDemandIncreaseResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + 0% + sl_electricityDemandIncreaseResidentialArea_pct.getIntValue() + "%" + + Dialog + 12 + + + CENTER + + + 1750063382223 + t_householdPVResidentialArea_pct + 235 + 55 + + true + true + false + SHAPE_DRAW_2D + sl_householdPVResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + 10% + sl_householdPVResidentialArea_pct.getIntValue() + "%" + + Dialog + 12 + + + CENTER + + + false + 1750063382225 + sl_householdPVResidentialArea_pct + 265 + 50 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPVSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdPVResidentialArea_pct.getValue() ); + +//If on pv map overlay, adjust colouring +if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); +} + +// Also updates the home batteries +f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), uI_Tabs.f_getActiveSliderGridConnections_houses() ); + + + 0 + HORIZONTAL + 0 + 100 + 5 + false + + + + 1750063382227 + t_householdPVResidentialAreaDescription + 20 + 55 + + true + true + false + SHAPE_DRAW_2D + sl_householdPVResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Share of houses with PV + + Dialog + 12 + + + LEFT + + + 1750063382229 + t_electricitDemandSlidersResidentialAreaDescription + 20 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Households + + Calibri + 14 + + + LEFT + + + 1750063382237 + t_householdBatteriesResidentialAreaDescription + 30 + 85 + + true + true + false + SHAPE_DRAW_2D + sl_householdBatteriesResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Of which with batteries + + Dialog + 12 + + + LEFT + + + false + 1750063382239 + sl_householdBatteriesResidentialArea_pct + 265 + 80 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), uI_Tabs.f_getActiveSliderGridConnections_houses() ); + + + 0 + HORIZONTAL + 0 + 100 + 5 + false + + + + 1750063382241 + t_householdBatteriesResidentialArea_pct + 235 + 85 + + true + true + false + SHAPE_DRAW_2D + sl_householdBatteriesResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + 0% + sl_householdBatteriesResidentialArea_pct.getIntValue() + "%" + + Dialog + 12 + + + CENTER + + + false + 1750063382243 + sl_gridBatteriesResidentialArea_kWh + 266 + 220 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setGridBatteries_residential( sl_gridBatteriesResidentialArea_kWh.getValue(), uI_Tabs.f_getAllSliderGridConnections_gridBatteries() ); + + + + 0 + HORIZONTAL + 0 + 1000 + 10 + false + + + + 1750063382245 + t_gridBatteriesResidentialAreaDescription + 20 + 226 + + true + true + false + SHAPE_DRAW_2D + sl_gridBatteriesResidentialArea_kWh.isVisible() + false + 0 + 0.0 + -16777216 + Shared battery capacity + + Dialog + 12 + + + LEFT + + + 1750063382247 + t_gridBatteriesResidentialArea_kW + 236 + 225 + + true + true + false + SHAPE_DRAW_2D + sl_gridBatteriesResidentialArea_kWh.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_gridBatteriesResidentialArea_kWh.getIntValue() + " kWh" + + Dialog + 12 + + + CENTER + + + 1750063382251 + t_electricityDemandIncreaseResidentialAreaDescription + 20 + 165 + + true + true + false + SHAPE_DRAW_2D + sl_electricityDemandIncreaseResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Electricity consumption growth + + Dialog + 12 + + + LEFT + + + false + 1750063382253 + sl_electricityDemandIncreaseResidentialArea_pct + 265 + 160 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setDemandIncrease( new ArrayList<GridConnection>(findAll(zero_Interface.energyModel.Houses, x -> true)), sl_electricityDemandIncreaseResidentialArea_pct.getValue() ); + + + + 0 + HORIZONTAL + -50 + 50 + 1 + false + + + + 1750063382255 + t_householdElectricCookingResidentialAreaDescription + 20 + 125 + + true + true + false + SHAPE_DRAW_2D + sl_householdElectricCookingResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Perc. electric cooking + + Dialog + 12 + + + LEFT + + + false + 1750063382257 + sl_householdElectricCookingResidentialArea_pct + 265 + 120 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setElectricCooking(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdElectricCookingResidentialArea_pct.getValue() ); + + + 0 + HORIZONTAL + 0 + 100 + 2 + false + + + + 1750063382259 + t_householdElectricCookingResidentialArea_pct + 235 + 125 + + true + true + false + SHAPE_DRAW_2D + sl_householdElectricCookingResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + 0% + sl_householdElectricCookingResidentialArea_pct.getIntValue() + "%" + + Dialog + 12 + + + CENTER + + + false + 1750063382261 + button_trafoReinforcement + 238 + 0 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + false; // DOESNT WORK PROPERLY + true + zero_Interface.v_clickedGridNode != null + //gr_electricityDemandSlidersResidentialAreaScale.setVisible(false); +gr_trafoReinforcement.setVisible(true); + + + + + Trafo reinforcement + + + + 1752232850349 + i_householdRooftopPV + 190 + 55 + + true + true + false + SHAPE_DRAW_2D3D + sl_householdPVResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdRooftopPV, zero_Interface.v_infoText.householdRooftopPV, i_householdRooftopPV.getX() + uI_Tabs.v_presentationXOffset, i_householdRooftopPV.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1752232850368 + i_householdBatteries + 190 + 85 + + true + true + false + SHAPE_DRAW_2D3D + sl_householdBatteriesResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdBatteries, zero_Interface.v_infoText.householdBatteries, i_householdBatteries.getX() + uI_Tabs.v_presentationXOffset, i_householdBatteries.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1752232850385 + i_householdElectricCooking + 190 + 125 + + true + true + false + SHAPE_DRAW_2D3D + sl_householdElectricCookingResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdElectricCooking, zero_Interface.v_infoText.householdElectricCooking, i_householdElectricCooking.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricCooking.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1752232850402 + i_householdElectricityGrowth + 190 + 165 + + true + true + false + SHAPE_DRAW_2D3D + sl_electricityDemandIncreaseResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdElectricityGrowth, zero_Interface.v_infoText.householdElectricityConsumptionGrowth, i_householdElectricityGrowth.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricityGrowth.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1752232850473 + i_householdNeighbourhoodBatteries + 190 + 225 + + true + true + false + SHAPE_DRAW_2D3D + sl_gridBatteriesResidentialArea_kWh.isVisible() + zero_Interface.f_setInfoText(i_householdNeighbourhoodBatteries, zero_Interface.v_infoText.gridBattery_residential, i_householdNeighbourhoodBatteries.getX() + uI_Tabs.v_presentationXOffset, i_householdNeighbourhoodBatteries.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1750063382277 + gr_trafoReinforcement + 1200 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + false + 0 + 0.0 + + + 1750063382279 + rect_trafoReinforcement + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 370 + 350 + 0.0 + -32 + null + + + 1750063382281 + t_addTrafoDescription + 10 + 70 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trafostation uitbreiden/bijplaatsen + + SansSerif + 11 + + + LEFT + + + false + 1750063382283 + sl_trafoReinforcement + 20 + 90 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + + + 0 + HORIZONTAL + 0 + 1000 + 50 + false + + + + 1750063382285 + t_minTrafoReinforcement + 20 + 120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + min + sl_trafoReinforcement.getMin() + + SansSerif + 10 + + + LEFT + + + 1750063382287 + t_maxTrafoReinforcement + 170 + 120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + max + sl_trafoReinforcement.getMax() + + SansSerif + 10 + + + RIGHT + + + 1750063382289 + t_trafoReinforcementValue + 95 + 120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + value + sl_trafoReinforcement.getIntValue() + " kVA" + + SansSerif + 10 + + + CENTER + + + false + 1750063382291 + t_confirmTrafoReinforcement + 210 + 94 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + zero_Interface.v_clickedGridNode.p_capacity_kW += sl_trafoReinforcement.getValue(); + +zero_Interface.f_setTrafoText(); + + + + Voer netuitbreiding uit + + + + 1750063382293 + t_currentTrafoReinforcement + 200 + 70 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Huidige LS-capaciteit: 300 kVA + "Huidige LS-capaciteit: " + roundToInt(zero_Interface.v_clickedGridNode.p_capacity_kW) + " kVA" + + SansSerif + 11 + + + LEFT + + + false + 1750063382295 + t_resetTrafoReinforcement + 215 + 300 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + for (GridNode GN : zero_Interface.energyModel.f_getGridNodesNotTopLevel() ){ + GN.p_capacity_kW = GN.p_originalCapacity_kW; +} +for (GridNode GN : zero_Interface.energyModel.f_getGridNodesTopLevel() ){ + GN.p_capacity_kW = GN.p_originalCapacity_kW; +} +zero_Interface.f_setTrafoText(); + + + + + Reset trafostations + + + + false + 1750063382297 + t_closeTrafoReinforcement + 350 + 2 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + gr_trafoReinforcement.setVisible(false); + + + + + + + + 1750063382299 + line_closeTrafoReinforcement1 + 353 + 17 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -2894893 + null + SOLID + 1 + 0 + 1 + 0 + 12 + -12 + 0 + + + 1750063382301 + line_closeTrafoReinforcement2 + 365 + 17 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -2894893 + null + SOLID + 1 + 0 + 1 + 0 + -12 + -12 + 0 + + + 1750063382303 + t_titleTrafoReinforcement + 20 + 21 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trafostation reinforcement + + Calibri + 14 + + + LEFT + + + + + 1754985710083 + rect_batteryFunctions + 39 + 931 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16744320 + null + SOLID + 311 + 109 + 0.0 + -1 + null + + + 1754985710085 + t_batteryFunctionsDescription + 189 + 936 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Battery Functions + + Dialog + 18 + + + CENTER + + + + + + + 1722253108625 + tabHeating + // Default Sliders +public ShapeGroup getGroupHeatDemandSliders() { + return this.gr_heatingSliders_default; +} + +public ShapeSlider getSliderHeatDemandReductionCompanies_pct() { + return this.sl_heatDemandReductionCompanies_pct; +} + +public ShapeSlider getSliderGasBurnerCompanies_pct() { + return this.sl_gasBurnerCompanies_pct; +} + +public ShapeSlider getSliderElectricHeatPumpCompanies_pct() { + return this.sl_electricHeatPumpCompanies_pct; +} + +public ShapeSlider getSliderHeatDemandReductionHouseholds_pct() { + return this.sl_heatDemandReductionHouseholds_pct; +} + +public ShapeSlider getSliderGasBurnerHouseholds_pct() { + return this.sl_gasBurnerHouseholds_pct; +} + +public ShapeSlider getSliderElectricHeatPumpHouseholds_pct() { + return this.sl_electricHeatPumpHouseholds_pct; +} + +// Residential Tab Sliders +public ShapeGroup getGroupHeatDemandSlidersResidentialArea() { + return this.gr_heatingSliders_residential; +} + +public ShapeSlider getSliderHeatDemandSlidersResidentialAreaHouseholdsGasBurner_pct() { + return this.sl_householdGasBurnerResidentialArea_pct; +} +public ShapeSlider getSl_householdHybridHeatpumpResidentialArea() { + return this.sl_householdHybridHeatpumpResidentialArea; +} + +public ShapeSlider getSliderHeatDemandSlidersResidentialAreaHouseholdsElectricHeatPump_pct() { + return this.sl_householdElectricHeatPumpResidentialArea_pct; +} + +// Company Tab Sliders +public ShapeGroup getGroupHeatDemandSlidersCompanies() { + return this.gr_heatingSliders_businesspark; +} + +public ShapeSlider getSliderHeatDemandSlidersCompaniesHeatDemandReductionCompanies_pct() { + return this.sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct; +} + +public ShapeSlider getSliderHeatDemandSlidersCompaniesGasBurnerCompanies_pct() { + return this.sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct; +} + +public ShapeSlider getSliderHeatDemandSlidersCompaniesElectricHeatPumpCompanies_pct() { + return this.sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct; +} + +public ShapeSlider getSl_heatingTypeSlidersCompaniesCustom_pct(){ + return this.sl_heatingTypeSlidersCompaniesCustom_pct; +} + +public ShapeSlider getSl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct(){ + return this.sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct; +} + +public ShapeSlider getSl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct(){ + return this.sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct; +} + 1754045642067 + import zeroPackage.ZeroMath; + + zerointerfaceloader + tabArea + + false + + 1722253108631 + 1722253108631 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089977 + true + 1722326400000 + + 0 + HOUR + + + 1 + HOUR + + + + 1722253108628 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1722253108632 + 1722253108626 + + + VOID + int + 1722256102007 + f_setHeatingSystemsCompanies + Function that adds or removes heatpumps to utility connections. Takes a percentage as a parameter and runs untill that percentage of all the utility connections has a heatpump. If a new heatpump is created it determines its heat demand on a heat_demand consumption asset if it exists, else it looks for a heat profile asset. The function also updates the radio button in the company UI. + true + 100 + 1190 + + false + false + true + + gcList + List<GCUtility> + + + sliderGasburner + ShapeSlider + + + sliderHeatpump + ShapeSlider + + + sliderHybridHeatPump + ShapeSlider + + + sliderDistrictHeating + ShapeSlider + + + sliderCustomHeating + ShapeSlider + + double targetHeatPump_pct = sliderHeatpump.getValue(); + +//Set the sliders if companyUI is present using the companyUI functions, if not: do it the normal way +if(zero_Interface.c_companyUIs.size()>0){ + f_setHeatingSystemsWithCompanyUI(gcList, targetHeatPump_pct, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); +} +else{ + ArrayList<GCUtility> companies = new ArrayList<GCUtility>(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).toList()); + double nbHeatPumps = count(gcList, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); + + while ( targetHeatPumpAmount < nbHeatPumps) { // remove excess heatpumps, replace with gasburners. + GCUtility company = findFirst(companies, x->x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + if (company != null) { + company.c_heatingAssets.get(0).removeEnergyAsset(); + nbHeatPumps--; + companies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); + double heatOutputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minGasBurnerOutputCapacity_kW, peakHeatDemand_kW); + new J_EAConversionGasBurner(company, heatOutputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); + company.f_addHeatManagementToGC(company, OL_GridConnectionHeatingType.GAS_BURNER, false); + } + else { + throw new RuntimeException("Can't find Heatpump in company that should have heatpump in f_setHeatingSystemsCompanies."); + } + } + + while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. + GCUtility company = findFirst(companies, x -> x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); + if (company != null) { + company.c_heatingAssets.get(0).removeEnergyAsset(); + nbHeatPumps++; + companies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); + double electricInputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minHeatpumpElectricCapacity_kW, peakHeatDemand_kW); + new J_EAConversionHeatPump(company, electricInputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC, zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), 0, 1, OL_AmbientTempType.AMBIENT_AIR); + company.f_addHeatManagementToGC(company, OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false); + } + else { + throw new RuntimeException("Can't find Gasburner in company that should have gasburner in f_setHeatingSystemsCompanies."); + } + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.b_changeToCustomScenario = true; +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1722256221655 + f_setHeatingSystemsHouseholds + Function that adds or removes heatpumps to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a heatpump. If a new heatpump is created it determines its heat demand on a heat_demand consumption asset if it exists, else it looks for a heat profile asset. + true + 100 + 1230 + + false + true + true + + gcList + List<GCHouse> + + + targetHeatPump_pct + double + + ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedHeatingSystemsHouses.stream().filter(gcList::contains).toList()); +double nbHeatPumps = count(gcList, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); +int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); + +while ( nbHeatPumps > targetHeatPumpAmount) { // remove excess heatpumps, replace with gasburners. + GCHouse house = findFirst(houses, x->x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + if (house != null) { + house.c_heatingAssets.get(0).removeEnergyAsset(); + nbHeatPumps--; + houses.remove(house); + zero_Interface.c_orderedHeatingSystemsHouses.remove(house); + zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house) * 2;//Just make it always twice as high, to be able to support savings/additional consumption slider settings. + double heatOutputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minGasBurnerOutputCapacity_kW, peakHeatDemand_kW); + new J_EAConversionGasBurner(house, heatOutputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); + house.f_addHeatManagementToGC(house, OL_GridConnectionHeatingType.GAS_BURNER, false); + } + else { + throw new RuntimeException("Can't find Heatpump in house that should have heatpump in f_setHeatingSystemsHouseholds."); + } +} + +while ( nbHeatPumps < targetHeatPumpAmount) { // remove gasburners, add heatpumps. + GCHouse house = findFirst(houses, x -> x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); + if (house != null) { + house.c_heatingAssets.get(0).removeEnergyAsset(); + nbHeatPumps++; + houses.remove(house); + zero_Interface.c_orderedHeatingSystemsHouses.remove(house); + zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house) * 2;//Just make it always twice as high, to be able to support savings/additional consumption slider settings. + double electricInputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minHeatpumpElectricCapacity_kW, peakHeatDemand_kW); + new J_EAConversionHeatPump(house, electricInputPower_kW, 0.5, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC, zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), 0, 1, OL_AmbientTempType.AMBIENT_AIR); + house.f_addHeatManagementToGC(house, OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false); + } + else { + throw new RuntimeException("Can't find Gasburner in house that should have gasburner in f_setHeatingSystemsHouseholds."); + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.b_changeToCustomScenario = true; +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1722335783993 + f_setDemandReductionHeating + Function that reduces the heat demand of all profile and consumption assets. Takes as arguments a list of GridConnections to effect and a percentage to reduce by compared to the default value of the assets. Does not effect heating demand from gridconnection that have a thermal building model. + 70 + 560 + + false + true + true + + gcList + List<GridConnection> + + + demandReduction_pct + double + + double scalingFactor = 1 - demandReduction_pct/100; + +for (GridConnection gc : gcList) { + // Set Consumption Assets + for (J_EAConsumption j_ea : gc.c_consumptionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.HEAT_DEMAND) { + j_ea.setConsumptionScaling_fr( scalingFactor ); + } + } + // Set Profile Assets + for (J_EAProfile j_ea : gc.c_profileAssets) { + if (j_ea.energyCarrier == OL_EnergyCarriers.HEAT) { + j_ea.setProfileScaling_fr( scalingFactor ); + } + } + + if(gc.p_BuildingThermalAsset != null){ + gc.p_BuildingThermalAsset.setLossScalingFactor_fr(scalingFactor); + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + int + 1729259449060 + f_setHeatingSystemsWithCompanyUI + true + 120 + 1210 + + false + true + true + + gcList + List<GCUtility> + + + targetHeatPump_pct + double + + + sliderGasburner + ShapeSlider + + + sliderHeatpump + ShapeSlider + + + sliderHybridHeatPump + ShapeSlider + + + sliderDistrictHeating + ShapeSlider + + + sliderCustomHeating + ShapeSlider + + ArrayList<GCUtility> companies = new ArrayList<GCUtility>(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).filter(x -> x.v_isActive).toList()); +int nbActiveCompanies = companies.size() + v_totalNumberOfCustomHeatingSystems; +int nbHeatPumps = count(companies, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); +int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * nbActiveCompanies); + + +while ( targetHeatPumpAmount < nbHeatPumps){ // remove excess heatpumps of companies that didnt start with a heatpump, replace with gasburners. + GCUtility company = findFirst(companies, gc -> gc.p_heatingManagement != null && !(gc.p_heatingManagement instanceof J_HeatingManagementGhost) && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + if (company != null) { + UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); + + companyUI.b_runningMainInterfaceSlider = true; + if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ + int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); + companyUI.GCnr_selection.setValue(i, true); + } + // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! + boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); + companyUI.rb_heatingTypePrivateUI.setEnabled(true); + companyUI.rb_heatingTypePrivateUI.setValue(0, true); // First option is gasburner + companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); + companyUI.rb_scenariosPrivateUI.setValue(2, false); + companyUI.b_runningMainInterfaceSlider = false; + + //Reorder c_orderedHeatingSystems + zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); + companies.remove(company); + nbHeatPumps--; + } + else { //No more heating assets to adjust: this is the minimum: set slider to minimum and do nothing else + int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); + sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); + f_setHeatingSliders(1, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); + return; + } +} + +while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. + + GCUtility company = findFirst(companies, gc -> gc.p_heatingManagement != null && !(gc.p_heatingManagement instanceof J_HeatingManagementGhost) && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); + if (company != null) { + UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); + companyUI.b_runningMainInterfaceSlider = true; + if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ + int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); + companyUI.GCnr_selection.setValue(i, true); + } + + // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! + boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); + companyUI.rb_heatingTypePrivateUI.setEnabled(true); + companyUI.rb_heatingTypePrivateUI.setValue(2, true); // Third option (index 2) is electric heatpump + companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); + companyUI.rb_scenariosPrivateUI.setValue(2, false); + companyUI.b_runningMainInterfaceSlider = false; + + //Reorder c_orderedHeatingSystems + zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); + companies.remove(company); + nbHeatPumps++; + } + else { //No more gas burner assets to adjust: this is the minimum: set slider to minimum and do nothing else + int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); + sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); + f_setHeatingSliders(1, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); + return; + } +} + + + RETURNS_VALUE + double + 1749116448649 + f_calculatePeakHeatDemand_kW + 60 + 1070 + + false + true + true + + gc + GridConnection + + double peakHeatDemand_kW = 0.0; +for (J_EAConsumption j_ea : gc.c_consumptionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.HEAT_DEMAND || j_ea.getEAType() == OL_EnergyAssetType.HOT_WATER_CONSUMPTION) { + double[] profile = j_ea.getProfilePointer().getAllValues(); + double maxFactor = Arrays.stream(profile).max().getAsDouble(); + peakHeatDemand_kW += maxFactor * j_ea.yearlyDemand_kWh * j_ea.getConsumptionScaling_fr(); + } +} +for (J_EAProfile j_ea : gc.c_profileAssets) { + if (j_ea.energyCarrier == OL_EnergyCarriers.HEAT) { + double maxValue = j_ea.getProfileScaling_fr() * Arrays.stream(j_ea.a_energyProfile_kWh).max().getAsDouble(); + peakHeatDemand_kW += maxValue / zero_Interface.energyModel.p_timeStep_h * j_ea.getProfileScaling_fr(); + } +} +if (gc.p_BuildingThermalAsset != null) { + double maximalTemperatureDifference_K = 30.0; // Approximation + peakHeatDemand_kW += gc.p_BuildingThermalAsset.getLossFactor_WpK() * maximalTemperatureDifference_K / 1000; +} +return peakHeatDemand_kW; + + + VOID + double + 1749739532180 + f_addDistrictHeatingToAllHouses + 70 + 900 + + false + true + true + + housesGCList + List<GCHouse> + + for (GCHouse house: housesGCList ) { + // Remove the existing heating assets + house.f_removeAllHeatingAssets(); + + // Add a heat node + house.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + // Create a heat node if it does not exist yet + if(house.p_parentNodeHeat == null){ + GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); + zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); + GN_heat.p_gridNodeID = "Heatgrid"; + + // Check wether transformer capacity is known or estimated + GN_heat.p_capacity_kW = 1000000; + GN_heat.p_realCapacityAvailable = false; + + // Basic GN information + GN_heat.p_description = "Warmtenet"; + + //Define node type + GN_heat.p_nodeType = OL_GridNodeType.HT; + GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + + //Define GN location + GN_heat.p_latitude = 0; + GN_heat.p_longitude = 0; + GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + + //Connect + house.p_parentNodeHeat = GN_heat; + + //Show warning that heat grid is not a simple solution + zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); + } + house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; + + double outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); + double efficiency = 1.0; + + new J_EAConversionHeatDeliverySet(house, peakHeatDemand_kW, efficiency, zero_Interface.energyModel.p_timeStep_h, outputTemperature_degC); + + house.f_addHeatManagement(OL_GridConnectionHeatingType.DISTRICTHEAT, false); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1749739532202 + f_removeDistrictHeatingFromAllHouses + 70 + 920 + + false + true + true + + housesGCList + List<GCHouse> + + for (GCHouse house: housesGCList ) { + house.f_removeAllHeatingAssets(); + house.p_parentNodeHeat = null; + house.p_parentNodeHeatID = null; + + //add gasburner + J_EAConsumption heatDemandAsset = findFirst(house.c_consumptionAssets, j_ea -> j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); + J_EAConversionGasBurner gasBurner; + //if house has follows the general heat deamnd profile + if (heatDemandAsset != null) { + gasBurner = new J_EAConversionGasBurner(house, heatDemandAsset.yearlyDemand_kWh/8760*10, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); + } + //if house has a thermalBuildingAsset + else if (house.p_BuildingThermalAsset != null){ + double gasBurnerCapacity_kW = 10; + gasBurner = new J_EAConversionGasBurner(house, gasBurnerCapacity_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); + } + // Else house has a customprofiel + else { + J_EAProfile heatDemandProfile = (J_EAProfile)findFirst(house.c_profileAssets, x->x instanceof J_EAProfile && x.energyCarrier == OL_EnergyCarriers.HEAT); + double peakHeatDemand_kW = heatDemandProfile.getProfileScaling_fr() * Arrays.stream(heatDemandProfile.a_energyProfile_kWh).max().orElseThrow(() -> new RuntimeException("Unable to find the maximum of the heat demand profile")); + gasBurner = new J_EAConversionGasBurner(house, peakHeatDemand_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); + } + house.f_addHeatManagement(OL_GridConnectionHeatingType.GAS_BURNER, false); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1749739532217 + f_setAircos + 70 + 610 + + false + true + true + + gcListHouses + List<GCHouse> + + + desiredShare + double + + double nbHousesWithAirco = count(gcListHouses, x -> x.p_airco != null); +double nbHouses = gcListHouses.size(); + +while ( roundToInt(nbHouses * desiredShare) > nbHousesWithAirco ) { + GCHouse house = randomWhere(gcListHouses, x -> x.p_airco == null); + double aircoPower_kW = roundToDecimal(uniform(3,6),1); + new J_EAAirco(house, aircoPower_kW, zero_Interface.energyModel.p_timeStep_h); + nbHousesWithAirco ++; +} +while ( roundToInt(nbHouses * desiredShare) < nbHousesWithAirco ) { + GCHouse house = randomWhere(gcListHouses, x -> x.p_airco != null); + house.p_airco.removeEnergyAsset(); + nbHousesWithAirco --; +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + + VOID + double + 1749739532231 + f_addLTDH + 70 + 850 + + false + true + true + + housesGCList + List<GCHouse> + + for (GCHouse house: housesGCList ) { + house.f_removeAllHeatingAssets(); + + // Add a heat node + house.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + // Create a heat node if it does not exist yet + if(house.p_parentNodeHeat == null){ + GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); + zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); + GN_heat.p_gridNodeID = "Heatgrid"; + + // Check wether transformer capacity is known or estimated + GN_heat.p_capacity_kW = 1000000; + GN_heat.p_realCapacityAvailable = false; + + // Basic GN information + GN_heat.p_description = "Warmtenet"; + + //Define node type + GN_heat.p_nodeType = OL_GridNodeType.HT; + GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + + //Define GN location + GN_heat.p_latitude = 0; + GN_heat.p_longitude = 0; + GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + + //Connect + house.p_parentNodeHeat = GN_heat; + + //Show warning that heat grid is not a simple solution + zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); + } + house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); + double heatpumpElectricCapacity_kW = min(peakHeatDemand_kW / 3, 1.0); + double efficiency_fr = 0.5; + double inputTemperature_degC = 15.0; // TODO: Look at these temperatures! + double outputTemperature_degC = 50.0; + double sourceAssetHeatPower_kW = 0.0; + double belowZeroHeatpumpEtaReductionFactor = 1.0; + J_EAConversionHeatPump heatpump = new J_EAConversionHeatPump(house, + heatpumpElectricCapacity_kW, + efficiency_fr, + zero_Interface.energyModel.p_timeStep_h, + outputTemperature_degC, + zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), + sourceAssetHeatPower_kW, + belowZeroHeatpumpEtaReductionFactor, + OL_AmbientTempType.HEAT_GRID + ); + heatpump.updateParameters(inputTemperature_degC, outputTemperature_degC); + house.f_addHeatManagement(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, false); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1749739532244 + f_removeLTDH + 70 + 870 + + false + true + true + + housesGCList + List<GCHouse> + + for (GCHouse house: housesGCList ) { + // Disconnect from GridNode Heat + house.p_parentNodeHeat = null; + house.p_parentNodeHeatID = null; + + // Remove Heatpump and replace with gasburner + house.f_removeAllHeatingAssets(); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); + new J_EAConversionGasBurner(house, peakHeatDemand_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); + house.f_addHeatManagement(OL_GridConnectionHeatingType.GAS_BURNER, false); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1752227724432 + f_householdInsulation + 70 + 580 + + false + true + true + + housesGCList + List<GCHouse> + + + houses_pct + double + + int nbHouses = count(housesGCList, x -> x.p_energyLabel != OL_GridConnectionIsolationLabel.A); +int nbHousesWithImprovedInsulation = count(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); +int targetNbHousesWithImprovedInsulation = roundToInt(houses_pct / 100.0 * nbHouses); + +while (nbHousesWithImprovedInsulation < targetNbHousesWithImprovedInsulation) { + GCHouse house = findFirst(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() >= 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); + if (house != null) { + house.p_BuildingThermalAsset.setLossScalingFactor_fr( 0.7 ); + nbHousesWithImprovedInsulation++; + } + else { + throw new RuntimeException("Unable to find house that does not yet have additional insulation"); + } +} +while (nbHousesWithImprovedInsulation > targetNbHousesWithImprovedInsulation) { + GCHouse house = findFirst(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); + if (house != null) { + house.p_BuildingThermalAsset.setLossScalingFactor_fr( 1 ); + nbHousesWithImprovedInsulation--; + } + else { + throw new RuntimeException("Unable to find house that has additional insulation"); + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1753950993262 + f_setPTSystemHouses + Function that adds or removes photovoltaic production assets to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a PV asset. If a new asset is created it takes as its electric capacity a random value between 3 and 6 kW. The variables for amount of installed PV are updated automatically in the zero_engine. + + 70 + 1010 + + false + true + true + + gcList + List<GCHouse> + + + PT_pct + double + + ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedPTSystemsHouses.stream().filter(gcList::contains).toList()); +int nbHouses = houses.size(); +int nbHousesWithPT = count(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); +int nbHousesWithPTGoal = roundToInt(PT_pct / 100.0 * nbHouses); + +while ( nbHousesWithPTGoal < nbHousesWithPT ) { // remove excess PV systems + GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); + J_EA ptAsset = findFirst(house.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOTHERMAL ); + + if (ptAsset != null) { + ptAsset.removeEnergyAsset(); + houses.remove(house); + zero_Interface.c_orderedPTSystemsHouses.remove(house); + zero_Interface.c_orderedPTSystemsHouses.add(0, house); + + if(house.p_heatBuffer != null){ + house.p_heatBuffer.removeEnergyAsset(); + } + if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + J_EAProduction pvAsset = findFirst(house.c_productionAssets, ea -> ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); + if(pvAsset != null){ + double newInstalledPVCapacity = min(house.v_liveAssetsMetaData.PVPotential_kW, pvAsset.getCapacityElectric_kW() + zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); + pvAsset.setCapacityElectric_kW(newInstalledPVCapacity); + } + } + nbHousesWithPT --; + } + else { + traceln(" cant find PV asset in house that should have PV asset in f_setPVHouses (Interface)"); + } +} + +while ( nbHousesWithPTGoal > nbHousesWithPT ) { + GCHouse house = findFirst(houses, x -> !x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); + if (house == null){ + traceln("No gridconnection without PT panels found! Current PVsystems count: %s", nbHousesWithPT); + break; + } + else { + String assetName = "Rooftop PT"; + double installedPTCapacity_kW = zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPTPower_kWpm2;//roundToDecimal(uniform(3,6),2); + + //Compensate for pt if it is present + if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + J_EAProduction pvAsset = findFirst(house.c_productionAssets, ea -> ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); + if(pvAsset != null){ + double newInstalledPVCapacity = max(0, pvAsset.getCapacityElectric_kW() - zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); + pvAsset.setCapacityElectric_kW(newInstalledPVCapacity); + } + } + J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOTHERMAL, assetName, OL_EnergyCarriers.HEAT, installedPTCapacity_kW, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); + + //Get parameters for the heatbuffer + double lossFactor_WpK = 0;// For now no loss factor + double minTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgMinHeatBufferTemperature_degC; + double maxTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgMaxHeatBufferTemperature_degC; + double initialTemperature_degC = (minTemperature_degC + maxTemperature_degC)/2; + double setTemperature_degC = initialTemperature_degC; + double heatBufferStorageCapacity_m3 = zero_Interface.energyModel.avgc_data.p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 * installedPTCapacity_kW/zero_Interface.energyModel.avgc_data.p_avgPTPower_kWpm2; + double heatCapacity_JpK = zero_Interface.energyModel.avgc_data.p_waterHeatCapacity_JpkgK*(heatBufferStorageCapacity_m3*zero_Interface.energyModel.avgc_data.p_waterDensity_kgpm3); + + //Add heatbuffer + J_EAStorageHeat heatbufferAsset = new J_EAStorageHeat ( house, OL_EnergyAssetType.STORAGE_HEAT, installedPTCapacity_kW, lossFactor_WpK, zero_Interface.energyModel.p_timeStep_h, initialTemperature_degC, minTemperature_degC, maxTemperature_degC, setTemperature_degC, heatCapacity_JpK, OL_AmbientTempType.FIXED); + + houses.remove(house); + zero_Interface.c_orderedPTSystemsHouses.remove(house); + zero_Interface.c_orderedPTSystemsHouses.add(0, house); + nbHousesWithPT ++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1754391096443 + f_setHeatingSliders + Function that calculates all the values of the other sliders and sets them without calling an action. Takes as parameters the index of the slider which should not be touched as well as all the sliders. HybridHeatPump and DistrictHeating sliders are optional and an argument of null can be passed. + 70 + 690 + + false + true + true + + gcList + List<GridConnection> + + + orderedHeatingSystemGCList + List<GridConnection> + + + changedSliderHeatingType + OL_GridConnectionHeatingType + + + gasBurnerSlider + ShapeSlider + + + hybridHeatPumpSlider + ShapeSlider + + + heatPumpSlider + ShapeSlider + + + HTdistrictHeatingSlider + ShapeSlider + + + LTdistrictHeatingSlider + ShapeSlider + + + customHeatingSlider + ShapeSlider + + ////Determine the changed slider index used in the distribution for loop +int changedSliderIndex = 0; +switch(changedSliderHeatingType){ + case GAS_BURNER: + changedSliderIndex = 0; + break; + case HYBRID_HEATPUMP: + changedSliderIndex = 1; + break; + case ELECTRIC_HEATPUMP: + changedSliderIndex = 2; + break; + case DISTRICTHEAT: + changedSliderIndex = 3; + break; + case LT_DISTRICTHEAT: + case CUSTOM: + throw new RuntimeException("Changed a heating type slider with a currently unsupported type!"); +} + +//// Get current pct values (after slider change, but before correction; In other words total_pct != 100) +double pct_naturalGasBurner = gasBurnerSlider.getValue(); +double pct_hybridHeatPump = hybridHeatPumpSlider != null ? hybridHeatPumpSlider.getValue() : 0; +double pct_electricHeatPump = heatPumpSlider != null ? heatPumpSlider.getValue() : 0; +double pct_HTdistrictHeating = HTdistrictHeatingSlider != null ? HTdistrictHeatingSlider.getValue() : 0; +double pct_LTdistrictHeating = LTdistrictHeatingSlider != null ? LTdistrictHeatingSlider.getValue() : 0; +double pct_customHeatingSlider = customHeatingSlider != null ? customHeatingSlider.getValue() : 0; + +//Set array with pct values +double pctArray[] = { + pct_naturalGasBurner, + pct_hybridHeatPump, + pct_electricHeatPump, + pct_HTdistrictHeating, + pct_LTdistrictHeating, + pct_customHeatingSlider +}; + +//// Create a ghost asset array, and fill it. This is used to find minimums of certain sliders. Also get the total amount of GC with heating systems. +int ghostAssetTotalArray[] = new int[pctArray.length]; +int totalGCWithHeating = 0; +for(GridConnection GC : gcList){ + if(GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE && GC.v_isActive){ + totalGCWithHeating++; + + if(GC.f_getHeatingTypeIsGhost()){ + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + ghostAssetTotalArray[0]++; + break; + case HYBRID_HEATPUMP: + ghostAssetTotalArray[1]++; + break; + case ELECTRIC_HEATPUMP: + ghostAssetTotalArray[2]++; + break; + case DISTRICTHEAT: + ghostAssetTotalArray[3]++; + break; + case LT_DISTRICTHEAT: + ghostAssetTotalArray[4]++; + break; + case CUSTOM: + ghostAssetTotalArray[5]++; + break; + } + } + } +} + +//// Correct the slider change trough to the other sliders. But don't move the custom slider or set sliders lower than their unchangable ghost assets. +int customSliderIndex = 5; +double pctExcess = Arrays.stream(pctArray).sum() - 100; + +for (int i = 0; i < pctArray.length && pctExcess != 0 ; i++) { + if (i != changedSliderIndex && i != customSliderIndex) { + double ghostMin_pct = ((double) 100.0 * ghostAssetTotalArray[i]) / totalGCWithHeating; + double maxDown_pct = pctArray[i] - ghostMin_pct; + double maxUp_pct = 100 - pctArray[i]; + + // Determine the slider delta, positive delta -> slider increases, negative -> slider decreases + double deltaSlider_pct = 0; + if(pctExcess > 0){ + deltaSlider_pct = -min(maxDown_pct, pctExcess); + } + else{ + deltaSlider_pct = min(maxUp_pct, -pctExcess); + } + + pctArray[i] += deltaSlider_pct; + pctExcess = Arrays.stream(pctArray).sum() - 100; + } +} + +//If still not 0, then adjust the changedSlider back to solve it. +if (pctExcess != 0){ + pctArray[changedSliderIndex] = max(0, pctArray[changedSliderIndex] - pctExcess); +} + +//// Set refound values to the sliders again +gasBurnerSlider.setValue(roundToInt(pctArray[0]), false); +if(hybridHeatPumpSlider != null){ + hybridHeatPumpSlider.setValue(roundToInt(pctArray[1]), false); +} +if(heatPumpSlider != null){ + heatPumpSlider.setValue(roundToInt(pctArray[2]), false); +} +if(HTdistrictHeatingSlider != null){ + HTdistrictHeatingSlider.setValue(roundToInt(pctArray[3]), false); +} +if(LTdistrictHeatingSlider != null){ + LTdistrictHeatingSlider.setValue(roundToInt(pctArray[4]), false); +} +if(customHeatingSlider != null){ + customHeatingSlider.setValue(roundToInt(pctArray[5]), false); +} + + +//Set the heating systems in the engine to the correct setting +f_setHeatingSystems(gcList, orderedHeatingSystemGCList, changedSliderHeatingType, pctArray[changedSliderIndex]); + + + VOID + double + 1754923748794 + f_updateSliders_Heating + -380 + 30 + + false + true + true + if(gr_heatingSliders_default.isVisible()){ + f_updateHeatingSliders_default(); +} +else if(gr_heatingSliders_businesspark.isVisible()){ + f_updateHeatingSliders_businesspark(); +} +else if(gr_heatingSliders_residential.isVisible()){ + f_updateHeatingSliders_residential(); +} +else{ + f_updateHeatingSliders_custom(); +} + + + VOID + double + 1754924509667 + f_updateHeatingSliders_default + -360 + 50 + + false + true + true + ////Companies +List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); + +//Savings (IN PROGRESS, WHAT ABOUT THERMAL BUILDINGS?????) +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GridConnection GC : utilityGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.getActiveEnergyCarriers().contains(OL_EnergyCarriers.HEAT)); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + + if(GC.p_BuildingThermalAsset != null){ + traceln("WARNING: SLIDER SAVINGS UPDATE FUNCTION IS NOT FUNCTIONAL YET FOR COMPANIES WITH THERMAL BUILDING ASSETS"); + } + } +} + +double heatSavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; +sl_heatDemandReductionCompanies_pct.setValue(roundToInt(heatSavings_pct), false); + + +//Heating assets +//Heating type +int totalCompaniesWithHeating = 0; +int nbOfCompaniesWithGasBurners = 0; +int nbOfCompaniesWithHybridHeatpumps = 0; +int nbOfCompaniesWithElectricHeatpumps = 0; +int nbOfCompaniesOnHTHeatGrid = 0; +int nbOfCompaniesOnLTHeatGrid = 0; + +for(GCUtility GC : utilityGridConnections){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalCompaniesWithHeating++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbOfCompaniesWithGasBurners++; + break; + case HYBRID_HEATPUMP: + nbOfCompaniesWithHybridHeatpumps++; + break; + case ELECTRIC_HEATPUMP: + nbOfCompaniesWithElectricHeatpumps++; + break; + case DISTRICTHEAT: + nbOfCompaniesOnHTHeatGrid++; + break; + case LT_DISTRICTHEAT: + nbOfCompaniesOnLTHeatGrid++; + break; + } + } +} + +int companiesWithGasBurners_pct = roundToInt(100.0 * nbOfCompaniesWithGasBurners / totalCompaniesWithHeating); +int companiesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithHybridHeatpumps / totalCompaniesWithHeating); +int companiesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithElectricHeatpumps / totalCompaniesWithHeating); +int companiesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnHTHeatGrid / totalCompaniesWithHeating); + +sl_gasBurnerCompanies_pct.setValue(companiesWithGasBurners_pct, false); +sl_hybridHeatPumpCompanies_pct.setValue(companiesWithHybridHeatpump_pct, false); +sl_electricHeatPumpCompanies_pct.setValue(companiesWithElectricHeatpump_pct, false); +sl_districtHeatingCompanies_pct.setValue(companiesWithHTDistrictHeat_pct, false); + + +////Houses +List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); + +//Savings +double averageScalingFactor = 0; +double totalScalingFactors = 0; +for(GCHouse GC : houseGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.getActiveEnergyCarriers().contains(OL_EnergyCarriers.HEAT)); + for(J_EAProfile profileEA : profileEAs){ + double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; + double newTotalScalingFactorValue = totalScalingFactorValue + profileEA.getProfileScaling_fr(); + totalScalingFactors++; + averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; + double newTotalScalingFactorValue = totalScalingFactorValue + consumptionEA.getConsumptionScaling_fr(); + totalScalingFactors++; + averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; + } + + if(GC.p_BuildingThermalAsset != null){ + double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; + double newTotalScalingFactorValue = totalScalingFactorValue + GC.p_BuildingThermalAsset.getLossScalingFactor_fr(); + totalScalingFactors++; + averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; + } + } +} +double averageSavingsFactor_pct = (1-averageScalingFactor)*100.0; +sl_heatDemandReductionHouseholds_pct.setValue(roundToInt(averageSavingsFactor_pct), false); + + +//Heating type +int totalHousesWithHeating = 0; +int nbOfHousesWithGasBurners = 0; +int nbOfHousesWithHybridHeatpumps = 0; +int nbOfHousesWithElectricHeatpumps = 0; +int nbOfHousesOnHTHeatGrid = 0; +int nbOfHousesOnLTHeatGrid = 0; + +for(GCHouse GC : houseGridConnections){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalHousesWithHeating++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbOfHousesWithGasBurners++; + break; + case HYBRID_HEATPUMP: + nbOfHousesWithHybridHeatpumps++; + break; + case ELECTRIC_HEATPUMP: + nbOfHousesWithElectricHeatpumps++; + break; + case DISTRICTHEAT: + nbOfHousesOnHTHeatGrid++; + break; + case LT_DISTRICTHEAT: + nbOfHousesOnLTHeatGrid++; + break; + } + } +} + +int housesWithGasBurners_pct = roundToInt(100.0 * nbOfHousesWithGasBurners / totalHousesWithHeating); +int housesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfHousesWithHybridHeatpumps / totalHousesWithHeating); +int housesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfHousesWithElectricHeatpumps / totalHousesWithHeating); +int housesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfHousesOnHTHeatGrid / totalHousesWithHeating); + +sl_gasBurnerHouseholds_pct.setValue(housesWithGasBurners_pct, false); +sl_hybridHeatPumpHouseholds_pct.setValue(housesWithHybridHeatpump_pct, false); +sl_electricHeatPumpHouseholds_pct.setValue(housesWithElectricHeatpump_pct, false); +sl_districtHeatingHouseholds_pct.setValue(housesWithHTDistrictHeat_pct, false); + + + + VOID + double + 1754924542535 + f_updateHeatingSliders_residential + -360 + 90 + + false + true + true + List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); + + +//Heating type +int totalHousesWithHeating = 0; +int nbOfHousesWithGasBurners = 0; +int nbOfHousesWithHybridHeatpumps = 0; +int nbOfHousesWithElectricHeatpumps = 0; +int nbOfHousesOnHTHeatGrid = 0; +int nbOfHousesOnLTHeatGrid = 0; + +for(GCHouse GC : houseGridConnections){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalHousesWithHeating++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbOfHousesWithGasBurners++; + break; + case HYBRID_HEATPUMP: + nbOfHousesWithHybridHeatpumps++; + break; + case ELECTRIC_HEATPUMP: + nbOfHousesWithElectricHeatpumps++; + break; + case DISTRICTHEAT: + nbOfHousesOnHTHeatGrid++; + break; + case LT_DISTRICTHEAT: + nbOfHousesOnLTHeatGrid++; + break; + } + } +} + +int housesWithGasBurners_pct = roundToInt(100.0 * nbOfHousesWithGasBurners / totalHousesWithHeating); +int housesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfHousesWithHybridHeatpumps / totalHousesWithHeating); +int housesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfHousesWithElectricHeatpumps / totalHousesWithHeating); + +sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, false); +sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, false); +sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, false); +cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); +cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + +if(nbOfHousesOnHTHeatGrid == totalHousesWithHeating){ + cb_householdHTDistrictHeatingResidentialArea.setSelected(true, false); +} +if(nbOfHousesOnLTHeatGrid == totalHousesWithHeating){ + cb_householdLTDistrictHeatingResidentialArea.setSelected(true, false); +} + +//Houses with Airco +double nbHouses = houseGridConnections.size(); +double nbHousesWithAirco = count(houseGridConnections, x -> x.p_airco != null); +double pctOfHousesWithAirco = (nbHousesWithAirco*100.0)/nbHouses; +sl_householdAircoResidentialArea_pct.setValue(pctOfHousesWithAirco, false); + + +//Houses with better isolation +int nbHousesThatCanGetImprovedIsolation = count(houseGridConnections, x -> x.p_energyLabel != OL_GridConnectionIsolationLabel.A); +int nbHousesWithImprovedInsulation = count(houseGridConnections, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); +double pctOfHousesWithImprovedInsulation = 100.0 * ((double)nbHousesWithImprovedInsulation)/nbHousesThatCanGetImprovedIsolation; +sl_householdHeatDemandReductionResidentialArea_pct.setValue(roundToInt(pctOfHousesWithImprovedInsulation), false); + + +//PT +int nbHousesWithPT = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); + +sl_rooftopPTHouses_pct.setValue(roundToInt((nbHousesWithPT*100.0)/nbHouses), false); + + + VOID + double + 1754924544023 + f_updateHeatingSliders_businesspark + -360 + 70 + + false + true + true + List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); + +//Savings (IN PROGRESS, WHAT ABOUT THERMAL BUILDINGS?????) +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GridConnection GC : utilityGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); // FIX FOR HOT WATER/PT IN LONG RUN + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + + if(GC.p_BuildingThermalAsset != null){ + traceln("WARNING: SLIDER SAVINGS UPDATE FUNCTION IS NOT FUNCTIONAL YET FOR COMPANIES WITH THERMAL BUILDING ASSETS"); + } + } +} + +double heatSavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; +sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.setValue(roundToInt(heatSavings_pct), false); + + +//Heating type +int totalCompaniesWithHeating = 0; +int nbOfCompaniesWithGasBurners = 0; +int nbOfCompaniesWithHybridHeatpumps = 0; +int nbOfCompaniesWithElectricHeatpumps = 0; +int nbOfCompaniesOnHTHeatGrid = 0; +int nbOfCompaniesOnLTHeatGrid = 0; +int nbOfCompaniesWithCustomHeating = 0; + +for(GCUtility GC : utilityGridConnections){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalCompaniesWithHeating++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbOfCompaniesWithGasBurners++; + break; + case HYBRID_HEATPUMP: + nbOfCompaniesWithHybridHeatpumps++; + break; + case ELECTRIC_HEATPUMP: + nbOfCompaniesWithElectricHeatpumps++; + break; + case DISTRICTHEAT: + nbOfCompaniesOnHTHeatGrid++; + break; + case LT_DISTRICTHEAT: + nbOfCompaniesOnLTHeatGrid++; + break; + case CUSTOM: + nbOfCompaniesWithCustomHeating++; + break; + } + } +} + +int companiesWithGasBurners_pct = roundToInt(100.0 * nbOfCompaniesWithGasBurners / totalCompaniesWithHeating); +int companiesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithHybridHeatpumps / totalCompaniesWithHeating); +int companiesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithElectricHeatpumps / totalCompaniesWithHeating); +int companiesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnHTHeatGrid / totalCompaniesWithHeating); +int companiesWithLTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnLTHeatGrid / totalCompaniesWithHeating); +int companiesWithCustomHeating_pct = roundToInt(100.0 * nbOfCompaniesWithCustomHeating / totalCompaniesWithHeating); + + +sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct.setValue(companiesWithGasBurners_pct, false); +sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.setValue(companiesWithHybridHeatpump_pct, false); +sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct.setValue(companiesWithElectricHeatpump_pct, false); +sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.setValue(companiesWithHTDistrictHeat_pct, false); +//sl_heatDemandSlidersCompaniesLTDistrictHeatingCompanies_pct.setValue(companiesWithLTDistrictHeat_pct, false); Doesnt exist (yet) for companies +sl_heatingTypeSlidersCompaniesCustom_pct.setValue(companiesWithCustomHeating_pct, false); + + + + VOID + double + 1754924574713 + f_updateHeatingSliders_custom + -360 + 110 + + false + true + true + //If you have a custom tab, +//override this function to make it update automatically +traceln("Forgot to override the update custom heating sliders functionality"); + + + VOID + double + 1760350664957 + f_setHeatingSystems + 90 + 711 + + false + true + true + + gcList + List<GridConnection> + + + orderedHeatingSystemGCList + List<GridConnection> + + + changedSliderHeatingType + OL_GridConnectionHeatingType + + + sliderGoal_pct + double + + int totalNrOfHeatingSystems = 0; +int nbGasBurners = 0; +int nbHybridHeatpumps = 0; +int nbElectricHeatpumps = 0; +int nbHTHeatGrid = 0; +int nbLTHeatGrid = 0; +int nbCustomHeating = 0; +List<GridConnection> gasBurnerGCs = new ArrayList<>(); +List<GridConnection> hybridHeatpumpGCs = new ArrayList<>(); +List<GridConnection> electricHeatpumpGCs = new ArrayList<>(); +List<GridConnection> HTHeatGridGCs = new ArrayList<>(); +List<GridConnection> LTHeatGridGCs = new ArrayList<>(); + +for(GridConnection GC : gcList){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalNrOfHeatingSystems++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbGasBurners++; + if(!GC.f_getHeatingTypeIsGhost()){ + gasBurnerGCs.add(GC); + } + break; + case HYBRID_HEATPUMP: + nbHybridHeatpumps++; + if(!GC.f_getHeatingTypeIsGhost()){ + hybridHeatpumpGCs.add(GC); + } + break; + case ELECTRIC_HEATPUMP: + nbElectricHeatpumps++; + if(!GC.f_getHeatingTypeIsGhost()){ + electricHeatpumpGCs.add(GC); + } + break; + case DISTRICTHEAT: + nbHTHeatGrid++; + if(!GC.f_getHeatingTypeIsGhost()){ + HTHeatGridGCs.add(GC); + } + break; + case LT_DISTRICTHEAT: + nbLTHeatGrid++; + if(!GC.f_getHeatingTypeIsGhost()){ + LTHeatGridGCs.add(GC); + } + break; + case CUSTOM: + nbCustomHeating++; + if(!GC.f_getHeatingTypeIsGhost()){ + //No collection, as ghost cant be changed anyway + } + break; + } + } +} + +int nbChangedHeatingTypeGoal = roundToInt(totalNrOfHeatingSystems*sliderGoal_pct/100.0); + +int currentNumberOfChangedHeatingType = 0; + +switch(changedSliderHeatingType){ + case GAS_BURNER: + currentNumberOfChangedHeatingType = nbGasBurners; + break; + case HYBRID_HEATPUMP: + currentNumberOfChangedHeatingType = nbHybridHeatpumps; + break; + case ELECTRIC_HEATPUMP: + currentNumberOfChangedHeatingType = nbElectricHeatpumps; + break; + case DISTRICTHEAT: + currentNumberOfChangedHeatingType = nbHTHeatGrid; + break; + case LT_DISTRICTHEAT: + currentNumberOfChangedHeatingType = nbLTHeatGrid; + break; +} + + + +if (currentNumberOfChangedHeatingType < nbChangedHeatingTypeGoal) { + while ( currentNumberOfChangedHeatingType < nbChangedHeatingTypeGoal ) { + + GridConnection changingGC = null; + if(changedSliderHeatingType != OL_GridConnectionHeatingType.GAS_BURNER && gasBurnerGCs.size() > 0){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> gasBurnerGCs.contains(gc)); + gasBurnerGCs.remove(changingGC); + } + else if(changedSliderHeatingType != OL_GridConnectionHeatingType.HYBRID_HEATPUMP && hybridHeatpumpGCs.size() > 0){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> hybridHeatpumpGCs.contains(gc)); + hybridHeatpumpGCs.remove(changingGC); + } + else if (changedSliderHeatingType != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP && electricHeatpumpGCs.size() > 0 ) { + changingGC = findFirst(orderedHeatingSystemGCList, gc -> electricHeatpumpGCs.contains(gc)); + electricHeatpumpGCs.remove(changingGC); + } + else if (changedSliderHeatingType != OL_GridConnectionHeatingType.DISTRICTHEAT && HTHeatGridGCs.size() > 0 ) { + changingGC = findFirst(orderedHeatingSystemGCList, gc -> HTHeatGridGCs.contains(gc)); + HTHeatGridGCs.remove(changingGC); + } + else if (changedSliderHeatingType != OL_GridConnectionHeatingType.LT_DISTRICTHEAT && LTHeatGridGCs.size() > 0 ) { + changingGC = findFirst(orderedHeatingSystemGCList, gc -> LTHeatGridGCs.contains(gc)); + LTHeatGridGCs.remove(changingGC); + } + else{ + throw new RuntimeException("No more GC left to change into raised slider type!" ); + } + + if(changingGC == null){ + throw new RuntimeException("orderedHeatingSystemGClist does not contain a GC found by this function! This should not be possible!" ); + } + + //Change the current heating type to the new one + changingGC.f_removeAllHeatingAssets(); + f_addHeatAsset(changingGC, changedSliderHeatingType, f_calculatePeakHeatDemand_kW(changingGC)); + changingGC.f_addHeatManagement(changedSliderHeatingType, false); + currentNumberOfChangedHeatingType ++; + } +} +else { + // Remove Gas burners Trucks + while ( currentNumberOfChangedHeatingType > nbChangedHeatingTypeGoal ) { + // replace a gasburner with a hybrid heatpump + GridConnection changingGC = null; + OL_GridConnectionHeatingType newHeatingType = OL_GridConnectionHeatingType.GAS_BURNER; // Always change into gasburner system. + if(changedSliderHeatingType == OL_GridConnectionHeatingType.GAS_BURNER){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> gasBurnerGCs.contains(gc)); + gasBurnerGCs.remove(changingGC); + newHeatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; // If removing gasburner, change into hybrid system. + } + else if(changedSliderHeatingType == OL_GridConnectionHeatingType.HYBRID_HEATPUMP){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> hybridHeatpumpGCs.contains(gc)); + hybridHeatpumpGCs.remove(changingGC); + } + else if(changedSliderHeatingType == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> electricHeatpumpGCs.contains(gc)); + electricHeatpumpGCs.remove(changingGC); + } + else if(changedSliderHeatingType == OL_GridConnectionHeatingType.DISTRICTHEAT){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> HTHeatGridGCs.contains(gc)); + HTHeatGridGCs.remove(changingGC); + } + else if(changedSliderHeatingType == OL_GridConnectionHeatingType.LT_DISTRICTHEAT){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> LTHeatGridGCs.contains(gc)); + LTHeatGridGCs.remove(changingGC); + } + changingGC.f_removeAllHeatingAssets(); + f_addHeatAsset(changingGC, newHeatingType, f_calculatePeakHeatDemand_kW(changingGC)); + changingGC.f_addHeatManagement(newHeatingType, false); + currentNumberOfChangedHeatingType--; + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + VOID + double + 1760368810352 + f_addHeatAsset + 110 + 731 + + false + true + true + + parentGC + GridConnection + + + heatAssetType + OL_GridConnectionHeatingType + + + maxHeatOutputPower_kW + double + + //Initialize parameters +double heatOutputCapacityGasBurner_kW; +double inputCapacityElectric_kW; +double efficiency; +double baseTemperature_degC; +double outputTemperature_degC; +OL_AmbientTempType ambientTempType; +double sourceAssetHeatPower_kW; +double belowZeroHeatpumpEtaReductionFactor; +maxHeatOutputPower_kW = maxHeatOutputPower_kW*2; // Make the asset capacity twice as high, to make sure it can handle the load in other scenarios with more heat consumption. +J_AVGC_data avgc_data = zero_Interface.energyModel.avgc_data; +double timeStep_h = zero_Interface.energyModel.p_timeStep_h; + +switch (heatAssetType){ // There is always only one heatingType, If there are many assets the type is CUSTOM + + case GAS_BURNER: + heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); + J_EAConversionGasBurner gasBurner = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW , avgc_data.p_avgEfficiencyGasBurner_fr, timeStep_h, 90); + break; + + case HYBRID_HEATPUMP: + + //Add primary heating asset (heatpump) (if its not part of the basic profile already + inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW / 3); //-- /3, kan nog kleiner want is hybride zodat gasbrander ook bij springt, dus kleiner MOETEN aanname voor hoe klein onderzoeken + + efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; + baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType); + + zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); + + //Add secondary heating asset (gasburner) + heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); + efficiency = avgc_data.p_avgEfficiencyGasBurner_fr; + outputTemperature_degC = avgc_data.p_avgOutputTemperatureGasBurner_degC; + + J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW, efficiency, timeStep_h, outputTemperature_degC); + break; + + case ELECTRIC_HEATPUMP: + //Add primary heating asset (heatpump) + inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW); // Could be smaller due to high cop + efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; + baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); + break; + + case GAS_CHP: + + double outputCapacityElectric_kW = (maxHeatOutputPower_kW/avgc_data.p_avgEfficiencyCHP_thermal_fr) * avgc_data.p_avgEfficiencyCHP_electric_fr; + outputTemperature_degC = avgc_data.p_avgOutputTemperatureCHP_degC; + efficiency = avgc_data.p_avgEfficiencyCHP_thermal_fr + avgc_data.p_avgEfficiencyCHP_electric_fr; + + new J_EAConversionGasCHP(parentGC, outputCapacityElectric_kW, maxHeatOutputPower_kW, efficiency, timeStep_h, outputTemperature_degC ); + break; + + case DISTRICTHEAT: + double heatOutputCapacityDeliverySet_kW = max(avgc_data.p_minDistrictHeatingDeliverySetOutputCapacity_kW, maxHeatOutputPower_kW); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; + efficiency = avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; + + new J_EAConversionHeatDeliverySet(parentGC, heatOutputCapacityDeliverySet_kW, efficiency, timeStep_h, outputTemperature_degC); + + //Add GC to heat grid + GridNode heatgrid = findFirst(zero_Interface.energyModel.pop_gridNodes, node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + if(heatgrid == null){ + heatgrid = f_createNewHeatGrid(); + } + //Connect + parentGC.p_parentNodeHeatID = heatgrid.p_gridNodeID; + parentGC.p_parentNodeHeat = heatgrid; + break; +} + + + + RETURNS_VALUE + GridNode + 1760370085949 + f_createNewHeatGrid + 130 + 751 + + false + true + true + GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); +zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); +GN_heat.p_gridNodeID = "Heatgrid"; + +// Check wether transformer capacity is known or estimated +GN_heat.p_capacity_kW = 1000000; +GN_heat.p_realCapacityAvailable = false; + +// Basic GN information +GN_heat.p_description = "Custom toegevoegde Warmtenet"; + +//Define node type +GN_heat.p_nodeType = OL_GridNodeType.HT; +GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + +//Define GN location +GN_heat.p_latitude = 0; +GN_heat.p_longitude = 0; +GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + +//Show warning that heat grid is not a simple solution +zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); + +return GN_heat; + + + + + 1722253108626 + connections + 50 + -50 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1722253115477 + uI_Tabs + 40 + -100 + + false + true + true + + zerointerfaceloader + UI_Tabs + + + + 1722253115479 + zero_Interface + 160 + -100 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + 1753694295453 + uI_EnergyHub + 310 + -100 + + false + true + true + + zerointerfaceloader + UI_EnergyHub + + + + + + 1722253108632 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1722350093699 + rect_genericFunctions + 10 + 460 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -4144960 + null + SOLID + 450 + 580 + 0.0 + -1 + null + + + 1722350093702 + t_genericFunctions + 140 + 480 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Generic Functions + + SansSerif + 22 + + + LEFT + + + 1722253128676 + gr_heatingSliders_default + 0 + 0 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1722253128678 + rect_heatDemandSliders + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + + null + SOLID + 370 + 350 + 0.0 + -6943 + null + + + 1722253128680 + t_gasBurnerHouseholdsDescription + 30 + 240 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + HR ketel aardgas + + Dialog + 14 + + + LEFT + + + 1722253128682 + t_hybridHeatPumpHouseholdsDescription + 30 + 265 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Hybride warmtepomp + + SansSerif + 14 + + + LEFT + + + 1722253128684 + t_electricHeatPumpHouseholdsDescription + 30 + 290 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elek. warmtepomp + + Dialog + 14 + + + LEFT + + + 1722253128686 + t_districtHeatingHouseholdsDescription + 30 + 315 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Warmtenet + + Dialog + 14 + + + LEFT + + + 1722253128688 + t_electricHeatPumpHouseholds_pct + 235 + 290 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_electricHeatPumpHouseholds_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722253128690 + t_gasBurnerHouseholds_pct + 235 + 240 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_gasBurnerHouseholds_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722253128692 + t_districtHeatingHouseholds_pct + 235 + 315 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_districtHeatingHouseholds_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722253128694 + t_hybridHeatPumpHouseholds_pct + 235 + 265 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_hybridHeatPumpHouseholds_pct.getIntValue() + "%" + + SansSerif + 14 + + + CENTER + + + false + 1722253128696 + sl_districtHeatingHouseholds_pct + 265 + 310 + + true + true + false + SHAPE_DRAW_2D3D + + false + false + false + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722253128698 + sl_gasBurnerHouseholds_pct + 265 + 235 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.GAS_BURNER, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722253128700 + sl_hybridHeatPumpHouseholds_pct + 265 + 260 + + true + true + false + SHAPE_DRAW_2D3D + + false + false + false + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722253128702 + sl_electricHeatPumpHouseholds_pct + 265 + 285 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722253128704 + sl_heatDemandReductionHouseholds_pct + 265 + 200 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), sl_heatDemandReductionHouseholds_pct.getValue() ); + + + 0 + HORIZONTAL + -50 + 50 + 1 + false + + + + 1722253128706 + t_heatDemandReductionHouseholds_pct + 235 + 205 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_heatDemandReductionHouseholds_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722253128708 + t_heatDemandReductionHouseholdsDescription + 30 + 205 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing warmte + + Dialog + 14 + + + LEFT + + + 1722253128710 + t_householdsDescription + 20 + 180 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Huishoudens + + Calibri + 18 + + + LEFT + + + false + 1722253128712 + sl_heatDemandReductionCompanies_pct + 265 + 35 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), sl_heatDemandReductionCompanies_pct.getValue() ); + + + 0 + HORIZONTAL + -50 + 50 + 1 + false + + + + 1722253128714 + t_heatDemandReductionCompaniesDescription + 25 + 40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing warmte + + Dialog + 14 + + + LEFT + + + 1722253128716 + t_heatDemandReductionCompanies_pct + 235 + 40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_heatDemandReductionCompanies_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722253128718 + t_gasBurnerCompaniesDescription + 25 + 75 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + HR ketel aardgas + + Dialog + 14 + + + LEFT + + + 1722253128720 + t_hybridHeatPumpCompaniesDescription + 25 + 100 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Hybride warmtepomp + + SansSerif + 14 + + + LEFT + + + 1722253128722 + t_electricHeatPumpCompaniesDescription + 25 + 125 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elek. warmtepomp + + Dialog + 14 + + + LEFT + + + 1722253128724 + t_districtHeatingCompaniesDescription + 25 + 150 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Warmtenet + + Dialog + 14 + + + LEFT + + + 1722253128726 + t_electricHeatPumpCompanies_pct + 235 + 125 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_electricHeatPumpCompanies_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722253128728 + t_gasBurnerCompanies_pct + 235 + 75 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_gasBurnerCompanies_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722253128730 + t_districtHeatingCompanies_pct + 235 + 150 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_districtHeatingCompanies_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722253128732 + t_hybridHeatPumpCompanies_pct + 235 + 100 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_hybridHeatPumpCompanies_pct.getIntValue() + "%" + + SansSerif + 14 + + + CENTER + + + false + 1722253128734 + sl_districtHeatingCompanies_pct + 265 + 145 + + true + true + false + SHAPE_DRAW_2D3D + + false + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722253128736 + sl_gasBurnerCompanies_pct + 265 + 70 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.GAS_BURNER, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722253128738 + sl_hybridHeatPumpCompanies_pct + 265 + 95 + + true + true + false + SHAPE_DRAW_2D3D + + false + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722253128740 + sl_electricHeatPumpCompanies_pct + 265 + 120 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722254471242 + t_companiesDescription + 20 + 15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Bedrijven + + Calibri + 18 + + + LEFT + + + 1746091940464 + i_companyReduction + 170 + 40 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyReduction, zero_Interface.v_infoText.companyHeatDemandReduction, i_companyReduction.getX() + uI_Tabs.v_presentationXOffset, i_companyReduction.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746092829752 + i_companyGasBoiler + 170 + 75 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyGasBoiler, zero_Interface.v_infoText.companyGasBoiler, i_companyGasBoiler.getX() + uI_Tabs.v_presentationXOffset, i_companyGasBoiler.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746092829788 + i_companyElectricHeatpump + 170 + 125 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyElectricHeatpump, zero_Interface.v_infoText.companyElectricHeatpump, i_companyElectricHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_companyElectricHeatpump.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746092829826 + i_companyHybridHeatpump + 170 + 100 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyHybridHeatpump, zero_Interface.v_infoText.companyHybridHeatpump, i_companyHybridHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_companyHybridHeatpump.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746092829863 + i_companyHeatGrid + 170 + 150 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyHeatGrid, zero_Interface.v_infoText.companyHeatGrid, i_companyHeatGrid.getX() + uI_Tabs.v_presentationXOffset, i_companyHeatGrid.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746092829905 + i_householdElectricHeatpump + 170 + 290 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_householdElectricHeatpump, zero_Interface.v_infoText.householdElectricHeatpump, i_householdElectricHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricHeatpump.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746092829948 + i_householdReduction + 170 + 205 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_householdReduction, zero_Interface.v_infoText.householdHeatDemandReduction, i_householdReduction.getX() + uI_Tabs.v_presentationXOffset, i_householdReduction.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746092829986 + i_householdGasBoiler + 170 + 240 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_householdGasBoiler, zero_Interface.v_infoText.householdGasBoiler, i_householdGasBoiler.getX() + uI_Tabs.v_presentationXOffset, i_householdGasBoiler.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746092830024 + i_householdHeatGrid + 170 + 315 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_householdHeatGrid, zero_Interface.v_infoText.householdHeatGrid, i_householdHeatGrid.getX() + uI_Tabs.v_presentationXOffset, i_householdHeatGrid.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746092830063 + i_householdHybridHeatpump + 170 + 265 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_householdHybridHeatpump, zero_Interface.v_infoText.householdHybridHeatpump, i_householdHybridHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_householdHybridHeatpump.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1722326800106 + gr_heatingSliders_businesspark + 800 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + false + 0 + 0.0 + + + 1722326800108 + rect_heatDemandSliders1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + + null + SOLID + 370 + 350 + 0.0 + -6943 + null + + + false + 1722326800142 + sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct + 255 + 50 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.getValue()); + + + 0 + HORIZONTAL + -50 + 50 + 1 + false + + + + 1722326800144 + t_heatDemandReductionCompaniesDescription1 + 15 + 55 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing warmte + + Dialog + 14 + + + LEFT + + + 1722326800146 + t_heatDemandReductionCompanies_pct1 + 225 + 55 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722326800148 + t_gasBurnerCompaniesDescription1 + 15 + 90 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + HR ketel aardgas + + Dialog + 14 + + + LEFT + + + 1722326800150 + t_hybridHeatPumpCompaniesDescription1 + 15 + 115 + + true + true + false + SHAPE_DRAW_2D + sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible() + false + 0 + 0.0 + -16777216 + Hybride warmtepomp + + SansSerif + 14 + + + LEFT + + + 1722326800152 + t_electricHeatPumpCompaniesDescription1 + 15 + 140 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elek. warmtepomp + + Dialog + 14 + + + LEFT + + + 1722326800154 + t_districtHeatingCompaniesDescription1 + 15 + 165 + + true + true + false + SHAPE_DRAW_2D + sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible() + false + 0 + 0.0 + -16777216 + Warmtenet + + Dialog + 14 + + + LEFT + + + 1722326800156 + t_electricHeatPumpCompanies_pct1 + 225 + 140 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722326800158 + t_gasBurnerCompanies_pct1 + 225 + 90 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722326800160 + t_districtHeatingCompanies_pct1 + 225 + 165 + + true + true + false + SHAPE_DRAW_2D + sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722326800162 + t_hybridHeatPumpCompanies_pct1 + 225 + 115 + + true + true + false + SHAPE_DRAW_2D + sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.getIntValue() + "%" + + SansSerif + 14 + + + CENTER + + + false + 1722326800164 + sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct + 255 + 160 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722326800166 + sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct + 255 + 85 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.GAS_BURNER, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722326800168 + sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct + 255 + 110 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722326800170 + sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct + 255 + 135 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722326800172 + t_companiesDescription1 + 10 + 30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Bedrijven + + Calibri + 18 + + + LEFT + + + 1734371025574 + t_eBoilerCompanies_pct + 225 + 190 + + true + true + false + SHAPE_DRAW_2D + sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_heatDemandSlidersCompaniesEBoiler_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + false + 1734371025600 + sl_heatDemandSlidersCompaniesEBoiler_pct + 255 + 185 + + true + true + false + SHAPE_DRAW_2D3D + + false + sl_heatDemandSlidersCompaniesEBoiler_pct.isEnabled() + false + traceln("Slider doet nog niets!!");//f_setHeatingSlidersCompanies(3); +//f_resetNeighborhoodHeatingSystems(4); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1734371025534 + t_eBoilerCompaniesDescription + 15 + 190 + + true + true + false + SHAPE_DRAW_2D + sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible() + false + 0 + 0.0 + -16777216 + E-boiler + + Dialog + 14 + + + LEFT + + + 1746093187570 + i_companyReduction_Company + 160 + 55 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyReduction_Company, zero_Interface.v_infoText.companyHeatDemandReduction, i_companyReduction_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyReduction_Company.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746093187613 + i_companyGasBoiler_Company + 160 + 90 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyGasBoiler_Company, zero_Interface.v_infoText.companyGasBoiler, i_companyGasBoiler_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyGasBoiler_Company.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746093187656 + i_companyElectricHeatpump_Company + 160 + 140 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_companyElectricHeatpump_Company, zero_Interface.v_infoText.companyElectricHeatpump, i_companyElectricHeatpump_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyElectricHeatpump_Company.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746093187698 + i_companyHybridHeatpump_Company + 160 + 115 + + true + true + false + SHAPE_DRAW_2D3D + sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible() + zero_Interface.f_setInfoText(i_companyHybridHeatpump_Company, zero_Interface.v_infoText.companyHybridHeatpump, i_companyHybridHeatpump_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyHybridHeatpump_Company.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746093187741 + i_companyHeatGrid_Company + 160 + 165 + + true + true + false + SHAPE_DRAW_2D3D + sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible() + zero_Interface.f_setInfoText(i_companyHeatGrid_Company, zero_Interface.v_infoText.companyHeatGrid, i_companyHeatGrid_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyHeatGrid_Company.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746093187784 + i_companyEBoiler_Company + 160 + 190 + + true + true + false + SHAPE_DRAW_2D3D + sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible() + zero_Interface.f_setInfoText(i_companyEBoiler_Company, zero_Interface.v_infoText.companyElectricBoiler, i_companyEBoiler_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyEBoiler_Company.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1754382990780 + t_customHeatingTypeCompanies_pct + 225 + 225 + + true + true + false + SHAPE_DRAW_2D + sl_heatingTypeSlidersCompaniesCustom_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_heatingTypeSlidersCompaniesCustom_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + false + 1754382990782 + sl_heatingTypeSlidersCompaniesCustom_pct + 255 + 220 + + true + true + false + SHAPE_DRAW_2D3D + + false + false + new RuntimeException("This slider action should not be called, this slider is purely for visualisation of the amount of custom heating types for companies"); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1754382990784 + txt_customHeatingDemandCompaniesDescription + 15 + 225 + + true + true + false + SHAPE_DRAW_2D + sl_heatingTypeSlidersCompaniesCustom_pct.isVisible() + false + 0 + 0.0 + -16777216 + Custom systeem + + Dialog + 14 + + + LEFT + + + 1754382990787 + i_companyCustomHeatingType_Company + 160 + 225 + + true + true + false + SHAPE_DRAW_2D3D + sl_heatingTypeSlidersCompaniesCustom_pct.isVisible() + zero_Interface.f_setInfoText(i_companyCustomHeatingType_Company, zero_Interface.v_infoText.companyCustomHeating, i_companyCustomHeatingType_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyCustomHeatingType_Company.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1722335783989 + rect_demandFunctions + 40 + 510 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -8355840 + null + SOLID + 390 + 120 + 0.0 + -1 + null + + + 1722335783991 + txt_demandFunctionsDescription + 240 + 520 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Demand Functions + + SansSerif + 18 + + + CENTER + + + 1722338183031 + rect_heatingFunctions + 40 + 640 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -5952982 + null + SOLID + 390 + 150 + 0.0 + -1 + null + + + 1722338183033 + txt_heatingFunctionsDescription + 130 + 650 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Heating Functions + + SansSerif + 18 + + + CENTER + + + 1749738869813 + gr_heatingSliders_residential + 400 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + false + 0 + 0.0 + + + 1749738869815 + rect_heatDeandSlidersResidentialArea + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + + null + SOLID + 370 + 350 + 0.0 + -6943 + null + + + 1749738869817 + t_householdGasBurnerDescriptionResidentialArea + 20 + 55 + + true + true + false + SHAPE_DRAW_2D + sl_householdGasBurnerResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Gas brander + + Dialog + 12 + + + LEFT + + + 1749738869821 + t_householdElectricHeatPumpDescriptionResidentialArea + 20 + 105 + + true + true + false + SHAPE_DRAW_2D + sl_householdElectricHeatPumpResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Elec. warmtepomp + + Dialog + 12 + + + LEFT + + + 1749738869823 + t_householdElectricHeatPumpResidentialArea_pct + 230 + 105 + + true + true + false + SHAPE_DRAW_2D + sl_householdElectricHeatPumpResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_householdElectricHeatPumpResidentialArea_pct.getIntValue() + "%" + + Dialog + 12 + + + CENTER + + + 1749738869825 + t_householdGasBurnerResidentialArea_pct + 230 + 55 + + true + true + false + SHAPE_DRAW_2D + sl_householdGasBurnerResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_householdGasBurnerResidentialArea_pct.getIntValue() + "%" + + Dialog + 12 + + + CENTER + + + false + 1749738869829 + sl_householdGasBurnerResidentialArea_pct + 260 + 50 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} + +f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.GAS_BURNER, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); + + + + 100 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1749738869833 + sl_householdElectricHeatPumpResidentialArea_pct + 260 + 100 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} + +f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1749738869835 + sl_householdHeatDemandReductionResidentialArea_pct + 260 + 245 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_householdInsulation( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdHeatDemandReductionResidentialArea_pct.getValue() ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1749738869837 + t_householdHeatDemandReductionResidentialArea_pct + 230 + 250 + + true + true + false + SHAPE_DRAW_2D + sl_householdHeatDemandReductionResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_householdHeatDemandReductionResidentialArea_pct.getIntValue() + "%" + + Dialog + 12 + + + CENTER + + + 1749738869839 + t_householdHeatDemandReductionDescriptionResidentialArea + 20 + 250 + + true + true + false + SHAPE_DRAW_2D + sl_householdHeatDemandReductionResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Huizen met betere isolatie + + Dialog + 12 + + + LEFT + + + 1749738869841 + t_householdHeatingTypeDescriptionResidentialArea + 20 + 30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Heating & Cooling + + Calibri + 14 + + + LEFT + + + false + 1749738869843 + sl_householdAircoResidentialArea_pct + 260 + 216 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setAircos(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdAircoResidentialArea_pct.getValue() / 100.0); + + + 0 + HORIZONTAL + 0 + 100 + 5 + false + + + + 1749738869845 + t_householdAircoDescriptionResidentialArea + 20 + 220 + + true + true + false + SHAPE_DRAW_2D + sl_householdAircoResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Huizen met Airco + + SansSerif + 12 + + + LEFT + + + 1749738869847 + t_householdAircoResidentialArea_pct + 230 + 220 + + true + true + false + SHAPE_DRAW_2D + sl_householdAircoResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_householdAircoResidentialArea_pct.getIntValue() + "%" + + SansSerif + 12 + + + CENTER + + + false + 1749738869849 + cb_householdHTDistrictHeatingResidentialArea + 20 + 130 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if ( cb_householdHTDistrictHeatingResidentialArea.isSelected() ){ + sl_householdGasBurnerResidentialArea_pct.setValue(0, false); + sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_addDistrictHeatingToAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +else{ + sl_householdGasBurnerResidentialArea_pct.setValue(100, false); + sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} + + + + HT-Warmtenet + false + + + + false + 1749738869851 + cb_householdLTDistrictHeatingResidentialArea + 20 + 165 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if ( cb_householdLTDistrictHeatingResidentialArea.isSelected() ){ + sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); + sl_householdGasBurnerResidentialArea_pct.setValue(0, false); + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_addLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +else{ + sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); + sl_householdGasBurnerResidentialArea_pct.setValue(100, false); + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} + + + + LT-Warmtenet + false + + + + 1752231559962 + i_householdGasBurner + 180 + 55 + + true + true + false + SHAPE_DRAW_2D3D + sl_householdGasBurnerResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdGasBurner, zero_Interface.v_infoText.householdGasBoiler, i_householdGasBurner.getX() + uI_Tabs.v_presentationXOffset, i_householdGasBurner.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1752231559982 + i_householdHeatPump + 180 + 105 + + true + true + false + SHAPE_DRAW_2D3D + sl_householdElectricHeatPumpResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdHeatPump, zero_Interface.v_infoText.householdElectricHeatpump, i_householdHeatPump.getX() + uI_Tabs.v_presentationXOffset, i_householdHeatPump.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1752231560000 + i_householdHTDistrictHeating + 220 + 135 + + true + true + false + SHAPE_DRAW_2D3D + cb_householdHTDistrictHeatingResidentialArea.isVisible() + zero_Interface.f_setInfoText(i_householdHTDistrictHeating, zero_Interface.v_infoText.householdHTDistrictHeating, i_householdHTDistrictHeating.getX() + uI_Tabs.v_presentationXOffset, i_householdHTDistrictHeating.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1752231560019 + i_householdLTDistrictHeating + 220 + 170 + + true + true + false + SHAPE_DRAW_2D3D + cb_householdLTDistrictHeatingResidentialArea.isVisible() + zero_Interface.f_setInfoText(i_householdLTDistrictHeating, zero_Interface.v_infoText.householdElectricHeatpump, i_householdLTDistrictHeating.getX() + uI_Tabs.v_presentationXOffset, i_householdLTDistrictHeating.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1752231560038 + i_householdAirconditioning + 180 + 220 + + true + true + false + SHAPE_DRAW_2D3D + sl_householdAircoResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdAirconditioning, zero_Interface.v_infoText.householdAirconditioning, i_householdAirconditioning.getX() + uI_Tabs.v_presentationXOffset, i_householdAirconditioning.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1752231560056 + i_householdAdditionalInsulation + 180 + 250 + + true + true + false + SHAPE_DRAW_2D3D + sl_householdHeatDemandReductionResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdAdditionalInsulation, zero_Interface.v_infoText.householdAdditionalInsulation, i_householdAdditionalInsulation.getX() + uI_Tabs.v_presentationXOffset, i_householdAdditionalInsulation.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1753951517102 + gr_ptSlidersHouses + 200 + 320 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753949405477 + t_rooftopPTHouses_pct + 230 + 299 + + true + true + false + SHAPE_DRAW_2D + sl_rooftopPTHouses_pct.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_rooftopPTHouses_pct.getIntValue() + "%" + + Dialog + 12 + + + CENTER + + + false + 1753949405484 + sl_rooftopPTHouses_pct + 260 + 294 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPTSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_rooftopPTHouses_pct.getValue() ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1753949405489 + txt_rooftopPTHousesDescription + 20 + 300 + + true + true + false + SHAPE_DRAW_2D + sl_rooftopPTHouses_pct.isVisible() + false + 0 + 0.0 + -16777216 + Huizen met PT + + Dialog + 12 + + + LEFT + + + 1753949405492 + i_householdPT + 180 + 298 + + true + true + false + SHAPE_DRAW_2D3D + sl_rooftopPTHouses_pct.isVisible() + zero_Interface.f_setInfoText(i_householdPT, zero_Interface.v_infoText.householdRooftopPT, i_householdPT.getX() + uI_Tabs.v_presentationXOffset, i_householdPT.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1760349016791 + txt_householdHybridHeatpumpDescriptionResidentialArea + 20 + 80 + + true + true + false + SHAPE_DRAW_2D + sl_householdHybridHeatpumpResidentialArea.isVisible() + false + 0 + 0.0 + -16777216 + Hybride warmtepomp + + Dialog + 12 + + + LEFT + + + false + 1760349016817 + sl_householdHybridHeatpumpResidentialArea + 260 + 75 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} + +f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); + + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1760349016828 + i_householdHybridHeatPump + 180 + 80 + + true + true + false + SHAPE_DRAW_2D3D + sl_householdHybridHeatpumpResidentialArea.isVisible() + zero_Interface.f_setInfoText(i_householdHybridHeatPump, zero_Interface.v_infoText.householdHybridHeatpump, i_householdHybridHeatPump.getX() + uI_Tabs.v_presentationXOffset, i_householdHybridHeatPump.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1760349443892 + t_householdElectricHeatPumpResidentialArea_pct1 + 230 + 80 + + true + true + false + SHAPE_DRAW_2D + sl_householdHybridHeatpumpResidentialArea.isVisible() + false + 0 + 0.0 + -16777216 + # + sl_householdHybridHeatpumpResidentialArea.getIntValue() + "%" + + Dialog + 12 + + + CENTER + + + + + 1755004749570 + rect_districtHeatingFunctions + 40 + 800 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -65536 + null + SOLID + 390 + 150 + 0.0 + -1 + null + + + 1755004766095 + txt_districtheatingFunctionsDescription + 160 + 810 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + District Heating Functions + + SansSerif + 18 + + + CENTER + + + 1755004809972 + rect_heatingProductionFunctions + 40 + 960 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16711936 + null + SOLID + 390 + 70 + 0.0 + -1 + null + + + 1755004834735 + txt_heatingProductionFunctionsDescription + 160 + 970 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + District Heating Functions + + SansSerif + 18 + + + CENTER + + + + + + + 1722245324895 + tabMobility + // Default Sliders +public ShapeGroup getGr_mobilitySliders_default() { + return this.gr_mobilitySliders_default; +} + +//Residential sliders +public ShapeGroup getGr_mobilitySliders_residential() { + return this.gr_mobilitySliders_residential; +} + +public ShapeSlider getSliderMobilityDemandReduction_pct () { + return this.sl_mobilityDemandReduction_pct; +} + +public ShapeSlider getSliderElectricTrucks_pct() { + return this.sl_electricTrucks_pct; +} + +public ShapeSlider getSliderHydrogenTrucks_pct() { + return this.sl_hydrogenTrucks_pct; +} + +public ShapeSlider getSliderFossilFuelTrucks_pct() { + return this.sl_fossilFuelTrucks_pct; +} + +public ShapeSlider getSliderElectricVans_pct() { + return this.sl_electricVans_pct; +} + +public ShapeSlider getSliderFossilFuelVans_pct() { + return this.sl_fossilFuelVans_pct; +} + +public ShapeSlider getSliderElectricCars_pct() { + return this.sl_electricCars_pct; +} + +public ShapeSlider getSliderFossilFuelCars_pct() { + return this.sl_fossilFuelCars_pct; +} + +public ShapeSlider getSl_privateEVsResidentialArea_pct(){ + return this.sl_privateEVsResidentialArea_pct; +} + +public ShapeSlider getSl_publicChargersResidentialArea_pct(){ + return this.sl_publicChargersResidentialArea_pct; +} + + 1754045642067 + import org.apache.commons.lang3.tuple.Triple; +import java.util.stream.Collectors; + + zerointerfaceloader + tabArea + + false + + 1722245324901 + 1722245324901 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089976 + true + 1722326400000 + + 0 + HOUR + + + 1 + HOUR + + + + 1722245324898 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1722245324902 + 1722245324896 + + + 1729167973194 + v_totalNumberOfGhostVehicle_Trucks + 40 + 1140 + + false + true + true + + int + + 0 + + + + + 1729168015819 + v_totalNumberOfGhostVehicle_Vans + 40 + 1120 + + false + true + true + + int + + 0 + + + + + 1729168016768 + v_totalNumberOfGhostVehicle_Cars + 40 + 1100 + + false + true + true + + int + + 0 + + + + + + + VOID + double + 1722256088443 + f_setVehicleSliders + Function that calculates the values of the other sliders and sets them without calling an action. Takes as parameters the index of the slider which should not be touched as well as all the slider objects. HydrogenVehicle slider is optional and an argument of null can be passed. + 70 + 740 + + false + true + true + + sliderIndex + int + + + electricSlider + ShapeSlider + + + hydrogenSlider + ShapeSlider + + + fossilFuelSlider + ShapeSlider + + double pct_electric = electricSlider.getValue(); +double pct_hydrogen = 0; +double pct_fossilFuel = fossilFuelSlider.getValue(); +if (hydrogenSlider != null) { + pct_hydrogen = hydrogenSlider.getValue(); +} + + +//Set array with pct values +double pctArray[]={pct_electric, pct_hydrogen, pct_fossilFuel}; +double pctExcess = Arrays.stream(pctArray).sum() - 100; +for (int i = 0; i<pctArray.length; i++){ + if (!(i==(int)sliderIndex)) { + pctArray[i] = max(0,pctArray[i] - pctExcess); + pctExcess = Arrays.stream(pctArray).sum() - 100; + } +} +if (pctExcess != 0) { + traceln("Sliders don't add up to 100%!"); +} + +//Set Sliders +electricSlider.setValue(pctArray[0], false); +if (hydrogenSlider != null) { + hydrogenSlider.setValue(pctArray[1], false); +} +fossilFuelSlider.setValue(pctArray[2], false); + +/* +double pct_fossilFuel = fossilFuelSlider.getValue(); +double pct_electric = electricSlider.getValue(); +double pct_hydrogen = 0; +if (hydrogenSlider != null) { + pct_hydrogen = hydrogenSlider.getValue(); +} + + +//Set array with pct values +double pctArray[]={pct_fossilFuel, pct_electric, pct_hydrogen}; +double pctExcess = Arrays.stream(pctArray).sum() - 100; +for (int i = 0; i<pctArray.length; i++){ + if (!(i==(int)sliderIndex)) { + pctArray[i] = max(0,pctArray[i] - pctExcess); + pctExcess = Arrays.stream(pctArray).sum() - 100; + } +} +if (pctExcess != 0) { + traceln("Sliders don't add up to 100%!"); +} + +//Set Sliders +fossilFuelSlider.setValue(pctArray[0], false); +electricSlider.setValue(pctArray[1], false); +if (hydrogenSlider != null) { + hydrogenSlider.setValue(pctArray[2], false); +} +*/ + + + VOID + double + 1722342449665 + f_setDemandReduction + Function that reduces the distance of all triptrackers of vehicles. Takes as arguments a list of GridConnections to effect and a percentage to reduce by compared to the default distance value of the triptrackers. + 70 + 600 + + false + true + true + + gcList + List<GridConnection> + + + demandReduction_pct + double + + // TODO: when new triptrackers are created, for example in the company ui sliders, +// make sure they have this distance scaling fraction! + +double scalingFactor = 1 - demandReduction_pct/100; + +for (GridConnection gc : gcList) { + for (J_EAVehicle j_ea : gc.c_vehicleAssets) { + j_ea.getTripTracker().distanceScaling_fr = scalingFactor; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + RETURNS_VALUE + Triple<Integer, Integer, Integer> + 1729168033110 + f_calculateNumberOfGhostVehicles + 20 + 1080 + + false + true + true + + gcList + List<GridConnection> + + Integer numberOfGhostVehicle_Cars = 0; +Integer numberOfGhostVehicle_Vans = 0; +Integer numberOfGhostVehicle_Trucks = 0; + +for (GridConnection gc : gcList ) { + if(gc.v_hasQuarterHourlyValues && gc.v_isActive){ + numberOfGhostVehicle_Cars += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVCars(); + numberOfGhostVehicle_Vans += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVVans(); + numberOfGhostVehicle_Trucks += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVTrucks(); + } +} + + +return Triple.of(numberOfGhostVehicle_Cars, numberOfGhostVehicle_Vans, numberOfGhostVehicle_Trucks); + + + VOID + double + 1746008458894 + f_setDieselTrucks + 70 + 770 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricTrucks + ShapeSlider + + + sliderHydrogenTrucks + ShapeSlider + + + sliderFossilFuelTrucks + ShapeSlider + + double pctDieselTrucksGoal = sliderFossilFuelTrucks.getValue(); + +int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); + +int nbEtruckCurrent = triple.getLeft(); +int nbHydrogentrucksCurrent = triple.getMiddle(); +int nbDieseltrucksCurrent = triple.getRight(); +int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; + +int nbDieselTrucksGoal = roundToInt(total_vehicles*pctDieselTrucksGoal/100.0); +boolean finishedLookingThroughElectricTrucks = false; + +if (nbDieseltrucksCurrent < nbDieselTrucksGoal) { + // Add Diesel Trucks + while ( nbDieseltrucksCurrent < nbDieselTrucksGoal ) { + if ( nbEtruckCurrent > numberOfGhostVehicle_Trucks && !finishedLookingThroughElectricTrucks ) { + // replace electric truck with a diesel truck + if (!f_electricToDieselTruck(gcList)) { + finishedLookingThroughElectricTrucks = true; + } + else { + nbDieseltrucksCurrent++; + nbEtruckCurrent--; + } + } + else{// ( nbHydrogentrucksCurrent > 0 ) { + // replace hydrogen truck with diesel truck + if (!f_hydrogenToDieselTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbDieseltrucksCurrent++; + nbHydrogentrucksCurrent--; + } + /* + else { + throw new RuntimeException("Can not add another diesel vehicle as there are no other vehicles to replace."); + } + */ + } +} +else { + // Remove Diesel Trucks + while ( nbDieseltrucksCurrent > nbDieselTrucksGoal ) { + // replace a diesel truck with an electric truck + if (!f_dieselToElectricTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbDieseltrucksCurrent--; + nbEtruckCurrent++; + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + VOID + double + 1746008458907 + f_setHydrogenTrucks + 70 + 790 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricTrucks + ShapeSlider + + + sliderHydrogenTrucks + ShapeSlider + + + sliderFossilFuelTrucks + ShapeSlider + + double pctHydrogenTrucksGoal = sliderHydrogenTrucks.getValue(); + +int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); + +int nbEtruckCurrent = triple.getLeft(); +int nbHydrogentrucksCurrent = triple.getMiddle(); +int nbDieseltrucksCurrent = triple.getRight(); +int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; + +int nbHydrogenTrucksGoal = roundToInt(total_vehicles*pctHydrogenTrucksGoal/100.0); +boolean finishedLookingThroughDieselTrucks = false; + +if (nbHydrogentrucksCurrent < nbHydrogenTrucksGoal) { + // Add Hydrogen Trucks + while ( nbHydrogentrucksCurrent < nbHydrogenTrucksGoal && !finishedLookingThroughDieselTrucks ) { + if ( nbDieseltrucksCurrent > 0 ) { + // replace a diesel truck with a hydrogen truck + if (!f_dieselToHydrogenTruck(gcList)) { + finishedLookingThroughDieselTrucks = true; + } + else { + nbHydrogentrucksCurrent++; + nbDieseltrucksCurrent--; + } + } + else{// ( nbEtruckCurrent > v_totalNumberOfGhostVehicle_Trucks ) { + // replace an electric truck with a hydrogen truck + if (!f_electricToHydrogenTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbHydrogentrucksCurrent++; + nbEtruckCurrent--; + } + /*else { + throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); + }*/ + } +} +else { + // Remove Hydrogen Trucks + while ( nbHydrogentrucksCurrent > nbHydrogenTrucksGoal ) { + // replace a hydrogen truck with a diesel truck + if (!f_hydrogenToDieselTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbHydrogentrucksCurrent--; + nbDieseltrucksCurrent++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1746008458917 + f_setElectricTrucks + 70 + 810 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricTrucks + ShapeSlider + + + sliderHydrogenTrucks + ShapeSlider + + + sliderFossilFuelTrucks + ShapeSlider + + double pctElectricTrucksGoal = sliderElectricTrucks.getValue(); + +int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); + +int nbEtruckCurrent = triple.getLeft(); +int nbHydrogentrucksCurrent = triple.getMiddle(); +int nbDieseltrucksCurrent = triple.getRight(); +int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; + +int nbElectricTrucksGoal = roundToInt(total_vehicles*pctElectricTrucksGoal/100.0); +boolean finishedLookingThroughDieselTrucks = false; + +if (nbEtruckCurrent < nbElectricTrucksGoal) { + // Add Electric Trucks + while ( nbEtruckCurrent < nbElectricTrucksGoal && !finishedLookingThroughDieselTrucks ) { + if ( nbDieseltrucksCurrent > 0 ) { + // replace a diesel truck with an electric truck + if (!f_dieselToElectricTruck(gcList)) { + finishedLookingThroughDieselTrucks = true; + } + else { + nbEtruckCurrent++; + nbDieseltrucksCurrent--; + } + } + else{// if ( nbHydrogentrucksCurrent > 0 ) { + // replace a hydrogen truck with an electric truck + if (!f_hydrogenToElectricTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbEtruckCurrent++; + nbHydrogentrucksCurrent--; + } + /*else { + throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); + } + */ + } +} +else { + // Remove Electric Trucks + while ( nbEtruckCurrent > nbElectricTrucksGoal ) { + // replace an electric truck with a diesel truck + if (!f_electricToDieselTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbEtruckCurrent--; + nbDieseltrucksCurrent++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + RETURNS_VALUE + boolean + 1746008458938 + f_dieselToElectricTruck + 360 + 720 + + false + true + true + + gcList + List<GridConnection> + + J_EADieselVehicle dieselTruck = null; +boolean foundAdditionalVehicle = false; + +// find the diesel truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); + if ( dieselTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (dieselTruck!=null) { + GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; + boolean available = dieselTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselTruck); + dieselTruck.removeEnergyAsset(); + + // Re-add Electric vehicle + double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; + double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; + double initialStateOfCharge_fr = 1.0; + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; + double vehicleScalingElectric = 1.0; + J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); + electricTruck.available = available; + + zero_Interface.c_orderedVehicles.add(0, electricTruck); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricTruck); + } +} + +else { + return false; + //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); +} + +return true; + + + RETURNS_VALUE + boolean + 1746008458950 + f_hydrogenToElectricTruck + 360 + 740 + + false + true + true + + gcList + List<GridConnection> + + J_EAHydrogenVehicle hydrogenTruck = null; +boolean foundAdditionalVehicle = false; + +// find the hydrogen truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); + if ( hydrogenTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (hydrogenTruck!=null) { + GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; + boolean available = true; + available = hydrogenTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenTruck); + hydrogenTruck.removeEnergyAsset(); + + + // Re-add Electric vehicle + double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; + double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; + double initialStateOfCharge_fr = 1.0; + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; + double vehicleScalingElectric = 1.0; + J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); + electricTruck.available = available; + + zero_Interface.c_orderedVehicles.add(0, electricTruck); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricTruck); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); +} + +return true; + + + RETURNS_VALUE + boolean + 1746008458960 + f_electricToHydrogenTruck + 360 + 780 + + false + true + true + + gcList + List<GridConnection> + + J_EAEV electricTruck = null; +boolean foundAdditionalVehicle = false; + +// find the electric truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + electricTruck = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); + if ( electricTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicle +if (!foundAdditionalVehicle) { + electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (electricTruck!=null) { + GridConnection gc = (GridConnection)electricTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; + boolean available = true; + available = electricTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(electricTruck); + electricTruck.removeEnergyAsset(); + + // Re-add hydrogen vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); + hydrogenVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(hydrogenVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); +} + +return true; + + + RETURNS_VALUE + boolean + 1746008458968 + f_dieselToHydrogenTruck + 360 + 800 + + false + true + true + + gcList + List<GridConnection> + + J_EADieselVehicle dieselTruck = null; +boolean foundAdditionalVehicle = false; + +// find the diesel truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); + if ( dieselTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (dieselTruck!=null) { + GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; + boolean available = true; + available = dieselTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselTruck); + dieselTruck.removeEnergyAsset(); + + // Re-add hydrogen vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); + hydrogenVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(hydrogenVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); +} + +return true; + + + RETURNS_VALUE + boolean + 1746008458977 + f_electricToDieselTruck + 360 + 840 + + false + true + true + + gcList + List<GridConnection> + + J_EAEV electricTruck = null; +boolean foundAdditionalVehicle = false; + +// find the electric truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + electricTruck = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); + if ( electricTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if ( electricTruck != null ) { + GridConnection gc = (GridConnection)electricTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; + boolean available = true; + available = electricTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(electricTruck); + electricTruck.removeEnergyAsset(); + + // Re-add diesel vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); + dieselVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); +} + +return true; + + + RETURNS_VALUE + boolean + 1746008458987 + f_hydrogenToDieselTruck + 360 + 860 + + false + true + true + + gcList + List<GridConnection> + + J_EAHydrogenVehicle hydrogenTruck = null; +boolean foundAdditionalVehicle = false; + +// find the hydrogen truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); + if ( hydrogenTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if ( hydrogenTruck != null ) { + GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; + boolean available = true; + available = hydrogenTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenTruck); + hydrogenTruck.removeEnergyAsset(); + + // Re-add diesel vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); + dieselVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); +} + +return true; + + + VOID + double + 1746018501114 + f_setTruckSlidersToCurrentEngineState + 360 + 1040 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricTrucks + ShapeSlider + + + sliderHydrogenTrucks + ShapeSlider + + + sliderFossilFuelTrucks + ShapeSlider + + List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); +for (GridConnection gc : gcList) { + if (gc.v_isActive) { + vehicles.addAll(gc.c_vehicleAssets); + } +} + +int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); + +int nbElectricTrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Trucks; +int nbDieseltrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); +int nbHydrogentrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); + +int totalVehicles = nbElectricTrucksCurrent + nbDieseltrucksCurrent + nbHydrogentrucksCurrent; + + + +int pct_electricTruckSlider = roundToInt(100.0*nbElectricTrucksCurrent/totalVehicles); +int pct_hydrogenTruckSlider = roundToInt(100.0*nbHydrogentrucksCurrent/totalVehicles); +int pct_dieselTruckSlider = roundToInt(100.0*nbDieseltrucksCurrent/totalVehicles); + +sliderElectricTrucks.setValue(pct_electricTruckSlider, false); +if ( sliderHydrogenTrucks != null ) { + sliderHydrogenTrucks.setValue(pct_hydrogenTruckSlider, false); +} +else if ( sliderHydrogenTrucks == null && pct_hydrogenTruckSlider != 0 ) { + throw new RuntimeException("Hydrogen trucks found but no hydrogen slider passed to f_setTruckSlidersToCurrentEngineState"); +}sliderFossilFuelTrucks.setValue(pct_dieselTruckSlider, false); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + RETURNS_VALUE + Triple<Integer, Integer, Integer> + 1749134655530 + f_calculateCurrentNumberOfTrucks + 20 + 1040 + + false + true + true + + gcList + List<GridConnection> + + + numberOfGhostVehicle_Trucks + Integer + + if (numberOfGhostVehicle_Trucks == null) { + numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); +} + +int nbEtruckCurrent = numberOfGhostVehicle_Trucks; +int nbHydrogenTrucksCurrent = 0; +int nbDieselTrucksCurrent = 0; +for ( GridConnection gc : gcList ) { + nbEtruckCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(gc instanceof GCPublicCharger) && gc.v_isActive); + nbHydrogenTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && gc.v_isActive); + nbDieselTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && gc.v_isActive); +} + +return Triple.of(nbEtruckCurrent, nbHydrogenTrucksCurrent, nbDieselTrucksCurrent); + + + RETURNS_VALUE + boolean + 1749645625091 + f_dieselToElectricVan + 590 + 720 + + false + true + true + + gcList + List<GridConnection> + + J_EADieselVehicle dieselVan = null; +boolean foundAdditionalVehicle = false; + +// find the diesel van to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + dieselVan = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); + if ( dieselVan != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + dieselVan = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (dieselVan!=null) { + GridConnection gc = (GridConnection)dieselVan.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = dieselVan.tripTracker; + boolean available = dieselVan.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselVan); + dieselVan.removeEnergyAsset(); + + // Re-add Electric vehicle + double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerVan_kW; + double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageVan_kWh; + double initialStateOfCharge_fr = 1.0; + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; + double vehicleScalingElectric = 1.0; + J_EAEV electricVan = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VAN, tripTracker); + electricVan.available = available; + + zero_Interface.c_orderedVehicles.add(0, electricVan); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricVan); + } +} + +else { + return false; + //throw new RuntimeException("Numbers suggest there is a diesel van left, but could not find it."); +} + +return true; + + + RETURNS_VALUE + boolean + 1749645629101 + f_electricToDieselVan + 590 + 740 + + false + true + true + + gcList + List<GridConnection> + + J_EAEV electricVan = null; +boolean foundAdditionalVehicle = false; + +// find the electric van to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + electricVan = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN); + if ( electricVan != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + electricVan = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if ( electricVan != null ) { + GridConnection gc = (GridConnection)electricVan.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = electricVan.tripTracker; + boolean available = true; + available = electricVan.getAvailability(); + zero_Interface.c_orderedVehicles.remove(electricVan); + electricVan.removeEnergyAsset(); + + // Re-add diesel vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VAN, tripTracker); + dieselVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is an electric van left, but could not find it."); +} + +return true; + + + RETURNS_VALUE + boolean + 1749646233660 + f_dieselToElectricCar + 590 + 780 + + false + true + true + + gcList + List<GridConnection> + + J_EADieselVehicle dieselCar = null; +boolean foundAdditionalVehicle = false; + +// find the diesel car to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + dieselCar = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); + if ( dieselCar != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + dieselCar = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (dieselCar!=null) { + GridConnection gc = (GridConnection)dieselCar.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = dieselCar.tripTracker; + boolean available = dieselCar.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselCar); + dieselCar.removeEnergyAsset(); + + // Re-add Electric vehicle + double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerCar_kW; + double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageCar_kWh; + double initialStateOfCharge_fr = 1.0; + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; + double vehicleScalingElectric = 1.0; + J_EAEV electricCar = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VEHICLE, tripTracker); + electricCar.available = available; + + zero_Interface.c_orderedVehicles.add(0, electricCar); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricCar); + } +} + +else { + return false; + //throw new RuntimeException("Numbers suggest there is a diesel car left, but could not find it."); +} + +return true; + + + RETURNS_VALUE + boolean + 1749646235580 + f_electricToDieselCar + 590 + 800 + + false + true + true + + gcList + List<GridConnection> + + J_EAEV electricCar = null; +boolean foundAdditionalVehicle = false; + +// find the electric car to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + electricCar = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); + if ( electricCar != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + electricCar = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if ( electricCar != null ) { + GridConnection gc = (GridConnection)electricCar.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = electricCar.tripTracker; + boolean available = true; + available = electricCar.getAvailability(); + zero_Interface.c_orderedVehicles.remove(electricCar); + electricCar.removeEnergyAsset(); + + // Re-add diesel vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VEHICLE, tripTracker); + dieselVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is an electric car left, but could not find it."); +} + +return true; + + + RETURNS_VALUE + Triple<Integer, Integer, Integer> + 1749655535164 + f_calculateCurrentNumberOfVans + 20 + 1020 + + false + true + true + + gcList + List<GridConnection> + + + numberOfGhostVehicle_Vans + Integer + + if (numberOfGhostVehicle_Vans == null) { + numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +} + +int nbEVansCurrent = numberOfGhostVehicle_Vans; +int nbHydrogenVansCurrent = 0; +int nbDieselVansCurrent = 0; +for ( GridConnection gc : gcList ) { + nbEVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(gc instanceof GCPublicCharger) && gc.v_isActive); + nbHydrogenVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN && gc.v_isActive); + nbDieselVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && gc.v_isActive); +} + +return Triple.of(nbEVansCurrent, nbHydrogenVansCurrent, nbDieselVansCurrent); + + + RETURNS_VALUE + Triple<Integer, Integer, Integer> + 1749655667960 + f_calculateCurrentNumberOfCars + 20 + 1000 + + false + true + true + + gcList + List<GridConnection> + + + numberOfGhostVehicle_Cars + Integer + + if (numberOfGhostVehicle_Cars == null) { + numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +} + +int nbEVsCurrent = numberOfGhostVehicle_Cars; +int nbHydrogenCarsCurrent = 0; +int nbDieselCarsCurrent = 0; +for ( GridConnection gc : gcList ) { + nbEVsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(gc instanceof GCPublicCharger) && gc.v_isActive); + nbHydrogenCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE && gc.v_isActive); + nbDieselCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && gc.v_isActive); +} + +return Triple.of(nbEVsCurrent, nbHydrogenCarsCurrent, nbDieselCarsCurrent); + + + VOID + double + 1749655752858 + f_setDieselVans + 70 + 840 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricVans + ShapeSlider + + + sliderFossilFuelVans + ShapeSlider + + double pctDieselVansGoal = sliderFossilFuelVans.getValue(); + +int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); + +int nbEvanCurrent = triple.getLeft(); +int nbDieselvansCurrent = triple.getRight(); + +int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; + +int nbDieselVansGoal = roundToInt(total_vehicles*pctDieselVansGoal/100.0); + +if (nbDieselvansCurrent < nbDieselVansGoal) { + // Add Diesel Vans + while ( nbDieselvansCurrent < nbDieselVansGoal ) { + if ( nbEvanCurrent > numberOfGhostVehicle_Vans ) { + // replace electric van with a diesel van + if (!f_electricToDieselVan(gcList)) { + f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); + return; + } + else { + nbDieselvansCurrent++; + nbEvanCurrent--; + } + } + } +} +else { + // Remove Diesel Vans + while ( nbDieselvansCurrent > nbDieselVansGoal ) { + // replace a diesel van with an electric van + if (!f_dieselToElectricVan(gcList)) { + f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); + return; + } + nbDieselvansCurrent--; + nbEvanCurrent++; + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + VOID + double + 1749656346356 + f_setElectricVans + 70 + 860 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricVans + ShapeSlider + + + sliderFossilFuelVans + ShapeSlider + + double pctElectricVansGoal = sliderElectricVans.getValue(); + +int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); + +int nbEvanCurrent = triple.getLeft(); +int nbDieselvansCurrent = triple.getRight(); + +int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; + +int nbElectricVansGoal = roundToInt(total_vehicles*pctElectricVansGoal/100.0); + +if (nbEvanCurrent < nbElectricVansGoal) { + // Add Electric Vans + while ( nbEvanCurrent < nbElectricVansGoal ) { + if ( nbDieselvansCurrent > 0 ) { + // replace a diesel van with an electric van + if (!f_dieselToElectricVan(gcList)) { + f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); + return; + } + else { + nbEvanCurrent++; + nbDieselvansCurrent--; + } + } + } +} +else { + // Remove Electric Vans + while ( nbEvanCurrent > nbElectricVansGoal ) { + // replace an electric van with a diesel van + if (!f_electricToDieselVan(gcList)) { + f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); + return; + } + nbEvanCurrent--; + nbDieselvansCurrent++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + VOID + double + 1749717776391 + f_setDieselCars + 70 + 890 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricCars + ShapeSlider + + + sliderFossilFuelCars + ShapeSlider + + double pctDieselCarsGoal = sliderFossilFuelCars.getValue(); + +int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); + +int nbEcarCurrent = triple.getLeft(); +int nbDieselcarsCurrent = triple.getRight(); + +int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; + +int nbDieselCarsGoal = roundToInt(total_vehicles*pctDieselCarsGoal/100.0); + +if (nbDieselcarsCurrent < nbDieselCarsGoal) { + // Add Diesel Cars + while ( nbDieselcarsCurrent < nbDieselCarsGoal ) { + if ( nbEcarCurrent > numberOfGhostVehicle_Cars ) { + // replace electric car with a diesel car + if (!f_electricToDieselCar(gcList)) { + f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); + return; + } + else { + nbDieselcarsCurrent++; + nbEcarCurrent--; + } + } + } +} +else { + // Remove Diesel Cars + while ( nbDieselcarsCurrent > nbDieselCarsGoal ) { + // replace a diesel car with an electric car + if (!f_dieselToElectricCar(gcList)) { + f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); + return; + } + nbDieselcarsCurrent--; + nbEcarCurrent++; + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + VOID + double + 1749717779317 + f_setElectricCars + 70 + 910 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricCars + ShapeSlider + + + sliderFossilFuelCars + ShapeSlider + + double pctElectricCarsGoal = sliderElectricCars.getValue(); + +int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); + +int nbEcarCurrent = triple.getLeft(); +int nbDieselcarsCurrent = triple.getRight(); + +int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; + +int nbElectricCarsGoal = roundToInt(total_vehicles*pctElectricCarsGoal/100.0); + +if (nbEcarCurrent < nbElectricCarsGoal) { + // Add Electric Cars + while ( nbEcarCurrent < nbElectricCarsGoal ) { + if ( nbDieselcarsCurrent > 0 ) { + // replace a diesel car with an electric car + if (!f_dieselToElectricCar(gcList)) { + f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); + return; + } + else { + nbEcarCurrent++; + nbDieselcarsCurrent--; + } + } + } +} +else { + // Remove Electric Cars + while ( nbEcarCurrent > nbElectricCarsGoal ) { + // replace an electric car with a diesel car + if (!f_electricToDieselCar(gcList)) { + f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); + return; + } + nbEcarCurrent--; + nbDieselcarsCurrent++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + VOID + double + 1749717909708 + f_setVanSlidersToCurrentEngineState + 360 + 1020 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricVans + ShapeSlider + + + sliderHydrogenVans + ShapeSlider + + + sliderFossilFuelVans + ShapeSlider + + List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); +for (GridConnection gc : gcList) { + if (gc.v_isActive) { + vehicles.addAll(gc.c_vehicleAssets); + } +} + +int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getRight(); + +int nbElectricVansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Vans; +int nbDieselvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); +int nbHydrogenvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); + +int totalVehicles = nbElectricVansCurrent + nbDieselvansCurrent + nbHydrogenvansCurrent; + + + +int pct_electricVanSlider = roundToInt(100.0*nbElectricVansCurrent/totalVehicles); +int pct_hydrogenVanSlider = roundToInt(100.0*nbHydrogenvansCurrent/totalVehicles); +int pct_dieselVanSlider = roundToInt(100.0*nbDieselvansCurrent/totalVehicles); + +sliderElectricVans.setValue(pct_electricVanSlider, false); +if ( sliderHydrogenVans != null ) { + sliderHydrogenVans.setValue(pct_hydrogenVanSlider, false); +} +else if ( sliderHydrogenVans == null && pct_hydrogenVanSlider != 0 ) { + throw new RuntimeException("Hydrogen vans found but no hydrogen slider passed to f_setVanSlidersToCurrentEngineState"); +} +sliderFossilFuelVans.setValue(pct_dieselVanSlider, false); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + VOID + double + 1749717987139 + f_setCarSlidersToCurrentEngineState + 360 + 1000 + + false + true + true + + gcList + List<GridConnection> + + + sliderElectricCars + ShapeSlider + + + sliderHydrogenCars + ShapeSlider + + + sliderFossilFuelCars + ShapeSlider + + List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); +for (GridConnection gc : gcList) { + if (gc.v_isActive) { + vehicles.addAll(gc.c_vehicleAssets); + } +} + +int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getRight(); + +int nbElectricCarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Cars; +int nbDieselcarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); +int nbHydrogencarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); + +int totalVehicles = nbElectricCarsCurrent + nbDieselcarsCurrent + nbHydrogencarsCurrent; + + + +int pct_electricCarSlider = roundToInt(100.0*nbElectricCarsCurrent/totalVehicles); +int pct_hydrogenCarSlider = roundToInt(100.0*nbHydrogencarsCurrent/totalVehicles); +int pct_dieselCarSlider = roundToInt(100.0*nbDieselcarsCurrent/totalVehicles); + +sliderElectricCars.setValue(pct_electricCarSlider, false); +if ( sliderHydrogenCars != null ) { + sliderHydrogenCars.setValue(pct_hydrogenCarSlider, false); +} +else if ( sliderHydrogenCars == null && pct_hydrogenCarSlider != 0 ) { + throw new RuntimeException("Hydrogen cars found but no hydrogen slider passed to f_setCarSlidersToCurrentEngineState"); +} +sliderFossilFuelCars.setValue(pct_dieselCarSlider, false); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings(); + + + VOID + double + 1754928402690 + f_updateSliders_Mobility + -350 + 40 + + false + true + true + Triple<Integer, Integer, Integer> triple = f_calculateNumberOfGhostVehicles( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()) ); +v_totalNumberOfGhostVehicle_Cars = triple.getLeft(); +v_totalNumberOfGhostVehicle_Vans = triple.getMiddle(); +v_totalNumberOfGhostVehicle_Trucks = triple.getRight(); + + +if(gr_mobilitySliders_default.isVisible()){ + f_updateMobilitySliders_default(); +} +else if(gr_mobilitySliders_residential.isVisible()){ + f_updateMobilitySliders_residential(); +} +else{ + f_updateMobilitySliders_custom(); +} + + + VOID + double + 1754928402694 + f_updateMobilitySliders_default + -330 + 60 + + false + true + true + List<GridConnection> allConsumerGridConnections = uI_Tabs.f_getActiveSliderGridConnections_consumption(); + +////Savings +double totalBaseTravelDistance_km = 0; +double totalSavedTravelDistance_km = 0; +for(GridConnection GC : allConsumerGridConnections){ + if(GC.v_isActive){ + for(J_ActivityTrackerTrips tripTracker : GC.c_tripTrackers){ + totalBaseTravelDistance_km += tripTracker.getAnnualDistance_km(); + totalSavedTravelDistance_km += (1-tripTracker.getDistanceScaling_fr())*tripTracker.getAnnualDistance_km(); + } + } +} + +double mobilitySavings_pct = totalBaseTravelDistance_km > 0 ? (totalSavedTravelDistance_km/totalBaseTravelDistance_km * 100) : 0; +sl_mobilityDemandReduction_pct.setValue(roundToInt(mobilitySavings_pct), false); + + +//Smart charging +boolean smartCharging = false; +for(GridConnection GC : allConsumerGridConnections){ + if(GC.c_electricVehicles.size() > 0 && GC.f_getCurrentChargingType() != OL_ChargingAttitude.SIMPLE){ + smartCharging = true; + break; + } +} +cb_spreadChargingEVs.setSelected(smartCharging, false); + + +////Vehicles +// Initialize the vehicle counters +int DieselCars = 0; +int ElectricCars = v_totalNumberOfGhostVehicle_Cars; +int HydrogenCars = 0; + +int DieselVans = 0; +int ElectricVans = v_totalNumberOfGhostVehicle_Vans; +int HydrogenVans = 0; + +int DieselTrucks = 0; +int ElectricTrucks = v_totalNumberOfGhostVehicle_Trucks; +int HydrogenTrucks = 0; + +//Count the amount of vehicles for each type +for (GridConnection gc : allConsumerGridConnections) { + if(gc.v_isActive){ + for (J_EAVehicle vehicle : gc.c_vehicleAssets) { + if (vehicle instanceof J_EADieselVehicle){ + switch(vehicle.getEAType()){ + case DIESEL_VEHICLE: + DieselCars += 1; + break; + case DIESEL_VAN: + DieselVans += 1; + break; + case DIESEL_TRUCK: + DieselTrucks += 1; + break; + } + } + else if (vehicle instanceof J_EAEV){ + switch(vehicle.getEAType()){ + case ELECTRIC_VEHICLE: + ElectricCars += 1; + break; + case ELECTRIC_VAN: + ElectricVans += 1; + break; + case ELECTRIC_TRUCK: + ElectricTrucks += 1; + break; + } + } + else if (vehicle instanceof J_EAHydrogenVehicle){ + switch(vehicle.getEAType()){ + case HYDROGEN_VEHICLE: + HydrogenCars += 1; + break; + case HYDROGEN_VAN: + HydrogenVans += 1; + break; + case HYDROGEN_TRUCK: + HydrogenTrucks += 1; + break; + } + } + } + } +} + + +//Set CAR sliders +int totalCars = DieselCars + ElectricCars + HydrogenCars; +int DieselCars_pct = 0; +int ElectricCars_pct = 0; +int HydrogenCars_pct = 0; +if (totalCars != 0) { + DieselCars_pct = roundToInt((100.0 * DieselCars) / totalCars); + ElectricCars_pct = roundToInt((100.0 * ElectricCars) / totalCars); + HydrogenCars_pct = roundToInt((100.0 * HydrogenCars) / totalCars); +} +else{ + sl_fossilFuelCars_pct.setEnabled(false); + sl_electricCars_pct.setEnabled(false); +} +sl_fossilFuelCars_pct.setValue(DieselCars_pct, false); +sl_electricCars_pct.setValue(ElectricCars_pct, false); + + +//Set VAN sliders +int totalVans = DieselVans + ElectricVans + HydrogenVans; +int DieselVans_pct = 0; +int ElectricVans_pct = 0; +int HydrogenVans_pct = 0; +if (totalVans != 0) { + DieselVans_pct = roundToInt(100.0 * DieselVans / totalVans); + ElectricVans_pct = roundToInt(100.0 * ElectricVans / totalVans); + HydrogenVans_pct = roundToInt(100.0 * HydrogenVans / totalVans); +} +else{ + sl_fossilFuelVans_pct.setEnabled(false); + sl_electricVans_pct.setEnabled(false); +} +sl_fossilFuelVans_pct.setValue(DieselVans_pct, false); +sl_electricVans_pct.setValue(ElectricVans_pct, false); + + +//Set TRUCK sliders +int totalTrucks = DieselTrucks + ElectricTrucks + HydrogenTrucks; +int DieselTrucks_pct = 0; +int ElectricTrucks_pct = 0; +int HydrogenTrucks_pct = 0; +if (totalTrucks != 0) { + DieselTrucks_pct = roundToInt(100.0 * DieselTrucks / totalTrucks); + ElectricTrucks_pct = roundToInt(100.0 * ElectricTrucks / totalTrucks); + HydrogenTrucks_pct = roundToInt(100.0 * HydrogenTrucks / totalTrucks); +} +else{ + sl_fossilFuelTrucks_pct.setEnabled(false); + sl_electricTrucks_pct.setEnabled(false); + sl_hydrogenTrucks_pct.setEnabled(false); +} +sl_fossilFuelTrucks_pct.setValue(DieselTrucks_pct, false); +sl_electricTrucks_pct.setValue(ElectricTrucks_pct, false); +sl_hydrogenTrucks_pct.setValue(HydrogenTrucks_pct, false); + + + VOID + double + 1754928402700 + f_updateMobilitySliders_custom + -330 + 100 + + false + true + true + //If you have a custom tab, +//override this function to make it update automatically +traceln("Forgot to override the update custom electricity sliders functionality"); + + + VOID + double + 1754990674760 + f_setChargingAttitude + 65 + 655 + + false + true + true + + selectedChargingAttitude + OL_ChargingAttitude + + + gcList + List<GridConnection> + + gcList.forEach(x -> x.f_addChargingManagement(selectedChargingAttitude)); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1758183013077 + f_updateMobilitySliders_residential + -330 + 80 + + false + true + true + ////Private EV +gr_activateV2GPrivateParkedCars.setVisible(false); +cb_activateV2GPrivateParkedCars.setSelected(false, false); +gr_settingsV2G_privateParkedCars.setVisible(false); + +List<GCHouse> houseGridConnectionsWithPrivateParking = findAll(uI_Tabs.f_getActiveSliderGridConnections_houses(), house -> house.p_eigenOprit); +List<J_EAVehicle> privateParkedCars = new ArrayList<J_EAVehicle>(); +houseGridConnectionsWithPrivateParking.forEach(gc -> privateParkedCars.addAll(gc.c_vehicleAssets)); + +if (privateParkedCars.size() > 0) { + int nbPrivateEVs = count(privateParkedCars, x -> x instanceof J_EAEV); + int nbPrivateEVsThatSupportV2G = count(privateParkedCars, x -> x instanceof J_EAEV && ((J_EAEV)x).getV2GCapable()); + double privateEVs_pct = 100.0 * nbPrivateEVs / privateParkedCars.size(); + double privateEVsThatSupportV2G_pct = 100.0 * nbPrivateEVsThatSupportV2G / nbPrivateEVs; + sl_privateEVsResidentialArea_pct.setValue(roundToInt(privateEVs_pct), false); + sl_EVsThatSupportV2G_pct.setValue(roundToInt(privateEVsThatSupportV2G_pct), false); + + //Selected charging mode + GCHouse GCWithPrivateParkedEV = findFirst(houseGridConnectionsWithPrivateParking, gc -> gc.c_electricVehicles.size() > 0); + OL_ChargingAttitude currentChargingAttitude = (GCWithPrivateParkedEV != null) ? GCWithPrivateParkedEV.f_getCurrentChargingType() : OL_ChargingAttitude.SIMPLE; + boolean V2GActive = (GCWithPrivateParkedEV != null) ? GCWithPrivateParkedEV.f_getV2GActive() : false; + for(GridConnection GC : houseGridConnectionsWithPrivateParking){ + if(GC.c_electricVehicles.size() > 0 ){ + if(currentChargingAttitude != OL_ChargingAttitude.CUSTOM && GC.f_getCurrentChargingType() != currentChargingAttitude){ + currentChargingAttitude = OL_ChargingAttitude.CUSTOM; // Here used as varied: in other words: custom setting + } + if(V2GActive && !GC.f_getV2GActive()){ + V2GActive = false; + } + } + + if(currentChargingAttitude == OL_ChargingAttitude.CUSTOM && !V2GActive){ + break; + } + + } + + String selectedChargingAttitudeString = ""; + switch(currentChargingAttitude){ + case SIMPLE: + selectedChargingAttitudeString = "Niet slim laden"; + break; + case PRICE: + selectedChargingAttitudeString = "Slim laden: Prijs gestuurd"; + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + case BALANCE_LOCAL: + selectedChargingAttitudeString = "Slim laden: Netbewust"; + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + case CUSTOM: + selectedChargingAttitudeString = "Gevarieerd"; + break; + } + + cb_chargingAttitudePrivateParkedCars.setValue(selectedChargingAttitudeString, false); + cb_activateV2GPrivateParkedCars.setSelected(V2GActive, false); + + if(gr_activateV2GPrivateParkedCars.isVisible() && V2GActive){ + gr_settingsV2G_privateParkedCars.setVisible(true); + } +} +else{ + sl_privateEVsResidentialArea_pct.setEnabled(false); +} + +////Chargers +OL_ChargingAttitude selectedChargingAttitude = null; +gr_activateV2GPublicChargers.setVisible(false); +cb_activateV2GPublicChargers.setSelected(false, false); +gr_settingsV1G_publicChargers.setVisible(false); +gr_settingsV2G_publicChargers.setVisible(false); + +List<GCPublicCharger> activeChargerGridConnections = uI_Tabs.f_getSliderGridConnections_chargers(); +List<GCPublicCharger> pausedChargerGridConnections = uI_Tabs.f_getPausedSliderGridConnections_chargers(); +List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); +activeChargerGridConnections.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); + + +int nbPublicChargerGC = activeChargerGridConnections.size() + pausedChargerGridConnections.size(); + +if(nbPublicChargerGC > 0 ){ + int nbActivePublicChargersGC = activeChargerGridConnections.size(); + double activePublicChargers_pct = 100.0 * nbActivePublicChargersGC / nbPublicChargerGC; + sl_publicChargersResidentialArea_pct.setValue(roundToInt(activePublicChargers_pct), false); + + int nbV1GChargers = count(activeChargersEA, x -> x.getV1GCapable()); + int nbV2GChargers =count(activeChargersEA, x -> x.getV2GCapable()); + int nbPublicChargers = activeChargersEA.size(); + + double V1G_pct = 100.0 * nbV1GChargers / nbPublicChargers; + double V2G_pct = 100.0 * nbV2GChargers / nbPublicChargers; + sl_chargersThatSupportV1G_pct.setValue(roundToInt(V1G_pct), false); + sl_chargersThatSupportV2G_pct.setValue(roundToInt(V2G_pct), false); + + //Selected charging mode + OL_ChargingAttitude currentChargingAttitude = activeChargersEA.size() > 0 ? activeChargersEA.get(0).getChargingAttitude(): OL_ChargingAttitude.SIMPLE; + boolean V2GActive = activeChargersEA.size() > 0 ? activeChargersEA.get(0).getV2GActive(): false; + for(J_EAChargePoint charger : activeChargersEA){ + if(currentChargingAttitude != OL_ChargingAttitude.CUSTOM && charger.getChargingAttitude() != currentChargingAttitude){ + currentChargingAttitude = OL_ChargingAttitude.CUSTOM; // Here used as varied: in other words: custom setting + } + if(V2GActive && !charger.getV2GActive()){ + V2GActive = false; + } + + if(currentChargingAttitude == OL_ChargingAttitude.CUSTOM && !V2GActive){ + break; + } + } + + String selectedChargingAttitudeString = ""; + switch(currentChargingAttitude){ + case SIMPLE: + selectedChargingAttitudeString = "Niet slim laden"; + break; + case PRICE: + selectedChargingAttitudeString = "Slim laden: Prijs gestuurd"; + gr_settingsV1G_publicChargers.setVisible(true); + gr_activateV2GPublicChargers.setVisible(true); + break; + case BALANCE_GRID: + selectedChargingAttitudeString = "Slim laden: Netbewust"; + gr_settingsV1G_publicChargers.setVisible(true); + gr_activateV2GPublicChargers.setVisible(true); + break; + case CUSTOM: + selectedChargingAttitudeString = "Gevarieerd"; + break; + } + + cb_chargingAttitudePrivatePublicChargers.setValue(selectedChargingAttitudeString, false); + cb_activateV2GPublicChargers.setSelected(V2GActive, false); + + if(gr_activateV2GPublicChargers.isVisible() && V2GActive){ + gr_settingsV2G_publicChargers.setVisible(true); + } +} +else{ + sl_publicChargersResidentialArea_pct.setEnabled(false); +} + + + VOID + double + 1758183975214 + f_setPublicChargingStations + 480 + 605 + + false + true + true + + gcListChargers + List<GCPublicCharger> + + + publicChargers_pct + double + + + V1GCapableChargerSlider + ShapeSlider + + + V2GCapableChargerSlider + ShapeSlider + + int totalNbChargers = gcListChargers.size(); +int currentNbChargers = count(gcListChargers, x -> x.v_isActive); +int nbChargersGoal = roundToInt(publicChargers_pct / 100 * totalNbChargers) ; + +while ( currentNbChargers > nbChargersGoal ) { + GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> x.v_isActive); + if (gc != null) { + gc.f_setActive(false); + zero_Interface.c_orderedPublicChargers.remove(gc); + zero_Interface.c_orderedPublicChargers.add(0, gc); + currentNbChargers--; + + for (J_EADieselVehicle car : zero_Interface.c_mappingOfVehiclesPerCharger.get(gc.p_uid)) { + car.reRegisterEnergyAsset(); + } + } + else { + throw new RuntimeException("Charger slider error: there are not sufficient chargers to remove"); + } +} +while ( currentNbChargers < nbChargersGoal){ + GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> !x.v_isActive); + if (gc != null) { + gc.f_setActive(true); + zero_Interface.c_orderedPublicChargers.remove(gc); + zero_Interface.c_orderedPublicChargers.add(0, gc); + currentNbChargers++; + + for (J_EADieselVehicle car : zero_Interface.c_mappingOfVehiclesPerCharger.get(gc.p_uid)) { + J_ActivityTrackerTrips tripTracker = car.getTripTracker(); //Needed, as triptracker is removed when removeEnergyAsset is called. + car.removeEnergyAsset(); + car.setTripTracker(tripTracker);//Re-set the triptracker again, for storing. + } + } + else { + throw new RuntimeException("Charger slider error: there are no more chargers to add"); + } +} + +//Update the V1G and V2G capable vehicle slider accordingly to the change in vehicle dynamics +int totalActiveChargers = 0; +int totalCapableV1GChargers = 0; +int totalCapableV2GChargers = 0; + +for(GCPublicCharger GC : gcListChargers){ + if(GC.v_isActive){ + for(J_EAChargePoint charger : GC.c_chargers){ + totalActiveChargers++; + if(charger.getV1GCapable()){ + totalCapableV1GChargers++; + } + if(charger.getV2GCapable()){ + totalCapableV2GChargers++; + } + } + + } +} +V1GCapableChargerSlider.setValue(roundToInt(100.0 * totalCapableV1GChargers/totalActiveChargers)); +V2GCapableChargerSlider.setValue(roundToInt(100.0 * totalCapableV2GChargers/totalActiveChargers)); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + + VOID + double + 1758183975221 + f_setV1GChargerCapabilities + 480 + 545 + + false + true + true + + gcListChargers + List<GCPublicCharger> + + + goal_pct + double + + List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); +gcListChargers.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); + +int totalNbChargers = activeChargersEA.size(); +int currentNbChargers = count(activeChargersEA, x -> x.getV1GCapable()); +int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); + +while (currentNbChargers < nbChargersGoal) { + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> activeChargersEA.contains(x) && !x.getV1GCapable()); + j_ea.setV1GCapability(true); + currentNbChargers++; + zero_Interface.c_orderedV1GChargers.remove(j_ea); + zero_Interface.c_orderedV1GChargers.add(0, j_ea); + +} +while (currentNbChargers > nbChargersGoal) { + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> activeChargersEA.contains(x) && x.getV1GCapable()); + j_ea.setV1GCapability(false); + currentNbChargers--; + zero_Interface.c_orderedV1GChargers.remove(j_ea); + zero_Interface.c_orderedV1GChargers.add(0, j_ea); +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1758183975227 + f_setV2GChargerCapabilities + 480 + 565 + + false + true + true + + gcListChargers + List<GCPublicCharger> + + + goal_pct + double + + List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); +gcListChargers.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); + +int totalNbChargers = activeChargersEA.size(); +int currentNbChargers = count(activeChargersEA, x -> x.getV2GCapable()); +int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); + +while (currentNbChargers < nbChargersGoal) { + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> activeChargersEA.contains(x) && !x.getV2GCapable()); + j_ea.setV2GCapability(true); + currentNbChargers++; + zero_Interface.c_orderedV2GChargers.remove(j_ea); + zero_Interface.c_orderedV2GChargers.add(0, j_ea); + +} +while (currentNbChargers > nbChargersGoal) { + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> activeChargersEA.contains(x) && x.getV2GCapable()); + j_ea.setV2GCapability(false); + currentNbChargers--; + zero_Interface.c_orderedV2GChargers.remove(j_ea); + zero_Interface.c_orderedV2GChargers.add(0, j_ea); +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1758183975234 + f_setVehiclesPrivateParking + 480 + 650 + + false + true + true + + gcListHouses + List<GCHouse> + + + privateParkingEV_pct + double + + + V2GCapableVehicleSlider + ShapeSlider + + //Voor nu zo opgelost, echter gaat dit niet goed werken met de volgorde. BEDENK EEN BETER MANIER!? +List<J_EAVehicle> gcListOrderedVehiclesPrivateParking = findAll( zero_Interface.c_orderedVehiclesPrivateParking, h -> gcListHouses.contains(h.getParentAgent())); + +int nbOfPrivateParkedEV = (int)sum(findAll(gcListHouses, gc -> gc.p_eigenOprit), x -> x.c_electricVehicles.size()); +int desiredNbOfPrivateParkedEV = roundToInt(privateParkingEV_pct / 100 * gcListOrderedVehiclesPrivateParking.size()); + + +// we scale the consumption instead of getting the diesel/EV parameter from avgc data to represent the 'size' of the car +double ratioEVToDieselConsumption = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm / zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionCar_kWhpkm; + +while ( nbOfPrivateParkedEV > desiredNbOfPrivateParkedEV){ + J_EAVehicle j_ea = findFirst( gcListOrderedVehiclesPrivateParking, h -> h instanceof J_EAEV); + if (j_ea.vehicleScaling != 1) { + throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); + } + J_ActivityTrackerTrips triptracker = j_ea.tripTracker; + double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() / ratioEVToDieselConsumption; + j_ea.removeEnergyAsset(); + gcListOrderedVehiclesPrivateParking.remove(j_ea); + zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); + J_EADieselVehicle dieselCar = new J_EADieselVehicle(j_ea.getParentAgent(), energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, 1, OL_EnergyAssetType.DIESEL_VEHICLE, triptracker); + gcListOrderedVehiclesPrivateParking.add(dieselCar); + zero_Interface.c_orderedVehiclesPrivateParking.add(dieselCar); + nbOfPrivateParkedEV --; +} +while ( nbOfPrivateParkedEV < desiredNbOfPrivateParkedEV){ + J_EAVehicle j_ea = findFirst( gcListOrderedVehiclesPrivateParking, h -> h instanceof J_EADieselVehicle); + if (j_ea.vehicleScaling != 1) { + throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); + } + J_ActivityTrackerTrips triptracker = j_ea.tripTracker; + double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() * ratioEVToDieselConsumption; + j_ea.removeEnergyAsset(); + gcListOrderedVehiclesPrivateParking.remove(j_ea); + zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); + double capacityElectricity_kW = randomTrue(0.6) ? randomTrue(0.4) ? 3.2 : 5.6 : 11.0; + double storageCapacity_kWh = uniform_discr(65,90); + J_EAEV ev = new J_EAEV(j_ea.getParentAgent(), capacityElectricity_kW, storageCapacity_kWh, 1, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, 1, OL_EnergyAssetType.ELECTRIC_VEHICLE, triptracker); + gcListOrderedVehiclesPrivateParking.add(ev); + zero_Interface.c_orderedVehiclesPrivateParking.add(ev); + nbOfPrivateParkedEV++; +} + + +//Update the V2G capable vehicle slider accordingly to the change in vehicle dynamics +int totalCapableV2GEVs = count(gcListOrderedVehiclesPrivateParking, vehicle -> vehicle instanceof J_EAEV && ((J_EAEV)vehicle).getV2GCapable()); +V2GCapableVehicleSlider.setValue(roundToInt(100.0*totalCapableV2GEVs/nbOfPrivateParkedEV)); + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1758275653317 + f_setV2GEVCapabilities + 480 + 585 + + false + true + true + + gcListHouses + List<GCHouse> + + + goal_pct + double + + //Voor nu zo werkend gemaakt met gclist als input, echter gaat dit niet goed werken mochten er minder gcs tussen zitten dan in de zero_interface ordered collectie staat en gaat de volgorde veranderen. +// -> BEDENK EEN BETER MANIER!? --> Bestaat er uberhaupt een manier voor? + +List<J_EAVehicle> gcListOrderedVehiclesPrivateParking_all = findAll( zero_Interface.c_orderedVehiclesPrivateParking, vehicle -> gcListHouses.contains(vehicle.getParentAgent()) && vehicle.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); + +List<J_EAEV> gcListOrderedVehiclesPrivateParking = gcListOrderedVehiclesPrivateParking_all.stream().map(v -> (J_EAEV) v).collect(Collectors.toList()); + +int totalNbEVs = gcListOrderedVehiclesPrivateParking.size(); +int currentNbEVsV2GCapable = count(gcListOrderedVehiclesPrivateParking, x -> x.getV2GCapable()); +int nbEVsV2GCapableGoal = roundToInt(goal_pct / 100.0 * totalNbEVs); + +while (currentNbEVsV2GCapable < nbEVsV2GCapableGoal) { + J_EAEV j_ea = findFirst(gcListOrderedVehiclesPrivateParking, x -> x.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !x.getV2GCapable()); + j_ea.setV2GCapable(true); + currentNbEVsV2GCapable++; + gcListOrderedVehiclesPrivateParking.remove(j_ea); + gcListOrderedVehiclesPrivateParking.add(0, j_ea); + +} +while (currentNbEVsV2GCapable > nbEVsV2GCapableGoal) { + J_EAEV j_ea = findFirst(gcListOrderedVehiclesPrivateParking, x -> x.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && x.getV2GCapable()); + j_ea.setV2GCapable(false); + currentNbEVsV2GCapable--; + gcListOrderedVehiclesPrivateParking.remove(j_ea); + gcListOrderedVehiclesPrivateParking.add(0, j_ea); +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1758276936913 + f_activateV2G + 65 + 675 + + false + true + true + + gcList + List<GridConnection> + + + activateV2G + boolean + + for(GridConnection GC : gcList){ + GC.f_activateV2GChargingMode(activateV2G); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); + + + VOID + double + 1764004906148 + f_initializeTab_Mobility + -350 + -50 + + false + true + true + //Use this function to initialize mobility tab settings at start of simulation + + + + + 1722245324896 + connections + 50 + -50 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1722245483166 + uI_Tabs + 50 + -100 + + false + true + true + + zerointerfaceloader + UI_Tabs + + + + 1722252542608 + zero_Interface + 150 + -100 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + 1753694295455 + uI_EnergyHub + 300 + -100 + + false + true + true + + zerointerfaceloader + UI_EnergyHub + + + + + + 1722245324902 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1722350199532 + rect_genericFunctions + 10 + 470 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -4144960 + null + SOLID + 800 + 470 + 0.0 + -1 + null + + + 1722350199535 + t_genericFunctions + 100 + 490 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Generic Functions + + SansSerif + 22 + + + LEFT + + + 1722247567090 + gr_mobilitySliders_default + 0 + 0 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1722247567092 + rect_mobilityDemandSliders_default + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + DOTTED + 370 + 350 + 0.0 + -2625550 + null + + + false + 1722247567094 + sl_fossilFuelCars_pct + 260 + 315 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + sl_electricCars_pct.setValue(100 - sl_fossilFuelCars_pct.getIntValue(), false); +f_setDieselCars( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricCars_pct, sl_fossilFuelCars_pct ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + false + 1722247567096 + sl_electricTrucks_pct + 260 + 105 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setVehicleSliders( 0, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); +f_setElectricTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722247567098 + t_fossilFuelCars_pct + 230 + 320 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_fossilFuelCars_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722247567100 + t_fossilFuelCarsDescription + 20 + 320 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fossiele brandstof + + Dialog + 14 + + + LEFT + + + 1722247567102 + t_electricTrucksDescription + 15 + 110 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektrisch + + Dialog + 14 + + + LEFT + + + 1722247567104 + t_electricTrucks_pct + 230 + 110 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_electricTrucks_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722247567106 + t_mobilityDemandReductionDescription + 15 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing transport + + Dialog + 14 + + + LEFT + + + false + 1722247567108 + sl_mobilityDemandReduction_pct + 260 + 15 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_mobilityDemandReduction_pct.getValue() ); + + + + 0 + HORIZONTAL + -50 + 50 + 1 + false + + + + 1722247567110 + t_mobilityDemandReduction_pct + 230 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_mobilityDemandReduction_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + false + 1722247567112 + sl_hydrogenTrucks_pct + 260 + 130 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setVehicleSliders( 1, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); +f_setHydrogenTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722247567114 + t_hydrogenTrucksDescription + 15 + 135 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Waterstof + + Dialog + 14 + + + LEFT + + + 1722247567116 + t_hydrogenTrucks_pct + 230 + 135 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_hydrogenTrucks_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + false + 1722247567118 + sl_fossilFuelTrucks_pct + 260 + 155 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setVehicleSliders( 2, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); +f_setDieselTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722247567120 + t_fossilFuelTrucksDescription + 15 + 160 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fossiele brandstof + + Dialog + 14 + + + LEFT + + + 1722247567122 + t_fossilFuelTrucks_pct + 230 + 160 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_fossilFuelTrucks_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722247567124 + t_trucksDescription + 15 + 85 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Vrachtwagens + + Dialog + 14 + + + LEFT + + + false + 1722247567126 + sl_electricCars_pct + 260 + 290 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + sl_fossilFuelCars_pct.setValue(100 - sl_electricCars_pct.getIntValue(), false); +f_setElectricCars( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricCars_pct, sl_fossilFuelCars_pct ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722247567128 + t_electricCarsDescription + 20 + 295 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektrisch + + Dialog + 14 + + + LEFT + + + 1722247567130 + t_electricCars_pct + 230 + 295 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_electricCars_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722247567132 + t_carsDescription + 15 + 270 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Auto's + + Dialog + 14 + + + LEFT + + + false + 1722247567134 + sl_fossilFuelVans_pct + 260 + 235 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + sl_electricVans_pct.setValue(100 - sl_fossilFuelVans_pct.getIntValue(), false); +f_setDieselVans( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricVans_pct, sl_fossilFuelVans_pct ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722247567136 + t_fossilFuelVans_pct + 230 + 240 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_fossilFuelVans_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722247567138 + t_fossilFuelVansDescription + 15 + 240 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fossiele brandstof + + Dialog + 14 + + + LEFT + + + false + 1722247567140 + sl_electricVans_pct + 260 + 210 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + sl_fossilFuelVans_pct.setValue(100 - sl_electricVans_pct.getIntValue(), false); +f_setElectricVans( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricVans_pct, sl_fossilFuelVans_pct ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1722247567142 + t_electricVansDescription + 15 + 215 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektrisch + + Dialog + 14 + + + LEFT + + + 1722247567144 + t_electricVans_pct + 230 + 215 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + # + sl_electricVans_pct.getIntValue() + "%" + + Dialog + 14 + + + CENTER + + + 1722247567146 + t_vansDescription + 15 + 190 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Busjes + + Dialog + 14 + + + LEFT + + + 1746096199769 + i_mobilityReduction + 160 + 20 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_mobilityReduction, zero_Interface.v_infoText.mobilityDemandReduction, i_mobilityReduction.getX() + uI_Tabs.v_presentationXOffset, i_mobilityReduction.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746096716217 + i_electricTruck + 160 + 110 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_electricTruck, zero_Interface.v_infoText.electricTrucks, i_electricTruck.getX() + uI_Tabs.v_presentationXOffset, i_electricTruck.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746096716230 + i_hydrogenTruck + 160 + 135 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_hydrogenTruck, zero_Interface.v_infoText.hydrogenTrucks, i_hydrogenTruck.getX() + uI_Tabs.v_presentationXOffset, i_hydrogenTruck.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746096716242 + i_fossilFuelTruck + 160 + 160 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_fossilFuelTruck, zero_Interface.v_infoText.fossilTrucks, i_fossilFuelTruck.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelTruck.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746096716255 + i_electricVans + 160 + 215 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_electricVans, zero_Interface.v_infoText.electricVans, i_electricVans.getX() + uI_Tabs.v_presentationXOffset, i_electricVans.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746096716267 + i_fossilFuelVans + 160 + 240 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_fossilFuelVans, zero_Interface.v_infoText.fossilVans, i_fossilFuelVans.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelVans.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746096716280 + i_electricCars + 160 + 295 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_electricCars, zero_Interface.v_infoText.electricCars, i_electricCars.getX() + uI_Tabs.v_presentationXOffset, i_electricCars.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1746096716293 + i_fossilFuelCars + 160 + 320 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_fossilFuelCars, zero_Interface.v_infoText.fossilCars, i_fossilFuelCars.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelCars.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + false + 1754990132964 + cb_spreadChargingEVs + 260 + 50 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + OL_ChargingAttitude selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; +if(cb_spreadChargingEVs.isSelected()){ + selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; +} + +f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getAllSliderGridConnections_all()); + + + + + false + + + + 1754990186800 + t_spreadChargingEVsDescription1 + 15 + 55 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Slim laden + + Dialog + 14 + + + LEFT + + + + + 1722342418259 + rect_demandFunctions + 50 + 550 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -8355840 + null + SOLID + 300 + 70 + 0.0 + -1 + null + + + 1722342418261 + t_demandFunctionsDescription + 200 + 560 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Demand Functions + + SansSerif + 18 + + + CENTER + + + 1722342719680 + rect_mobilityFunctions + 50 + 690 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -5952982 + null + SOLID + 720 + 230 + 0.0 + -1 + null + + + 1722342719682 + t_mobilityFunctionsDescription + 170 + 700 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Mobility Functions (default) + + SansSerif + 18 + + + CENTER + + + false + 1754990738497 + cb_setChargingAttitude + 265 + 640 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + OL_ChargingAttitude selectedChargingAttitude = null; + +switch(cb_setChargingAttitude.getValue()){ + case "Standaard": + selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; + break; + case "Gelimiteerd vermogen": + selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; + break; + /*case "Slimme spreiding": + selectedChargingAttitude = OL_ChargingAttitude.MAX_SPREAD; + break;*/ + case "Prijsgestuurd": + selectedChargingAttitude = OL_ChargingAttitude.PRICE; + break; + case "Custom": + selectedChargingAttitude = null; + break; +} + +if(selectedChargingAttitude != null){ + f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getAllSliderGridConnections_all()); +} + + + + false + + + + + false + + + + 1754991641604 + i_mobilityChargingAttitude + 160 + 55 + + true + true + false + SHAPE_DRAW_2D3D + zero_Interface.f_setInfoText(i_mobilityChargingAttitude, zero_Interface.v_infoText.mobilitySmartCharging, i_mobilityChargingAttitude.getX() + uI_Tabs.v_presentationXOffset, i_mobilityChargingAttitude.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1758182984074 + gr_mobilitySliders_residential + 400 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + 0 + false + 0 + 0.0 + + + 1758182947156 + rect_mobilityDemandSliders_residential + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + DOTTED + 370 + 350 + 0.0 + -2625550 + null + + + 1758183089010 + txt_privateParkedCars + 15 + 10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Privé geparkeerde autos + + Dialog + 14 + + + LEFT + + + 1758183152912 + txt_publicChargePoints + 15 + 165 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Publieke laadpalen + + Dialog + 14 + + + LEFT + + + false + 1758183196756 + sl_publicChargersResidentialArea_pct + 260 + 190 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPublicChargingStations(uI_Tabs.f_getAllSliderGridConnections_chargers(), sl_publicChargersResidentialArea_pct.getIntValue(), sl_chargersThatSupportV1G_pct, sl_chargersThatSupportV2G_pct); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1758183196774 + t_publicEVsResidentialAreaDescription + 15 + 195 + + true + true + false + SHAPE_DRAW_2D + sl_publicChargersResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Actieve laadpalen in gebied + + Dialog + 14 + + + LEFT + + + 1758183196782 + t_publicEVsResidentialArea_pct + 245 + 195 + + true + true + false + SHAPE_DRAW_2D + sl_publicChargersResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + 0% + sl_publicChargersResidentialArea_pct.getIntValue() + " %" + + Dialog + 12 + + + RIGHT + + + 1758183196796 + t_privateEVsResidentialAreaDescription + 15 + 40 + + true + true + false + SHAPE_DRAW_2D + sl_privateEVsResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + Aandeel Elektrisch + + Dialog + 14 + + + LEFT + + + false + 1758183196803 + sl_privateEVsResidentialArea_pct + 260 + 34 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setVehiclesPrivateParking(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_privateEVsResidentialArea_pct.getValue(), sl_EVsThatSupportV2G_pct); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1758183196811 + t_privateEVsResidentialArea_pct + 244 + 40 + + true + true + false + SHAPE_DRAW_2D + sl_privateEVsResidentialArea_pct.isVisible() + false + 0 + 0.0 + -16777216 + 0% + sl_privateEVsResidentialArea_pct.getIntValue() + " %" + + Dialog + 12 + + + RIGHT + + + 1758183196871 + gr_settingsV2G_publicChargers + 9 + 311 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1758183196873 + sl_chargersThatSupportV2G_pct + 251 + 4 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setV2GChargerCapabilities( uI_Tabs.f_getSliderGridConnections_chargers(), sl_chargersThatSupportV2G_pct.getValue() ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1758183196875 + t_chargersThatSupportV2GDescription + 5 + 10 + + true + true + false + SHAPE_DRAW_2D + sl_chargersThatSupportV2G_pct.isVisible() + false + 0 + 0.0 + -16777216 + Laadpalen met V2G + + Dialog + 14 + + + LEFT + + + 1758183196877 + t_chargersThatSupportV2G_pct + 226 + 11 + + true + true + false + SHAPE_DRAW_2D + sl_chargersThatSupportV2G_pct.isVisible() + false + 0 + 0.0 + -16777216 + 0% + sl_chargersThatSupportV2G_pct.getIntValue() + " %" + + Dialog + 12 + + + CENTER + + + 1758183196879 + i_householdPublicChargersV2G + 181 + 10 + + true + true + false + SHAPE_DRAW_2D3D + sl_chargersThatSupportV2G_pct.isVisible() + zero_Interface.f_setInfoText(i_householdPublicChargersV2G, zero_Interface.v_infoText.householdPublicParkingV2G, i_householdPublicChargersV2G.getX() + gr_settingsV2G_publicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargersV2G.getY() + gr_settingsV2G_publicChargers.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1758183196924 + i_householdPrivateEV + 190 + 39 + + true + true + false + SHAPE_DRAW_2D3D + sl_privateEVsResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdPrivateEV, zero_Interface.v_infoText.householdPrivateParking, i_householdPrivateEV.getX() + uI_Tabs.v_presentationXOffset, i_householdPrivateEV.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1758183196939 + i_householdPublicChargers + 190 + 193 + + true + true + false + SHAPE_DRAW_2D3D + sl_publicChargersResidentialArea_pct.isVisible() + zero_Interface.f_setInfoText(i_householdPublicChargers, zero_Interface.v_infoText.householdPublicParking, i_householdPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargers.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1758183196817 + gr_settingsV1G_publicChargers + 5 + 250 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1758183196819 + sl_chargersThatSupportV1G_pct + 255 + 0 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setV1GChargerCapabilities( uI_Tabs.f_getSliderGridConnections_chargers(), sl_chargersThatSupportV1G_pct.getValue() ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1758183196821 + txt_chargersThatSupportV1GDescription + 10 + 5 + + true + true + false + SHAPE_DRAW_2D + sl_chargersThatSupportV1G_pct.isVisible() + false + 0 + 0.0 + -16777216 + Laadpalen met V1G + + Dialog + 14 + + + LEFT + + + 1758183196823 + t_chargersThatSupportV1G_pct + 240 + 7 + + true + true + false + SHAPE_DRAW_2D + sl_chargersThatSupportV1G_pct.isVisible() + false + 0 + 0.0 + -16777216 + 0% + sl_chargersThatSupportV1G_pct.getIntValue() + " %" + + Dialog + 12 + + + RIGHT + + + 1758183196825 + i_householdPublicChargersV1G + 185 + 5 + + true + true + false + SHAPE_DRAW_2D3D + sl_chargersThatSupportV1G_pct.isVisible() + zero_Interface.f_setInfoText(i_householdPublicChargersV1G, zero_Interface.v_infoText.householdPublicParkingV1G, i_householdPublicChargersV1G.getX() + gr_settingsV1G_publicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargersV1G.getY() + gr_settingsV1G_publicChargers.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1758191125495 + gr_activateV2GPrivateParkedCars + 170 + 110 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1758190979055 + cb_activateV2GPrivateParkedCars + 135 + -16 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_activateV2G(new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), cb_activateV2GPrivateParkedCars.isSelected()); +gr_settingsV2G_privateParkedCars.setVisible(cb_activateV2GPrivateParkedCars.isSelected()); + + + + + false + + + + 1758191012105 + i_activateV2GPrivateParkedCars + 20 + -10 + + true + true + false + SHAPE_DRAW_2D3D + cb_activateV2GPrivateParkedCars.isVisible() + zero_Interface.f_setInfoText(i_activateV2GPrivateParkedCars, zero_Interface.v_infoText.activateV2GPrivateParkedCars, i_activateV2GPrivateParkedCars.getX() + gr_activateV2GPrivateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_activateV2GPrivateParkedCars.getY() + gr_activateV2GPrivateParkedCars.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1758191030984 + txt_activateV2GPrivateParkedCars + -155 + -10 + + true + true + false + SHAPE_DRAW_2D + cb_activateV2GPrivateParkedCars.isVisible() + false + 0 + 0.0 + -16777216 + Activeer V2G + + Dialog + 14 + + + LEFT + + + + + 1758189201608 + txt_chargingStrategyPrivateParkedCars + 15 + 70 + + true + true + false + SHAPE_DRAW_2D + cb_chargingAttitudePrivateParkedCars.isVisible() + false + 0 + 0.0 + -16777216 + Laad strategie + + Dialog + 14 + + + LEFT + + + false + 1758189233415 + cb_chargingAttitudePrivateParkedCars + 221 + 70 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + sl_privateEVsResidentialArea_pct.isEnabled() + OL_ChargingAttitude selectedChargingAttitude = null; +gr_activateV2GPrivateParkedCars.setVisible(false); +cb_activateV2GPrivateParkedCars.setSelected(false, false); +gr_settingsV2G_privateParkedCars.setVisible(false); + +switch(cb_chargingAttitudePrivateParkedCars.getValue()){ + case "Niet slim laden": + selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; + break; + case "Slim laden: Prijs gestuurd": + selectedChargingAttitude = OL_ChargingAttitude.PRICE; + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + case "Slim laden: Netbewust": + selectedChargingAttitude = OL_ChargingAttitude.BALANCE_LOCAL; // For now Balance_Local + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + /* + case "Slim laden: Locale balans": + selectedChargingAttitude = OL_ChargingAttitude.BALANCE_LOCAL; + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + */ + case "Gevarieerd": + zero_Interface.f_setErrorScreen("De geselecteerde laad strategie is er alleen ter visualisatie in het geval niet elk huis dezelfde laad strategie heeft. Dit is dus niet een strategie die je handmatig aan kunt zetten. Voor nu is 'Niet slim laden' weer geselecteerd.", 0, 0); + selectedChargingAttitude = null; + break; +} + +if(selectedChargingAttitude != null){ + f_setChargingAttitude(selectedChargingAttitude, new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses())); +} +else{ + cb_chargingAttitudePrivateParkedCars.setValue("Niet slim laden", true); +} + + + + false + + + + + false + + + + 1758189262812 + i_chargingAttitudePrivateParkedCars + 190 + 70 + + true + true + false + SHAPE_DRAW_2D3D + cb_chargingAttitudePrivateParkedCars.isVisible() + zero_Interface.f_setInfoText(i_chargingAttitudePrivateParkedCars, zero_Interface.v_infoText.chargingAttitudePrivateParkedCars, i_chargingAttitudePrivateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_chargingAttitudePrivateParkedCars.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1758192054421 + txt_chargingStrategyPublicChargers + 15 + 225 + + true + true + false + SHAPE_DRAW_2D + cb_chargingAttitudePrivatePublicChargers.isVisible() + false + 0 + 0.0 + -16777216 + Laad strategie + + Dialog + 14 + + + LEFT + + + false + 1758192054440 + cb_chargingAttitudePrivatePublicChargers + 221 + 225 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + sl_publicChargersResidentialArea_pct.isEnabled() + OL_ChargingAttitude selectedChargingAttitude = null; +gr_activateV2GPublicChargers.setVisible(false); +cb_activateV2GPublicChargers.setSelected(false, true); // True call for now needed for chargepoints only +gr_settingsV1G_publicChargers.setVisible(false); +gr_settingsV2G_publicChargers.setVisible(false); + +switch(cb_chargingAttitudePrivatePublicChargers.getValue()){ + case "Niet slim laden": + selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; + break; + case "Slim laden: Prijs gestuurd": + selectedChargingAttitude = OL_ChargingAttitude.PRICE; + gr_activateV2GPublicChargers.setVisible(true); + gr_settingsV1G_publicChargers.setVisible(true); + break; + case "Slim laden: Netbewust": + selectedChargingAttitude = OL_ChargingAttitude.BALANCE_GRID; + gr_activateV2GPublicChargers.setVisible(true); + gr_settingsV1G_publicChargers.setVisible(true); + break; + case "Gevarieerd": + zero_Interface.f_setErrorScreen("De geselecteerde laad strategie is er alleen ter visualisatie in het geval niet elk huis dezelfde laad strategie heeft. Dit is dus niet een strategie die je handmatig aan kunt zetten. Voor nu is 'Niet slim laden' weer geselecteerd.", 0, 0); + selectedChargingAttitude = null; + break; +} + +if(selectedChargingAttitude != null){ + List<GridConnection> allChargersInModel = new ArrayList<GridConnection>(uI_Tabs.f_getSliderGridConnections_chargers()); + allChargersInModel.addAll(uI_Tabs.f_getPausedSliderGridConnections_chargers()); + f_setChargingAttitude(selectedChargingAttitude, allChargersInModel); +} +else{ + cb_chargingAttitudePrivatePublicChargers.setValue("Niet slim laden", true); +} + + + + false + + + + + false + + + + 1758192054460 + i_chargingStrategyPublicChargers + 190 + 225 + + true + true + false + SHAPE_DRAW_2D3D + cb_chargingAttitudePrivatePublicChargers.isVisible() + zero_Interface.f_setInfoText(i_chargingStrategyPublicChargers, zero_Interface.v_infoText.chargingStrategyPublicChargers, i_chargingStrategyPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_chargingStrategyPublicChargers.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1758192011387 + gr_activateV2GPublicChargers + 170 + 300 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1758192011389 + cb_activateV2GPublicChargers + 135 + -16 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_activateV2G(new ArrayList<GridConnection>(uI_Tabs.f_getAllSliderGridConnections_chargers()), cb_activateV2GPublicChargers.isSelected()); +gr_settingsV2G_publicChargers.setVisible(cb_activateV2GPublicChargers.isSelected()); + + + + + false + + + + 1758192011391 + i_activateV2GPrivatePublicChargers + 20 + -10 + + true + true + false + SHAPE_DRAW_2D3D + cb_activateV2GPublicChargers.isVisible() + zero_Interface.f_setInfoText(i_activateV2GPrivatePublicChargers, zero_Interface.v_infoText.activateV2GPrivatePublicChargers, i_activateV2GPrivatePublicChargers.getX() + gr_activateV2GPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_activateV2GPrivatePublicChargers.getY() + gr_activateV2GPublicChargers.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1758192011393 + txt_activateV2GPrivatePublicChargers + -155 + -10 + + true + true + false + SHAPE_DRAW_2D + cb_activateV2GPublicChargers.isVisible() + false + 0 + 0.0 + -16777216 + Activeer V2G + + Dialog + 14 + + + LEFT + + + + + 1758274187930 + gr_settingsV2G_privateParkedCars + 9 + 121 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1758274187932 + sl_EVsThatSupportV2G_pct + 251 + 4 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setV2GEVCapabilities( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_EVsThatSupportV2G_pct.getValue() ); + + + 0 + HORIZONTAL + 0 + 100 + 1 + false + + + + 1758274187934 + txt_EVsThatSupportV2GDescription + 5 + 10 + + true + true + false + SHAPE_DRAW_2D + sl_EVsThatSupportV2G_pct.isVisible() + false + 0 + 0.0 + -16777216 + EVs die V2G ondersteunen + + Dialog + 14 + + + LEFT + + + 1758274187936 + txt_EVsThatSupportV2G_pct + 226 + 10 + + true + true + false + SHAPE_DRAW_2D + sl_EVsThatSupportV2G_pct.isVisible() + false + 0 + 0.0 + -16777216 + 0% + sl_EVsThatSupportV2G_pct.getIntValue() + " %" + + Dialog + 12 + + + CENTER + + + 1758274187938 + i_EVsThatSupportV2G + 181 + 8 + + true + true + false + SHAPE_DRAW_2D3D + sl_EVsThatSupportV2G_pct.isVisible() + zero_Interface.f_setInfoText(i_EVsThatSupportV2G, zero_Interface.v_infoText.EVsThatSupportV2G, i_EVsThatSupportV2G.getX() + gr_settingsV2G_privateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_EVsThatSupportV2G.getY() + gr_settingsV2G_privateParkedCars.getY() + uI_Tabs.v_presentationYOffset); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + + + 1758183975194 + txt_mobilityFunctionsDescription + 590 + 510 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Mobility Functions + + Dialog + 18 + + + CENTER + + + 1758183975205 + rect_mobilityFunctions1 + 440 + 500 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16711936 + null + SOLID + 310 + 170 + 0.0 + -1 + null + + + 1758184003102 + t_mobilityFunctionsDescription1 + 590 + 510 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Mobility Functions (residential) + + SansSerif + 14 + + + CENTER + + + + + + + 1709049456135 + UI_Battery + 1754045666929 + false + + 1709049456141 + 1709049456141 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089975 + true + 1709107200000 + + 0 + HOUR + + + 1 + HOUR + + + + 1709049456138 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1709049456142 + 1709049456136 + + + 1715597286082 + v_colorBattery_lines + -740 + 70 + + false + true + true + + Color + + new Color(158, 201, 158) + + + + + 1715597307038 + v_colorBattery_background + -740 + 90 + + false + true + true + + Color + + new Color(198, 251, 198) + + + + + 1715597314638 + v_colorBatter_3 + -740 + 110 + + false + true + true + + Color + + white + + + + + 1715602425848 + v_sliderStartValue_priceLimit + -730 + 270 + + false + true + true + + double + + 0 + + + + + 1715607530949 + v_sliderMinValue_balanceLimit + -730 + 290 + + false + true + true + + double + + + + 1715607536716 + v_sliderMaxValue_balanceLimit + -730 + 310 + + false + true + true + + double + + + + 1715607544383 + v_sliderStartValue_balanceLimit + -730 + 330 + + false + true + true + + double + + 0 + + + + + 1715630743924 + v_sliderStartValue_BatteryP_MW + -730 + 250 + + false + true + true + + double + + + + 1724947743379 + v_currentSelectedBattery + -310 + 570 + + false + true + true + + int + + 0 + + + + + 1724947743386 + p_amountOfGISObjects + -310 + 210 + + false + true + true + + int + NONE + false + + 1724947743384 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1724947743389 + p_amountOfGC + -310 + 230 + + false + true + true + + int + NONE + false + + 1724947743387 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1724947743355 + c_GISObjects_Battery + -310 + 140 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1724947743357 + c_gridConnections_Battery + -310 + 160 + + false + true + true + + ArrayList + GridConnection + String + + + + 1724947743359 + c_connectedGridNodes + -310 + 180 + + false + true + true + + ArrayList + Object + String + + + + 1724947743361 + c_connectionOwners_Battery + -310 + 120 + + false + true + true + + ArrayList + ConnectionOwner + String + + + + 1724947743365 + c_gridBatteries + -310 + 300 + + false + true + true + + ArrayList + J_EAStorageElectric + J_EAConversionElectrolyser + + + + + + VOID + double + 1709553910991 + f_styleBatteryUI + -760 + 50 + + false + true + true + + + VOID + double + 1715591908888 + f_initializeUIBattery + -760 + 210 + + false + true + true + + COC + ConnectionOwner + + //Instantiate new sliders +f_instantiateSlidersBattery(COC); + + + VOID + double + 1715591980366 + f_instantiateSlidersBattery + -740 + 230 + + false + true + true + + COC + ConnectionOwner + + // Electrolyser Power start value +v_sliderStartValue_BatteryP_MW = ((J_EAConversionElectrolyser)COC.f_getOwnedGridConnections().get(0).c_conversionAssets.get(0)).getInputCapacity_kW()/1000; +sl_batteryPower.setValue(v_sliderStartValue_BatteryP_MW, false); +t_powerBattery.setText(v_sliderStartValue_BatteryP_MW + " MW"); + + +// Price limit start value +v_sliderStartValue_priceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_electricityPriceMaxForProfit_eurpkWh; +sl_batteryElectricityPriceLimit.setValue(v_sliderStartValue_priceLimit, false); +t_electricityPriceLimit.setText("€" + v_sliderStartValue_priceLimit); + + +//Balance limit start value +v_sliderStartValue_balanceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_gridNodeCongestionLimit_kW; +sl_batteryElectricityBalanceLimit.setValue(v_sliderStartValue_balanceLimit, false); +t_electricityBalanceLimit.setText(v_sliderStartValue_balanceLimit + " MW"); + + +//Radio button balance or price mode +int rb_value = 0; +switch (((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).p_electrolyserOperationMode){ + + case PRICE: + + rb_value = 0; + //Set visibility of price slider true and balance slider false + gr_electricityPriceSliderBattery.setVisible(true); + gr_electricityBalanceSliderBattery.setVisible(false); + break; + + case BALANCE: + rb_value = 1; + + //Set visibility of balance slider true and price slider false + gr_electricityBalanceSliderBattery.setVisible(true); + gr_electricityPriceSliderBattery.setVisible(false); + break; +} +rb_batteryMode.setValue(rb_value, false); + + + VOID + double + 1724947743369 + f_setScenarioFuture + -290 + 490 + + false + true + true + + GC + GridConnection + + //Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +//Scenario code here + + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(1, false); + + + VOID + double + 1724947743373 + f_setScenario + -310 + 450 + + false + true + true + + scenario_nr + int + + switch (scenario_nr){ + + case 0: // Current + + break; + + case 1: // Future + + break; + + case 2: // Hydrogen + traceln("Selected scenario: Hydrogen : DOES NOTHING YET"); + break; + + case 3: // Custom + + if(rb_scenariosPrivateUI.getValue() == 2){ + return; + } + rb_scenariosPrivateUI.setValue(2, false); + traceln("Selected scenario: Custom"); + break; + + default: + +} + +//Set 'results up to date' to false +zero_Interface.b_resultsUpToDate = false; + + + VOID + double + 1724947743375 + f_setScenarioCurrent + -290 + 470 + + false + true + true + + GC + GridConnection + + //Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +//Scenario code here + + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(0, false); + + + VOID + double + 1724947743377 + f_setSelectedGC + Function that sets the sliders to match the currently present settings of the energy assets owned by the selected GC. Used when a connection owner has multiple grid connections, and wants to set the sliders of a different GC. + -310 + 400 + + false + true + true + //Initialize slider presets to selected GC (min, max, etc.) +//f_setSliderPresets(); + + + + + + + 1709049456136 + connections + 50 + -50 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1709049456197 + zero_Interface + 50 + -100 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + + + 1709049456142 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1725002991039 + rect_canvas + 0 + 0 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 1920 + 980 + 0.0 + -1 + null + + + 1725002921481 + rect_scenarios + 0 + 0 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + v_colorBattery_background + null + SOLID + 370 + 170 + 0.0 + -1 + v_colorBattery_lines + null + + + 1709582023151 + plot + 400 + 280 + + true + true + false + SHAPE_DRAW_2D3D + true + + 1751013532165 + true + 1709625600000 + + 0 + HOUR + + + 1 + HOUR + + + false + 540 + 400 + + + + 50 + 30 + 460 + 310 + -1 + -16777216 + -12566464 + + + SOUTH + -16777216 + 30 + + + DEFAULT + DEFAULT + -12566464 + + true + MOVEMENT_WITH_TIME + MODEL_TIME_UNIT + 0 + 1 + AUTO + true + LINEAR + 100 + 100 + false + MODEL_TIME_UNITS + + + 1715589407937 + slider_blocker + 0 + 170 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + v_colorBattery_lines + null + SOLID + 370 + 810 + 0.0 + -1 + v_colorBatter_3 + null + + + 1715596728186 + t_batterySliders + 70 + 200 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Battery + + Calibri + 22 + + + LEFT + + + 1715597165299 + gr_buttonBattery + 41 + 211 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715596934178 + ovalBatteryButton + -1 + -1 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + + null + SOLID + 20 + 40 + 0.0 + -6632142 + zero_Interface.v_batteryColor + null + + + 1715596882276 + t_battery + -10 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -1 + Bat + + SansSerif + 14 + + + LEFT + + + + + 1715606650390 + gr_electricityPriceSliderBattery + 190 + 450 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715597606225 + txt_electricityPriceLimit + -170 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Electriciteits prijs limiet + + Dialog + 14 + + + LEFT + + + false + 1715597606227 + sl_batteryElectricityPriceLimit + 62 + -15 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Adjust the maximum price of electricity used to produce hydrogen +((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_electricityPriceMaxForProfit_eurpkWh = sl_batteryElectricityPriceLimit.getValue(); + +//Set text accordingly +t_electricityPriceLimit.setText( "€" + sl_batteryElectricityPriceLimit.getValue()); + +//Set scenario to custom +f_setScenario(2); + + + v_sliderStartValue_priceLimit + HORIZONTAL + 0 + 0.5 + 0.01 + false + + + + 1715597606229 + t_electricityPriceLimit + 40 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + €0.00 + + Dialog + 14 + + + RIGHT + + + + + 1715606688952 + gr_batteryPowerSlider + 190 + 280 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715597606231 + txt_powerBattery + -170 + -15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Vermogen + + Dialog + 14 + + + LEFT + + + false + 1715597606233 + sl_batteryPower + 62 + -20 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Adjust the electric capacity +c_gridBatteries.get(v_currentSelectedBattery).setCapacityElectric_kW(sl_batteryPower.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW + +//Adjust grid connection capacity as well (if needed) +if(sl_batteryPower.getValue()*1000 > 2000){ + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryPower.getValue()*1000; + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryPower.getValue()*1000; + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryPower.getValue()*1000; +} + +//Set the text accordingly +t_powerBattery.setText(sl_batteryPower.getValue() + " MW"); + + +//Set scenario to custom +f_setScenario(2); + + + 0 + HORIZONTAL + 0 + 10 + 0.1 + false + + + + 1715597606235 + t_powerBattery + 35 + -15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 1.0 MW + + Dialog + 14 + + + RIGHT + + + + + 1715606719124 + gr_batteryMode + 100 + 380 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1715598832030 + rb_batteryMode + -80 + -20 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + /* +switch (rb_batteryMode.getValue()){ + + case 0: + c_ownedGridConnections.get(0).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.PRICE; + + //Set visibility of price slider true and balance slider false + gr_electricityPriceSlider.setVisible(true); + gr_electricityBalanceSlider.setVisible(false); + break; + + case 1: + c_ownedGridConnections.get(0).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.BALANCE; + + //Set visibility of balance slider true and price slider false + gr_electricityBalanceSlider.setVisible(true); + gr_electricityPriceSlider.setVisible(false); + break; +} + + + + 0 + VERTICAL + + + false + + + + 1715598901188 + txt_electrolyserMode + -80 + -40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Batterij modus + + Dialog + 14 + + + LEFT + + + + + 1715606808711 + gr_electricityBalanceSliderBattery + 190 + 490 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715606808713 + txt_electricityBalanceLimit + -170 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Electriciteits balans limiet + + Dialog + 14 + + + LEFT + + + false + 1715606808715 + sl_batteryElectricityBalanceLimit + 62 + -15 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Adjust the gridnode congestion while charging +((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_gridNodeCongestionLimit_kW = sl_batteryElectricityBalanceLimit.getValue()*1000; + +//Set text accordingly +t_electricityBalanceLimit.setText( sl_batteryElectricityBalanceLimit.getValue() + " MW" ); + +//Set scenario to custom +f_setScenario(2); + + + v_sliderStartValue_balanceLimit + HORIZONTAL + v_sliderMinValue_balanceLimit + v_sliderMaxValue_balanceLimit + 0.01 + false + + + + 1715606808717 + t_electricityBalanceLimit + 50 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0.0 MW + + Dialog + 14 + + + RIGHT + + + + + 1724859658263 + gr_scenarioRB + 120 + 100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1724859658265 + rb_scenariosPrivateUI + -100 + -60 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_setScenario(rb_scenariosPrivateUI.getValue()); + + + + 0 + VERTICAL + + + + false + + + + 1724859658267 + text187 + -100 + -80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer een scenario + + Calibri + 20 + + + LEFT + + + + + 1724947743345 + text + -320 + 540 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Current selected assets + + SansSerif + 14 + + + LEFT + + + 1724947743347 + txt_batteryAssets + -320 + 270 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Battery assets + + SansSerif + 14 + + + LEFT + + + 1724947743349 + txt_setSlidersToSelectedGC + -320 + 370 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Set Sliders to selected GC + + SansSerif + 14 + + + LEFT + + + 1724947743351 + text7 + -320 + 420 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Set Sliders to Scenario + + SansSerif + 14 + + + LEFT + + + 1724947743353 + text5 + -320 + 90 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Connections + + SansSerif + 12 + + + LEFT + + + 1724948168075 + gr_batteryCapacitySlider + 190 + 320 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724948168077 + txt_powerBattery1 + -170 + -15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Opslagcapaciteit + + Dialog + 14 + + + LEFT + + + false + 1724948168079 + sl_batteryCapacity + 62 + -20 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Adjust the electric capacity +c_gridBatteries.get(v_currentSelectedBattery).setStorageCapacity_kWh(sl_batteryCapacity.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW + +//Adjust grid connection capacity as well (if needed) +if(sl_batteryCapacity.getValue()*1000 > 2000){ + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryCapacity.getValue()*1000; + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryCapacity.getValue()*1000; + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryCapacity.getValue()*1000; +} + +//Set the text accordingly +t_capacityBattery.setText(sl_batteryCapacity.getValue() + " MWh"); + + +//Set scenario to custom +f_setScenario(2); + + + 0 + HORIZONTAL + 0 + 100 + 0.1 + false + + + + 1724948168081 + t_capacityBattery + 35 + -15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 1.0 MWh + + Dialog + 14 + + + RIGHT + + + + + 1725003063740 + txt_batteryControlRoom + 760 + 80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Batterij Controlroom + + Calibri + 72 + + + LEFT + + + + + + + 1725002896440 + va_batteryUI + 0 + 0 + + false + true + false + Batter UI + 1920 + 980 + + + + + 1708522361862 + UI_company + +//Getters for shapes +public ShapeRadioButtonGroup getRb_scenariosPrivateUI() { + return this.rb_scenariosPrivateUI; +} + +public ShapeRadioButtonGroup getRb_heatingTypePrivateUI() { + return this.rb_heatingTypePrivateUI; +} + +public ShapeSlider getSl_batteryCompany(){ + return this.sl_batteryCompany; +} + +public ShapeSlider getSl_heatDemandCompanyReduction(){ + return this.sl_heatDemandCompanyReduction; +} + +public ShapeSlider getSl_electricityDemandCompanyReduction(){ + return this.sl_electricityDemandCompanyReduction; +} + +public ShapeSlider getSl_mobilityDemandCompanyReduction(){ + return this.sl_mobilityDemandCompanyReduction; +} + 1754045666929 + //import kotlinx.serialization.internal.ArrayListClassDesc; +import org.eclipse.jdt.internal.compiler.ast.ForeachStatement; + + //Initialize graph locations and visibility +f_setResultsUIPresets(); + +zero_Interface.c_UIResultsInstances.add(uI_Results); + false + + 1708522361868 + 1708522361868 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089974 + true + 1708588800000 + + 0 + HOUR + + + 1 + HOUR + + + + 1708522361865 + scale + 10 + -210 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1708522361869 + 1708522361863 + + + 1708611471928 + v_companyUIBackgroundColor + -430 + 50 + + false + true + true + + Color + + new Color( 204, 72, 118); + + + + + 1709554407054 + v_companyUILineColor + -430 + 90 + + false + true + true + + Color + + black + + + + + 1713957213075 + v_minPVSlider + -1060 + 430 + + false + true + true + + double + + 0 + + + + + 1713957229701 + v_maxPVSlider + -1060 + 450 + + false + true + true + + double + + 100 + + + + + 1713957233827 + v_defaultPVSlider + -1060 + 470 + + false + true + true + + double + + 0 + + + + + 1713971707023 + v_minBatSlider + -1060 + 510 + + false + true + true + + double + + 0 + + + + + 1713971707027 + v_maxBatSlider + -1060 + 530 + + false + true + true + + double + + 1000 + + + + + 1713971707029 + v_defaultBatSlider + -1060 + 550 + + false + true + true + + double + + 0 + + + + + 1714139274247 + v_nbEVCars + -1050 + 730 + + false + true + true + + int + + 0 + + + + + 1714139294087 + v_nbHydrogenCars + -1050 + 770 + + false + true + true + + int + + 0 + + + + + 1714139299844 + v_nbDieselCars + -1050 + 750 + + false + true + true + + int + + 0 + + + + + 1714139304156 + v_nbEVVans + -1050 + 930 + + false + true + true + + int + + 0 + + + + + 1714139320416 + v_nbEVTrucks + -1050 + 1130 + + false + true + true + + int + + 0 + + + + + 1714139381294 + v_nbDieselVans + -1050 + 950 + + false + true + true + + int + + 0 + + + + + 1714139385293 + v_nbDieselTrucks + -1050 + 1150 + + false + true + true + + int + + 0 + + + + + 1714139405729 + v_nbHydrogenVans + -1050 + 970 + + false + true + true + + int + + 0 + + + + + 1714139413565 + v_nbHydrogenTrucks + -1050 + 1170 + + false + true + true + + int + + 0 + + + + + 1714139966993 + v_minEVCarSlider + -1050 + 610 + + false + true + true + + int + + 0 + + + + + 1714139997786 + v_minHydrogenCarSlider + -1050 + 650 + + false + true + true + + int + + 0 + + + + + 1714140003906 + v_maxEVCarSlider + -1050 + 670 + + false + true + true + + int + + 20 + + + + + 1714140007855 + v_minDieselCarSlider + -1050 + 630 + + false + true + true + + int + + 0 + + + + + 1714140012482 + v_maxHydrogenCarSlider + -1050 + 710 + + false + true + true + + int + + 20 + + + + + 1714140056511 + v_maxDieselCarSlider + -1050 + 690 + + false + true + true + + int + + 20 + + + + + 1714141906262 + v_minEVVanSlider + -1050 + 810 + + false + true + true + + int + + 0 + + + + + 1714141906264 + v_minHydrogenVanSlider + -1050 + 850 + + false + true + true + + int + + 0 + + + + + 1714141906266 + v_maxEVVanSlider + -1050 + 870 + + false + true + true + + int + + 20 + + + + + 1714141906268 + v_minDieselVanSlider + -1050 + 830 + + false + true + true + + int + + 0 + + + + + 1714141906270 + v_maxHydrogenVanSlider + -1050 + 910 + + false + true + true + + int + + 20 + + + + + 1714141906272 + v_maxDieselVanSlider + -1050 + 890 + + false + true + true + + int + + 20 + + + + + 1714142030261 + v_minEVTruckSlider + -1050 + 1010 + + false + true + true + + int + + 0 + + + + + 1714142030263 + v_minHydrogenTruckSlider + -1050 + 1050 + + false + true + true + + int + + 0 + + + + + 1714142030265 + v_maxEVTruckSlider + -1050 + 1070 + + false + true + true + + int + + 20 + + + + + 1714142030267 + v_minDieselTruckSlider + -1050 + 1030 + + false + true + true + + int + + 0 + + + + + 1714142030269 + v_maxDieselTruckSlider + -1050 + 1090 + + false + true + true + + int + + 20 + + + + + 1714142035660 + v_maxHydrogenTruckSlider + -1050 + 1110 + + false + true + true + + int + + 20 + + + + + 1725364840518 + v_adressGC + -740 + 90 + + false + true + true + + String + + + + 1725373825534 + v_chartBackgroundColor + -430 + 130 + + false + true + true + + Color + + white + + + + + 1725381531538 + v_companyUILineWidth + -430 + 110 + + false + true + true + + double + + 2 + + + + + 1725381554846 + v_chartLineWidth + -430 + 150 + + false + true + true + + double + + 2 + + + + + 1725382988283 + v_companyUIBackgroundColorSliders + -430 + 70 + + false + true + true + + Color + + white + + + + + 1725609978738 + v_loadScreenColor + -430 + 180 + + false + true + true + + Color + + v_companyUIBackgroundColor + + + + + 1725614630564 + v_minGCCapacitySlider + -1060 + 270 + + false + true + true + + double + + 0 + + + + + 1725614630566 + v_maxGCCapacitySlider + -1060 + 290 + + false + true + true + + double + + 100 + + + + + 1725614630568 + v_defaultGCCapacitySlider + -1060 + 310 + + false + true + true + + double + + 0 + + + + + 1725625091022 + b_runningMainInterfaceScenarioSettings + -410 + 850 + + false + true + true + + boolean + + false + + + + + 1727798399505 + v_minGCCapacitySlider_Feedin + -1060 + 350 + + false + true + true + + double + + 0 + + + + + 1727798399507 + v_maxGCCapacitySlider_Feedin + -1060 + 370 + + false + true + true + + double + + 100 + + + + + 1727798399509 + v_defaultGCCapacitySlider_Feedin + -1060 + 390 + + false + true + true + + double + + 0 + + + + + 1727872520826 + v_physicalConnectionCapacity_kW + -1060 + 250 + + false + true + true + + double + + + + 1727883544535 + v_NFATO_kW_delivery + -430 + 745 + + false + true + true + + double + + + + 1727883574908 + v_NFATO_kW_feedin + -430 + 765 + + false + true + true + + double + + + + 1727941212434 + v_NFATO_active + -430 + 725 + + false + true + true + + boolean + + + + 1729686904963 + b_runningMainInterfaceSlider + -410 + 870 + + false + true + true + + boolean + + false + + + + + 1756376301806 + v_minSavingsSliders + -1050 + 1260 + + false + true + true + + double + + -50 + + + + + 1756376314706 + v_maxSavingsSliders + -1050 + 1280 + + false + true + true + + double + + 50 + + + + + 1708522385741 + p_companyName + -740 + 70 + + false + true + true + + String + NONE + false + + 1708522385739 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1715181661645 + p_maxAddedVehicles + Amount of vehicles that can additionally be added on the already existing ones + -1060 + 1190 + + false + true + true + + int + NONE + false + + 20 + + + 1715181661643 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760715449229 + p_scenarioSettings_Current + -740 + 140 + + false + true + true + + J_scenario_Current + NONE + false + + 1760715449227 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760715453384 + p_scenarioSettings_Future + -740 + 160 + + false + true + true + + J_scenario_Future + NONE + false + + 1760715453382 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760715588549 + p_gridConnection + -740 + 50 + + false + true + true + + GridConnection + NONE + false + + 1760715588547 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + + + VOID + double + 1713445281785 + f_setScenarioFuture + -410 + 410 + + false + true + true + //Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +////Heating + +//Heating savings +sl_heatDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedHeatSavings_pct(), true); + +//Heating type (aangenomen dat het hetzelfde blijft, want hebben geen vraag die dat stelt in het formulier) +int nr_currentHeatingType = 0; +switch (p_scenarioSettings_Future.getPlannedHeatingType()){ + case GAS_BURNER: + nr_currentHeatingType = 0; + break; + + case HYBRID_HEATPUMP: + nr_currentHeatingType = 1; + break; + + case ELECTRIC_HEATPUMP: + nr_currentHeatingType = 2; + break; + + //case HYDROGENBURNER: + case DISTRICTHEAT: + nr_currentHeatingType = 3; + break; + + case GAS_CHP: + nr_currentHeatingType = 4; + break; + + default: +} +rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, true); + + +////Electricity + +//Electricity savings +sl_electricityDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedElectricitySavings_pct(), true); + +//Connection capacity (Delivery) +sl_GCCapacityCompany.setValue(p_scenarioSettings_Future.getRequestedContractDeliveryCapacity_kW(), true); + +//Connection capacity (Feedin) +sl_GCCapacityCompany_Feedin.setValue(p_scenarioSettings_Future.getRequestedContractFeedinCapacity_kW(), true); + +//Connection capacity (Physical) +v_physicalConnectionCapacity_kW = p_scenarioSettings_Future.getRequestedPhysicalConnectionCapacity_kW(); +p_gridConnection.v_liveConnectionMetaData.physicalCapacity_kW = v_physicalConnectionCapacity_kW; + +//Solar panel power +sl_rooftopPVCompany.setValue(p_scenarioSettings_Future.getPlannedPV_kW(), true); + +//Battery capacity +sl_batteryCompany.setValue(p_scenarioSettings_Future.getPlannedBatteryCapacity_kWh(), true); + +//Curtailment setting +cb_curtailmentCompany.setSelected(p_scenarioSettings_Future.getPlannedCurtailment(), true); + +////Mobility + +//Mobility savings +sl_mobilityDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedTransportSavings_pct(), true); + +//Cars (VOLGORDE BELANGRIJK) +sl_hydrogenCarsCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenCars(), true); +sl_electricCarsCompany.setValue(p_scenarioSettings_Future.getPlannedEVCars(), true); +//sl_dieselCarsCompany.setValue(c_scenarioSettings_Future.getPlannedDieselCars(), true); + +//Vans (VOLGORDE BELANGRIJK) +sl_hydrogenVansCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenVans(), true); +sl_electricVansCompany.setValue(p_scenarioSettings_Future.getPlannedEVVans(), true); +//sl_dieselVansCompany.setValue(c_scenarioSettings_Future.getPlannedDieselVans(), true); + +//Trucks (VOLGORDE BELANGRIJK) +sl_hydrogenTrucksCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenTrucks(), true); +sl_electricTrucksCompany.setValue(p_scenarioSettings_Future.getPlannedEVTrucks(), true); +//sl_dieselTrucksCompany.setValue(c_scenarioSettings_Future.getPlannedDieselTrucks(), true); + +//set active if active in future +p_gridConnection.f_setActive(p_scenarioSettings_Future.getIsActiveInFuture()); + + +//Reset button to future, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(1, false); + + + VOID + double + 1713447383903 + f_setScenario + -430 + 370 + + false + true + true + + scenario_nr + int + + switch (scenario_nr){ + + case 0: // Current + f_setScenarioCurrent(); + + if(!b_runningMainInterfaceScenarioSettings){ + traceln("Selected scenario: Current"); + } + + break; + + case 1: // Future + f_setScenarioFuture(); + + if(!b_runningMainInterfaceScenarioSettings){ + traceln("Selected scenario: Future"); + } + break; + + case 2: // Custom + if(rb_scenariosPrivateUI.getValue() == 2){ + return; + } + rb_scenariosPrivateUI.setValue(2, false); + + if(!b_runningMainInterfaceSlider){ + traceln("Selected scenario: Custom"); + } + break; + + default: +} + +//Set 'results up to date' to false +zero_Interface.b_resultsUpToDate = false; + + + VOID + double + 1713447428490 + f_setScenarioCurrent + -410 + 390 + + false + true + true + //Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +////Heating + +//Heating savings +sl_heatDemandCompanyReduction.setValue(0, true); + +//Heating type +int nr_currentHeatingType = 0; +switch (p_scenarioSettings_Current.getCurrentHeatingType()){ + case GAS_BURNER: + nr_currentHeatingType = 0; + break; + + case HYBRID_HEATPUMP: + nr_currentHeatingType = 1; + break; + + case ELECTRIC_HEATPUMP: + nr_currentHeatingType = 2; + break; + + //case HYDROGENBURNER: + case DISTRICTHEAT: + nr_currentHeatingType = 3; + break; + + case GAS_CHP: + nr_currentHeatingType = 4; + break; + + default: +} +rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, true); + + +////Electricity + +//Electricity savings +sl_electricityDemandCompanyReduction.setValue(0, true); + +//Connection capacity (Delivery) +sl_GCCapacityCompany.setValue(p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW(), true); + +//Connection capacity (Feedin) +sl_GCCapacityCompany_Feedin.setValue(p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW(), true); + +//Connection capacity (Physical) +v_physicalConnectionCapacity_kW = p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW(); +p_gridConnection.v_liveConnectionMetaData.physicalCapacity_kW = v_physicalConnectionCapacity_kW; + +//Solar panel power +sl_rooftopPVCompany.setValue(v_minPVSlider, true); + +//Battery capacity +sl_batteryCompany.setValue(v_minBatSlider, true); + +//Curtailment setting +cb_curtailmentCompany.setSelected(false, false); + +////Mobility + +//Mobility savings +sl_mobilityDemandCompanyReduction.setValue(0, true); + +//Cars (VOLGORDE BELANGRIJK) +sl_hydrogenCarsCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenCars(), true); +sl_electricCarsCompany.setValue(p_scenarioSettings_Current.getCurrentEVCars(), true); +//sl_dieselCarsCompany.setValue(c_scenarioSettings_Current.getCurrentDieselCars(), true); + +//Vans (VOLGORDE BELANGRIJK) +sl_hydrogenVansCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenVans(), true); +sl_electricVansCompany.setValue(p_scenarioSettings_Current.getCurrentEVVans(), true); +//sl_dieselVansCompany.setValue(c_scenarioSettings_Current.getCurrentDieselVans(), true); + +//Trucks (VOLGORDE BELANGRIJK) +sl_hydrogenTrucksCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenTrucks(), true); +sl_electricTrucksCompany.setValue(p_scenarioSettings_Current.getCurrentEVTrucks(), true); +//sl_dieselTrucksCompany.setValue(c_scenarioSettings_Current.getCurrentDieselTrucks(), true); + +//set active if active in present +p_gridConnection.f_setActive(p_scenarioSettings_Current.getIsCurrentlyActive()); + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(0, false); + + + VOID + double + 1713537591106 + f_setHeatingType + -430 + 490 + + false + true + true + + GC + GridConnection + + + selectedHeatingType + OL_GridConnectionHeatingType + + //Check if selected is not the same as previous, if not: continue with the setting of new heating type +if (GC.f_getCurrentHeatingType() == selectedHeatingType){ + //traceln("Selected heating type is the same as previous heating type"); + return; +} + +//Remove from heat grid if it was connected to one. +GC.p_parentNodeHeat = null; +GC.p_parentNodeHeatID = null; + +//Remove primary heating asset +GC.f_removeAllHeatingAssets(); + +//Get needed cacacity +double capacityThermal_kW; + +//Select heat demand consumption asset +J_EAConsumption heatDemandAsset = findFirst(GC.c_consumptionAssets, j_ea->j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); + +//Check heating demand asset is null (shouldnt be possible) +if (heatDemandAsset != null){ + capacityThermal_kW = heatDemandAsset.yearlyDemand_kWh/8760*10; // --> average hourly consumption * 10 --> to always have enough capacity +} +else{ + //Select profile heat demand asset + J_EAProfile heatDemandAsset_Profile = findFirst(GC.c_profileAssets, j_ea->j_ea.energyCarrier == OL_EnergyCarriers.HEAT); + + if(heatDemandAsset_Profile != null){ + capacityThermal_kW = heatDemandAsset_Profile.getProfileScaling_fr() * max(heatDemandAsset_Profile.a_energyProfile_kWh)*4; + } + else{ + traceln("No heating demand asset found for GC:" + GC.p_gridConnectionID); + traceln("--> No heating asset created"); + return; + } + +} + +capacityThermal_kW = capacityThermal_kW * 2;//For now just make it always twice as high, to be able to support savings/additional consumption slider settings. + +//Algemeen +double timestep_h = zero_Interface.energyModel.p_timeStep_h; +double efficiency; +double outputTemperature_degC; + +//Heatpump specifieke parameters +double baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); +double capacityElectric_kW; +OL_AmbientTempType ambientTempType; +double sourceAssetHeatPower_kW; +double belowZeroHeatpumpEtaReductionFactor; + + + +//Create selected heating type +switch (selectedHeatingType){ + case GAS_BURNER: + + //Add primary heating asset (gasburner) + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; + + new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); + + break; + + case HYBRID_HEATPUMP: + + //Add primary heating asset (heatpump) + capacityElectric_kW = capacityThermal_kW / 3; //-- /3, want is hybride, dus kleiner + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); + zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); + + //Add secondary heating asset (gasburner) + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; + + J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); + //GC.p_secondaryHeatingAsset = gasBurnerHybrid; + + break; + + case ELECTRIC_HEATPUMP: + + //Add primary heating asset (heatpump) + capacityElectric_kW = capacityThermal_kW; + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); + + //Add secondary heating asset (if needed??) //E-boiler!!?? + break; + + case HYDROGENBURNER: + + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHydrogenBurner_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHydrogenBurner_degC; + + //Add primary heating asset (hydrogenburner) + new J_EAConversionHydrogenBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); + + break; + + case DISTRICTHEAT: + + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; + + new J_EAConversionHeatDeliverySet(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); + + //Add GC to heat grid if it exists, else create new one + GC.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + if(GC.p_parentNodeHeat == null){ + GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); + zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); + GN_heat.p_gridNodeID = "Heatgrid"; + + // Check wether transformer capacity is known or estimated + GN_heat.p_capacity_kW = 1000000; + GN_heat.p_realCapacityAvailable = false; + + // Basic GN information + GN_heat.p_description = "Warmtenet"; + + //Define node type + GN_heat.p_nodeType = OL_GridNodeType.HT; + GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + + //Define GN location + GN_heat.p_latitude = 0; + GN_heat.p_longitude = 0; + GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + + //Connect + GC.p_parentNodeHeat = GN_heat; + + //Show warning that heat grid is not a simple solution + f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import."); + } + GC.p_parentNodeHeatID = GC.p_parentNodeHeat.p_gridNodeID; + break; + + case GAS_CHP: + + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr + zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureCHP_degC; + double outputCapacityElectric_kW = (capacityThermal_kW/zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr) * zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; + + new J_EAConversionGasCHP(GC, outputCapacityElectric_kW, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC ); + + break; +} + +// Add a management for the chosen heating type +GC.f_addHeatManagement(selectedHeatingType, false); + + + VOID + double + 1713537591117 + f_setGCCapacity + -430 + 510 + + false + true + true + + GC + GridConnection + + + setGridConnectionCapacity_kW + double + + + type + String + + GC.f_nfatoSetConnectionCapacity(true); + +switch(type){ + case "DELIVERY": + GC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = setGridConnectionCapacity_kW; + break; + case "FEEDIN": + GC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = setGridConnectionCapacity_kW; + break; + case "PHYSICAL": + GC.v_liveConnectionMetaData.physicalCapacity_kW = setGridConnectionCapacity_kW; + break; +} + +GC.f_nfatoSetConnectionCapacity(false); + + + VOID + double + 1713537591121 + f_setBattery + -430 + 570 + + false + true + true + + GC + GridConnection + + + setBatteryCapacity_kWh + double + + J_EAStorage batteryAsset = findFirst(GC.c_storageAssets, p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); + +if (setBatteryCapacity_kWh == 0) { + if (batteryAsset != null) { + batteryAsset.removeEnergyAsset(); + } +} +else { + double c_rate = 1.0 / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; + if (batteryAsset == null) { + batteryAsset = new J_EAStorageElectric(GC, setBatteryCapacity_kWh * c_rate, setBatteryCapacity_kWh, 0.5, zero_Interface.energyModel.p_timeStep_h); + } + else { + if (batteryAsset.getStorageCapacity_kWh() != 0) { + c_rate = ((J_EAStorageElectric)batteryAsset).getCapacityElectric_kW()/((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh(); + } + ((J_EAStorageElectric)batteryAsset).setStorageCapacity_kWh(setBatteryCapacity_kWh); + ((J_EAStorageElectric)batteryAsset).setCapacityElectric_kW(c_rate * setBatteryCapacity_kWh); + } +} + +//Add battery algorithm if it is not present +if(GC.f_getBatteryManagement() == null){ + GC.f_setBatteryManagement(new J_BatteryManagementSelfConsumption(GC)); +} + + + + VOID + double + 1713954180112 + f_setPVSystem + -430 + 530 + + false + true + true + + GC + GridConnection + + + v_rooftopPV_kWp + double + + if (GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + J_EAProduction pvAsset = findFirst(GC.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); + if (v_rooftopPV_kWp == 0) { + pvAsset.removeEnergyAsset(); + } + else { + pvAsset.setCapacityElectric_kW(v_rooftopPV_kWp); + } +} +else{ + if (v_rooftopPV_kWp != 0) { + f_addPVAsset(GC, OL_EnergyAssetType.PHOTOVOLTAIC, v_rooftopPV_kWp); + } +} + + + VOID + double + 1713956765904 + f_setSliderPresets + Set Slider presets (limits, start value, text) for private company sliders + -1090 + 190 + + false + true + true + //Heating radio button +f_setHeatingRB(); + +//Set grid capacity slider (delivery) +f_setGCCapacitySliderPresets(); + +//Set connection capacity slider (feedin) +f_setGCCapacitySliderPresets_Feedin(); + +//PV slider +f_setPVSliderPresets(); + +//Battery slider +f_setBatSliderPresets(); + +//Vehicles sliders +f_setVehicleSliderPresets(); + +//Demand Reduction sliders +f_setDemandReductionSliderPresets(); + + + VOID + double + 1713961813474 + f_setComboBoxOwnedGC + -1070 + 100 + + false + true + true + String currentSelectedGCString = ""; +int i = 1; +List<String> ownedGCs = new ArrayList<String>(); +for(GridConnection GC : p_gridConnection.p_owner.f_getOwnedGridConnections()){ + if(GC instanceof GCUtility){ + String GCDisplayName = "Aansluiting " + i + ": " + GC.p_address.getAddress(); + ownedGCs.add(GCDisplayName); + i++; + + if(GC == p_gridConnection){ + currentSelectedGCString = GCDisplayName; + } + } +} +String[] ownedGCsArray = new String[ownedGCs.size()]; +for(int j = 0; j < ownedGCsArray.length; j++){ + ownedGCsArray[j] = ownedGCs.get(j); +} + +cb_selectGC.setItems(ownedGCsArray, false); + +//Set cb to correct gc +cb_selectGC.setValue(currentSelectedGCString, false); + + + VOID + double + 1714139629738 + f_setPVSliderPresets + -1070 + 410 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_rooftopPVCompany.setRange(0, 2000000); + +//Set range specific for each company +v_minPVSlider = roundToInt(p_scenarioSettings_Current.getCurrentPV_kW()); +v_maxPVSlider = roundToInt(zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV* p_gridConnection.p_roofSurfaceArea_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); +if(v_maxPVSlider <= v_minPVSlider){ + v_maxPVSlider = v_minPVSlider + 1000; +} +v_defaultPVSlider = v_minPVSlider; + + + VOID + double + 1714139648227 + f_setBatSliderPresets + -1070 + 490 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_batteryCompany.setRange(0, 10000); + +double upperLimit = 1000 + 1000 * Math.ceil(p_scenarioSettings_Current.getCurrentPV_kW()/1000.0); +v_minBatSlider = roundToInt(p_scenarioSettings_Current.getCurrentBatteryCapacity_kWh()); +v_maxBatSlider = Math.max(v_minBatSlider*2, upperLimit); +v_defaultBatSlider = v_minBatSlider; + + + VOID + double + 1714139684603 + f_setVehicleSliderPresets + -1070 + 570 + + false + true + true + //Cars +f_setCarSliderPresets(); + +//Vans +f_setVanSliderPresets(); + +//Trucks +f_setTruckSliderPresets(); + + + VOID + double + 1714140108358 + f_setCarSliderPresets + -1060 + 590 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_electricCarsCompany.setRange(0, 500); +sl_dieselCarsCompany.setRange(0, 500); +sl_hydrogenCarsCompany.setRange(0, 500); + + +//Get default values +int default_nbEVCars = p_scenarioSettings_Current.getCurrentEVCars(); +int default_nbDieselCars = p_scenarioSettings_Current.getCurrentDieselCars(); +int default_nbHydrogenCars = p_scenarioSettings_Current.getCurrentHydrogenCars(); + +//Set minimum value +v_minEVCarSlider = default_nbEVCars; +v_minDieselCarSlider = 0; +v_minHydrogenCarSlider = 0; + +//Determine realistic max additional vehicles +int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVCars + default_nbDieselCars + default_nbHydrogenCars)*1, 20); + +//Set maximum +v_maxEVCarSlider = default_nbEVCars + default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. +v_maxDieselCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; +v_maxHydrogenCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; + +//Set default values +v_nbEVCars = default_nbEVCars; +v_nbDieselCars = default_nbDieselCars; +v_nbHydrogenCars = default_nbHydrogenCars; + +//Set slider knobs +sl_electricCarsCompany.setValue(v_nbEVCars, false); +sl_dieselCarsCompany.setValue(v_nbDieselCars, false); +sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); + + + + VOID + double + 1714140134819 + f_setVanSliderPresets + -1060 + 790 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_electricVansCompany.setRange(0, 500); +sl_dieselVansCompany.setRange(0, 500); +sl_hydrogenVansCompany.setRange(0, 500); + +//Get default values +int default_nbEVVans = p_scenarioSettings_Current.getCurrentEVVans(); +int default_nbDieselVans = p_scenarioSettings_Current.getCurrentDieselVans(); +int default_nbHydrogenVans = p_scenarioSettings_Current.getCurrentHydrogenVans(); + +//Set minimum value +v_minEVVanSlider = default_nbEVVans; +v_minDieselVanSlider = 0; +v_minHydrogenVanSlider = 0; + +//Determine realistic max additional vehicles +int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVVans + default_nbDieselVans + default_nbHydrogenVans)*2, 20); + +//Set maximum +v_maxEVVanSlider = default_nbEVVans + default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. +v_maxDieselVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; +v_maxHydrogenVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; + +//Set default values +v_nbEVVans = default_nbEVVans; +v_nbDieselVans = default_nbDieselVans; +v_nbHydrogenVans = default_nbHydrogenVans; + +//Set slider knob +sl_electricVansCompany.setValue(v_nbEVVans, false); +sl_dieselVansCompany.setValue(v_nbDieselVans, false); +sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); + + + + VOID + double + 1714140156233 + f_setTruckSliderPresets + -1060 + 990 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_electricTrucksCompany.setRange(0, 500); +sl_dieselTrucksCompany.setRange(0, 500); +sl_hydrogenTrucksCompany.setRange(0, 500); + +//Get default values +int default_nbEVTrucks = p_scenarioSettings_Current.getCurrentEVTrucks(); +int default_nbDieselTrucks = p_scenarioSettings_Current.getCurrentDieselTrucks(); +int default_nbHydrogenTrucks = p_scenarioSettings_Current.getCurrentHydrogenTrucks(); + +//Set minimum value +v_minEVTruckSlider = default_nbEVTrucks; +v_minDieselTruckSlider = 0; +v_minHydrogenTruckSlider = 0; + +//Determine realistic max additional vehicles +int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVTrucks + default_nbDieselTrucks + default_nbHydrogenTrucks)*2, 20); + +//Set maximum +v_maxEVTruckSlider = default_nbEVTrucks + default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. +v_maxDieselTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; +v_maxHydrogenTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; + +//Set default values +v_nbEVTrucks = default_nbEVTrucks; +v_nbDieselTrucks = default_nbDieselTrucks; +v_nbHydrogenTrucks = default_nbHydrogenTrucks; + +//Set slider knob +sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); +sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); +sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); + + + + VOID + double + 1714410040303 + f_createVehicle + -410 + 650 + + false + true + true + + parentGC + GridConnection + + + vehicleType + OL_EnergyAssetType + + + tripTracker + J_ActivityTrackerTrips + + + available + boolean + + + isAdditionalVehicle + boolean + + double energyConsumption_kWhpkm = 0; +double vehicleScaling = 1.0; +double timestep_h = zero_Interface.energyModel.p_timeStep_h; + +if (vehicleType == OL_EnergyAssetType.ELECTRIC_VEHICLE || vehicleType == OL_EnergyAssetType.ELECTRIC_VAN || vehicleType == OL_EnergyAssetType.ELECTRIC_TRUCK ){ // Create EVS + double storageCapacity_kWh = 0; + double capacityElectricity_kW = 0; + double stateOfCharge_fr = 1; // Initial state of charge + + switch(vehicleType){ + case ELECTRIC_VEHICLE: + capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVCarChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVCarChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerCar_kW; + storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageCar_kWh; + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; + break; + case ELECTRIC_VAN: + capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVVanChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVVanChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerVan_kW; + storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageVan_kWh; + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; + break; + case ELECTRIC_TRUCK: + capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVTruckChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVTruckChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; + storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; + break; + + } + + //Create EV and connect to GC and selected trip tracker + J_EAEV electricVehicle = new J_EAEV(parentGC, capacityElectricity_kW, storageCapacity_kWh, stateOfCharge_fr, timestep_h, energyConsumption_kWhpkm, vehicleScaling, vehicleType, tripTracker); + electricVehicle.available = available; + + + + if (isAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(electricVehicle); + } + else{ + zero_Interface.c_orderedVehicles.add(0, electricVehicle); + } +} + +else if (vehicleType == OL_EnergyAssetType.DIESEL_VEHICLE || vehicleType == OL_EnergyAssetType.DIESEL_VAN || vehicleType == OL_EnergyAssetType.DIESEL_TRUCK ){ // Create diesel vehicles + switch (vehicleType){ + + case DIESEL_VEHICLE: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionCar_kWhpkm; + break; + + case DIESEL_VAN: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionVan_kWhpkm; + break; + + case DIESEL_TRUCK: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + break; + } + + //Create Diesel vehicle and connect to GC and selected trip tracker + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(parentGC, energyConsumption_kWhpkm, timestep_h, vehicleScaling, vehicleType, tripTracker); + dieselVehicle.available = available; + + + + if (isAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(dieselVehicle); + } + else{ + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + } +} + +else{ // (Hydrogen vehicles) + switch (vehicleType){ + case HYDROGEN_VEHICLE: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionCar_kWhpkm; + break; + case HYDROGEN_VAN: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionVan_kWhpkm; + break; + case HYDROGEN_TRUCK: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; + break; + + } + + //Create Hydrogen vehicle and connect to GC and selected trip tracker + J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(parentGC, energyConsumption_kWhpkm, timestep_h, vehicleScaling, vehicleType, tripTracker); + hydrogenVehicle.available = available; + + + + if (isAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(hydrogenVehicle); + } + else{ + zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); + } +} + + + + + VOID + int + 1714411599586 + f_setElectricVehicleSliders + -430 + 590 + + false + true + true + + GC + GridConnection + + + vehicleType + OL_EnergyAssetType + + + setAmountOfVehicles + int + + int local_EV_nb; +int local_DieselV_nb; +int local_HydrogenV_nb; +int max_amount_diesel_vehicles; + +OL_EnergyAssetType vehicleType_diesel; +OL_EnergyAssetType vehicleType_hydrogen; + +switch (vehicleType){ + + case ELECTRIC_VEHICLE: + + vehicleType_diesel = OL_EnergyAssetType.DIESEL_VEHICLE; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VEHICLE; + + local_EV_nb = v_nbEVCars; + local_DieselV_nb = v_nbDieselCars; + local_HydrogenV_nb = v_nbHydrogenCars; + + max_amount_diesel_vehicles = v_maxDieselCarSlider; + + break; + + case ELECTRIC_VAN: + + vehicleType_diesel = OL_EnergyAssetType.DIESEL_VAN; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VAN; + + local_EV_nb = v_nbEVVans; + local_DieselV_nb = v_nbDieselVans; + local_HydrogenV_nb = v_nbHydrogenVans; + + max_amount_diesel_vehicles = v_maxDieselVanSlider; + + break; + + case ELECTRIC_TRUCK: + + vehicleType_diesel = OL_EnergyAssetType.DIESEL_TRUCK; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_TRUCK; + + local_EV_nb = v_nbEVTrucks; + local_DieselV_nb = v_nbDieselTrucks; + local_HydrogenV_nb = v_nbHydrogenTrucks; + + max_amount_diesel_vehicles = v_maxDieselTruckSlider; + + break; + + default: + traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); + return; +} + + +if (setAmountOfVehicles > local_EV_nb){ // Slider has increased the amount of selected vehicles + + //First convert all other existing additional vehicles + int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_hydrogen).size(); + while(setAmountOfVehicles > local_EV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ + + // Find an additional Diesel vehicle + J_EAVehicle dieselVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel); + + if(dieselVehicle != null){ + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + // Remove Diesel vehicle + boolean available = dieselVehicle.getAvailability(); + dieselVehicle.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + + //Create new additional EV + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_EV_nb++; + local_DieselV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + else{ + // Find an additional Hydrogen vehicle + J_EAVehicle hydrogenVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove Hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + hydrogenVehicle.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + + //Create new additional EV + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_EV_nb++; + local_HydrogenV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + } + + while ( setAmountOfVehicles > local_EV_nb && local_DieselV_nb > 0) { + + // Find a Diesel vehicle + J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + // Remove Diesel vehicle + boolean available = dieselVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + dieselVehicle.removeEnergyAsset(); + + //Create new EV + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_EV_nb++; + local_DieselV_nb--; + } + while (setAmountOfVehicles > local_EV_nb && local_HydrogenV_nb > 0){ + + // Find a Hydrogen vehicle + J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove Hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + hydrogenVehicle.removeEnergyAsset(); + + //Create new EV + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_EV_nb++; + local_HydrogenV_nb--; + } + while (setAmountOfVehicles > local_EV_nb){ //If still not enough EV: + + // Create additional vehicles + f_createVehicle(GC, vehicleType, null, true, true); + + //Update variables + local_EV_nb++; + } + +} +else if(setAmountOfVehicles < local_EV_nb){ // Slider has decreased the amount of selected vehicles + + ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); + while(setAmountOfVehicles < local_EV_nb && additionalVehicles.size() > 0){ //If there are additional EV, remove them first + + //Find additional created vehicle + J_EAEV ev = (J_EAEV)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added + + // Remove electric vehicle + additionalVehicles.remove(ev); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); + zero_Interface.c_orderedVehicles.remove(ev); + ev.removeEnergyAsset(); + + //Update variable + local_EV_nb--; + } + while ( setAmountOfVehicles < local_EV_nb && local_DieselV_nb < max_amount_diesel_vehicles) { + + //Find a to be removed EV + J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + //Remove EV + boolean available = ev.getAvailability(); + zero_Interface.c_orderedVehicles.remove(ev); + ev.removeEnergyAsset(); + + // Create diesel vehicle + f_createVehicle(GC, vehicleType_diesel, tripTracker, available, false); + + local_EV_nb--; + local_DieselV_nb++; + } +} + + + +//Update variables +switch (vehicleType){ + + case ELECTRIC_VEHICLE: + + v_nbEVCars = local_EV_nb; + v_nbDieselCars = local_DieselV_nb; + v_nbHydrogenCars = local_HydrogenV_nb; + + break; + + case ELECTRIC_VAN: + + v_nbEVVans = local_EV_nb; + v_nbDieselVans = local_DieselV_nb; + v_nbHydrogenVans = local_HydrogenV_nb; + + break; + + case ELECTRIC_TRUCK: + + v_nbEVTrucks = local_EV_nb; + v_nbDieselTrucks = local_DieselV_nb; + v_nbHydrogenTrucks = local_HydrogenV_nb; + + break; +} + + + VOID + int + 1714471183392 + f_setDieselVehicleSliders + -430 + 630 + + false + true + true + + GC + GridConnection + + + vehicleType + OL_EnergyAssetType + + + setAmountOfVehicles + int + + int local_EV_nb; +int local_DieselV_nb; +int local_HydrogenV_nb; + +int min_amount_EV; +int max_amount_EV; + +OL_EnergyAssetType vehicleType_electric; +OL_EnergyAssetType vehicleType_hydrogen; + +switch (vehicleType){ + + case DIESEL_VEHICLE: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VEHICLE; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VEHICLE; + + local_EV_nb = v_nbEVCars; + local_DieselV_nb = v_nbDieselCars; + local_HydrogenV_nb = v_nbHydrogenCars; + + min_amount_EV = v_minEVCarSlider; + max_amount_EV = v_maxEVCarSlider; + + break; + + case DIESEL_VAN: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VAN; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VAN; + + local_EV_nb = v_nbEVVans; + local_DieselV_nb = v_nbDieselVans; + local_HydrogenV_nb = v_nbHydrogenVans; + + min_amount_EV = v_minEVVanSlider; + max_amount_EV = v_maxEVVanSlider; + + break; + + case DIESEL_TRUCK: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_TRUCK; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_TRUCK; + + local_EV_nb = v_nbEVTrucks; + local_DieselV_nb = v_nbDieselTrucks; + local_HydrogenV_nb = v_nbHydrogenTrucks; + + min_amount_EV = v_minEVTruckSlider; + max_amount_EV = v_maxEVTruckSlider; + + break; + + default: + traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); + return; +} + + +if (setAmountOfVehicles > local_DieselV_nb){ // Slider has increased the amount of selected vehicles + //First convert all other existing additional vehicles + int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen || p.energyAssetType == vehicleType_electric).size(); + while(setAmountOfVehicles > local_DieselV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ + + // Find an additional EV vehicle + J_EAVehicle ev = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_electric); + + if(ev != null){ + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + // Remove EV + boolean available = ev.getAvailability(); + ev.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); + zero_Interface.c_orderedVehicles.remove(ev); + + //Create new additional Diesel vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_DieselV_nb++; + local_EV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + else{ + // Find an additional Hydrogen vehicle + J_EAVehicle hydrogenVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove Hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + hydrogenVehicle.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + + //Create new additional Diesel vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_DieselV_nb++; + local_HydrogenV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + } + while ( setAmountOfVehicles > local_DieselV_nb && local_EV_nb > min_amount_EV) { + + // Find an EV + J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + //Remove one EV + boolean available = ev.getAvailability(); + zero_Interface.c_orderedVehicles.remove(ev); + ev.removeEnergyAsset(); + + //Create new Diesel vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_DieselV_nb++; + local_EV_nb--; + } + while (setAmountOfVehicles > local_DieselV_nb && local_HydrogenV_nb > 0){ + + // Find a Hydrogen vehicle + J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + hydrogenVehicle.removeEnergyAsset(); + + //Create new Diesel vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_DieselV_nb++; + local_HydrogenV_nb--; + } + while (setAmountOfVehicles > local_DieselV_nb){ // Create additional vehicles + + f_createVehicle(GC, vehicleType, null, true, true); + + local_DieselV_nb++; + } +} +else if(setAmountOfVehicles < local_DieselV_nb){ // Slider has decreased the amount of selected vehicles + + ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); + while(setAmountOfVehicles < local_DieselV_nb && additionalVehicles.size() > 0){ //Remove additional Diesel vehicles first + + //Find additional created vehicle + J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added + + // Remove diesel vehicle + additionalVehicles.remove(dieselVehicle); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); + dieselVehicle.removeEnergyAsset(); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + + //Update variable + local_DieselV_nb--; + } + while ( setAmountOfVehicles < local_DieselV_nb && local_EV_nb < max_amount_EV) { + + // Find a to be removed Diesel vehicle + J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + // Remove diesel vehicle + boolean available = dieselVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + dieselVehicle.removeEnergyAsset(); + + //Create new EV + f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); + + //Update variables + local_DieselV_nb--; + local_EV_nb++; + } +} + + + +//Update variables +switch (vehicleType){ + + case DIESEL_VEHICLE: + v_nbEVCars = local_EV_nb; + v_nbDieselCars = local_DieselV_nb; + v_nbHydrogenCars = local_HydrogenV_nb; + break; + + case DIESEL_VAN: + v_nbEVVans = local_EV_nb; + v_nbDieselVans = local_DieselV_nb; + v_nbHydrogenVans = local_HydrogenV_nb; + break; + + case DIESEL_TRUCK: + v_nbEVTrucks = local_EV_nb; + v_nbDieselTrucks = local_DieselV_nb; + v_nbHydrogenTrucks = local_HydrogenV_nb; + break; +} + + + VOID + int + 1714474430338 + f_setHydrogenVehicleSliders + -430 + 610 + + false + true + true + + GC + GridConnection + + + vehicleType + OL_EnergyAssetType + + + setAmountOfVehicles + int + + int local_EV_nb; +int local_DieselV_nb; +int local_HydrogenV_nb; + +int min_amount_EV; +int max_amount_EV; + +OL_EnergyAssetType vehicleType_electric; +OL_EnergyAssetType vehicleType_diesel; + +switch (vehicleType){ + + case HYDROGEN_VEHICLE: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VEHICLE; + vehicleType_diesel = OL_EnergyAssetType.DIESEL_VEHICLE; + + local_EV_nb = v_nbEVCars; + local_DieselV_nb = v_nbDieselCars; + local_HydrogenV_nb = v_nbHydrogenCars; + + min_amount_EV = v_minEVCarSlider; + max_amount_EV = v_maxEVCarSlider; + + break; + + case HYDROGEN_VAN: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VAN; + vehicleType_diesel = OL_EnergyAssetType.DIESEL_VAN; + + local_EV_nb = v_nbEVVans; + local_DieselV_nb = v_nbDieselVans; + local_HydrogenV_nb = v_nbHydrogenVans; + + min_amount_EV = v_minEVVanSlider; + max_amount_EV = v_maxEVVanSlider; + + break; + + case HYDROGEN_TRUCK: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_TRUCK; + vehicleType_diesel = OL_EnergyAssetType.DIESEL_TRUCK; + + local_EV_nb = v_nbEVTrucks; + local_DieselV_nb = v_nbDieselTrucks; + local_HydrogenV_nb = v_nbHydrogenTrucks; + + min_amount_EV = v_minEVTruckSlider; + max_amount_EV = v_maxEVTruckSlider; + + break; + + default: + traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); + return; +} + +if (setAmountOfVehicles > local_HydrogenV_nb){ // Slider has increased the amount of selected vehicles + + //First convert all other existing additional vehicles + int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_electric).size(); + while(setAmountOfVehicles > local_HydrogenV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ + + // Find an additional Diesel vehicle + J_EAVehicle dieselVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel); + + if(dieselVehicle != null){ + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + // Remove Diesel vehicle + boolean available = dieselVehicle.getAvailability(); + dieselVehicle.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + + //Create new additional Hydrogen vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_HydrogenV_nb++; + local_DieselV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + else{ + // Find an additional EV vehicle + J_EAVehicle ev = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_electric); + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + // Remove EV + boolean available = ev.getAvailability(); + ev.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); + zero_Interface.c_orderedVehicles.remove(ev); + + //Create new additional Hydrogen vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_HydrogenV_nb++; + local_EV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + } + while ( setAmountOfVehicles > local_HydrogenV_nb && local_DieselV_nb > 0) { + + // Find a to be removed Diesel vehicle + J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + //Remove diesel vehicle + boolean available = dieselVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + dieselVehicle.removeEnergyAsset(); + + //Create new Hydrogen vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_HydrogenV_nb++; + local_DieselV_nb--; + + } + while (setAmountOfVehicles > local_HydrogenV_nb && local_EV_nb > min_amount_EV){ + + // Find a to be removed EV + J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + // Remove EV + boolean available = ev.getAvailability(); + zero_Interface.c_orderedVehicles.remove(ev); + ev.removeEnergyAsset(); + + //Create new Hydrogen vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_HydrogenV_nb++; + local_EV_nb--; + } + while (setAmountOfVehicles > local_HydrogenV_nb){ // Create additional vehicles + + f_createVehicle(GC, vehicleType, null, true, true); + local_HydrogenV_nb++; + } + + +} +else if(setAmountOfVehicles < local_HydrogenV_nb){ // Slider has decreased the amount of selected vehicles + + ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); + while(setAmountOfVehicles < local_HydrogenV_nb && additionalVehicles.size() > 0){//Remove additional Hydrogen vehicles first + + //Find additional created vehicle + J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added + + // Remove hydrogen vehicle + additionalVehicles.remove(hydrogenVehicle); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); + hydrogenVehicle.removeEnergyAsset(); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + + //Update variable + local_HydrogenV_nb--; + } + while ( setAmountOfVehicles < local_HydrogenV_nb && local_EV_nb < max_amount_EV) { + + // Find a to be removed Hydrogen vehicle + J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + hydrogenVehicle.removeEnergyAsset(); + + //Create new EV vehicle + f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); + + //Update variables + local_HydrogenV_nb--; + local_EV_nb++; + } +} + +//Update variables +switch (vehicleType){ + + case HYDROGEN_VEHICLE: + + v_nbEVCars = local_EV_nb; + v_nbDieselCars = local_DieselV_nb; + v_nbHydrogenCars = local_HydrogenV_nb; + + break; + + case HYDROGEN_VAN: + + v_nbEVVans = local_EV_nb; + v_nbDieselVans = local_DieselV_nb; + v_nbHydrogenVans = local_HydrogenV_nb; + + break; + + case HYDROGEN_TRUCK: + + v_nbEVTrucks = local_EV_nb; + v_nbDieselTrucks = local_DieselV_nb; + v_nbHydrogenTrucks = local_HydrogenV_nb; + + break; +} + + + VOID + double + 1714654645264 + f_setResultsUIPresets + -1050 + 1350 + + false + true + true + //Set the order of the resultsUI to front but behind simulation screen group and load icon +presentation.remove(uI_Results_presentation); +presentation.insert(presentation.size()-1, uI_Results_presentation); +presentation.remove(gr_loadIcon); +presentation.insert(presentation.size()-1, gr_loadIcon); +presentation.remove(gr_simulateYearScreen); +presentation.insert(presentation.size()-1, gr_simulateYearScreen); +presentation.remove(gr_GCisPausedScreen); +presentation.insert(presentation.size()-1, gr_GCisPausedScreen); + + + +//Set the locations and visibilities of the ResultsUI agents +uI_Results.f_setChartProfiles_Presentation(0, 0, true); +uI_Results.f_setChartBalance_Presentation(530, 0, true); +uI_Results.f_setChartGridLoad_Presentation(1060, 0, false); +uI_Results.f_setChartSankey_Presentation(1060, 0, true); +uI_Results.f_setResultsUIHeader(null, null, false); + +//Disable KPIsummary button if KPIsummary is not selected +if(zero_Interface.settings.showKPISummary() == null || !zero_Interface.settings.showKPISummary()){ + uI_Results.getCheckbox_KPISummary().setVisible(false); +} +else{ + //uI_Results.f_setCB_KPISummary_Presentation(10, -30, true); +} + +//Set selected object display flase +uI_Results.b_isCompanyUIResultsUI = true; + +//Set the color of the charts +uI_Results.f_styleAllCharts(v_chartBackgroundColor, v_companyUILineColor, v_chartLineWidth, LINE_STYLE_SOLID); + + + VOID + double + 1714655282643 + f_setCompanyUI + -1090 + 40 + + false + true + true + + GC + GridConnection + + //Initialize parameters +p_gridConnection = GC; +p_companyName = GC.p_ownerID; +v_adressGC = GC.p_address.getAddress(); +p_scenarioSettings_Current = zero_Interface.c_scenarioMap_Current.get(GC.p_uid); +p_scenarioSettings_Future = zero_Interface.c_scenarioMap_Future.get(GC.p_uid); + +//Scale companyName to the box size +f_setNameTextSize(); + +//Set the sliders to the correct settings +f_setSelectedGCSliders(); + +//Set the new graphs/building selection +if(!b_runningMainInterfaceScenarioSettings && !b_runningMainInterfaceSlider && p_gridConnection.v_isActive){ + f_updateUIResultsCompanyUI(); + if(p_gridConnection.v_rapidRunData != null){ + uI_Results.f_setAllCharts(); + } +} + +//Set connected GC combobox +f_setComboBoxOwnedGC(); + +//Enable/disable all sliders (based on paused) +f_enableAllSliders(p_gridConnection.v_isActive); + + + + VOID + double + 1714656835269 + f_updateUIResultsCompanyUI + -1050 + 1370 + + false + true + true + uI_Results.f_updateResultsUI(p_gridConnection); +uI_Results.f_setChartProfiles_Presentation(null, null, true); +uI_Results.f_setChartBalance_Presentation(null, null, true); + +if(cb_showGridloadPlot.isSelected()) + uI_Results.f_setChartGridLoad_Presentation(null, null, true); +else{ + uI_Results.f_setChartSankey_Presentation(null, null, true); +} + + + VOID + double + 1715713362876 + f_setHeatingRB + -1070 + 210 + + false + true + true + int nr_currentHeatingType = 0; +String rbHeating_acces = "enabled"; + +switch (p_scenarioSettings_Current.getCurrentHeatingType()){ + case GAS_BURNER: + nr_currentHeatingType = 0; + break; + case HYBRID_HEATPUMP: + nr_currentHeatingType = 1; + rbHeating_acces = "disabled"; + break; + case ELECTRIC_HEATPUMP: + nr_currentHeatingType = 2; + rbHeating_acces = "disabled"; + break; + case DISTRICTHEAT: + nr_currentHeatingType = 3; + break; + case LT_DISTRICTHEAT: + nr_currentHeatingType = 3; + rbHeating_acces = "disabled"; + break; + case CUSTOM: + nr_currentHeatingType = 4; + rbHeating_acces = "disabled"; + break; + default: + rbHeating_acces = "invisible"; +} + +if (rbHeating_acces.equals("disabled") || rbHeating_acces.equals("invisible")){ + rb_heatingTypePrivateUI.setEnabled(false); + + if(p_gridConnection.v_hasQuarterHourlyValues){ + sl_heatDemandCompanyReduction.setEnabled(false); + } + + if (rbHeating_acces.equals("invisible")){ + rb_heatingTypePrivateUI.setVisible(false); + gr_heatDemandReductionSlider.setVisible(false); + } + else { + gr_heatDemandReductionSlider.setVisible(true); + } +} +else{ // if(rbHeating_acces.equals("enabled"){ + rb_heatingTypePrivateUI.setEnabled(true); + rb_heatingTypePrivateUI.setVisible(true); + sl_heatDemandCompanyReduction.setEnabled(true); + gr_heatDemandReductionSlider.setVisible(true); +} + + + + VOID + double + 1715952034311 + f_addPVAsset + -410 + 550 + + false + true + true + + parentGC + GridConnection + + + asset_type + OL_EnergyAssetType + + + installedPower_kW + double + + String asset_name = "Solar Panels"; +double capacityElectric_kW = installedPower_kW; +double capacityHeat_kW = 0; +double yearlyProductionMethane_kWh = 0; +double yearlyProductionHydrogen_kWh = 0; +double timestep_h = zero_Interface.energyModel.p_timeStep_h; +double outputTemperature_degC = 0; + +J_EAProduction production_asset = new J_EAProduction(parentGC, asset_type, asset_name, OL_EnergyCarriers.ELECTRICITY, capacityElectric_kW, timestep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr); +parentGC.v_liveAssetsMetaData.updateActiveAssetData(new ArrayList<GridConnection>(List.of(parentGC))); + + + + VOID + double + 1725439625846 + f_setSelectedGCSliders + -1070 + 80 + + false + true + true + //Reset GC capacities to without NFATO values +p_gridConnection.f_nfatoSetConnectionCapacity(true); + +//Initialize slider presets to selected GC (min, max, etc.) +f_setSliderPresets(); + +//If GC not active in current situation, disable scenario rb +rb_scenariosPrivateUI.setEnabled(p_scenarioSettings_Current.getIsCurrentlyActive()); + +//Find the current heating type +int nr_currentHeatingType = 0; +switch (p_gridConnection.f_getCurrentHeatingType()){ + case GAS_BURNER: + nr_currentHeatingType = 0; + break; + + case HYBRID_HEATPUMP: + nr_currentHeatingType = 1; + break; + + case ELECTRIC_HEATPUMP: + nr_currentHeatingType = 2; + break; + + case DISTRICTHEAT: + case LT_DISTRICTHEAT: + nr_currentHeatingType = 3; + break; + case CUSTOM: + nr_currentHeatingType = 4; + break; + default: + nr_currentHeatingType = 4; +} + +//Find the current heat saving percentage +int currentHeatSavings = 0; + +J_EAConsumption consumptionEAHEAT = findFirst(p_gridConnection.c_consumptionAssets, consumptionAsset -> consumptionAsset.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); +if (consumptionEAHEAT != null){ + currentHeatSavings = roundToInt((consumptionEAHEAT.getConsumptionScaling_fr() - 1)*-100); +} +else{ + J_EAProfile profileEAHEAT = findFirst(p_gridConnection.c_profileAssets, profileAsset -> profileAsset.energyCarrier == OL_EnergyCarriers.HEAT); + if (profileEAHEAT != null){ + currentHeatSavings = roundToInt((profileEAHEAT.getProfileScaling_fr() - 1)*-100); + } +} + +//Find the current electricity savings percentage +int currentElectricitySavings = 0; + +J_EAConsumption consumptionEAELECTRIC = findFirst(p_gridConnection.c_consumptionAssets, consumptionAsset -> consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND); +if (consumptionEAELECTRIC != null){ + currentElectricitySavings = roundToInt((consumptionEAELECTRIC.getConsumptionScaling_fr() - 1)*-100); +} +else{ + J_EAProfile profileEAELECTRIC = findFirst(p_gridConnection.c_profileAssets, profileAsset -> profileAsset.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + if (profileEAELECTRIC != null){ + currentElectricitySavings = roundToInt((profileEAELECTRIC.getProfileScaling_fr() - 1)*-100); + } +} + +//Find the current Connection capacity (delivery) +int GCContractCapacityCurrent_Delivery = roundToInt(p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); + +//Find the current Connection capacity (feedin) +int GCContractCapacityCurrent_Feedin = roundToInt(p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacity_kW); + +//Set the nfato values +f_getNFATOValues(); + +//Find the current battery capacity +int BatteryCapacityCurrent = 0; +J_EAStorage batteryAsset = findFirst(p_gridConnection.c_storageAssets, p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); +if (batteryAsset != null){ + BatteryCapacityCurrent = roundToInt(((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh()); +} + +//Find the current PV capacity +int PVCapacityCurrent = 0; +if (p_gridConnection.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + J_EAProduction pvAsset = findFirst(p_gridConnection.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); + PVCapacityCurrent = roundToInt(pvAsset.getCapacityElectric_kW()); +} + +//Find the current curtailment setting +boolean currentCurtailmentSetting = p_gridConnection.v_enableCurtailment; + +//Find the current transport savings +int currentTransportSavings = 0; +if (p_gridConnection.c_tripTrackers.size() > 0){ + currentTransportSavings = - roundToInt(p_gridConnection.c_tripTrackers.get(0).getDistanceScaling_fr()*100) + 100; +} + + +//Find the current number of vehicles for each type +int nbEcarsCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); +int nbHydrogencarsCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); +int nbDieselcarsCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); + +int nbEvansCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN); +int nbHydrogenvansCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); +int nbDieselvansCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); + +int nbEtrucksCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); +int nbHydrogentrucksCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); +int nbDieseltrucksCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); + +//Check on electric cars, cause for companies that have quarterlyhour electricity data, the initial ea for EV (and other electric appliances) are not made. +if (p_gridConnection.v_hasQuarterHourlyValues){ + + nbEcarsCurrent += v_minEVCarSlider; + nbEvansCurrent += v_minEVVanSlider; + nbEtrucksCurrent += v_minEVTruckSlider; +} + + +////Set slider knobs at the currently (!) correct points + +//heating +rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, false); + +//Heat savings +sl_heatDemandCompanyReduction.setValue(currentHeatSavings, false); + +//Electricity savings +sl_electricityDemandCompanyReduction.setValue(currentElectricitySavings, false); + +//Contract connection capacity (delivery) +sl_GCCapacityCompany.setValue(GCContractCapacityCurrent_Delivery, false); +v_defaultGCCapacitySlider = GCContractCapacityCurrent_Delivery; + +//Contract connection capacity (feedin) +sl_GCCapacityCompany_Feedin.setValue(GCContractCapacityCurrent_Feedin, false); +v_defaultGCCapacitySlider_Feedin = GCContractCapacityCurrent_Feedin; + +//Battery capacity +sl_batteryCompany.setValue(BatteryCapacityCurrent, false); +v_defaultBatSlider = BatteryCapacityCurrent; + +//Solar panel power +sl_rooftopPVCompany.setValue(PVCapacityCurrent, false); +v_defaultPVSlider = PVCapacityCurrent; + +//Curtailment setting +cb_curtailmentCompany.setSelected(currentCurtailmentSetting, false); + + +//Mobility savings +sl_mobilityDemandCompanyReduction.setValue(currentTransportSavings, false); + +//Cars +sl_electricCarsCompany.setValue(nbEcarsCurrent, false); +sl_hydrogenCarsCompany.setValue(nbHydrogencarsCurrent, false); +sl_dieselCarsCompany.setValue(nbDieselcarsCurrent, false); + +v_nbEVCars = nbEcarsCurrent; +v_nbHydrogenCars = nbHydrogencarsCurrent; +v_nbDieselCars = nbDieselcarsCurrent; + + +//Vans +sl_electricVansCompany.setValue(nbEvansCurrent, false); +sl_hydrogenVansCompany.setValue(nbHydrogenvansCurrent, false); +sl_dieselVansCompany.setValue(nbDieselvansCurrent, false); + +v_nbEVVans = nbEvansCurrent; +v_nbHydrogenVans = nbHydrogenvansCurrent; +v_nbDieselVans = nbDieselvansCurrent; + + +//Trucks +sl_electricTrucksCompany.setValue(nbEtrucksCurrent, false); +sl_hydrogenTrucksCompany.setValue(nbHydrogentrucksCurrent, false); +sl_dieselTrucksCompany.setValue(nbDieseltrucksCurrent, false); + +v_nbEVTrucks = nbEtrucksCurrent; +v_nbHydrogenTrucks = nbHydrogentrucksCurrent; +v_nbDieselTrucks = nbDieseltrucksCurrent; + +//Add nfato again +p_gridConnection.f_nfatoSetConnectionCapacity(false); + + + VOID + double + 1725439635605 + f_selectGCOnMainInterface + -410 + 300 + + false + true + true + //Select the newly selected GC also on the main interface (if not paused) +zero_Interface.f_clearSelectionAndSelectEnergyModel(); + +if(p_gridConnection.v_isActive){ + zero_Interface.f_selectBuilding(p_gridConnection.c_connectedGISObjects.get(0), p_gridConnection.c_connectedGISObjects); +} + + + VOID + double + 1725607045331 + f_setSimulateYearScreen + -430 + 830 + + false + true + true + if(!b_runningMainInterfaceScenarioSettings && !b_runningMainInterfaceSlider){ + //Update main interface sliders according to the companyUI changes + zero_Interface.f_updateMainInterfaceSliders(); + + //Set it for main interface as well + zero_Interface.f_resetSettings(); + + //Update variable to change to custom scenario + zero_Interface.f_setScenarioToCustom(); +} + + + VOID + double + 1725614403909 + f_setGCCapacitySliderPresets + -1070 + 230 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_GCCapacityCompany.setRange(0, 100000); + +//Get current grid capacity +double defaultGCCapacitySlider = p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW(); + +//Get future grid capacity +double futureGCCapacity_delivery_kW = p_scenarioSettings_Future.getRequestedContractDeliveryCapacity_kW(); + +//Get current physical capacity +v_physicalConnectionCapacity_kW = p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW(); + +//Set range specific for specific intervals of capacity +v_minGCCapacitySlider = 0; + +if(futureGCCapacity_delivery_kW < 100 && defaultGCCapacitySlider < 100){ + v_maxGCCapacitySlider = 150; +} +else if(futureGCCapacity_delivery_kW < 1000 && defaultGCCapacitySlider < 1000){ + v_maxGCCapacitySlider = 2000; +} +else if(futureGCCapacity_delivery_kW < 8000 && defaultGCCapacitySlider < 8000){ + v_maxGCCapacitySlider = 10000; +} +else if(futureGCCapacity_delivery_kW < 15000 && defaultGCCapacitySlider < 15000){ + v_maxGCCapacitySlider = 20000; +} +else{ + v_maxGCCapacitySlider = max(futureGCCapacity_delivery_kW, defaultGCCapacitySlider); +} + +v_defaultGCCapacitySlider = roundToInt(defaultGCCapacitySlider); + +//Set slider knob +sl_GCCapacityCompany.setValue(v_defaultGCCapacitySlider, false); + + + VOID + double + 1727712593952 + f_setNameTextSize + -1070 + 60 + + false + true + true + if (p_companyName == null) { + return; +} + +int nameLength = p_companyName.length(); + +int i = 0; +if(nameLength > 24){ + while(24+i != nameLength){ + + t_companyName.setScale(0.9); + i++; + } +} +//Works for now: Possible to make it more accurate using getFontMetrics package and comparing width of text with the name text box width. +//--> Not done for now, as it feels unnecessary. + + + VOID + double + 1727798399503 + f_setGCCapacitySliderPresets_Feedin + -1070 + 330 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_GCCapacityCompany_Feedin.setRange(0, 100000); + +//Get current grid capacity +double defaultGCCapacitySlider_Feedin = p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW(); + +//Set range specific for specific intervals of capacity +v_minGCCapacitySlider_Feedin = 0; + +if(defaultGCCapacitySlider_Feedin < 100){ + v_maxGCCapacitySlider_Feedin = 150; +} +else if(defaultGCCapacitySlider_Feedin < 1000){ + v_maxGCCapacitySlider_Feedin = 2000; +} +else if(defaultGCCapacitySlider_Feedin < 8000){ + v_maxGCCapacitySlider_Feedin = 10000; +} +else if(defaultGCCapacitySlider_Feedin < 15000){ + v_maxGCCapacitySlider_Feedin = 20000; +} +else{ + v_maxGCCapacitySlider_Feedin = defaultGCCapacitySlider_Feedin; +} + +v_defaultGCCapacitySlider_Feedin = roundToInt(defaultGCCapacitySlider_Feedin); + +//Set slider knob +sl_GCCapacityCompany_Feedin.setValue(v_defaultGCCapacitySlider_Feedin, false); + + + VOID + double + 1727884380899 + f_getNFATOValues + -430 + 705 + + false + true + true + v_NFATO_active = p_gridConnection.v_enableNFato; +v_NFATO_kW_delivery = p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacity_kW - v_defaultGCCapacitySlider; +v_NFATO_kW_feedin = p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacity_kW- v_defaultGCCapacitySlider_Feedin; + +if(v_NFATO_kW_delivery > 0){ + t_GCCapacityCompany_delivery_nfato.setColor(green); +} +else if(v_NFATO_kW_delivery < 0){ + t_GCCapacityCompany_delivery_nfato.setColor(red); +} +else{ + t_GCCapacityCompany_delivery_nfato.setColor(black); +} + +if(v_NFATO_kW_feedin > 0){ + t_GCCapacityCompany_Feedin_nfato.setColor(green); +} +else if(v_NFATO_kW_feedin < 0){ + t_GCCapacityCompany_Feedin_nfato.setColor(red); +} +else{ + t_GCCapacityCompany_Feedin_nfato.setColor(black); +} + + + + VOID + double + 1729515671654 + f_enableAllSliders + -1070 + 120 + + false + true + true + + enable + boolean + + sl_heatDemandCompanyReduction.setEnabled(enable); +rb_heatingTypePrivateUI.setEnabled(enable); + +sl_electricityDemandCompanyReduction.setEnabled(enable); +sl_GCCapacityCompany.setEnabled(enable); +sl_GCCapacityCompany_Feedin.setEnabled(enable); +sl_batteryCompany.setEnabled(enable); +sl_rooftopPVCompany.setEnabled(enable); +cb_curtailmentCompany.setEnabled(enable); + +sl_mobilityDemandCompanyReduction.setEnabled(enable); + +sl_electricCarsCompany.setEnabled(enable); +sl_hydrogenCarsCompany.setEnabled(enable); +sl_dieselCarsCompany.setEnabled(enable); + +sl_electricVansCompany.setEnabled(enable); +sl_hydrogenVansCompany.setEnabled(enable); +sl_dieselVansCompany.setEnabled(enable); + +sl_electricTrucksCompany.setEnabled(enable); +sl_hydrogenTrucksCompany.setEnabled(enable); +sl_dieselTrucksCompany.setEnabled(enable); + +// Disabled / Invisible heating based on current scenario settings +if (enable) { + f_setHeatingRB(); +} + + + VOID + double + 1747316158336 + f_setErrorScreen + 5540 + 1110 + + false + true + true + + errorMessage + String + + //Reset location and height +button_errorOK.setY(50); +rect_errorMessage.setY(-120); +rect_errorMessage.setHeight(200); +t_errorMessage.setY(-70); + +//Set position above all other things +presentation.remove(gr_errorScreen); +presentation.insert(presentation.size(), gr_errorScreen); + +int width_numberOfCharacters = 44; + +// Set Text +Pair<String, Integer> p = zero_Interface.v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); +errorMessage = p.getFirst(); +int numberOfLines = p.getSecond(); +int additionalLines = max(0, numberOfLines - 3); + +// Set Size +rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); +rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); +//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); +t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); + +t_errorMessage.setText(errorMessage); +gr_errorScreen.setVisible(true); + + + VOID + double + 1756898097088 + f_setDemandReductionSliderPresets + -1060 + 1240 + + false + true + true + v_minSavingsSliders = -50; +v_maxSavingsSliders = 50; +sl_heatDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); +sl_electricityDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); +sl_mobilityDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); + + + VOID + double + 1760976810989 + f_selectDifferentOwnedGC + -430 + 280 + + false + true + true + + selectedOwnedGCIndex + int + + //Set companyUI to the new GC +f_setCompanyUI(p_gridConnection.p_owner.f_getOwnedGridConnections().get(selectedOwnedGCIndex)); + +//Select the gc on the main interface (map) aswell +f_selectGCOnMainInterface(); + + + + + + + 1708522361863 + connections + true + 20 + -160 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1708522362017 + zero_Interface + 20 + -120 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + + + 1714652079023 + uI_Results + -1050 + 1330 + + false + true + true + 1714652081119 + + digital_twin_results + UI_Results + + + + digital_twin_results + UI_Results + 1704197366556 + + + + + energyModel + + zero_Interface.energyModel + + + + p_cutOff_MWh + + + gr_infoText + + + gr_closeInfoText + + + t_infoTextDescription + + + rect_infoText + + + p_currentActiveInfoBubble + + + false + + 100 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089973 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + + + 1708522361869 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1708612468547 + rect_canvas + -1160 + -400 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 4560 + 1800 + 0.0 + -1 + null + + + 1708522459040 + rect_background + 0 + 0 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1920 + 980 + 0.0 + -1 + v_companyUIBackgroundColor + null + + + 1713446065829 + rect_sliders + 0 + 140 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 360 + 840 + 0.0 + -1 + v_companyUIBackgroundColorSliders + null + + + 1708611929678 + rect_scenarios + 0 + 0 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 360 + 140 + 0.0 + -1 + v_companyUIBackgroundColorSliders + null + + + 1708611713278 + text + -440 + 20 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Colors and Styling + + SansSerif + 12 + + + LEFT + + + 1708611755978 + text4 + -750 + 20 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Company parameters + + SansSerif + 12 + + + LEFT + + + 1709571615104 + txt_storedScenarios + -750 + 110 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Scenarios + + SansSerif + 12 + + + LEFT + + + false + 1711555257574 + button1 + 180 + -80 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + p_gridConnection.va_gridConnection.navigateTo(); + + + + Go to GC in engine + + + + 1713447348497 + gr_scenarioRB + 140 + 100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1713447230459 + rb_scenariosPrivateUI + -100 + -60 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if (p_scenarioSettings_Current != null && p_scenarioSettings_Future != null){ + f_setScenario(rb_scenariosPrivateUI.getValue()); +} + +// Simulate Year button on Interface +zero_Interface.f_resetSettings(); + + + + 0 + VERTICAL + + + + false + + + + 1713447252716 + txt_scenario + -100 + -80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer een scenario + + Calibri + 20 + + + LEFT + + + + + 1713537625797 + txt_scenarioSettings + -440 + 340 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Set Sliders to Scenario + + SansSerif + 12 + + + LEFT + + + 1713957149840 + txt_sliderPresetsAndLimits + -1100 + 160 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Slider limits and presets + + SansSerif + 12 + + + LEFT + + + 1713957196998 + txt_sliderFunctions + -440 + 460 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Slider functions + + SansSerif + 12 + + + LEFT + + + false + 1714641703973 + button2 + 360 + -80 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + ((GIS_Building)p_gridConnection.c_connectedGISObjects.get(0)).va_building.navigateTo(); + + + + Go to Building in engine + + + + false + 1714641782724 + button3 + 0 + -80 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + p_gridConnection.p_owner.va_ConnectionOwner.navigateTo(); + + + + Go to Owner in engine + + + + 1714655090415 + txt_initialization + -1100 + 10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Initialization + + SansSerif + 12 + + + LEFT + + + 1714660279044 + txt_uiResult + -1060 + 1300 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + UI_Result connection (graphs) + + SansSerif + 12 + + + LEFT + + + 1715626747942 + gr_companyUISliders + 310 + 445 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1713446221121 + txt_warmte + -240 + -270 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Warmte + + Calibri + 22 + + + LEFT + + + 1713446658919 + t_GCCapacityCompany + -85 + 6 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + sl_GCCapacityCompany.getIntValue() + " kW" + + Dialog + 14 + + + RIGHT + + + false + 1713446658921 + sl_GCCapacityCompany + -58 + 1 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setGCCapacity(p_gridConnection, sl_GCCapacityCompany.getValue(), "DELIVERY"); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_defaultGCCapacitySlider + HORIZONTAL + v_minGCCapacitySlider + v_maxGCCapacitySlider + 1 + false + + + + 1713446658933 + txt_GCCapacity + -290 + 6 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Contr. capaciteit (af.) + + Dialog + 14 + + + LEFT + + + 1713446065831 + gr_heatDemandReductionSlider + -120 + -106 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1713446065865 + sl_heatDemandCompanyReduction + 62 + -130 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + double newHeatDemandReduction_pct = sl_heatDemandCompanyReduction.getValue(); +double consumptionScaling_fr = 1 - newHeatDemandReduction_pct/100; + +for (J_EA j_ea : p_gridConnection.c_energyAssets){ + if (j_ea instanceof J_EAConsumption) { + if (j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND) { + ((J_EAConsumption)j_ea).setConsumptionScaling_fr(consumptionScaling_fr); + } + } + if (j_ea instanceof J_EAProfile) { + if (((J_EAProfile) j_ea).energyCarrier== OL_EnergyCarriers.HEAT) { + ((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr ); + } + } +} + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + 0 + HORIZONTAL + v_minSavingsSliders + v_maxSavingsSliders + 1 + false + + + + 1713446065869 + text195 + -170 + -125 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing warmte + + Dialog + 14 + + + LEFT + + + 1713446065871 + t_heatDemandReductionCompanies + 35 + -125 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0% + sl_heatDemandCompanyReduction.getIntValue() + "%" + + Dialog + 14 + + + RIGHT + + + + + 1713446065985 + txt_elektriciteit + -240 + -68 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektriciteit + + Calibri + 22 + + + LEFT + + + 1713446438059 + txt_mobiliteit + -240 + 166 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Transport + + Calibri + 22 + + + LEFT + + + 1713446065961 + t_electricityDemandReductionCompany + -85 + -24 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0% + sl_electricityDemandCompanyReduction.getIntValue() + "%" + + + Dialog + 14 + + + RIGHT + + + false + 1713446065963 + sl_electricityDemandCompanyReduction + -58 + -29 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + double newElectricityDemandReduction_pct = sl_electricityDemandCompanyReduction.getValue(); +double consumptionScaling_fr = 1 - newElectricityDemandReduction_pct/100; + +for (J_EA j_ea : p_gridConnection.c_energyAssets) { + if (j_ea instanceof J_EAConsumption) { + if (j_ea.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND) { + ((J_EAConsumption)j_ea).setConsumptionScaling_fr(consumptionScaling_fr); + } + } + if (j_ea instanceof J_EAProfile) { + if (((J_EAProfile) j_ea).energyCarrier == OL_EnergyCarriers.ELECTRICITY) { + ((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr ); + } + } +} + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + + 0 + HORIZONTAL + v_minSavingsSliders + v_maxSavingsSliders + 1 + false + + + + 1713446065965 + text279 + -290 + -24 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing elektriciteit + + Dialog + 14 + + + LEFT + + + 1713447888398 + gr_companyMobilitySliders + -120 + 360 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1713446839189 + sl_electricVansCompany + 62 + -3 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_VAN, (int)sl_electricVansCompany.getValue()); + +//Update the other two sliders aswell +sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); +sl_dieselVansCompany.setValue(v_nbDieselVans, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbEVVans + HORIZONTAL + v_minEVVanSlider + v_maxEVVanSlider + 1 + false + v_nbEVVans + + + + 1713446839191 + text266 + -170 + 0 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektrisch + + Dialog + 14 + + + LEFT + + + 1713446839193 + t_numberOfElectricVansCompany + 35 + 0 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_electricVansCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + false + 1713446839195 + sl_hydrogenVansCompany + 62 + 22 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_VAN, (int)sl_hydrogenVansCompany.getValue()); + +//Update the other two sliders aswell +sl_electricVansCompany.setValue(v_nbEVVans, false); +sl_dieselVansCompany.setValue(v_nbDieselVans, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbHydrogenVans + HORIZONTAL + v_minHydrogenVanSlider + v_maxHydrogenVanSlider + 1 + false + v_nbHydrogenVans + + + + 1713446839197 + text271 + -170 + 25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Waterstof + + Dialog + 14 + + + LEFT + + + 1713446839199 + t_numberOfHydrogenVansCompany + 35 + 25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_hydrogenVansCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + false + 1713446839201 + sl_dieselVansCompany + 62 + 47 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_VAN, (int)sl_dieselVansCompany.getValue()); + +//Update the other two sliders aswell +sl_electricVansCompany.setValue(v_nbEVVans, false); +sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbDieselVans + HORIZONTAL + v_minDieselVanSlider + v_maxDieselVanSlider + 1 + false + v_nbDieselVans + + + + 1713446839203 + text285 + -170 + 50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fossiele brandstof + + Dialog + 14 + + + LEFT + + + 1713446839205 + t_numberOfDieselVansCompany + 35 + 50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_dieselVansCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446839207 + text274 + -170 + -25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Busjes + + Dialog + 14 + + + LEFT + + + 1713446857516 + t_numberOfDieselTrucksCompany + 35 + 145 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_dieselTrucksCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446857518 + t_numberOfHydrogenTrucksCompany + 35 + 120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_hydrogenTrucksCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446857520 + text272 + -170 + 120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Waterstof + + Dialog + 14 + + + LEFT + + + 1713446857522 + text286 + -170 + 145 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fossiele brandstof + + Dialog + 14 + + + LEFT + + + 1713446857524 + text268 + -170 + 95 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektrisch + + Dialog + 14 + + + LEFT + + + 1713446857528 + text275 + -170 + 70 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trucks + + Dialog + 14 + + + LEFT + + + false + 1713446857530 + sl_hydrogenTrucksCompany + 62 + 117 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_TRUCK, (int)sl_hydrogenTrucksCompany.getValue()); + +//Update the other two sliders aswell +sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); +sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbHydrogenTrucks + HORIZONTAL + v_minHydrogenTruckSlider + v_maxHydrogenTruckSlider + 1 + false + v_nbHydrogenTrucks + + + + 1713446857532 + t_numberOfElectricTrucksCompany + 35 + 95 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_electricTrucksCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + false + 1713446857534 + sl_electricTrucksCompany + 62 + 92 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_TRUCK, (int)sl_electricTrucksCompany.getValue()); + +//Update the other two sliders aswell +sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); +sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbEVTrucks + HORIZONTAL + v_minEVTruckSlider + v_maxEVTruckSlider + 1 + false + v_nbEVTrucks + + + + false + 1713446857526 + sl_dieselTrucksCompany + 62 + 142 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_TRUCK, (int)sl_dieselTrucksCompany.getValue()); + +//Update the other two sliders aswell +sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); +sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbDieselTrucks + HORIZONTAL + v_minDieselTruckSlider + v_maxDieselTruckSlider + 1 + false + v_nbDieselTrucks + + + + false + 1713446065901 + sl_electricCarsCompany + 62 + -103 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_VEHICLE, (int)sl_electricCarsCompany.getValue()); + +//Update the other two sliders aswell +sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); +sl_dieselCarsCompany.setValue(v_nbDieselCars, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbEVCars + HORIZONTAL + v_minEVCarSlider + v_maxEVCarSlider + 1 + false + v_nbEVCars + + + + 1713446065907 + text265 + -170 + -100 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektrisch + + Dialog + 14 + + + LEFT + + + 1713446065909 + t_numberOfElectricCarsCompany + 35 + -100 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_electricCarsCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446065917 + text267 + -170 + -155 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing transport + + Dialog + 14 + + + LEFT + + + false + 1713446065919 + sl_mobilityDemandCompanyReduction + 62 + -160 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + p_gridConnection.c_tripTrackers.forEach(tt -> tt.distanceScaling_fr = 1-sl_mobilityDemandCompanyReduction.getValue()/100); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + 0 + HORIZONTAL + v_minSavingsSliders + v_maxSavingsSliders + 1 + false + + + + 1713446065921 + t_mobilityDemandReductionCompany + 35 + -155 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0% + sl_mobilityDemandCompanyReduction.getIntValue() + "%" + + Dialog + 14 + + + RIGHT + + + false + 1713446065923 + sl_hydrogenCarsCompany + 62 + -78 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_VEHICLE, (int)sl_hydrogenCarsCompany.getValue()); + +//Update the other two sliders aswell +sl_electricCarsCompany.setValue(v_nbEVCars, false); +sl_dieselCarsCompany.setValue(v_nbDieselCars, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbHydrogenCars + HORIZONTAL + v_minHydrogenCarSlider + v_maxHydrogenCarSlider + 1 + false + v_nbHydrogenCars + + + + 1713446065925 + text270 + -170 + -75 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Waterstof + + Dialog + 14 + + + LEFT + + + 1713446065927 + t_numberOfHydrogenCarsCompany + 35 + -75 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_hydrogenCarsCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + false + 1713446065933 + sl_dieselCarsCompany + 62 + -54 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_VEHICLE, (int)sl_dieselCarsCompany.getValue()); + +//Update the other two sliders aswell +sl_electricCarsCompany.setValue(v_nbEVCars, false); +sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbDieselCars + HORIZONTAL + v_minDieselCarSlider + v_maxDieselCarSlider + 1 + false + v_nbDieselCars + + + + 1713446065935 + text284 + -170 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fossiele brandstof + + Dialog + 14 + + + LEFT + + + 1713446065937 + t_numberOfDieselCarsCompany + 35 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_dieselCarsCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446065939 + text273 + -170 + -125 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Autos + + Dialog + 14 + + + LEFT + + + + + 1713547081193 + gr_selectedGC + -60 + -290 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1713544148158 + cb_selectGC + -84 + -13 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + f_selectDifferentOwnedGC(cb_selectGC.getValueIndex()); + + + + false + + + false + + + + 1713547027389 + text9 + -240 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geselecteerde Aansluiting: + + SansSerif + 12 + + + LEFT + + + + + false + 1713963799790 + sl_batteryCompany + -58 + 61 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //traceln("Slider werkt nog niet volledig!!, batterij sturing werkt nog niet goed"); +f_setBattery(p_gridConnection, sl_batteryCompany.getValue()); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_defaultBatSlider + HORIZONTAL + v_minBatSlider + v_maxBatSlider + 1 + false + + + + 1713963799825 + t_batteryCompany + -85 + 66 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kWh + sl_batteryCompany.getIntValue() + " kWh" + + Dialog + 14 + + + RIGHT + + + 1713963799827 + text283 + -290 + 66 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Batterij capaciteit + + Dialog + 14 + + + LEFT + + + 1715084970828 + g_energyDemandSettings + 280 + -100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715084970830 + gr_electricityButton1 + -560 + 42 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715084970832 + ovalElectricityButton1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -32 + null + + + 1715084970834 + image4 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-electricity-3408805.png + + + false + + + + + 1715084970836 + gr_heatButton1 + -560 + -160 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715084970838 + ovalHeatButton1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -6943 + null + + + 1715084970840 + image11 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-fire-2429630.png + + + false + + + + + 1715084970842 + gr_transportButton1 + -560 + 276 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715084970844 + ovalTransportButton1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -2625550 + null + + + 1715084970846 + image16 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-car-1777731.png + + + false + + + + + + + false + 1715093089631 + rb_heatingTypePrivateUI + -290 + -206 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if (!rb_heatingTypePrivateUI.isEnabled()){// check if disabled, if so, skip when called + return; +} + +//Convert radiobutton integer to OL type +OL_GridConnectionHeatingType selectedHeatingType; +switch (rb_heatingTypePrivateUI.getValue()){ + case 0: + selectedHeatingType = OL_GridConnectionHeatingType.GAS_BURNER; + break; + case 1: + selectedHeatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; + break; + case 2: + selectedHeatingType = OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP; + break; + case 3: + selectedHeatingType = OL_GridConnectionHeatingType.DISTRICTHEAT; + break; + case 4: + selectedHeatingType = OL_GridConnectionHeatingType.CUSTOM; + f_setErrorScreen("De 'custom' verwarming optie wordt alleen gebruikt ter visualisatie voor bedrijven die starten met een 'custom' warmte systeem. In plaats van 'custom' is de knop nu gezet op 'HR ketel aardgas'."); + rb_heatingTypePrivateUI.setValue(0); + return; + default: + selectedHeatingType = OL_GridConnectionHeatingType.NONE; +} + + +//Radio button function +f_setHeatingType(p_gridConnection, selectedHeatingType); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + + 0 + VERTICAL + + + + + + false + + + + 1725618990626 + t_rooftopSolarCompany + -85 + 96 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + sl_rooftopPVCompany.getIntValue() + " kW" + + Dialog + 14 + + + RIGHT + + + false + 1725618990628 + sl_rooftopPVCompany + -58 + 91 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPVSystem(p_gridConnection, sl_rooftopPVCompany.getValue()); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_defaultPVSlider + HORIZONTAL + v_minPVSlider + v_maxPVSlider + 1 + false + + + + 1725618990630 + txt_PVPower + -290 + 96 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + PV vermogen + + Dialog + 14 + + + LEFT + + + 1727796446739 + t_GCCapacityCompany_Feedin + -85 + 36 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + sl_GCCapacityCompany_Feedin.getIntValue() + " kW" + + Dialog + 14 + + + RIGHT + + + false + 1727796446741 + sl_GCCapacityCompany_Feedin + -58 + 31 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setGCCapacity(p_gridConnection, sl_GCCapacityCompany_Feedin.getValue(), "FEEDIN"); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_defaultGCCapacitySlider_Feedin + HORIZONTAL + v_minGCCapacitySlider_Feedin + v_maxGCCapacitySlider_Feedin + 1 + false + + + + 1727796446743 + txt_GCCapacityCompany_Feedin + -290 + 36 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Contr. capaciteit (te.) + + Dialog + 14 + + + LEFT + + + + + false + 1708523022017 + button + 1670 + 20 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + zero_Interface.uI_Results.getCheckbox_KPISummary().setSelected(false, true); + +zero_Interface.va_Interface.navigateTo(); +zero_Interface.v_currentViewArea = zero_Interface.va_Interface; + + + + + Terug naar hoofdscherm + + + + 1725365029204 + gr_companyDetails + 1140 + 80 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725366551214 + roundRect_companyName + -298 + -59.512 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 596 + 119.024 + 0.0 + -1 + null + 10 + + + 1708611721668 + t_companyName + 0 + -46.34 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Company Name + p_companyName + + SansSerif + 48 + + + CENTER + + + 1708611716618 + t_GCadress + 0 + 23.17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Adress + v_adressGC + + SansSerif + 20 + + + CENTER + + + + + 1714652081119 + uI_Results_presentation + 380 + 220 + + false + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + 1725381132369 + mask_resultsUI1 + 370 + 60 + + false + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + null + SOLID + 470 + 110 + 0.0 + -1 + null + + + 1725381214835 + mask_resultsUI2 + 845 + 270 + + false + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + null + SOLID + 2495 + 700 + 0.0 + -1 + null + + + 1725382426671 + gr_chartNameLeft + 610 + 200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725381345763 + rect_chartNameLeft + -230 + -30 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth + -16777216 + v_companyUILineColor + null + SOLID + 460 + 50 + 0.0 + -1 + v_chartBackgroundColor + null + + + 1725382366046 + txt_chartNameLeft + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Profielen + + SansSerif + 24 + + + CENTER + + + + + 1725382459577 + gr_chartNameMiddle + 1140 + 200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725382459579 + rect_chartNameMiddle + -230 + -30 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth + -16777216 + v_companyUILineColor + null + SOLID + 460 + 50 + 0.0 + -1 + v_chartBackgroundColor + null + + + 1725382459581 + txt_chartNameMiddle + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Opwek/verbruik diagram + + SansSerif + 24 + + + CENTER + + + + + 1725382464651 + gr_chartNameRight + 1670 + 200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725382464653 + rect_chartNameRight + -230 + -30 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth + -16777216 + v_companyUILineColor + null + SOLID + 460 + 50 + 0.0 + -1 + v_chartBackgroundColor + null + + + 1725382464655 + txt_chartNameRight + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energiestromen + + SansSerif + 24 + + + CENTER + + + + + 1725606178083 + gr_simulateYearScreen + 1375 + 540 + + true + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725606178085 + rect_simulateYearScreen2 + -535 + -320 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -6943 + v_companyUIBackgroundColor + null + SOLID + 1060 + 750 + 0.0 + -1 + v_companyUIBackgroundColor + null + + + 1725606178087 + gr_simulateYearToCalculateKPIs + -35 + 40 + + true + true + false + SHAPE_DRAW_2D3D + //Set correct overlay +gr_simulateYearScreen.setVisible(false); +gr_loadIcon.setVisible(true); + + +//Run simulation +new Thread( () -> { + zero_Interface.energyModel.f_runRapidSimulation(); + zero_Interface.uI_Results.f_updateResultsUI(zero_Interface.energyModel); + f_updateUIResultsCompanyUI(); + gr_loadIcon.setVisible(false); + + //Update and show kpi summary chart after run + if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ + uI_Results.getCheckbox_KPISummary().setSelected(true, true); + } + + //Update results up to date boolean + uI_Results.f_enableNonLivePlotRadioButtons(true); + zero_Interface.b_resultsUpToDate = true; + zero_Interface.gr_simulateYear.setVisible(false); + zero_Interface.uI_Results.f_enableNonLivePlotRadioButtons(true); + +}).start(); + + + + + false + 0 + 0.0 + + + 1725606178089 + t_simulateYearToCalculateCostsSmall + -140 + -40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simuleer jaar voor KPI's + + SansSerif + 28 + + + CENTER + + + 1725606178091 + image_simulateYearToCalculateCostsSmall + -420 + -70 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 102.315 + 99.723 + 0.0 + + + zerointerfaceloader + icon_greater_than.png + + + false + + + + + + + 1725606178111 + gr_loadIcon + 2360 + 280 + + true + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725606178113 + rect_loadIcon + -1520 + -60.969 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -369756683 + v_loadScreenColor + null + SOLID + 1065 + 755.969 + 0.0 + -369756683 + v_loadScreenColor + null + + + 1729516584700 + rect_GCisPausedScreen3 + -1990 + -60 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -6943 + v_loadScreenColor + null + SOLID + 480 + 755 + 0.0 + -1 + v_loadScreenColor + null + + + 1725606744485 + gr_loadIconText + -1220 + 280 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725606744487 + image_loadIconSmall + -27.610999999999876 + -5.4780000000000655 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 61.016 + 60.969 + 0.0 + + + zerointerfaceloader + icon_loading.gif + + + false + + + 1725606744489 + t_loadIconSmall + 2.8969999999999345 + -55.96199999999999 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Jaar wordt gesimuleerd + + SansSerif + 28 + + + CENTER + + + + + + + 1727797637172 + txt_curtailmentDescriptionCompany + 20 + 571 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Curtailment opwek + + Dialog + 14 + + + LEFT + + + false + 1727797637174 + cb_curtailmentCompany + 291 + 564 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if (cb_curtailmentCompany.isSelected()) { + p_gridConnection.v_enableCurtailment = true; +} +else { + p_gridConnection.v_enableCurtailment = false; +} + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + + + false + + + + 1727883464770 + txt_nfatoValues + -440 + 680 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + NF ATO values + + SansSerif + 12 + + + LEFT + + + 1727939194812 + gr_TableConnectionCapacity + 565 + 80 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1727939194814 + rect_table_GridconnectionCapacaties + -185 + -60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 380 + 120 + 0.0 + -1 + null + + + 1727939194816 + txt_additionalGCCapacityInfo + -178 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Aansluitings capaciteit type + + SansSerif + 16 + + + LEFT + + + 1727939194818 + text1 + -175 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fysieke capaciteit + + SansSerif + 14 + + + LEFT + + + 1727939194820 + text2 + -175 + 8 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Contract capaciteit afname + + SansSerif + 14 + + + LEFT + + + 1727939194822 + text3 + -175 + 33 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Contract capaciteit teruglevering + + SansSerif + 14 + + + LEFT + + + 1727939194824 + t_GCCapacityCompany_delivery2 + 152 + 8 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + t_GCCapacityCompany.getText() + + Dialog + 14 + + + CENTER + + + 1727939194826 + t_GCCapacityCompany_Feedin_2 + 152 + 33 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + t_GCCapacityCompany_Feedin.getText() + + Dialog + 14 + + + CENTER + + + 1727939194828 + t_GCCapacityCompany_physical + 152 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + roundToInt(v_physicalConnectionCapacity_kW) + " kW" + + Dialog + 14 + + + CENTER + + + 1727939194830 + line_table_ConnectionCapacityInfo_1 + 41 + -60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1 + 0 + 1 + 0 + 0 + 120 + 0 + + + 1727939194832 + txt_table_ConnectionCapacityInfo_owned + 152 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Capaciteit + + SansSerif + 16 + + + CENTER + + + 1727939194834 + line_table_ConnectionCapacityInfo_3 + -185 + -25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1 + 0 + 1 + 0 + 380 + 0 + 0 + + + 1727939206993 + gr_table_nfato + 225 + 0 + + true + true + false + SHAPE_DRAW_2D3D + v_NFATO_active + + + + + false + 0 + 0.0 + + + 1727939206995 + rect_Table_NFATO + -30 + -60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 65 + 120 + 0.0 + -1 + null + + + 1727939206997 + txt_table_ConnectionCapacityInfo_nfato + 3 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + NF ATO + + SansSerif + 16 + + + CENTER + + + 1727939206999 + t_GCCapacityCompany_delivery_nfato + 0.5 + 8 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + roundToInt(v_NFATO_kW_delivery) + " kW" + + Dialog + 14 + + + CENTER + + + 1727939207001 + t_GCCapacityCompany_Feedin_nfato + 0.5 + 33 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + roundToInt(v_NFATO_kW_feedin) + " kW" + + Dialog + 14 + + + CENTER + + + 1727939207003 + t_GCCapacityCompany_physical_nfato + 0.5 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + --- + + Dialog + 14 + + + CENTER + + + 1727939207005 + line_table_ConnectionCapacityInfo_NFATO + -30 + -25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1 + 0 + 1 + 0 + 65 + 0 + 0 + + + + + 1744645098225 + line_table_ConnectionCapacityInfo_2 + 109 + -60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1 + 0 + 1 + 0 + 0 + 120 + 0 + + + 1744645140831 + txt_table_ConnectionCapacityInfo_known + 75 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Status + + SansSerif + 16 + + + CENTER + + + 1744645285983 + t_GCCapacityCompany_delivery3 + 75 + 8 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Custom + p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW() != sl_GCCapacityCompany.getValue() ? "Custom" : +p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacityKnown ? "Bekend" : "Geschat" + + Dialog + 14 + + + CENTER + + + 1744645285985 + t_GCCapacityCompany_Feedin_3 + 75 + 33 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geschat + p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW() != sl_GCCapacityCompany_Feedin.getValue() ? "Custom" : +p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacityKnown ? "Bekend" : "Geschat" + + Dialog + 14 + + + CENTER + + + 1744645285987 + t_GCCapacityCompany_physical1 + 75 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Bekend + p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW() != v_physicalConnectionCapacity_kW ? "Custom" : +p_gridConnection.v_liveConnectionMetaData.physicalCapacityKnown ? "Bekend" : "Geschat" + + Dialog + 14 + + + CENTER + + + + + 1729511748859 + gr_GCisPausedScreen + 4480 + 920 + + true + false + false + true + SHAPE_DRAW_2D3D + 1375 + 540 + !p_gridConnection.v_isActive + false + 0 + 0.0 + + + 1729511748861 + rect_GCisPausedScreen + -1010 + -320 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -369756683 + v_loadScreenColor + null + SOLID + 545 + 760 + 0.0 + -369756683 + v_loadScreenColor + null + + + 1729511748863 + rect_GCisPausedScreen2 + -535 + -320 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -6943 + v_companyUIBackgroundColor + null + SOLID + 1075 + 760 + 0.0 + -1 + v_companyUIBackgroundColor + null + + + 1729511748865 + gr_GCisPausedScreenText + -35 + 40 + + true + true + false + SHAPE_DRAW_2D3D + //Set correct overlay +gr_simulateYearScreen.setVisible(false); +gr_loadIcon.setVisible(true); +rect_GCisPausedScreen3.setVisible(true); + +//Unpause gc +p_gridConnection.f_setActive(true); +zero_Interface.b_resultsUpToDate = false; +zero_Interface.f_setScenarioToCustom(); +f_enableAllSliders(true); + + +//Run simulation +new Thread( () -> { + + //Run rapid run in engine + zero_Interface.energyModel.f_runRapidSimulation(); + + //Update map selection and resultsUIs + f_selectGCOnMainInterface(); + f_updateUIResultsCompanyUI(); + + //Update and show kpi summary chart after run + if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ + uI_Results.getCheckbox_KPISummary().setSelected(true, true); + } + + //Remove all simulation screens + zero_Interface.f_removeAllSimulateYearScreens(); + rect_GCisPausedScreen3.setVisible(false); +}).start(); + + +//Update results up to date boolean +zero_Interface.b_resultsUpToDate = true; + + false + 0 + 0.0 + + + 1729511748867 + t_GCisPausedScreen + -140 + -80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Onpauzeer aansluiting +en +simuleer jaar voor KPI's + + SansSerif + 28 + + + CENTER + + + 1729511748869 + image_simulateYearToCalculateCostsSmall1 + -420 + -70 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 102.315 + 99.723 + 0.0 + + + zerointerfaceloader + icon_greater_than.png + + + false + + + + + 1729511999717 + txt_GCisPaused + -235 + -230 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Aansluiting is gepauzeerd! + + SansSerif + 72 + + + CENTER + + + + + false + 1740047018374 + cb_showGridloadPlot + 1450 + 130 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + uI_Results.f_setChartGridLoad_Presentation(null, null, cb_showGridloadPlot.isSelected()); +uI_Results.f_setChartSankey_Presentation(null, null, !cb_showGridloadPlot.isSelected()); + +if(cb_showGridloadPlot.isSelected()){ + txt_chartNameRight.setText("Netbelasting"); +} +else{ + txt_chartNameRight.setText("Energiestromen"); +} + + + + Toon Netbelasting duurkromme + false + + + + 1747234551900 + gr_heatingOptionBlockerCHP + true + 140 + 1500 + + true + true + false + true + SHAPE_DRAW_2D3D + 150 + 350 + false + 0 + 0.0 + + + 1747234424173 + rect_heatingOptionClickBlockerCHP + -140 + -15 + + true + true + false + SHAPE_DRAW_2D3D + rb_heatingTypePrivateUI.isVisible() + ; + false + 0 + 10 + 1 + + null + SOLID + 280 + 30 + 0.0 + + null + + + 1747234398590 + rect_heatingOptionBlockerCHP + -140 + -15 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 280 + 30 + 0.0 + -65536 + v_companyUIBackgroundColorSliders + null + + + + + 1747316158314 + gr_errorScreen + 6480 + 600 + + true + false + false + SHAPE_DRAW_2D3D + 960 + 500 + false + 0 + 0.0 + + + 1747316158316 + rect_errorScreenGrayOut + -960 + -500 + + true + true + false + SHAPE_DRAW_2D3D + //traceln(); + false + 0 + 10 + 1 + -2049715245 + null + SOLID + 1920 + 980 + 0.0 + -2049715245 + null + + + 1747316158318 + rect_errorScreenClickBlocking + -960 + -500 + + true + true + false + SHAPE_DRAW_2D3D + double click_block = 0; + false + 0 + 10 + 1 + -2049715245 + null + null + SOLID + 1920 + 980 + 0.0 + -2049715245 + null + null + + + 1747326072959 + rect_errorMessage + -270 + -120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 4 + -65536 + null + SOLID + 540 + 200 + 0.0 + -1 + null + 10 + + + 1747316158322 + t_errorMessage + 0 + -70 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + TYPE YOUR ERROR MESSAGE HERE + + SansSerif + 24 + + + CENTER + + + 1747316158324 + button_errorOK + 0 + 50 + + true + true + false + SHAPE_DRAW_2D3D + gr_errorScreen.setVisible(false); + false + 0 + 0.0 + + + 1747316158326 + rect_errorOK + -60 + -20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 120 + 40 + 0.0 + -1 + null + + + 1747316158328 + txt_errorOK + 0 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Ok + + SansSerif + 18 + + + CENTER + + + + + + + 1760974606250 + txt_setSimYearScreen + -440 + 800 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simulate year screen + + SansSerif + 12 + + + LEFT + + + 1760976852165 + txt_selectDifferentOwnedGC + -440 + 250 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Select different owned GC + + SansSerif + 12 + + + LEFT + + + + + + + 1708523262441 + va_companyUI + 0 + 0 + + false + true + false + company UI + 1920 + 980 + + + + + 1709049506453 + UI_EnergyHub + 1754045666929 + import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.annotation.JsonAutoDetect; + +import java.io.IOException; + +import energy.lux.uplux.*; +import java.util.UUID; +import java.util.function.Predicate; + zero_Interface.c_UIResultsInstances.add(uI_Results); + false + + 1709049506460 + 1709049506460 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089954 + true + 1709107200000 + + 0 + HOUR + + + 1 + HOUR + + + + 1709049506456 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1709049506460 + 1709049506454 + + + 1753435936823 + v_energyHubCoop + -370 + 290 + + false + true + true + + EnergyCoop + + + + 1756801110760 + v_scenarioName + -350 + 400 + + false + true + true + + String + + + + 1756806431965 + v_objectMapper + -710 + 350 + + false + true + true + + ObjectMapper + + + + 1753436054975 + p_energyHubBackGroundColor + -800 + 60 + + false + true + true + + Color + NONE + false + + new Color(198, 251, 198) + + + 1753436054973 + COLOR_PICKER + 0 + 100 + NO_DELIMETER + + + + + 1753436082357 + p_energyHubLineColor + -800 + 80 + + false + true + true + + Color + NONE + false + + new Color(118, 171, 118) + + + 1753436082355 + COLOR_PICKER + 0 + 100 + NO_DELIMETER + + + + + 1753705811916 + p_energyHubLineWidth + -800 + 100 + + false + true + true + + double + NONE + false + + 2.0 + + + 1753705811914 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1753705865456 + p_energyHubLineStyle + -800 + 120 + + false + true + true + + LineStyle + NONE + false + + LINE_STYLE_SOLID + + + 1753705865454 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1756388977317 + c_sliderEAGCs + -370 + 250 + + false + true + true + + ArrayList + GridConnection + String + + + + 1756806491891 + c_GISregions + -710 + 400 + + false + true + true + + LinkedHashMap + String + GISRegion + + + + + + VOID + double + 1753446461346 + f_initializeEnergyHubDashboard + -390 + 30 + + false + true + true + //Set map to correct layout +zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); +zero_Interface.b_updateLiveCongestionColors = false; + +// Zoom map to the selected EHub members +f_zoomMapToBuildings(); + +// Sets the names of the members below the map (call before adding sliders) +f_initializeEnergyHubMemberNames(); + +//Add slider GC Needs to happen before EnergyCoop creation in some way!!! +f_addSliderEAGridConnections(); + +//Initialize the ui_results +f_initializeEnergyHubResultsUI(); + +//Initialize the ui_tabs +f_initializeEnergyHubTabs(); + +//Initialize custom user saved scenarios +f_initializeUserSavedScenarios(combobox_selectScenario); + + +runSimulation(); + + + VOID + double + 1753694353046 + f_initializeEnergyHubResultsUI + -370 + 125 + + false + true + true + //Initialize the ui_results +uI_Results.energyModel = zero_Interface.energyModel; +uI_Results.v_interfaceViewAreaXOffset = zero_Interface.va_EHubDashboard.getX(); +uI_Results.v_interfaceViewAreaYOffset = zero_Interface.va_EHubDashboard.getY(); + +//Style resultsUI +f_styleEnergyHubResultsUI(); + +//Set ResultsUI radiobutton setup +uI_Results.v_selectedRadioButtonSetup = OL_RadioButtonSetup.DEFAULT_AND_GESPREKSLEIDRAADBEDRIJVEN_AND_GTO; + + +//Connect resultsUI +uI_Results.f_initializeResultsUI(); +uI_Results.f_updateResultsUI(v_energyHubCoop); + + + VOID + double + 1753694406870 + f_initializeEnergyHubTabs + -370 + 195 + + false + true + true + //Initialize the ui_tabs +uI_Tabs.add_pop_tabElectricity(); +uI_Tabs.add_pop_tabHeating(); +uI_Tabs.add_pop_tabMobility(); + +//Adjust location of buttons to account for missing e-hub tab +uI_Tabs.gr_energyDemandSettings.setX(zero_Interface.uI_Tabs.gr_energyDemandSettings.getX()+40); + +// Group visibilities +// When using an extension of a generic tab don't forget to typecast it! +if (zero_Interface.project_data.project_type() == OL_ProjectType.RESIDENTIAL) { + ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_ResidentialArea().setVisible(true); + ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersResidentialArea().setVisible(true); + ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_residential().setVisible(true); +} +else { + ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_Businesspark().setVisible(true); + ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersCompanies().setVisible(true); + ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_default().setVisible(true); +} + +//Initialize slider gcs and set sliders +uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), new ArrayList<>()); + +uI_Tabs.v_presentationXOffset += zero_Interface.va_EHubDashboard.getX(); +uI_Tabs.v_presentationYOffset += zero_Interface.va_EHubDashboard.getY(); + + + VOID + double + 1753694556229 + f_styleEnergyHubResultsUI + -350 + 145 + + false + true + true + uI_Results.f_styleAllCharts(white, p_energyHubLineColor, p_energyHubLineWidth, p_energyHubLineStyle); +uI_Results.f_styleResultsUIHeader(p_energyHubLineColor, p_energyHubLineColor, p_energyHubLineWidth, p_energyHubLineStyle); + + + VOID + double + 1755014317038 + f_addSliderEAGridConnections + -370 + 100 + + false + true + true + //Check if a slider EA GC has been manually selected +GridConnection manualSelectedSliderGC_solarFarm = null; +GridConnection manualSelectedSliderGC_windFarm = null; +GridConnection manualSelectedSliderGC_gridBattery = null; +for (GridConnection GC : v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()) { + if(GC instanceof GCEnergyProduction){ + if (((GCEnergyProduction)GC).p_isSliderGC) { + if(manualSelectedSliderGC_solarFarm == null && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + manualSelectedSliderGC_solarFarm = GC; + } + else if(manualSelectedSliderGC_windFarm == null && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ + manualSelectedSliderGC_windFarm = GC; + } + } + } + if(manualSelectedSliderGC_gridBattery == null && GC instanceof GCGridBattery && ((GCGridBattery)GC).p_isSliderGC && GC.p_batteryAsset != null){ + manualSelectedSliderGC_gridBattery = GC; + } +} + +//If a slider EA GC has not been manually selected: +GridConnection sliderGC_solarFarm = null; +GridConnection sliderGC_windFarm = null; +GridConnection sliderGC_gridBattery = null; +if(manualSelectedSliderGC_solarFarm == null){ + sliderGC_solarFarm = findFirst(zero_Interface.energyModel.EnergyProductionSites, gc -> gc.p_gridConnectionID.equals("EnergyHub solarfarm slider")); +} +if(manualSelectedSliderGC_windFarm == null){ + sliderGC_windFarm = findFirst(zero_Interface.energyModel.EnergyProductionSites, gc -> gc.p_gridConnectionID.equals("EnergyHub windfarm slider")); +} +if(manualSelectedSliderGC_gridBattery == null){ + sliderGC_gridBattery = findFirst(zero_Interface.energyModel.GridBatteries, gc -> gc.p_gridConnectionID.equals("EnergyHub battery slider")); +} + +//Add to coop and other collections +if(sliderGC_solarFarm != null){ + c_sliderEAGCs.add(sliderGC_solarFarm); +} +if(sliderGC_windFarm != null){ + c_sliderEAGCs.add(sliderGC_windFarm); +} +if(sliderGC_gridBattery != null){ + c_sliderEAGCs.add(sliderGC_gridBattery); +} + +v_energyHubCoop.f_addMemberGCs(c_sliderEAGCs); + + + VOID + double + 1756302765458 + f_initializeEnergyHubMemberNames + -370 + 55 + + false + true + true + t_energyHubMember1.setVisible(false); +t_energyHubMember2.setVisible(false); +t_energyHubMember3.setVisible(false); +t_energyHubMember4.setVisible(false); +t_energyHubMember5.setVisible(false); +t_energyHubMember6.setVisible(false); +t_energyHubMember7.setVisible(false); +t_energyHubMemberOthers.setVisible(false); + +int maxChars = 25; +String name = ""; + +// Filter out GCs without building that are sliderGCs +List<GridConnection> members = v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(); +Predicate<GridConnection> isGenericSliderGC = gc -> (gc instanceof GCGridBattery && ((GCGridBattery)gc).p_isSliderGC && gc.c_connectedGISObjects.size() == 0) || (gc instanceof GCEnergyProduction && ((GCEnergyProduction)gc).p_isSliderGC && gc.c_connectedGISObjects.size() == 0); +members.removeIf(isGenericSliderGC); + +try { + name = members.get(0).p_ownerID; + t_energyHubMember1.setText(f_formatName(name, maxChars)); + t_energyHubMember1.setVisible(true); + name = members.get(1).p_ownerID; + t_energyHubMember2.setText(f_formatName(name, maxChars)); + t_energyHubMember2.setVisible(true); + name = members.get(2).p_ownerID; + t_energyHubMember3.setText(f_formatName(name, maxChars)); + t_energyHubMember3.setVisible(true); + name = members.get(3).p_ownerID; + t_energyHubMember4.setText(f_formatName(name, maxChars)); + t_energyHubMember4.setVisible(true); + name = members.get(4).p_ownerID; + t_energyHubMember5.setText(f_formatName(name, maxChars)); + t_energyHubMember5.setVisible(true); + name = members.get(5).p_ownerID; + t_energyHubMember6.setText(f_formatName(name, maxChars)); + t_energyHubMember6.setVisible(true); + name = members.get(6).p_ownerID; + t_energyHubMember7.setText(f_formatName(name, maxChars)); + t_energyHubMember7.setVisible(true); + if (members.size() == 8) { + name = members.get(7).p_ownerID; + t_energyHubMemberOthers.setText(f_formatName(name, maxChars)); + t_energyHubMemberOthers.setVisible(true); + } + else if (members.size() > 8) { + int nbOthers = members.size() - 7; + t_energyHubMemberOthers.setText("En nog " + nbOthers + " andere leden"); + t_energyHubMemberOthers.setVisible(true); + } +} +catch (Exception exception) { + if (exception instanceof IndexOutOfBoundsException) { + traceln("Ignoring IndexOutOfBoundsException"); // do nothing + } + else { + exception.printStackTrace(); + } +} + + + VOID + double + 1756395572049 + f_initializeUserSavedScenarios + -370 + 340 + + false + true + true + + combo + ShapeComboBox + + if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { + return; +} + +var repository = UserScenarioRepository.builder() + .userId(UUID.fromString(zero_Interface.user.userIdToken())) + .modelName(zero_Interface.project_data.project_name()) + .build(); + +var scenarioList = repository.listUserScenarios(); +int nbScenarios = scenarioList.size(); +String[] scenarioNames = new String[nbScenarios]; +for (int i = 0; i < nbScenarios; i++) { + scenarioNames[i] = scenarioList.get(i).getName(); +} + +combo.setItems(scenarioNames); + + + VOID + double + 1756805429105 + f_loadScenario + -370 + 360 + + false + true + true + + index + int + + zero_Interface.f_setScenarioToCustom(); + +for (UI_Results ui_results : zero_Interface.c_UIResultsInstances) { + if (ui_results.f_getSelectedObjectData() != null) { + zero_Interface.f_enableLivePlotsOnly(ui_results); + } +} + + +if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { + zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's in te laden. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + return; +} +traceln("Loading modelSave..."); +//pauseSimulation(); + +// Collect GIS_Objects into hashmap, to link to new EnergyModel. +zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +pauseSimulation(); +try { + v_objectMapper = new ObjectMapper(); + f_addMixins(); + + var repository = UserScenarioRepository.builder() + .userId(UUID.fromString(zero_Interface.user.userIdToken())) + .modelName(zero_Interface.project_data.project_name()) + .build(); + + var scenarioList = repository.listUserScenarios(); + + // Deserialize the JSON into a new EnergyModel instance: + var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(index).getId()); + + /*int n = 200; // how many characters you want + byte[] buffer = new byte[n]; + int read = jsonStream.read(buffer, 0, n); + + if (read > 0) { + String preview = new String(buffer, 0, read, "UTF-8"); + System.out.println(preview); + }*/ + + //jsonStream.close(); + + //traceln("jsonStream: %s", jsonStream.toString().substring(0,30)); + J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); + //J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); + + EnergyModel deserializedEnergyModel = saveObject.energyModel; + + // Reconstruct all Agents + f_reconstructEnergyModel(deserializedEnergyModel); + f_reconstructGridConnections(deserializedEnergyModel); + f_reconstructActors(deserializedEnergyModel); + f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); + + f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); + + // Get profilePointer tableFunctions from 'original' energyModel + deserializedEnergyModel.c_profiles.forEach(x->{ + J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); + x.setTableFunction(origProfile.getTableFunction()); + }); + // get heatingTypeHashmap from 'old' energyModel. + deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; + + zero_Interface.zero_loader.energyModel = deserializedEnergyModel; + zero_Interface.energyModel = deserializedEnergyModel; + zero_Interface.uI_Results.energyModel = deserializedEnergyModel; + uI_Results.energyModel = deserializedEnergyModel; + + deserializedEnergyModel.f_startAfterDeserialisation(); + + f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); + + + // Putting back the ordered collections in the interface + f_reconstructOrderedCollections(saveObject); + + //zero_Interface.f_clearSelectionAndSelectEnergyModel(); + + /* + zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); + uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); + zero_Interface.f_updateMainInterfaceSliders(); + + zero_Interface.f_resetSettings(); + */ + + ///button_exit.action(); + + // v_energyHubCoop not updated to point to 'new' coop + //uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); + + ///zero_Interface.f_simulateYearFromMainInterface(); + + v_energyHubCoop = findFirst(zero_Interface.energyModel.pop_energyCoops,x->x.p_actorID.equals("eHubConfiguratorCoop")); + if (v_energyHubCoop == null){ + throw new RuntimeException("No energyCoop found with p_actorID = eHubConfiguratorCoop"); + } + zero_Interface.v_customEnergyCoop = v_energyHubCoop; + // Update the E-Hub Dashboard with the loaded E-Hub from savefile + f_initializeEnergyHubMemberNames(); + uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); + uI_Results.f_updateResultsUI(v_energyHubCoop); + + // Update the main interface with the loaded E-Hub from savefile + zero_Interface.c_selectedGridConnections = new ArrayList<>(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()); + + // Update the main interface tabs with the GCs from the new engine + zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); + + // Reset all colors on the GIS map + zero_Interface.energyModel.pop_GIS_Buildings.forEach(x -> zero_Interface.f_styleAreas(x)); + zero_Interface.energyModel.pop_GIS_Objects.forEach(x -> zero_Interface.f_styleAreas(x)); + zero_Interface.energyModel.pop_GIS_Parcels.forEach(x -> zero_Interface.f_styleAreas(x)); + + // Color all selected GC + for (GridConnection gc : zero_Interface.c_selectedGridConnections) { + gc.c_connectedGISObjects.forEach(x -> x.gisRegion.setFillColor(zero_Interface.v_selectionColor)); + } + + // Zoom GIS Map to selected buildings + f_zoomMapToBuildings(); + + // Simulate a year + gr_simulateYearEnergyHub.setVisible(false); + gr_loadIconYearSimulationEnergyHub.setVisible(true); + + + zero_Interface.f_simulateYearFromMainInterface(); + + traceln("ModelSave loaded succesfully!"); + + //zero_Interface.b_inEnergyHubSelectionMode = true; + //zero_Interface.f_finalizeEnergyHubConfiguration(); + + //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); + + /* + Date startDate = getExperiment().getEngine().getStartDate(); + int day = getExperiment().getEngine().getDayOfMonth(); + int month = getExperiment().getEngine().getMonth(); + traceln("day: " + day); + traceln("month: " + month); + startDate.setMonth(startDate.getMonth() - month); + startDate.setDate(startDate.getDate() - day); + getExperiment().getEngine().setStartDate(startDate); + */ + +} catch (IOException e) { + e.printStackTrace(); +} + + + + + VOID + double + 1756805443177 + f_saveScenario + -370 + 380 + + false + true + true + + scenarioName + String + + if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { + zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's op te slaan. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + return; +} + +traceln("Starting model serialisation..."); +J_ModelSave saveObject = new J_ModelSave(); +saveObject.energyModel = zero_Interface.energyModel; + +zero_Interface.energyModel.pop_gridNodes.forEach(x->saveObject.c_gridNodes.add(x)); +zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); + +saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; +saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; +saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; +saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; +saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; +saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; +saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; +saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; +saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; +saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; +saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; +saveObject.c_scenarioMap_Current = zero_Interface.c_scenarioMap_Current; +saveObject.c_scenarioMap_Future = zero_Interface.c_scenarioMap_Future; + +List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps = new ArrayList<LinkedHashMap<String, List<J_EAVehicle>>>(); + +saveObject.c_additionalVehicleHashMaps = c_additionalVehicleHashMaps; + +v_objectMapper = new ObjectMapper(); +f_addMixins(); +v_objectMapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE); +traceln("Model serialisation has been completed."); + +traceln("Trying to save to file..."); +try { + + //v_objectMapper.writeValue(new File("energyModel.json"), energyModel); + + //v_objectMapper.writeValue(new File("ModelSave.json"), saveObject); + + var repository = UserScenarioRepository.builder() + .userId(UUID.fromString(zero_Interface.user.userIdToken())) + .modelName(zero_Interface.project_data.project_name()) + .build(); + + repository.saveUserScenario( + scenarioName, + v_objectMapper.writeValueAsBytes(saveObject) + ); + + traceln("Scenario saved to file."); + +} catch (IOException e) { + traceln("Saving to file has failed."); + e.printStackTrace(); +} + + + + VOID + double + 1756806431955 + f_addMixins + -710 + 370 + + false + true + true + v_objectMapper.addMixIn(Agent.class, AgentMixin.class); +//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); + +//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); +//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); + +//Ignore classes + +v_objectMapper.addMixIn(java.awt.Font.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(java.awt.Color.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(java.awt.Paint.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeLine.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeLineFill.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeText.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(DataSet.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(Level.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(TableFunction.class, IgnoreClassMixin.class); +//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeModelElementsGroup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeButton.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.analysis.TimePlot.class, IgnoreClassMixin.class); + + +// Weirdness regarding material handling toolbox +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); + + + + VOID + double + 1756806501010 + f_setEngineInputDataAfterDeserialisation + Functie van gillis voor inladen weer data! + -987 + 310 + + false + true + true + + deserializedEnergyModel + EnergyModel + + deserializedEnergyModel.p_truckTripsCsv = zero_Interface.energyModel.p_truckTripsCsv; +deserializedEnergyModel.p_householdTripsCsv = zero_Interface.energyModel.p_householdTripsCsv; +deserializedEnergyModel.p_cookingPatternCsv = zero_Interface.energyModel.p_cookingPatternCsv; + +//deserializedEnergyModel.avgc_data = zero_Interface.energyModel.avgc_data; +deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; + + + VOID + double + 1756806501019 + f_reconstructGridConnections + -986.667 + 352 + + false + true + true + + deserializedEnergyModel + EnergyModel + + ArrayList<GridConnection> allConnections = new ArrayList<>(); +allConnections.addAll(deserializedEnergyModel.c_gridConnections); +allConnections.addAll(deserializedEnergyModel.c_pausedGridConnections); + +for(GridConnection GC : allConnections){ + GC.energyModel = deserializedEnergyModel; + if (GC instanceof GCHouse){ + //toMove.add(GC); + f_reconstructAgent(GC, deserializedEnergyModel.Houses, deserializedEnergyModel); + } else if (GC instanceof GCEnergyProduction) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyProductionSites, deserializedEnergyModel); + } else if (GC instanceof GCEnergyConversion) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyConversionSites, deserializedEnergyModel); + } else if (GC instanceof GCGridBattery) { + f_reconstructAgent(GC, deserializedEnergyModel.GridBatteries, deserializedEnergyModel); + } else if (GC instanceof GCNeighborhood) { + f_reconstructAgent(GC, deserializedEnergyModel.Neighborhoods, deserializedEnergyModel); + } else if (GC instanceof GCPublicCharger) { + f_reconstructAgent(GC, deserializedEnergyModel.PublicChargers, deserializedEnergyModel); + } else if (GC instanceof GCUtility) { + f_reconstructAgent(GC, deserializedEnergyModel.UtilityConnections, deserializedEnergyModel); + } + //GC.f_startAfterDeserialisation(); +} + + + + + VOID + double + 1756806501029 + f_reconstructEnergyModel + -986.667 + 332 + + false + true + true + + energyModel + EnergyModel + + // Code Instead of Agent.goToPopulation() (which resets all parameters to default!) +/* +try{ // Reflection trick to get to Agent.owner private field + energyModel.forceSetOwner(energyModel, pop_energyModels); +} catch (Exception e) { + e.printStackTrace(); +} +*/ + +Agent root = zero_Interface.getRootAgent(); +traceln("root: " + root); +energyModel.restoreOwner(zero_Interface.zero_loader); + +energyModel.setEngine(getEngine()); +energyModel.instantiateBaseStructure_xjal(); +energyModel.setEnvironment(zero_Interface.zero_loader.getEnvironment()); + +traceln("EnergyModel owner: %s", energyModel.getOwner()); + +energyModel.create(); +//energyModel.start(); // Why is this needed? + + + VOID + double + 1756806501040 + f_reconstructAgent + -975 + 429 + + false + true + true + + agent + Agent + + + pop + AgentArrayList + + + energyModel + EnergyModel + + /* // Code Instead of Agent.goToPopulation() (which resets many variables to default!) +try{ // Reflection trick to get to Agent.owner private field + if (agent instanceof GridNode) { + ((GridNode)agent).forceSetOwner(agent,pop); + } else if (agent instanceof GridConnection) { + ((GridConnection)agent).forceSetOwner(agent,pop); + } else if (agent instanceof Actor) { + ((Actor)agent).forceSetOwner(agent,pop); + } else if (agent instanceof GIS_Object) { + ((GIS_Object)agent).forceSetOwner(agent,pop); + } +} catch (Exception e) { + e.printStackTrace(); +}*/ + +agent.restoreOwner(energyModel); // simply sets agent.d = root, should replace reflection hack +agent.restoreCollection_xjal(pop); // simple sets agent.j = pop, should replace reflection hack + +agent.setEngine(getEngine()); +agent.instantiateBaseStructure_xjal(); +agent.setEnvironment(pop.getEnvironment()); + +pop._add(agent); // Add to the population +//int popSize = pop.size(); +//pop.callCreate(agent, popSize); // Update population object +agent.create(); + + + VOID + double + 1756806501050 + f_reconstructActors + -987 + 372 + + false + true + true + + deserializedEnergyModel + EnergyModel + + for(Actor AC : deserializedEnergyModel.c_actors){ + + if (AC instanceof ConnectionOwner) { + ((ConnectionOwner)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_connectionOwners, deserializedEnergyModel); + } else if (AC instanceof EnergySupplier) { + ((EnergySupplier)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energySuppliers, deserializedEnergyModel); + } else if (AC instanceof EnergyCoop) { + ((EnergyCoop)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energyCoops, deserializedEnergyModel); + //((EnergyCoop)AC).f_startAfterDeserialisation(); + } else if (AC instanceof GridOperator) { + ((GridOperator)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_gridOperators, deserializedEnergyModel); + } + } + + + + VOID + double + 1756806501060 + f_reconstructGIS_Objects + -987 + 412 + + false + true + true + + deserializedEnergyModel + EnergyModel + + + c_GISObjects + ArrayList<GIS_Object> + + for(GIS_Object GO : c_GISObjects){ + GO.gisRegion = c_GISregions.get(GO.p_id); + + if (GO instanceof GIS_Building) { + ((GIS_Building)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Buildings, deserializedEnergyModel); + } else if (GO instanceof GIS_Parcel) { + ((GIS_Parcel)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Parcels, deserializedEnergyModel); + } else { + GO.energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Objects, deserializedEnergyModel); + //GO.f_startAfterDeserialisation(); + } + GO.f_resetStyle(); +} + + + VOID + double + 1756806501070 + f_reconstructGridNodes + -987 + 392 + + false + true + true + + deserializedEnergyModel + EnergyModel + + + c_gridNodes + ArrayList<GridNode> + + for(GridNode GN : c_gridNodes){ + GN.energyModel = deserializedEnergyModel; + f_reconstructAgent(GN, deserializedEnergyModel.pop_gridNodes, deserializedEnergyModel); +} + + + + VOID + double + 1756806501080 + f_reconstructOrderedCollections + -990 + 450 + + false + true + true + + saveObject + J_ModelSave + + zero_Interface.c_orderedPVSystemsCompanies = saveObject.c_orderedPVSystemsCompanies; +zero_Interface.c_orderedPVSystemsHouses = saveObject.c_orderedPVSystemsHouses; +zero_Interface.c_orderedVehicles = saveObject.c_orderedVehicles; +zero_Interface.c_orderedHeatingSystemsCompanies = saveObject.c_orderedHeatingSystemsCompanies; +zero_Interface.c_orderedHeatingSystemsHouses = saveObject.c_orderedHeatingSystemsHouses; +zero_Interface.c_orderedVehiclesPrivateParking = saveObject.c_orderedVehiclesPrivateParking; +zero_Interface.c_orderedParkingSpaces = saveObject.c_orderedParkingSpaces; +zero_Interface.c_orderedV1GChargers = saveObject.c_orderedV1GChargers; +zero_Interface.c_orderedV2GChargers = saveObject.c_orderedV2GChargers; +zero_Interface.c_orderedPublicChargers = saveObject.c_orderedPublicChargers; +zero_Interface.c_mappingOfVehiclesPerCharger = saveObject.c_mappingOfVehiclesPerCharger; +zero_Interface.c_scenarioMap_Current = saveObject.c_scenarioMap_Current; +zero_Interface.c_scenarioMap_Future = saveObject.c_scenarioMap_Future; + +/* +List<ConnectionOwner> c_COCompanies = findAll(zero_Interface.energyModel.pop_connectionOwners, p -> p.p_connectionOwnerType == OL_ConnectionOwnerType.COMPANY); + +int i = 0; +for (ConnectionOwner CO : c_COCompanies) { + UI_company companyUI = zero_Interface.c_companyUIs.get(CO.p_connectionOwnerIndexNr); + companyUI.p_company = CO; + companyUI.c_ownedGridConnections = companyUI.p_company.f_getOwnedGridConnections(); + companyUI.c_additionalVehicles = saveObject.c_additionalVehicleHashMaps.get(i); + companyUI.f_setSelectedGCSliders(); + i++; +} +*/ + + + + RETURNS_VALUE + String + 1762259840876 + f_formatName + -350 + 77 + + false + true + true + + fullName + String + + + maxChars + int + + if (fullName.length() <= maxChars) { + return fullName; +} +StringBuilder output = new StringBuilder(); +String[] subNames = fullName.split(" "); +int remainingChars = maxChars; +for (String subName : subNames) { + remainingChars -= subName.length() + 1; + if (remainingChars >= 0) { + output.append(subName); + output.append(" "); + } +} +// If the output is empty (because the first word is longer than maxChars) cut the first word off at maxChars +if (output.toString().length() == 0) { + output.append(fullName.substring(0, maxChars)); +} +output.append("..."); +return output.toString(); + + + VOID + double + 1762352238220 + f_zoomMapToBuildings + -370 + 470 + + false + true + true + List<GIS_Object> gisObjects = new ArrayList<>(); +for (GridConnection GC : v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()) { //Buildings that are grouped, select as well. + for (GIS_Object object : GC.c_connectedGISObjects) { //Buildings that are grouped, select as well. + gisObjects.add(object); + object.gisRegion.setFillColor(zero_Interface.v_selectionColorAddBuildings); + } +} +zero_Interface.f_setMapViewBounds(gisObjects); + + + VOID + double + 1762356123802 + f_loadScenarioButton + -380 + 580 + + false + true + true + // The function creates a new thread, otherwise visibilities are only updated after the entire button action is finished, which is not enough feedback for the user +gr_forceSaveLoadScenario.setVisible(false); +gr_loadScenario.setVisible(false); +zero_Interface.f_setLoadingScreen(true, zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + +new Thread( () -> { + f_loadScenario(combobox_selectScenario.getValueIndex()); + zero_Interface.f_setLoadingScreen(false, 0, 0); +}).start(); + + + VOID + double + 1762358078152 + f_saveScenarioButton + -380 + 600 + + false + true + true + // The function creates a new thread, otherwise visibilities are only updated after the entire button action is finished, which is not enough feedback for the user +gr_forceSaveLoadScenario.setVisible(false); +gr_saveScenario.setVisible(false); +zero_Interface.f_setLoadingScreen(true, zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + +new Thread( () -> { + f_saveScenario(v_scenarioName); + zero_Interface.f_setLoadingScreen(false, 0, 0); +}).start(); + + + + + + 1709049506454 + connections + 50 + -50 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1747229590464 + zero_Interface + 50 + -100 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + + + 1716193013122 + uI_Results + -350 + 165 + + false + true + true + 1753694648333 + + digital_twin_results + UI_Results + + + + digital_twin_results + UI_Results + 1704197366556 + + + + + energyModel + + + p_cutOff_MWh + + + gr_infoText + + zero_Interface.gr_infoText + + + + gr_closeInfoText + + zero_Interface.gr_closeInfoText + + + + t_infoTextDescription + + zero_Interface.t_infoTextDescription + + + + rect_infoText + + zero_Interface.rect_infoText + + + + p_currentActiveInfoBubble + + zero_Interface.p_currentActiveInfoBubble + + + + false + + 100 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 2658477089962 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722252541830 + uI_Tabs + -350 + 215 + + false + true + true + 1753694955483 + + zerointerfaceloader + UI_Tabs + + + + zerointerfaceloader + UI_Tabs + 1722245292191 + + + + false + + 100 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 2658477089960 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + + + 1709049506460 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1753702320529 + rect_backGround + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 1920 + 980 + 0.0 + -1 + p_energyHubBackGroundColor + null + + + 1747228615096 + rect_settings + 10 + 440 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + p_energyHubLineWidth + -16777216 + p_energyHubLineColor + null + SOLID + p_energyHubLineStyle + 380 + 530 + 0.0 + -1 + null + 10 + + + 1753702302932 + gr_uI_Tabs_presentation + 0 + -20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753694955483 + uI_Tabs_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1753706195332 + rect_uITabsModelBlocker + 400 + 10 + + false + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 0 + + null + SOLID + 1500 + 960 + 0.0 + -1 + null + + + 1747228569476 + rect_scenarios + 10 + 90 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + p_energyHubLineWidth + -16777216 + p_energyHubLineColor + null + SOLID + p_energyHubLineStyle + 380 + 300 + 0.0 + -1 + null + 10 + + + 1747228738085 + t_scenario + 200 + 100 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Scenario's + + SansSerif + 36 + + + CENTER + + + 1747228860030 + txt_settings + 200 + 460 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Instellingen + + SansSerif + 36 + + + CENTER + + + 1747231288371 + rect_map + 470 + 190 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + p_energyHubLineWidth + -16777216 + p_energyHubLineColor + null + SOLID + p_energyHubLineStyle + 870 + 550 + 0.0 + -1 + p_energyHubLineColor + null + 10 + + + 1753704667485 + gr_energyHubTitle + 910 + 80 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1747228628985 + rect_title + -440 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + p_energyHubLineWidth + -16777216 + p_energyHubLineColor + null + SOLID + p_energyHubLineStyle + 870 + 110 + 0.0 + -1 + null + 10 + + + 1747228659472 + txt_energyHubTitle + -25 + -25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + EnergyHub Configurator + + SansSerif + 48 + + + CENTER + + + 1753704116114 + gr_energyHubLogo + -350 + 5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753704116116 + ovalEnergyHubLogo + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 48.1235 + 40 + 0.0 + -3736634 + null + + + 1753704116118 + line + -24.062 + -16.844 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 47 + -6 + 0 + + + 1753704116120 + line1 + -14.437 + 14.437 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 37 + -38 + 0 + + + 1753704116122 + line2 + -24.062 + -9.625 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 42 + 35 + 0 + + + 1753704116124 + oval + -26.468 + -14.437 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 7.2185 + 40 + 0.0 + -657931 + null + + + 1753704116126 + oval1 + -19.25 + 19.25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 7.2185 + 40 + 0.0 + -657931 + null + + + 1753704116128 + line3 + 19.25 + 24.062 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + DOTTED + 1 + 0 + 1 + 0 + 1 + -42 + 0 + + + 1753704116130 + oval4 + 19.25 + 24.062 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 7.2185 + 40 + 0.0 + -657931 + null + + + 1753704116132 + oval3 + 24.062 + -21.656 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 7.2185 + 40 + 0.0 + -657931 + null + + + + + + + 1753694681879 + gr_uI_Results_presentation + 1420 + 200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753694648333 + uI_Results_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + false + 1753706469000 + button_reconfigureEnergyHub + 1100 + 760 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + pauseSimulation(); + +//Remove slider GCs from coop +v_energyHubCoop.f_removeMemberGCs(c_sliderEAGCs); + + +zero_Interface.f_getScenarioButtons().setPos( 19, 144); + +zero_Interface.map.setScale( 1.0, 1.0); +zero_Interface.map.setPos(410, 130); + +zero_Interface.va_Interface.navigateTo(); +zero_Interface.v_currentViewArea = zero_Interface.va_Interface; +//zero_Interface.c_selectedGridConnections = new ArrayList<GridConnection>(c_selectedEnergyHubGC); +//zero_Interface.v_customEnergyCoop = v_energyHubCoop; + +v_energyHubCoop = null; + +zero_Interface.b_inEnergyHubSelectionMode = true; + + + + Herconfigureer de EnergyHub + + + + 1753706641851 + gr_exitButton + 1245 + 85 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1747230291770 + rect_exit + -91.459 + -27.63 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 173.773 + 55.262 + 0.0 + -1 + null + 10 + + + false + 1747230286040 + button_exit + -86.886 + -23.025 + + true + true + false + SHAPE_DRAW_2D3D + + false + + true + //Remove slider GCs from coop +v_energyHubCoop.f_removeMemberGCs(c_sliderEAGCs); +c_sliderEAGCs.clear(); + +zero_Interface.f_getScenarioButtons().setPos( 19, 144); + +zero_Interface.map.setScale( 1.0, 1.0); +zero_Interface.map.setPos(410, 130); + + +zero_Interface.button_clearFilters.action(); +zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); +zero_Interface.cb_showFilterInterface.setSelected(false, true); +zero_Interface.f_updateMainInterfaceSliders(); + +zero_Interface.f_setStartView(); + +v_energyHubCoop = null; + +zero_Interface.b_inEnergyHubMode = false; + +runSimulation(); + + + + Terug naar hoofdscherm + + + + + + 1753883623020 + gr_simulateYearScreenEnergyHub + 1900 + 130 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753883623022 + gr_loadIconYearSimulationEnergyHub + -261 + -25 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753883623024 + rect_loadIconSmall + -219 + -50 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + p_energyHubLineColor + null + DASHED + 460 + 250 + 0.0 + -369756683 + null + + + 1753883623026 + image_loadIconSmall + -30 + 60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 60 + 60 + 0.0 + + + zerointerfaceloader + icon_loading.gif + + + false + + + 1753883623028 + t_loadIconSmall + 0 + 15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Jaar wordt gesimuleerd + + SansSerif + 22 + + + CENTER + + + + + 1753883623030 + gr_simulateYearEnergyHub + 270 + 20 + + true + false + false + SHAPE_DRAW_2D3D + -250 + 15 + false + 0 + 0.0 + + + 1753883623032 + rect_simulateYearScreenSmall + -230 + -90 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + DASHED + 460 + 180 + 0.0 + -1 + p_energyHubLineColor + null + + + 1753883623034 + gr_simulateYearButtonEnergyHub + 10 + 50 + + true + true + false + SHAPE_DRAW_2D3D + gr_simulateYearEnergyHub.setVisible(false); +gr_loadIconYearSimulationEnergyHub.setVisible(true); +zero_Interface.f_simulateYearFromMainInterface(); + false + 0 + 0.0 + + + 1753883623036 + t_simulateYearToCalculateCostsSmall + 10 + -60 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simuleer jaar voor KPI's + + SansSerif + 22 + + + CENTER + + + 1753883623038 + image_simulateYearToCalculateCostsSmall + -200 + -75 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 60 + 60 + 0.0 + + + zerointerfaceloader + icon_greater_than.png + + + false + + + + + + + + + 1756302313206 + rect_memberNames + 470 + 760 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 500 + 200 + 0.0 + -1 + null + 10 + + + 1756302430570 + t_energyHubMember1 + 500 + 820 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 1 + + SansSerif + 18 + + + LEFT + + + 1756302500322 + t_energyHubMembers + 720 + 765 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + E-Hub Members + + SansSerif + 36 + + + CENTER + + + 1756302556840 + t_energyHubMember3 + 500 + 850 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 3 + + SansSerif + 18 + + + LEFT + + + 1756302569681 + t_energyHubMember2 + 930 + 820 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 2 + + SansSerif + 18 + + + RIGHT + + + 1756302580797 + t_energyHubMember4 + 930 + 850 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 4 + + SansSerif + 18 + + + RIGHT + + + 1756302616239 + t_energyHubMember5 + 500 + 880 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 5 + + SansSerif + 18 + + + LEFT + + + 1756302630734 + t_energyHubMember7 + 500 + 910 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 7 + + SansSerif + 18 + + + LEFT + + + 1756302634233 + t_energyHubMemberOthers + 930 + 910 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Etc + + SansSerif + 18 + + + RIGHT + + + 1756302654947 + t_energyHubMember6 + 930 + 880 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 6 + + SansSerif + 18 + + + RIGHT + + + 1758546856343 + gr_forceSaveLoadScenario + 0 + -1500 + + true + false + false + SHAPE_DRAW_2D3D + 0 + false + 0 + 0.0 + + + 1758548705448 + rect_forceSaveLoadScenarioClickBlocker1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + ; + false + 0 + 10 + 1 + + null + SOLID + 10 + 980 + 0.0 + 16777215 + null + + + 1758548705454 + rect_forceSaveLoadScenarioClickBlocker2 + 10 + 0 + + true + true + false + SHAPE_DRAW_2D3D + ; + false + 0 + 10 + 1 + + null + SOLID + 380 + 275 + 0.0 + 16777215 + null + + + 1758548705462 + rect_forceSaveLoadScenarioClickBlocker3 + 10 + 390 + + true + true + false + SHAPE_DRAW_2D3D + ; + false + 0 + 10 + 1 + + null + SOLID + 380 + 590 + 0.0 + 16777215 + null + + + 1758548705469 + rect_forceSaveLoadScenarioClickBlocker4 + 390 + 0 + + true + true + false + SHAPE_DRAW_2D3D + ; + false + 0 + 10 + 1 + + null + SOLID + 1530 + 980 + 0.0 + 16777215 + null + + + 1758546863803 + rect_forceSaveLoadScenario1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 10 + 980 + 0.0 + -1765752640 + zero_Interface.v_forcedClickScreenColor + null + + + 1758546863807 + rect_forceSaveLoadScenario2 + 10 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 380 + 275 + 0.0 + -1765752640 + zero_Interface.v_forcedClickScreenColor + null + + + 1758546863812 + rect_forceSaveLoadScenario3 + 10 + 390 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 380 + 590 + 0.0 + -1765752640 + zero_Interface.v_forcedClickScreenColor + null + + + 1758546863816 + rect_forceSaveLoadScenario4 + 390 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1530 + 980 + 0.0 + -1765752640 + zero_Interface.v_forcedClickScreenColor + null + + + false + 1758548909849 + button_cancelSaveLoadScenario + 305 + 355 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + gr_saveScenario.setVisible(false); +gr_loadScenario.setVisible(false); +gr_forceSaveLoadScenario.setVisible(false); + + + + annuleren + + + + + + 1756800864903 + gr_saveAndLoadScenarios + 365 + -270 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1756805661168 + gr_saveScenario + -330 + 610 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1756805661170 + image_saveScenario + 225 + -5 + + true + true + false + SHAPE_DRAW_2D3D + f_saveScenarioButton(); + false + 0 + 32 + 32 + 0.0 + + + zerointerfaceloader + save_icon.png + + + false + + + false + 1756805661172 + eb_scenarioName + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + + + + true + v_scenarioName + + + + 1758545634906 + t_saveScenarioInstructions + 5 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geef je scenario een naam en klik rechts op het icoontje + + SansSerif + 10 + + + LEFT + + + + + 1756805661208 + gr_loadScenario + -330 + 665 + + true + false + false + SHAPE_DRAW_2D3D + 610 + false + 0 + 0.0 + + + 1756805661210 + image_loadScenario + 225 + -5 + + true + true + false + SHAPE_DRAW_2D3D + f_loadScenarioButton(); + false + 0 + 32 + 32 + 0.0 + + + zerointerfaceloader + load_icon.png + + + false + + + false + 1756805661212 + combobox_selectScenario + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + + + + false + + false + + + + 1758545638022 + t_loadScenarioInstructions + 5 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer een scenario in de keuzelijst en klik op het icoontje + + SansSerif + 10 + + + LEFT + + + + + false + 1758532628277 + button_saveScenario + -331 + 555 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + gr_loadScenario.setVisible(false); +gr_forceSaveLoadScenario.setVisible(true); +gr_saveScenario.setVisible(true); + + + + Bewaar een scenario + + + + false + 1758532628290 + button_loadScenario + -181 + 555 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_initializeUserSavedScenarios(combobox_selectScenario); +if (combobox_selectScenario.getItems().length == 0) { + zero_Interface.f_setErrorScreen("Er zijn nog geen scenario's opgeslagen.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + return; +} + +gr_saveScenario.setVisible(false); +gr_forceSaveLoadScenario.setVisible(true); +gr_loadScenario.setVisible(true); + + + + + + Laad een scenario in + + + + + + 1762252612468 + t_date + 490 + 160 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Datum + zero_Interface.energyModel.v_isRapidRun ? zero_Interface.f_getDateString() : zero_Interface.f_getDateAndTimeString() + + SansSerif + 16 + + + LEFT + + + + + + + 1747229800342 + va_main + 0 + 0 + + false + true + false + + <Width>1920</Width> + <Height>980</Height> + </Area> + </Areas> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1717506309790</Id> + <Name>UI_Hydrogen</Name> + <Folder>1754045666929</Folder> + <Generic>false</Generic> + <GenericParameter> + <Id>1717506309785</Id> + <Name>1717506309785</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089972</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1709107200000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1717506309786</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1717506309821</CurrentLevel> + <ConnectionsId>1717506309867</ConnectionsId> + <Variables> + <Variable Class="PlainVariable"> + <Id>1717506309811</Id> + <Name>v_sliderStartValue_priceLimit</Name> + <X>-930</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1717506309813</Id> + <Name>v_sliderMinValue_balanceLimit</Name> + <X>-930</X> + <Y>290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1717506309815</Id> + <Name>v_sliderMaxValue_balanceLimit</Name> + <X>-930</X> + <Y>310</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1717506309817</Id> + <Name>v_sliderStartValue_balanceLimit</Name> + <X>-930</X> + <Y>330</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1717506309819</Id> + <Name>v_sliderStartValue_ElectrolyserP_MW</Name> + <X>-930</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724859028571</Id> + <Name>v_colorH2_blue</Name> + <X>-940</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Color</Type> + <InitialValue Class="CodeValue"> + <Code>new Color(33, 164, 195)</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724859028735</Id> + <Name>v_colorH2_green</Name> + <X>-940</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Color</Type> + <InitialValue Class="CodeValue"> + <Code>new Color(104, 193, 103)</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724859028737</Id> + <Name>v_colorH2_white</Name> + <X>-940</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Color</Type> + <InitialValue Class="CodeValue"> + <Code>white</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724860189446</Id> + <Name>v_currentSelectedElectrolyser</Name> + <X>-360</X> + <Y>510</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724944015553</Id> + <Name>v_currentSelectedStorage</Name> + <X>-360</X> + <Y>530</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724944025798</Id> + <Name>v_currentSelectedFuelCell</Name> + <X>-360</X> + <Y>550</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1724921941090</Id> + <Name>p_amountOfGISObjects</Name> + <X>-360</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>int</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1724921941088</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1724921946872</Id> + <Name>p_amountOfGC</Name> + <X>-360</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>int</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1724921946870</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724859404446</Id> + <Name>c_GISObjects_Hydrogen</Name> + <X>-360</X> + <Y>80</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GIS_Object</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724859404449</Id> + <Name>c_gridConnections_Hydrogen</Name> + <X>-360</X> + <Y>100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GridConnection</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724859404455</Id> + <Name>c_connectedGridNodes</Name> + <X>-360</X> + <Y>120</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Object</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724943470087</Id> + <Name>c_connectionOwners_Hydrogen</Name> + <X>-360</X> + <Y>60</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>ConnectionOwner</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724943620236</Id> + <Name>c_hydrogenStorages</Name> + <X>-360</X> + <Y>260</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>J_EAStorageGas</ElementClass> + <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724943636670</Id> + <Name>c_hydrogenElectrolysers</Name> + <X>-360</X> + <Y>240</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>J_EAConversionElectrolyser</ElementClass> + <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724943685107</Id> + <Name>c_hydrogenFuelCells</Name> + <X>-360</X> + <Y>280</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>J_EAConversionFuelCell</ElementClass> + <ValueElementClass>J_EAStorageGas</ValueElementClass> + </Properties> + </Variable> + </Variables> + <Functions> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1717506309797</Id> + <Name>f_styleHydrogenUI</Name> + <X>-960</X> + <Y>50</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1717506309801</Id> + <Name>f_initializeUIElectrolyser</Name> + <X>-960</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>COC</Name> + <Type>ConnectionOwner</Type> + </Parameter> + <Body>//Instantiate sliders +f_instantiateSlidersElectrolyser(COC);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1717506309803</Id> + <Name>f_instantiateSlidersElectrolyser</Name> + <X>-940</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>COC</Name> + <Type>ConnectionOwner</Type> + </Parameter> + <Body>// Electrolyser Power start value +v_sliderStartValue_ElectrolyserP_MW = ((J_EAConversionElectrolyser)COC.f_getOwnedGridConnections().get(0).c_conversionAssets.get(0)).getInputCapacity_kW()/1000; +sl_electrolyserPower.setValue(v_sliderStartValue_ElectrolyserP_MW, false); +t_powerElectrolyser.setText(v_sliderStartValue_ElectrolyserP_MW + " MW"); + + +// Price limit start value +v_sliderStartValue_priceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_electricityPriceMaxForProfit_eurpkWh; +sl_electrolyserElectricityPriceLimit.setValue(v_sliderStartValue_priceLimit, false); +t_electricityPriceLimit.setText("€" + v_sliderStartValue_priceLimit); + + +//Balance limit start value +v_sliderStartValue_balanceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_gridNodeCongestionLimit_kW; +sl_electrolyserElectricityBalanceLimit.setValue(v_sliderStartValue_balanceLimit, false); +t_electricityBalanceLimit.setText(v_sliderStartValue_balanceLimit + " MW"); + + +//Radio button balance or price mode +int rb_value = 0; +switch (((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).p_electrolyserOperationMode){ + + case PRICE: + + rb_value = 0; + //Set visibility of price slider true and balance slider false + gr_electricityPriceSlider.setVisible(true); + gr_electricityBalanceSlider.setVisible(false); + break; + + case BALANCE: + rb_value = 1; + + //Set visibility of balance slider true and price slider false + gr_electricityBalanceSlider.setVisible(true); + gr_electricityPriceSlider.setVisible(false); + break; +} +rb_electrolyserMode.setValue(rb_value, false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724859526072</Id> + <Name>f_setScenarioFuture</Name> + <X>-340</X> + <Y>430</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>//Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +//Scenario code here + + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(1, false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724859526076</Id> + <Name>f_setScenario</Name> + <X>-360</X> + <Y>390</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>scenario_nr</Name> + <Type>int</Type> + </Parameter> + <Body>switch (scenario_nr){ + + case 0: // Current + + break; + + case 1: // Future + + break; + + case 2: // Hydrogen + traceln("Selected scenario: Hydrogen : DOES NOTHING YET"); + break; + + case 3: // Custom + + if(rb_scenariosPrivateUI.getValue() == 2){ + return; + } + rb_scenariosPrivateUI.setValue(2, false); + traceln("Selected scenario: Custom"); + break; + + default: + +} + +//Set 'results up to date' to false +zero_Interface.b_resultsUpToDate = false;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724859526078</Id> + <Name>f_setScenarioCurrent</Name> + <X>-340</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>//Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +//Scenario code here + + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(0, false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724859526080</Id> + <Name>f_setSelectedGC</Name> + <Description>Function that sets the sliders to match the currently present settings of the energy assets owned by the selected GC. Used when a connection owner has multiple grid connections, and wants to set the sliders of a different GC. </Description> + <X>-360</X> + <Y>340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Initialize slider presets to selected GC (min, max, etc.) +//f_setSliderPresets(); + +</Body> + </Function> + </Functions> + <AgentLinks> + <AgentLink> + <Id>1717506309867</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <ContainerLinks> + <ContainerLink> + <Id>1717506328385</Id> + <Name>zero_Interface</Name> + <X>50</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>Zero_Interface</ClassName> + </ActiveObjectClass> + </ContainerLink> + </ContainerLinks> + <Presentation> + <Level> + <Id>1717506309821</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1725003123558</Id> + <Name>rect_canvas</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineColorCode>v_colorH2_blue</LineColorCode> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>1920</Width> + <Height>980</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillColorCode>v_colorH2_white</FillColorCode> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1724944453528</Id> + <Name>rect_scenarios</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineColorCode>v_colorH2_blue</LineColorCode> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>170</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillColorCode>v_colorH2_white</FillColorCode> + <FillMaterial>null</FillMaterial> + </Rectangle> + <TimePlot> + <Id>1717506309825</Id> + <Name>plot</Name> + <X>400</X> + <Y>280</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <AutoUpdate>true</AutoUpdate> + <RecurrenceProperties> + <Id>1751013532514</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1709625600000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </RecurrenceProperties> + <EmbeddedIcon>false</EmbeddedIcon> + <Width>540</Width> + <Height>400</Height> + <BackgroundColor/> + <BorderColor/> + <ChartArea> + <XOffset>50</XOffset> + <YOffset>30</YOffset> + <Width>460</Width> + <Height>310</Height> + <BackgroundColor>-1</BackgroundColor> + <BorderColor>-16777216</BorderColor> + <GridColor>-12566464</GridColor> + </ChartArea> + <Legend> + <Place>SOUTH</Place> + <TextColor>-16777216</TextColor> + <Size>30</Size> + </Legend> + <Labels> + <HorLabelsPosition>DEFAULT</HorLabelsPosition> + <VerLabelsPosition>DEFAULT</VerLabelsPosition> + <TextColor>-12566464</TextColor> + </Labels> + <ShowLegend>true</ShowLegend> + <TimeWindowsMovementType>MOVEMENT_WITH_TIME</TimeWindowsMovementType> + <TimeWindowUnits>MODEL_TIME_UNIT</TimeWindowUnits> + <VerScaleFromExpression>0</VerScaleFromExpression> + <VerScaleToExpression>1</VerScaleToExpression> + <VerScaleType>AUTO</VerScaleType> + <DrawLine>true</DrawLine> + <Interpolation>LINEAR</Interpolation> + <SamplesToKeep>100</SamplesToKeep> + <TimeWindowExpression>100</TimeWindowExpression> + <FillAreaUnderLine>false</FillAreaUnderLine> + <LabelFormat>MODEL_TIME_UNITS</LabelFormat> + </TimePlot> + <Rectangle> + <Id>1717506309827</Id> + <Name>rect_sliders</Name> + <X>0</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineColorCode>v_colorH2_blue</LineColorCode> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>810</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillColorCode>v_colorH2_white</FillColorCode> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1717506309829</Id> + <Name>txt_electrolyserSliders</Name> + <X>70</X> + <Y>200</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electrolyser</Text> + <Font> + <Name>Calibri</Name> + <Size>22</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1717506309831</Id> + <Name>gr_buttonH2Electrolyser</Name> + <X>41</X> + <Y>211</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Oval> + <Id>1717506309833</Id> + <Name>ovalElectrolyserButton</Name> + <X>-1</X> + <Y>-1</Y> + <Label> + <X>0</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <RadiusX>20</RadiusX> + <RadiusY>40</RadiusY> + <Rotation>0.0</Rotation> + <FillColor>-14774017</FillColor> + <FillColorCode>v_colorH2_blue</FillColorCode> + <FillMaterial>null</FillMaterial> + </Oval> + <Text> + <Id>1717506309835</Id> + <Name>txt_h21</Name> + <X>-10</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-1</Color> + <Text>H2</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1717506309837</Id> + <Name>gr_electricityPriceSlider</Name> + <X>190</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1717506309839</Id> + <Name>txt_electricityPriceLimit</Name> + <X>-170</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electriciteits prijs limiet</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1717506309841</Id> + <Name>sl_electrolyserElectricityPriceLimit</Name> + <X>62</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>//Adjust the maximum price of electricity used to produce hydrogen +((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_electricityPriceMaxForProfit_eurpkWh = sl_electrolyserElectricityPriceLimit.getValue(); + +//Set text accordingly +t_electricityPriceLimit.setText( "€" + sl_electrolyserElectricityPriceLimit.getValue()); + + +//Set scenario to custom +f_setScenario(2); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>v_sliderStartValue_priceLimit</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>0.5</MaxValue> + <Step>0.01</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1717506309843</Id> + <Name>t_electricityPriceLimit</Name> + <X>40</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text> €0.00</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1717506309845</Id> + <Name>gr_electrolyserPowerSlider</Name> + <X>190</X> + <Y>280</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1717506309847</Id> + <Name>txt_powerElectrolyser</Name> + <X>-170</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Vermogen electrolyser</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1717506309849</Id> + <Name>sl_electrolyserPower</Name> + <X>62</X> + <Y>-20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>//Adjust the electric capacity +c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).setInputCapacity_kW(sl_electrolyserPower.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW + +//Adjust grid connection capacity as well (if needed) +if(sl_electrolyserPower.getValue()*1000 > 2000){ + ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_electrolyserPower.getValue()*1000; + ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_electrolyserPower.getValue()*1000; + ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_electrolyserPower.getValue()*1000; +} + +//Set the text accordingly +t_powerElectrolyser.setText(sl_electrolyserPower.getValue() + " MW"); + + +//Set scenario to custom +f_setScenario(2); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>10</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1717506309851</Id> + <Name>t_powerElectrolyser</Name> + <X>35</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>1.0 MW</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1717506309853</Id> + <Name>gr_electrolyserMode</Name> + <X>100</X> + <Y>340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="RadioButtons"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1717506309855</Id> + <Name>rb_electrolyserMode</Name> + <X>-80</X> + <Y>-20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="150" Height="50"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>switch (rb_electrolyserMode.getValue()){ + + case 0: + ((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.PRICE; + + //Set visibility of price slider true and balance slider false + gr_electricityPriceSlider.setVisible(true); + gr_electricityBalanceSlider.setVisible(false); + break; + + case 1: + ((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.BALANCE; + + //Set visibility of balance slider true and price slider false + gr_electricityBalanceSlider.setVisible(true); + gr_electricityPriceSlider.setVisible(false); + break; +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>VERTICAL</Orientation> + <Button>Prijs</Button> + <Button>Balans</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1717506309857</Id> + <Name>txt_electrolyserMode</Name> + <X>-80</X> + <Y>-40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electrolyser modus</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1717506309859</Id> + <Name>gr_electricityBalanceSlider</Name> + <X>190</X> + <Y>450</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1717506309861</Id> + <Name>txt_electricityBalanceLimit</Name> + <X>-170</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electriciteits balans limiet</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1717506309863</Id> + <Name>sl_electrolyserElectricityBalanceLimit</Name> + <X>62</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode> +//Adjust the maximum price of electricity used to produce hydrogen +((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_gridNodeCongestionLimit_kW = sl_electrolyserElectricityBalanceLimit.getValue()*1000; + +//Set text accordingly +t_electricityBalanceLimit.setText( sl_electrolyserElectricityBalanceLimit.getValue() + " MW" ); + +//Set scenario to custom +f_setScenario(2); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>v_sliderStartValue_balanceLimit</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>v_sliderMinValue_balanceLimit</MinValue> + <MaxValue>v_sliderMaxValue_balanceLimit</MaxValue> + <Step>0.01</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1717506309865</Id> + <Name>t_electricityBalanceLimit</Name> + <X>50</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0.0 MW</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1724859404444</Id> + <Name>text5</Name> + <X>-370</X> + <Y>30</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Connections</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724859526068</Id> + <Name>text7</Name> + <X>-370</X> + <Y>360</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Set Sliders to Scenario</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724859526070</Id> + <Name>txt_setSlidersToSelectedGC</Name> + <X>-370</X> + <Y>310</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Set Sliders to selected GC</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1724859673741</Id> + <Name>gr_scenarioRB</Name> + <X>130</X> + <Y>100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="RadioButtons"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1724859673743</Id> + <Name>rb_scenariosPrivateUI</Name> + <X>-100</X> + <Y>-60</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="180" Height="120"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>f_setScenario(rb_scenariosPrivateUI.getValue());</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="14" Style="0"/> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>VERTICAL</Orientation> + <Button>Huidig - 2023</Button> + <Button>Toekomstplannen</Button> + <Button>Custom</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1724859673745</Id> + <Name>text187</Name> + <X>-100</X> + <Y>-80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Selecteer een scenario</Text> + <Font> + <Name>Calibri</Name> + <Size>20</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1724943713523</Id> + <Name>txt_hydrogenAssets</Name> + <X>-370</X> + <Y>210</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Hydrogen assets</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724944232372</Id> + <Name>txt_h2storageSliders</Name> + <X>72</X> + <Y>513</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Waterstof opslag</Text> + <Font> + <Name>Calibri</Name> + <Size>22</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1724944232376</Id> + <Name>gr_buttonH2Storage</Name> + <X>43</X> + <Y>524</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Oval> + <Id>1724944232378</Id> + <Name>ovalH2StorageButton</Name> + <X>-1</X> + <Y>-1</Y> + <Label> + <X>0</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <RadiusX>20</RadiusX> + <RadiusY>40</RadiusY> + <Rotation>0.0</Rotation> + <FillColor>-14774017</FillColor> + <FillColorCode>v_colorH2_blue</FillColorCode> + <FillMaterial>null</FillMaterial> + </Oval> + <Text> + <Id>1724944232380</Id> + <Name>txt_h22</Name> + <X>-10</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-1</Color> + <Text>H2</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1724944302875</Id> + <Name>txt_fuelCellSliders</Name> + <X>69</X> + <Y>739</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Fuelcell</Text> + <Font> + <Name>Calibri</Name> + <Size>22</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1724944302879</Id> + <Name>gr_buttonH2FuelCell</Name> + <X>40</X> + <Y>750</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Oval> + <Id>1724944302881</Id> + <Name>ovalH2StorageButton1</Name> + <X>-1</X> + <Y>-1</Y> + <Label> + <X>0</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <RadiusX>20</RadiusX> + <RadiusY>40</RadiusY> + <Rotation>0.0</Rotation> + <FillColor>-14774017</FillColor> + <FillColorCode>v_colorH2_blue</FillColorCode> + <FillMaterial>null</FillMaterial> + </Oval> + <Text> + <Id>1724944302883</Id> + <Name>txt_h23</Name> + <X>-10</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-1</Color> + <Text>H2</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1724947265014</Id> + <Name>text</Name> + <X>-370</X> + <Y>480</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Current selected assets</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1725003108502</Id> + <Name>txt_hydrogenControlRoom</Name> + <X>770</X> + <Y>70</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <ColorCode>v_colorH2_blue</ColorCode> + <Text>Hydrogen Controlroom</Text> + <Font> + <Name>Calibri</Name> + <Size>72</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Level> + </Presentation> + <Areas> + <Area> + <Id>1725002833718</Id> + <Name>va_hydrogenUI</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Title>Hydrogen UI + 1920 + 980 + + + + + 1722245292185 + UI_Tabs + /* +public ShapeGroup getGroupElectricityPresentation() { + return gr_tabElectricity_presentation; +} + +public ShapeEmbeddedObjectPresentation getElectricityPresentation() { + return pop_tabElectricity_presentation; +} +*/ + 1754045642067 + false + + 1722245292191 + 1722245292191 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089971 + true + 1722326400000 + + 0 + HOUR + + + 1 + HOUR + + + + 1722245292188 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1722245292192 + 1722245292186 + + + 1722245555993 + v_selectedTabType + 270 + 40 + + false + true + true + + EnergyDemandTab + + ELECTRICITY + + + + + 1746099651858 + v_presentationXOffset + 270 + 130 + + false + true + true + + double + + 15 + + + + + 1746099651890 + v_presentationYOffset + 270 + 150 + + false + true + true + + double + + 630 + + + + + 1754908036761 + v_activeSliderGridConnections + 530 + 50 + + false + true + true + + List<GridConnection> + + + + 1755013554753 + v_pausedSliderGridConnections + 530 + 70 + + false + true + true + + List<GridConnection> + + + + 1753869985994 + c_utilityGridConnections + true + 1170 + 75 + + false + true + true + + ArrayList + GCUtility + String + + + + 1753869993825 + c_houseGridConnections + true + 1170 + 100 + + false + true + true + + ArrayList + GCHouse + String + + + + 1753870454474 + c_gridBatteryGridConnections + true + 1170 + 125 + + false + true + true + + ArrayList + GCGridBattery + String + + + + 1753870466643 + c_solarFarmGridConnections + true + 1170 + 150 + + false + true + true + + ArrayList + GCEnergyProduction + String + + + + 1753870491136 + c_windFarmGridConnections + true + 1170 + 175 + + false + true + true + + ArrayList + GCEnergyProduction + String + + + + 1753870502247 + c_chargerGridConnections + true + 1170 + 200 + + false + true + true + + ArrayList + GCPublicCharger + String + + + + + + VOID + double + 1722245473562 + f_showCorrectTab + 270 + 70 + + false + true + true + pop_tabElectricity_presentation.setVisible(false); +pop_tabHeating_presentation.setVisible(false); +pop_tabMobility_presentation.setVisible(false); +pop_tabEHub_presentation.setVisible(false); + +switch (v_selectedTabType) { + case ELECTRICITY: + pop_tabElectricity_presentation.setVisible(true); + break; + case HEAT: + pop_tabHeating_presentation.setVisible(true); + break; + case MOBILITY: + pop_tabMobility_presentation.setVisible(true); + break; + case HUB: + case NFATO: + pop_tabEHub_presentation.setVisible(true); + break; +} + + + + VOID + double + 1722259092945 + f_setTab + 270 + 100 + + false + true + true + + tab + EnergyDemandTab + + v_selectedTabType = tab; +f_showCorrectTab(); + + + + VOID + double + 1753881126492 + f_initializeSliderGridConnections + true + 1170 + 50 + + false + true + true + + gridConnections + List<GridConnection> + + c_utilityGridConnections.clear(); +c_houseGridConnections.clear(); +c_solarFarmGridConnections.clear(); +c_windFarmGridConnections.clear(); +c_gridBatteryGridConnections.clear(); +c_chargerGridConnections.clear(); + + +for(GridConnection GC : gridConnections){ + if(GC instanceof GCUtility){ + c_utilityGridConnections.add((GCUtility)GC); + } + else if(GC instanceof GCHouse){ + c_houseGridConnections.add((GCHouse)GC); + } + else if(GC instanceof GCEnergyProduction){ + if(GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + c_solarFarmGridConnections.add((GCEnergyProduction)GC); + } + if(GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ + c_windFarmGridConnections.add((GCEnergyProduction)GC); + } + } + else if(GC instanceof GCGridBattery){ + c_gridBatteryGridConnections.add((GCGridBattery)GC); + } + else if(GC instanceof GCPublicCharger){ + c_chargerGridConnections.add((GCPublicCharger)GC); + } +} + + + VOID + double + 1754908006859 + f_initializeSliderGCPointers + 530 + 30 + + false + true + true + + activeGridConnections + List<GridConnection> + + + pausedGridConnections + List<GridConnection> + + if(activeGridConnections != null){ + v_activeSliderGridConnections = activeGridConnections; +} +else{ + v_activeSliderGridConnections = new ArrayList<>(); + traceln("WARNING: UITABS HAS BEEN INITIALIZED WITH NO ACTIVE GC"); +} + +if(pausedGridConnections != null){ + v_pausedSliderGridConnections = pausedGridConnections; +} +else{ + v_pausedSliderGridConnections = new ArrayList<>(); +} + + + VOID + double + 1754908356478 + f_initializeUI_Tabs + 50 + 150 + + false + true + true + + activeGridConnections + List<GridConnection> + + + pausedGridConnections + List<GridConnection> + + //Initialize the GridConnections +f_initializeSliderGCPointers(activeGridConnections, pausedGridConnections); + +//Initialize the tabs +f_initializeActiveTabs(); + +//Set sliders to engine state of the gridconnections +f_updateSliders(); + +//Show correct tab +f_showCorrectTab(); + + + RETURNS_VALUE + List<GCHouse> + 1754919017244 + f_getActiveSliderGridConnections_houses + 560 + 240 + + false + true + true + List<GCHouse> houseGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCHouse){ + houseGridConnections.add((GCHouse)GC); + } +} + +return houseGridConnections; + + + RETURNS_VALUE + List<GCUtility> + 1754922545766 + f_getActiveSliderGridConnections_utilities + 560 + 220 + + false + true + true + List<GCUtility> utilityGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCUtility){ + utilityGridConnections.add((GCUtility)GC); + } +} + +return utilityGridConnections; + + + RETURNS_VALUE + List<GCGridBattery> + 1754922546986 + f_getAllSliderGridConnections_gridBatteries + 540 + 300 + + false + true + true + List<GCGridBattery> gridBatteryGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCGridBattery){ + gridBatteryGridConnections.add((GCGridBattery)GC); + } +} +if(v_pausedSliderGridConnections != null){ + for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCGridBattery){ + gridBatteryGridConnections.add((GCGridBattery)GC); + } + } +} +return gridBatteryGridConnections; + + + RETURNS_VALUE + List<GCPublicCharger> + 1754922547989 + f_getSliderGridConnections_chargers + 550 + 380 + + false + true + true + List<GCPublicCharger> chargerGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCPublicCharger){ + chargerGridConnections.add((GCPublicCharger)GC); + } +} + +return chargerGridConnections; + + + RETURNS_VALUE + List<GCEnergyProduction> + 1754922591622 + f_getAllSliderGridConnections_production + 540 + 330 + + false + true + true + List<GCEnergyProduction> productionGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCEnergyProduction){ + productionGridConnections.add((GCEnergyProduction)GC); + } +} +if(v_pausedSliderGridConnections != null){ + for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCEnergyProduction){ + productionGridConnections.add((GCEnergyProduction)GC); + } + } +} +return productionGridConnections; + + + VOID + double + 1754929564839 + f_updateSliders + 50 + 200 + + false + true + true + if(!pop_tabElectricity.isEmpty()){ + pop_tabElectricity.get(0).f_updateSliders_Electricity(); +} +if(!pop_tabHeating.isEmpty()){ + pop_tabHeating.get(0).f_updateSliders_Heating(); +} +if(!pop_tabMobility.isEmpty()){ + pop_tabMobility.get(0).f_updateSliders_Mobility(); +} +if(!pop_tabEHub.isEmpty()){ + pop_tabEHub.get(0).f_updateSliders_EHub(); +} + + + RETURNS_VALUE + List<GridConnection> + 1754986474226 + f_getActiveSliderGridConnections_consumption + 550 + 200 + + false + true + true + List<GridConnection> consumptionGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCUtility){ + consumptionGridConnections.add(GC); + } + else if(GC instanceof GCHouse){ + consumptionGridConnections.add(GC); + } +} + +return consumptionGridConnections; + + + RETURNS_VALUE + List<GridConnection> + 1754991155553 + f_getActiveSliderGridConnections_all + 550 + 130 + + false + true + true + List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); + +return gridConnections; + + + RETURNS_VALUE + List<GCPublicCharger> + 1755013777878 + f_getPausedSliderGridConnections_chargers + 550 + 400 + + false + true + true + List<GCPublicCharger> pausedChargerGridConnections = new ArrayList<>(); + +if(v_pausedSliderGridConnections != null){ + for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCPublicCharger){ + pausedChargerGridConnections.add((GCPublicCharger)GC); + } + } +} + +return pausedChargerGridConnections; + + + VOID + double + 1756302560139 + f_initializeActiveTabs + 70 + 170 + + false + true + true + if(!pop_tabElectricity.isEmpty()){ + pop_tabElectricity.get(0).f_initializeTab_Electricity(); +} +if(!pop_tabHeating.isEmpty()){ + //pop_tabHeating.get(0).f_initializeTab_Heating(); +} +if(!pop_tabMobility.isEmpty()){ + pop_tabMobility.get(0).f_initializeTab_Mobility(); +} +if(!pop_tabEHub.isEmpty()){ + //pop_tabEHub.get(0).f_initializeTab_EHub(); +} + + + RETURNS_VALUE + List<GCPublicCharger> + 1758278620331 + f_getAllSliderGridConnections_chargers + 540 + 360 + + false + true + true + List<GCPublicCharger> chargerGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCPublicCharger){ + chargerGridConnections.add((GCPublicCharger)GC); + } +} +if(v_pausedSliderGridConnections != null){ + for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCPublicCharger){ + chargerGridConnections.add((GCPublicCharger)GC); + } + } +} + +return chargerGridConnections; + + + RETURNS_VALUE + List<GridConnection> + 1761208715194 + f_getAllSliderGridConnections_consumption + 540 + 180 + + false + true + true + List<GridConnection> consumptionGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCUtility){ + consumptionGridConnections.add(GC); + } + else if(GC instanceof GCHouse){ + consumptionGridConnections.add(GC); + } +} + +for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCUtility){ + consumptionGridConnections.add(GC); + } + else if(GC instanceof GCHouse){ + consumptionGridConnections.add(GC); + } +} + +return consumptionGridConnections; + + + RETURNS_VALUE + List<GridConnection> + 1761208797812 + f_getPausedSliderGridConnections_all + 550 + 150 + + false + true + true + List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); + +return gridConnections; + + + RETURNS_VALUE + List<GridConnection> + 1761208826669 + f_getAllSliderGridConnections_all + 530 + 110 + + false + true + true + List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); +gridConnections.addAll(v_pausedSliderGridConnections); + +return gridConnections; + + + + + 1722245292186 + connections + 50 + -40 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1722252542602 + zero_Interface + 50 + -100 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + 1753694295457 + uI_EnergyHub + 50 + -70 + + false + true + true + + zerointerfaceloader + UI_EnergyHub + + + + + + 1722245482640 + pop_tabMobility + 50 + 80 + + false + true + true + 1744964660761 + + zerointerfaceloader + tabMobility + + + + zerointerfaceloader + tabMobility + 1722245324901 + + + + true + + 0 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089970 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722245482641 + pop_tabElectricity + 50 + 40 + + false + true + true + 1744964655611 + + zerointerfaceloader + tabElectricity + + + + zerointerfaceloader + tabElectricity + 1722247653567 + + + + + p_currentPVOnLand_ha + + + p_currentWindTurbines_MW + + + true + + 0 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089969 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722253113248 + pop_tabHeating + 50 + 60 + + false + true + true + 1744964658364 + + zerointerfaceloader + tabHeating + + + + zerointerfaceloader + tabHeating + 1722253108631 + + + + true + + 0 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089968 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722253478328 + pop_tabEHub + 50 + 100 + + false + true + true + 1744964663750 + + zerointerfaceloader + tabEHub + + + + zerointerfaceloader + tabEHub + 1722253463901 + + + + true + + 0 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089967 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + + + 1722245292192 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1722248369298 + gr_energyDemandSettings + 200 + 580 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1722248369300 + gr_electricityButton + -125 + -25 + + true + true + false + SHAPE_DRAW_2D3D + !pop_tabElectricity.isEmpty() + v_selectedTabType = EnergyDemandTab.ELECTRICITY; +f_showCorrectTab(); + false + 0 + 0.0 + + + 1722248369302 + ovalElectricityButton + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -32 + null + + + 1722248369304 + image3 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-electricity-3408805.png + + + false + + + + + 1722248369306 + gr_heatButton + -40 + -25 + + true + true + false + SHAPE_DRAW_2D3D + !pop_tabHeating.isEmpty() + v_selectedTabType = EnergyDemandTab.HEAT; +f_showCorrectTab(); + false + 0 + 0.0 + + + 1722248369308 + ovalHeatButton + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -6943 + null + + + 1722248369310 + image10 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-fire-2429630.png + + + false + + + + + 1722248369312 + gr_mobilityButton + 45 + -25 + + true + true + false + SHAPE_DRAW_2D3D + !pop_tabMobility.isEmpty() + v_selectedTabType = EnergyDemandTab.MOBILITY; +f_showCorrectTab(); + false + 0 + 0.0 + + + 1722248369314 + ovalTransportButton + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -2625550 + null + + + 1722248369316 + image15 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-car-1777731.png + + + false + + + + + 1722248369318 + gr_eHubButton + 130 + -25 + + true + true + false + SHAPE_DRAW_2D3D + !pop_tabEHub.isEmpty() + v_selectedTabType = EnergyDemandTab.HUB; +f_showCorrectTab(); + false + 0 + 0.0 + + + 1722248369320 + ovalHubButton + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -3736634 + null + + + 1722248369322 + line + -10 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 20 + -2 + 0 + + + 1722248369324 + line1 + -6 + 6 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 16 + -15 + 0 + + + 1722248369326 + line2 + -10 + -4 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 18 + 15 + 0 + + + 1722248369328 + oval + -11 + -6 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 3 + 40 + 0.0 + -657931 + null + + + 1722248369330 + oval1 + -8 + 8 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 3 + 40 + 0.0 + -657931 + null + + + 1722248369332 + line3 + 8 + 10 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + DOTTED + 1 + 0 + 1 + 0 + 1 + -17 + 0 + + + 1722248369334 + oval4 + 8 + 10 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 3 + 40 + 0.0 + -657931 + null + + + 1722248369336 + oval3 + 10 + -9 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 3 + 40 + 0.0 + -657931 + null + + + + + 1722248369338 + txt_electricityButtonDescription + -125 + 10 + + true + true + false + SHAPE_DRAW_2D + gr_electricityButton.isVisible() + false + 0 + 0.0 + -16777216 + Elektriciteit + + Calibri + 12 + + + CENTER + + + 1722248369340 + txt_heatButtonDescription + -40 + 10 + + true + true + false + SHAPE_DRAW_2D + gr_heatButton.isVisible() + false + 0 + 0.0 + -16777216 + Warmte + + Calibri + 12 + + + CENTER + + + 1722248369342 + txt_mobilityButtonDescription + 45 + 10 + + true + true + false + SHAPE_DRAW_2D + gr_mobilityButton.isVisible() + false + 0 + 0.0 + -16777216 + Transport + + Calibri + 12 + + + CENTER + + + 1722248369344 + txt_eHubButtonDescription + 130 + 10 + + true + true + false + SHAPE_DRAW_2D + gr_eHubButton.isVisible() + false + 0 + 0.0 + -16777216 + E-hub + + Calibri + 12 + + + CENTER + + + + + 1744964727616 + gr_tabElectricity_presentation + 15 + 630 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744964655611 + pop_tabElectricity_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1744964732289 + gr_tabHeating_presentation + 15 + 630 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744964658364 + pop_tabHeating_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1744964737688 + gr_tabEHub_presentation + 15 + 630 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744964663750 + pop_tabEHub_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1744964742286 + gr_tabMobility_presentation + 15 + 630 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744964660761 + pop_tabMobility_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1753877322668 + txt_allGridConnectionsForTheseSliders + true + 1160 + 20 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + GridConnections displayed in slider + + SansSerif + 12 + + + LEFT + + + + + + + 1658477103140 + Zero_Interface + public ShapeButton getButton_goToUI() { + return this.button_goToUI; +} +public ShapeRadioButtonGroup getBuildingColorsRB(){ + return this.rb_mapOverlay; +} +public ShapeCheckBox getCb_showFilterInterface(){ + return this.cb_showFilterInterface; +} +public ShapeComboBox getCb_filterOptions(){ + return this.cb_filterOptions; +} + + /* +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.databind.node.TextNode; +import com.fasterxml.jackson.databind.node.NumericNode; +import com.fasterxml.jackson.core.type.TypeReference; + +// For deserialisation +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.annotation.JsonAutoDetect; +*/ +import java.io.FileOutputStream; +import java.util.stream.Stream; +import java.util.Dictionary.*; +import java.util.Hashtable.*; +import java.util.*; +import java.util.stream.Collectors; + +import java.io.*; +import java.io.File; +import java.io.IOException; +import java.util.Date; +import java.time.LocalDate; +import java.time.DayOfWeek; +import java.text.SimpleDateFormat; +import com.fasterxml.jackson.databind.node.JsonNodeFactory; + +//Possibility to turn of traceln +import java.io.OutputStream; +import java.io.PrintStream; + +//Curves +import com.anylogic.engine.markup.AbstractCurve; +import com.anylogic.engine.markup.GISMarkupSegment; +import com.anylogic.engine.markup.GISPoint; +//import zero_engine.OL_EnergyCarriers; +//import zero_engine.OL_EnergyCarriers; +import com.querydsl.core.types.dsl.TimeExpression; +//import zero_engine.J_EAStorageElectric; +//import zero_engine.J_EAConsumption; +import org.apache.commons.lang3.tuple.Triple; +import javax.media.jai.widget.ViewportListener; + false + + 1658477103138 + 1658477103138 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + GIS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + false + 1658477089966 + true + 1658563200000 + + 0 + HOUR + + + p_timeStep_h + HOUR + + + + 1658477103136 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1658477103139 + 1658477103135 + + + 1696837759932 + v_LVGridColor + 395 + 1220 + + false + true + true + + Color + + purple + + + + + 1696837759935 + v_HVGridColor + 395 + 1180 + + false + true + true + + Color + + red + + + + + 1696837759938 + v_gasGridColor + 395 + 1240 + + false + true + true + + Color + + brown + + + + + 1696837759945 + v_energyLabelAColor + 395 + 1325 + + false + true + true + + Color + + darkGreen + + + + + 1696837759948 + v_energyLabelBColor + 395 + 1345 + + false + true + true + + Color + + green + + + + + 1696837759950 + v_energyLabelCColor + 395 + 1365 + + false + true + true + + Color + + yellowGreen + + + + + 1696837759953 + v_energyLabelDColor + 395 + 1385 + + false + true + true + + Color + + gold + + + + + 1696837759955 + v_energyLabelEColor + 395 + 1405 + + false + true + true + + Color + + orange + + + + + 1696837759958 + v_energyLabelFColor + 395 + 1425 + + false + true + true + + Color + + orangeRed + + + + + 1696837759961 + v_energyLabelUnknownColor + 395 + 1465 + + false + true + true + + Color + + gray + + + + + 1696837759963 + v_energyLabelGColor + 395 + 1445 + + false + true + true + + Color + + red + + + + + 1696837759966 + v_MVGridColor + 395 + 1200 + + false + true + true + + Color + + steelBlue + + + + + 1696863329269 + v_gridConnectionInBuildingIndex + 50 + 1480 + + false + true + true + + int + + 0 + + + + + 1701164360663 + b_resultsUpToDate + -240 + 940 + + false + true + true + + boolean + + + + 1701879001472 + v_clickedObjectText + 50 + 1500 + + false + true + true + + String + + "None" + + + + + 1701879014361 + v_clickedObjectAdress + 50 + 1520 + + false + true + true + + String + + "" + + + + + 1702041370471 + v_simulationArea1Color + 1310 + 1230 + + false + true + true + + Color + + new Color(178, 34, 34, 0) + + + + + 1702043349202 + v_companyBuildingColor + 690 + 1060 + + false + true + true + + Color + + teal + + + + + 1702043408687 + v_detailedCompanyBuildingColor + 690 + 1110 + + false + true + true + + Color + + navy + + + + + 1702043479414 + v_houseBuildingColor + 690 + 1160 + + false + true + true + + Color + + new Color(154, 208, 194) + + + + + 1702043554935 + v_restBuildingColor + 690 + 1210 + + false + true + true + + Color + + gainsboro + + + + + 1702046920293 + v_clickedObjectDetails + 50 + 1540 + + false + true + true + + String + + "" + + + + + 1704450852556 + v_solarParkColor + 690 + 1310 + + false + true + true + + Color + + new Color(250, 246, 179, 206) + + + + + 1704463271534 + v_selectionColor + 400 + 1080 + + false + true + true + + Color + + yellow + + + + + 1704463281781 + v_selectionColorAddBuildings + 400 + 1100 + + false + true + true + + Color + + yellow + + + + + 1705663820237 + v_HVMVNodeColor + 1030 + 1060 + + false + true + true + + Color + + new Color(253, 223, 134, 206) + + + + + 1705663820239 + v_HVMVLineColor + 1030 + 1080 + + false + true + true + + Color + + navy + + + + + 1705664070254 + v_solarParkLineColor + 690 + 1330 + + false + true + true + + Color + + gold + + + + + 1705664575869 + v_electrolyserColor + 690 + 1445 + + false + true + true + + Color + + new Color(33, 164, 195) + + + + + 1705664587285 + v_chargingStationColor + 690 + 1490 + + false + true + true + + Color + + cyan + + + + + 1705668042403 + v_antiLayerColor + 1310 + 1210 + + false + true + true + + Color + + new Color(192, 192, 192, 100) + + + + + 1705668569794 + v_electrolyserLineColor + 690 + 1465 + + false + true + true + + Color + + navy + + + + + 1705668590932 + v_chargingStationLineColor + 690 + 1510 + + false + true + true + + Color + + darkBlue + + + + + 1705673181898 + v_clickedGridNode + 50 + 1380 + + false + true + true + + GridNode + + + + 1705673647104 + v_previousClickedObjectType + 50 + 1350 + + false + true + true + + OL_GISObjectType + + + + 1705673714784 + v_previousClickedGridNode + 50 + 1400 + + false + true + true + + GridNode + + + + 1705967311665 + v_simulationArea1LineColor + 1310 + 1250 + + false + true + true + + Color + + dimGray + + + + + 1705967344378 + v_simulationArea2Color + true + 1310 + 1270 + + false + true + true + + Color + + new Color(178, 34, 34, 0) + + + + + 1705967344381 + v_simulationArea2LineColor + true + 1310 + 1290 + + false + true + true + + Color + + dimGray + + + + + 1706892713276 + GISregion_antiLaag + -280 + 250 + + false + true + true + + GISRegion + + + + 1706990958029 + v_backgroundColor + 1312 + 1060 + + false + true + true + + Color + + (new Color(208, 208, 245)).brighter() + + + + + 1707918668189 + v_clickedObjectType + 50 + 1330 + + false + true + true + + OL_GISObjectType + + + + 1709803708318 + v_gridNodeFeedinColor + 400 + 1120 + + false + true + true + + Color + + orange + + + + + 1710162245199 + v_batteryColor + 690 + 1400 + + false + true + true + + Color + + green.darker() + + + + + 1710162245201 + v_batteryLineColor + 690 + 1420 + + false + true + true + + Color + + green + + + + + 1710166484674 + v_windFarmColor + 690 + 1355 + + false + true + true + + Color + + white + + + + + 1710166484676 + v_windFarmLineColor + 690 + 1375 + + false + true + true + + Color + + black + + + + + 1714137967101 + v_MVLVNodeColor + 1030 + 1220 + + false + true + true + + Color + + green + + + + + 1714137970406 + v_MVLVLineColor + 1030 + 1240 + + false + true + true + + Color + + green.brighter() + + + + + 1714137978358 + v_gridNodeColorStrained + 1030 + 1415 + + false + true + true + + Color + + orange + + + + + 1714137980262 + v_gridNodeLineColorStrained + 1030 + 1435 + + false + true + true + + Color + + orange.brighter() + + + + + 1714137982277 + v_gridNodeColorCongested + 1030 + 1460 + + false + true + true + + Color + + red + + + + + 1714137984157 + v_gridLineColorCongested + 1030 + 1480 + + false + true + true + + Color + + red.brighter() + + + + + 1718264413499 + v_unknownConsumptionColor + 395 + 1305 + + false + true + true + + Color + + white + + + + + 1718567214780 + b_updateLiveCongestionColors + 1030 + 1600 + + false + true + true + + boolean + + false + + + + + 1719311576065 + v_newChargingStationColor + 690 + 1540 + + false + true + true + + Color + + new Color(173, 255, 47, 156) + + + + + 1719311576067 + v_newChargingStationLineColor + 690 + 1560 + + false + true + true + + Color + + green + + + + + 1719830571563 + v_outsideTemperature + 940 + -260 + + false + false + true + + double + + + + 1719830581855 + v_solarIrradiance + 940 + -240 + + false + false + true + + int + + + + 1719830591551 + v_windspeed + 940 + -220 + + false + false + true + + String + + + + 1720905248678 + v_selectedGridConnectionIndex + 940 + -130 + + false + true + true + + int + + 0 + + + + + 1720905365617 + v_nbGridConnectionsInSelectedBuilding + 940 + -110 + + false + true + true + + int + + 0 + + + + + 1721652532124 + v_companyBuildingLineColor + 690 + 1080 + + false + true + true + + Color + + black + + + + + 1721652543732 + v_detailedCompanyBuildingLineColor + 690 + 1130 + + false + true + true + + Color + + black + + + + + 1721652554195 + v_houseBuildingLineColor + 690 + 1180 + + false + true + true + + Color + + black + + + + + 1721652564323 + v_restBuildingLineColor + 690 + 1230 + + false + true + true + + Color + + + + 1721729327873 + v_parcelColor + 690 + 1590 + + false + true + true + + Color + + navajoWhite + + + + + 1721729331151 + v_parcelLineColor + 690 + 1610 + + false + true + true + + Color + + black + + + + + 1721996776514 + v_MVMVNodeColor + 1030 + 1150 + + false + true + true + + Color + + new Color(253, 223, 134, 206) + + + + + 1721996776516 + v_MVMVLineColor + 1030 + 1170 + + false + true + true + + Color + + navy + + + + + 1721998215865 + v_HVMVNodeSize + 1030 + 1100 + + false + true + true + + double + + 100 + + + + + 1721998236233 + v_MVMVNodeSize + 1030 + 1190 + + false + true + true + + double + + 30 + + + + + 1721998240384 + v_MVLVNodeSize + 1030 + 1260 + + false + true + true + + double + + 20 + + + + + 1725018118872 + b_showCables + 50 + 1580 + + false + true + true + + boolean + + false + + + + + 1728404379677 + v_energyAssetLineWidth + 690 + 1280 + + false + true + true + + double + + 2 + + + + + 1732027307811 + b_runningMainInterfaceScenarios + -670 + 686 + + false + true + true + + boolean + + false + + + + + 1734617425109 + b_gridLoopsAreDefined + -630 + 510 + + false + true + true + + boolean + + false + + + + + 1739980192808 + v_customEnergyCoop + 50 + 1290 + + false + true + true + + EnergyCoop + + + + 1742298194173 + v_forcedClickScreenColor + 140 + -840 + + false + true + true + + Color + + new Color(105, 105, 105, 150) + + + + + 1743092928263 + b_inManualFilterSelectionMode + -1530 + 500 + + false + true + true + + boolean + + false + + + + + 1743666440153 + v_currentActiveInfoBubble + true + -1990 + 150 + + false + true + true + + ShapeImage + + + + 1744205147072 + v_infoText + -2010 + 80 + + false + true + true + + J_InfoText + + new J_InfoText() + + + + + 1750086295616 + v_parkingSpaceColor_private + 690 + 1720 + + false + true + true + + Color + + salmon + + + + + 1750086307414 + v_parkingSpaceLineColor_private + 690 + 1740 + + false + true + true + + Color + + red + + + + + 1750089169786 + v_parkingSpaceColor_electric + 690 + 1680 + + false + true + true + + Color + + lightGreen + + + + + 1750089169788 + v_parkingSpaceLineColor_electric + 690 + 1700 + + false + true + true + + Color + + green + + + + + 1750089171472 + v_parkingSpaceColor_public + 690 + 1640 + + false + true + true + + Color + + lightBlue + + + + + 1750089171474 + v_parkingSpaceLineColor_public + 690 + 1660 + + false + true + true + + Color + + blue + + + + + 1750165528617 + v_numberOfSurveyCompanies + 1390 + 1520 + + false + true + true + + int + + + + 1750777761770 + v_HVMVNodeIsVisible + 1030 + 1120 + + false + true + true + + boolean + + false + + + + + 1752836273466 + v_gridNodeLineColorUncongested + 1030 + 1390 + + false + true + true + + Color + + green.brighter() + + + + + 1752836375624 + v_gridNodeColorUncongested + 1030 + 1370 + + false + true + true + + Color + + green + + + + + 1752837181466 + v_LVLVNodeColor + 1030 + 1290 + + false + true + true + + Color + + green + + + + + 1752837181468 + v_LVLVLineColor + 1030 + 1310 + + false + true + true + + Color + + green.brighter() + + + + + 1752837181470 + v_LVLVNodeSize + 1030 + 1330 + + false + true + true + + double + + 10 + + + + + 1753105667219 + rb_mapOverlay + 1920 + 1495 + + false + true + true + + ShapeRadioButtonGroup + + + + 1753110308594 + v_amountOfDefinedGridLoops + -630 + 530 + + false + true + true + + int + + 0 + + + + + 1753115730758 + v_gridNodeColorCapacityUnknown + 1030 + 1510 + + false + true + true + + Color + + gray + + + + + 1753115736678 + v_gridNodeLineColorCapacityUnknown + 1030 + 1530 + + false + true + true + + Color + + gray.brighter() + + + + + 1754312936616 + v_parkingSpaceLineColor_unkown + 690 + 1810 + + false + true + true + + Color + + gray.darker() + + + + + 1754312949585 + v_parkingSpaceColor_unkown + 690 + 1790 + + false + true + true + + Color + + gray + + + + + 1756375264408 + v_currentViewArea + -2010 + 100 + + false + true + true + + ViewArea + + va_Interface + + + + + 1758795129963 + zero_loader + 50 + -250 + + false + true + true + + Zero_Loader + + + + 1715858732720 + energyModel + -200 + 1020 + + false + true + true + + EnergyModel + NONE + false + + 1715858732718 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1727251571552 + settings + -670 + 110 + + false + false + true + + Settings + NONE + false + + 1727251571550 + + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1746106585457 + p_currentActiveInfoBubble + -1990 + 170 + + false + true + true + + List<ShapeImage> + NONE + false + + new ArrayList<ShapeImage>() + + + 1746106585455 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1744987127500 + p_maxNrSelectedGCForExport + true + -555 + -440 + + false + true + true + + int + NONE + false + + 20 + + + 1744987127498 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1745937830300 + p_minSelectedGCForPublicAggregation + -670 + 895 + + false + true + true + + int + NONE + false + + 10 + + + 1745937830298 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1753446312779 + b_inEnergyHubSelectionMode + 2240 + -2110 + + false + true + true + + boolean + NONE + false + + false + + + 1753446312777 + CHECK_BOX + 0 + 100 + NO_DELIMETER + + + + + 1753446312783 + b_inEnergyHubMode + 2240 + -2130 + + false + true + true + + boolean + NONE + false + + false + + + 1753446312781 + CHECK_BOX + 0 + 100 + NO_DELIMETER + + + + + 1756395079958 + user + -670 + 130 + + false + false + true + + User + NONE + false + + 1756395079956 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1758028435828 + project_data + Should be filled with the Project_data record created in the startup of the project model + -670 + 90 + + false + false + true + + Project_data + NONE + false + + 1758028435826 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760978961206 + uI_Company + -250 + 480 + + false + false + true + + UI_company + NONE + false + + 1760978961204 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760978964017 + uI_Hydrogen + -250 + 520 + + false + false + true + + UI_Hydrogen + NONE + false + + 1760978964015 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760978968830 + uI_Battery + -250 + 560 + + false + false + true + + UI_Battery + NONE + false + + 1760978968828 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760979190278 + uI_EnergyHub + -250 + 440 + + false + false + true + + UI_EnergyHub + NONE + false + + 1760979190276 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761118903683 + rb_scenarios + -1150 + 100 + + false + true + true + + ShapeRadioButtonGroup + NONE + false + + 1761118903681 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761119479237 + t_scenario_current + -1145 + 245 + + false + true + true + + String + NONE + false + + "Het huidige scenario bevat de energie dynamieken van dit moment. \n" + +"Dit omvat o.a. de huidige zonnepanelen, het aantal elektrische \n" + +"voertuigen in per buurt, de energie consumptie profielen van bedrijven \n" + +"en de huidige gasconsumptie voor verwarming." + + + 1761119479235 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761119479242 + t_scenario_future + -1140 + 290 + + false + true + true + + String + NONE + false + + "Het toekomstige scenario bevat de energie dynamieken van dit moment, \n" + +"plus de toekomst plannen van alle bedrijven die de enquete hebben \n" + +"ingevuld. Deze plannen kunnen bevatten: het instaleren van extra \n" + +"zonnepanelen, aangevraagde net uitbereiding, maar ook plannen voor \n" + +"het electrificeren van het transport." + + + 1761119479240 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761119827711 + t_scenario_custom + -1140 + 335 + + false + true + true + + String + NONE + false + + "" + + + 1761119827709 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761134798639 + p_residentialScenario_Current + -1160 + 150 + + false + true + true + + J_SliderSettings_Residential + NONE + false + + 1761134798637 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1707918668148 + c_GISNeighborhoods + -280 + 230 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1713429665418 + c_scenarioMap_Future + -280 + 340 + + false + true + true + + LinkedHashMap + String + J_scenario_Future + + + + 1713874283959 + c_scenarioMap_Current + -280 + 320 + + false + true + true + + LinkedHashMap + String + J_scenario_Current + + + + 1715178022675 + c_orderedVehicles + 510 + -710 + + false + true + true + + ArrayList + J_EA + String + + + + 1715183417595 + c_orderedHeatingSystemsCompanies + 510 + -650 + + false + true + true + + ArrayList + GCUtility + String + + + + 1715183423011 + c_orderedPVSystemsCompanies + 510 + -690 + + false + true + true + + ArrayList + GCUtility + String + + + + 1719176257019 + c_orderedHeatingSystemsHouses + 840 + -650 + + false + true + true + + ArrayList + GCHouse + String + + + + 1722344496313 + c_GISNetplanes + -280 + 210 + + false + true + true + + ArrayList + GISRegion + GISRegion + + + + 1721302080638 + c_selectedGridConnections + 50 + 1260 + + false + true + true + + ArrayList + GridConnection + String + + + + 1725276677836 + c_LVCables + -280 + 170 + + false + true + true + + ArrayList + GISRoute + String + + + + 1725276688077 + c_MVCables + -280 + 190 + + false + true + true + + ArrayList + GISRoute + String + + + + 1734442668540 + c_selectedFilterOptions + -1550 + 80 + + false + true + true + + ArrayList + OL_FilterOptionsGC + String + + + + 1734512815255 + c_previousSelectedObjects + 50 + 1450 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1734513139372 + c_selectedObjects + 50 + 1430 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1742226708562 + c_manualFilterDeselectedGC + -1530 + 475 + + false + true + true + + ArrayList + GridConnection + String + + + + 1742226748068 + c_manualFilterSelectedGC + -1530 + 455 + + false + true + true + + ArrayList + GridConnection + String + + + + 1742376749972 + c_filterSelectedGridLoops + -1530 + 330 + + false + true + true + + ArrayList + GridNode + String + + + + 1742376765347 + c_filterSelectedNeighborhoods + -1530 + 390 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1744886925970 + c_presentations + Would have to be filled by hand with all presentations that are (indirectly) on the interface canvas. eg: c_presentations.add(uI_Tabs_presentation) + true + -2020 + 210 + + false + true + true + + ArrayList + ShapeEmbeddedObjectPresentation + String + + + + 1749741070275 + c_orderedParkingSpaces + 510 + -630 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1747300275742 + c_orderedPVSystemsHouses + 840 + -690 + + false + true + true + + ArrayList + GCHouse + String + + + + 1750078746618 + c_modelActiveSpecialGISObjects + 1390 + 1480 + + false + true + true + + LinkedHashSet + OL_GISObjectType + String + + + + 1750247117301 + c_orderedV1GChargers + 530 + -590 + + false + true + true + + ArrayList + J_EAChargePoint + String + + + + 1750089494475 + c_modelActiveParkingSpaceTypes + 1390 + 1500 + + false + true + true + + LinkedHashSet + OL_ParkingSpaceType + String + + + + 1750247117305 + c_orderedV2GChargers + 530 + -570 + + false + true + true + + ArrayList + J_EAChargePoint + String + + + + 1750156136377 + c_modelActiveDefaultGISBuildings + 1390 + 1460 + + false + true + true + + LinkedHashSet + OL_GISBuildingTypes + String + + + + 1750333680450 + c_orderedVehiclesPrivateParking + 510 + -530 + + false + true + true + + ArrayList + J_EAVehicle + String + + + + 1750335318608 + c_orderedPublicChargers + Niet laadpleinen, alleen losse palen + 510 + -610 + + false + true + true + + ArrayList + GCPublicCharger + String + + + + 1753087052979 + c_loadedMapOverlayTypes + 1920 + 1470 + + false + true + true + + ArrayList + OL_MapOverlayTypes + String + + + + 1753951769737 + c_orderedPTSystemsHouses + 510 + -670 + + false + true + true + + ArrayList + GCHouse + String + + + + 1756121323600 + c_mappingOfVehiclesPerCharger + 530 + -550 + + false + true + true + + LinkedHashMap + String + List<J_EADieselVehicle> + + + + 1756993771846 + c_UIResultsInstances + -290 + 650 + + false + true + true + + ArrayList + UI_Results + String + + + + 1760715323344 + c_additionalVehicles + 510 + -500 + + false + true + true + + LinkedHashMap + String + List<J_EAVehicle> + + + + + + 1658497469833 + e_calculateEnergyBalance + Trigger voor energieberekeningen in de model backbone. Volgorde is belangrijk voor consistente resultaten. + +@since: Sprint 6 +@author: Jorrit + -240 + 910 + + false + true + true + + + 1 + HOUR + + + 1/p_timeStep_h + PER_HOUR + + 1658477089965 + true + 1658563200000 + + 0 + HOUR + + + energyModel.p_timeStep_h + HOUR + + false + + // Trigger timestep in energymodel for continuous simulation ('interactive mode') +energyModel.f_runTimestep(); + + +// This function colors the trafos according to the amount of congestion. (maybe move this function call somewhere else?) +if ( b_updateLiveCongestionColors ){ + for (GridNode gn : energyModel.pop_gridNodes) { + if ((v_clickedObjectType != OL_GISObjectType.GRIDNODE || v_clickedGridNode != gn) && gn.p_energyCarrier == OL_EnergyCarriers.ELECTRICITY) { + f_setColorsBasedOnCongestion_gridnodes(gn, true); + } + } +} + + +// Update the NFATO values in the selected companyUI +if(c_selectedGridConnections.size() > 0 && c_selectedGridConnections.get(0).v_enableNFato){ + if(uI_Company.v_NFATO_active){ + uI_Company.f_getNFATOValues(); + } +} + +// Get the weather info +f_getWeatherInfo(); + + + 1743509682728 + e_setStartView + -660 + 265 + + false + true + true + + + 1 + HOUR + + + 1 + PER_HOUR + + 1658477089964 + true + 1743580800000 + + 0 + HOUR + + + 1 + HOUR + + false + + f_setStartView(); + + + + + VOID + double + 1696837759924 + f_setColorsBasedOnEnergyLabels + 1960 + 1870 + + false + true + true + + b + GIS_Object + + if (b.gisRegion != null){ + + OL_GridConnectionIsolationLabel buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.NONE; + + //Find the lowest energy label in the building + for(GridConnection GC : b.c_containedGridConnections){ + switch(GC.p_energyLabel){ + case A: + if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.A; + } + break; + case B: + if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.A){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.B; + } + break; + case C: + if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.B + || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.C){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.C; + } + break; + case D: + if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.E || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.F + || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.D; + } + break; + case E: + if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.F || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.E; + } + break; + case F: + if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.F; + } + break; + case G: + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.G; + break; + } + } + + //Color building based on lowest energy label + switch(buildingLowestEnergyLabel){ + + case A: + b.gisRegion.setFillColor(v_energyLabelAColor); + break; + case B: + b.gisRegion.setFillColor(v_energyLabelBColor); + break; + case C: + b.gisRegion.setFillColor(v_energyLabelCColor); + break; + case D: + b.gisRegion.setFillColor(v_energyLabelDColor); + break; + case E: + b.gisRegion.setFillColor(v_energyLabelEColor); + break; + case F: + b.gisRegion.setFillColor(v_energyLabelFColor); + break; + case G: + b.gisRegion.setFillColor(v_energyLabelGColor); + break; + case NONE: + b.gisRegion.setFillColor(v_energyLabelUnknownColor); + break; + } +} + + + VOID + double + 1696863329251 + f_selectGISRegion + Function that selects gisregions after click on the map + 50 + 1060 + + false + true + true + + clickx + double + + + clicky + double + + if(settings.isPublicModel()){ + f_selectGISRegion_publicModel(clickx, clicky); + return; +} + +//After a click, reset previous clicked building/gridNode colors and text +v_previousClickedObjectType = v_clickedObjectType; +c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); +ArrayList<GIS_Object> buildingsConnectedToSelectedBuildingsList = new ArrayList<>(); +c_selectedGridConnections.clear(); +c_selectedObjects.clear(); + +//Deselect previous selection +if( v_previousClickedObjectType != null){ + f_deselectPreviousSelect(); +} + +//Check if click was on Gridnode, if yes, select grid node +for ( GridNode GN : energyModel.pop_gridNodes ){ + if( GN.gisRegion != null && GN.gisRegion.contains(clickx, clicky) && GN.gisRegion.isVisible() ){ + f_selectGridNode(GN); + return; + } +} + +//Check if click was on Building, if yes, select grid building +for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ + if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ + if (b.gisRegion.isVisible()) { //only allow us to click on visible objects + if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections + buildingsConnectedToSelectedBuildingsList = b.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building + f_selectBuilding(b, buildingsConnectedToSelectedBuildingsList); + return; + } + } + } +} + +//Check if click was on remaining objects such as chargers, solarfields, parcels: if yes, select object +for ( GIS_Object GISobject : energyModel.pop_GIS_Objects ){ + if( GISobject.gisRegion != null && GISobject.gisRegion.contains(clickx, clicky) ) { + if (GISobject.gisRegion.isVisible()) { //only allow us to click on visible objects + if (GISobject.c_containedGridConnections.size() > 0 ) { // only allow objects with gridconnections + + // Find buildings powered by the same GC as the clicked object + buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; + + //Find the (first) connected GC in the object + GridConnection selectedGC = GISobject.c_containedGridConnections.get(0); + + //Set the selected GIS object type + v_clickedObjectType = GISobject.p_GISObjectType; + c_selectedObjects.add(GISobject); + + //Set the correct interface view for each object type + switch(v_clickedObjectType){ + + case CHARGER: + f_selectCharger((GCPublicCharger)selectedGC, GISobject ); + break; + + default: + buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building + f_selectBuilding(GISobject, buildingsConnectedToSelectedBuildingsList); + break; + } + return; + } + } + } +} + +//Still no clicked object? :select basic region +v_clickedObjectType = OL_GISObjectType.REGION; +uI_Results.f_updateResultsUI(energyModel); + +//Enable kpi summary button +uI_Results.getCheckbox_KPISummary().setEnabled(true); + + + VOID + double + 1702045084338 + f_styleAreas + -670 + 351 + + false + true + true + + gis_area + GIS_Object + + double width = 1; + +if (gis_area instanceof GIS_Parcel || + gis_area.c_containedGridConnections.size() == 0 || + gis_area.c_containedGridConnections.get(0) instanceof GCPublicCharger ) { + // Parcels, Chargers and GIS Objects without GCs are always the default color + gis_area.f_style(null, null, null, null); + return; +} + +//Get selected map overlay type, based on loaded order of the radio buttons +OL_MapOverlayTypes selectedMapOverlayType; +if(rb_mapOverlay != null){ + selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); +} +else{ + selectedMapOverlayType = OL_MapOverlayTypes.DEFAULT; +} +//Set the correct map overlay +switch(selectedMapOverlayType){ + case DEFAULT: + gis_area.f_style(null, null, null, null); + break; + case ELECTRICITY_CONSUMPTION: + if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { + f_setColorsBasedOnConsumptionProfileHouseholds(gis_area); + } + else { + f_setColorsBasedOnElectricityConsumption(gis_area); + } + break; + case PV_PRODUCTION: + f_setColorsBasedOnProduction(gis_area); + break; + case GRID_NEIGHBOURS: + f_setColorsBasedOnGridTopology_objects(gis_area); + break; + case CONGESTION: + f_setColorsBasedOnCongestion_objects(gis_area); + break; + case ENERGY_LABEL: + f_setColorsBasedOnEnergyLabels(gis_area); + break; + case PARKING_TYPE: + f_setColorsBasedOnParkingType_objects(gis_area); + break; +} + + + VOID + double + 1702385530773 + f_styleSimulationAreas + -670 + 331 + + false + true + true + + area + GIS_Object + + GISRegion gisregion = area.gisRegion; + +switch( area.p_GISObjectType ) { + case ANTI_LAYER: + gisregion.setVisible(true); + gisregion.setLineStyle( LINE_STYLE_SOLID ); + gisregion.setLineWidth( 0); + gisregion.setLineColor( v_antiLayerColor ); + gisregion.setFillColor( v_antiLayerColor ); + GISregion_antiLaag = gisregion; + + //Pas p_id aan naar een normale naam + area.p_id = "Buitengebied"; + break; + + default: + gisregion.setVisible(true); + gisregion.setLineColor( v_simulationArea1LineColor ); + gisregion.setLineStyle( LINE_STYLE_SOLID ); + gisregion.setLineWidth( 1); + gisregion.setFillColor( v_simulationArea1Color ); +} + + + VOID + double + 1705499586056 + f_styleGridNodes + -670 + 371 + + false + true + true + + GN + GridNode + + //Get selected map overlay type, based on loaded order of the radio buttons +OL_MapOverlayTypes selectedMapOverlayType; +if(rb_mapOverlay != null){ + selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); +} +else{ + selectedMapOverlayType = OL_MapOverlayTypes.DEFAULT; +} +//Set the correct map overlay +switch(selectedMapOverlayType){ + case DEFAULT: + case ELECTRICITY_CONSUMPTION: + case PV_PRODUCTION: + if(!b_updateLiveCongestionColors){ + switch( GN.p_nodeType ) { + case LVLV: + f_styleLVLV(GN.gisRegion); + break; + case MVLV: + f_styleMVLV(GN.gisRegion); + break; + case SUBMV: + f_styleSUBMV(GN.gisRegion); + break; + case MVMV: + f_styleMVMV(GN.gisRegion); + break; + case HVMV: + f_styleHVMV(GN.gisRegion); + break; + case HT: + + break; + case MT: + + break; + case LT: + + break; + default: + } + } + else{ + f_setColorsBasedOnCongestion_gridnodes(GN, true); + } + break; + case GRID_NEIGHBOURS: + f_setColorsBasedOnGridTopology_gridnodes(GN); + break; + case CONGESTION: + f_setColorsBasedOnCongestion_gridnodes(GN, false); + break; + case PARKING_TYPE: + f_setColorsBasedOnParkingType_gridnodes(GN); + break; +} + + + VOID + double + 1705505495599 + f_styleMVLV + -650 + 451 + + false + true + true + + gisregion + GISRegion + + gisregion.setLineStyle( LINE_STYLE_SOLID ); +gisregion.setLineColor( v_MVLVLineColor ); +gisregion.setLineWidth(2); +gisregion.setFillColor(v_MVLVNodeColor); + + + VOID + double + 1705505509120 + f_styleHVMV + -650 + 391 + + false + true + true + + gisregion + GISRegion + + gisregion.setFillColor(v_HVMVNodeColor); +gisregion.setLineStyle( LINE_STYLE_SOLID ); +gisregion.setLineColor( v_HVMVLineColor ); +gisregion.setLineWidth(2); +gisregion.setVisible(v_HVMVNodeIsVisible); + + + VOID + double + 1705925024602 + f_setUITabs + -670 + 601 + + false + true + true + //Create the tabs for the project +f_createUITabs_default(); + +//Initialize the uI_Tabs with the gridconnections +uI_Tabs.f_initializeUI_Tabs(energyModel.f_getGridConnectionsCollectionPointer(), energyModel.f_getPausedGridConnectionsCollectionPointer()); + +//Initialize sliders with certain presets +f_setSliderPresets(); + +//Store the initial slider state for Residential areas for the scenario current button +if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { + f_storeResidentialScenario_Current(); +} + + + VOID + double + 1707918668161 + f_selectGridNode + 70 + 1100 + + false + true + true + + GN + GridNode + + v_clickedGridNode = GN; +v_clickedObjectType = OL_GISObjectType.GRIDNODE; + +//Disable the KPI summary (button) +uI_Results.getCheckbox_KPISummary().setSelected(false, true); +uI_Results.getCheckbox_KPISummary().setEnabled(false); + + +// 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; +} + +v_clickedObjectAdress = ""; +v_clickedObjectDetails = "Type station:\t" + GN.p_description; + + +// Color the GridNode +GN.gisRegion.setFillColor( v_selectionColor ); +GN.gisRegion.setLineColor( orange ); + +// Color the connected GridConnections +for ( GridConnection GC : GN.f_getAllLowerLVLConnectedGridConnections()){ + if (GC.c_connectedGISObjects.size() == 0){ + //traceln("Gridconnection with ID " + GC.p_ownerID + " and index " + GC.getIndex() + " has no GIS building"); + } + else { + GC.c_connectedGISObjects.forEach(gb -> gb.f_style(v_gridNodeFeedinColor, v_gridNodeFeedinColor, 2.0, null)); + } +} + +uI_Results.f_updateUIresultsGridNode(GN); + + + VOID + double + 1707918668163 + f_selectBuilding + 70 + 1120 + + false + true + true + + b + GIS_Object + + + buildingsConnectedToSelectedGC_list + ArrayList<GIS_Object> + + c_selectedObjects = new ArrayList<GIS_Object>(buildingsConnectedToSelectedGC_list); +v_clickedObjectType = b.p_GISObjectType; + +//Enable checkbox +uI_Results.getCheckbox_KPISummary().setEnabled(true); + +// Color all buildings of the GridConnection associated with the selected building +if (!c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.equals("-") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("woonfunctie") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("Onbekend")){ + for (GIS_Object obj : c_selectedObjects) { //Buildings that are grouped, select as well. + obj.gisRegion.setFillColor(v_selectionColorAddBuildings); + } +} + +//Check the number of GCs in building +v_nbGridConnectionsInSelectedBuilding = b.c_containedGridConnections.size(); + +//Multiple GC in building: set additional adress in building info + buttons +if ( v_nbGridConnectionsInSelectedBuilding > 1 ){ + v_selectedGridConnectionIndex = 0; + v_clickedObjectText = "Pand met " + b.c_containedGridConnections.size() + " adressen: " + b.p_id; + gr_multipleBuildingInfo.setVisible(true); +} +else { + String text = ""; + if (project_data.project_type() == OL_ProjectType.BUSINESSPARK) { + if (b instanceof GIS_Building) { + if(b.c_containedGridConnections.get(0).p_owner.p_detailedCompany){ + text = b.c_containedGridConnections.get(0).p_owner.p_actorID + ", "; + } + else if(b.p_annotation != null){ + text = b.p_annotation + ", "; + } + } + else { + text = b.p_id + ", "; + } + } + else{ + if(b.p_annotation != null){ + text = b.p_annotation + ", "; + } + else{ + text = b.p_id + ", "; + } + } + + //Set adres text + if (c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address == null || c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress() == null) { + text = text + "Onbekend adres"; + } + else { + text = text + c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress(); + } + + v_clickedObjectText = text; + gr_multipleBuildingInfo.setVisible(false); +} + + + +//Update the resultsUI +f_updateUIResultsData(); + +//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(); + + + + VOID + double + 1707918668165 + f_deselectPreviousSelect + 70 + 1080 + + false + true + true + // Update for results_ui when deselecting objects to show entire area again as default option +v_clickedObjectText = "None"; +v_clickedObjectAdress = ""; +v_clickedObjectDetails = ""; +v_clickedObjectType = null; +button_goToUI.setVisible(false); +gr_multipleBuildingInfo.setVisible(false); + +// We restore the colors of what we clicked on before +if (v_previousClickedObjectType == OL_GISObjectType.GRIDNODE){ + v_previousClickedGridNode = v_clickedGridNode; + f_styleGridNodes(v_clickedGridNode); + for ( Agent agent : v_previousClickedGridNode.f_getAllLowerLVLConnectedGridConnections()){ + if (agent instanceof GridConnection) { + GridConnection GC = (GridConnection)agent; + for (GIS_Object a : GC.c_connectedGISObjects) { + f_styleAreas(a); + } + } + } +} +else if (v_previousClickedObjectType == OL_GISObjectType.BUILDING || + v_previousClickedObjectType == OL_GISObjectType.SOLARFARM || + v_previousClickedObjectType == OL_GISObjectType.WINDFARM || + v_previousClickedObjectType == OL_GISObjectType.ELECTROLYSER || + v_previousClickedObjectType == OL_GISObjectType.BATTERY || + v_previousClickedObjectType == OL_GISObjectType.CHARGER || + v_previousClickedObjectType == OL_GISObjectType.PARKING){ + for(GIS_Object previousClickedObject: c_previousSelectedObjects){ + f_styleAreas(previousClickedObject); + } +} + +if(v_customEnergyCoop != null){ + energyModel.f_removeEnergyCoop(v_customEnergyCoop); + v_customEnergyCoop = null; +} + + + VOID + double + 1709716821854 + f_connectResultsUI + -670 + 780 + + false + true + true + //Style resultsUI +f_styleResultsUI(); + +//Set ResultsUI radiobutton setup +if(settings.resultsUIRadioButtonSetup() != null){ + uI_Results.v_selectedRadioButtonSetup = settings.resultsUIRadioButtonSetup(); +} + +//Disable summary button if summary is not selected +if(settings.showKPISummary() == null || !settings.showKPISummary()){ + uI_Results.getCheckbox_KPISummary().setVisible(false); +} + +//Connect resultsUI +uI_Results.f_initializeResultsUI(); + +c_UIResultsInstances.add(uI_Results); + + + VOID + double + 1709718252272 + f_resetSettings + -290 + 750 + + false + true + true + if(!b_runningMainInterfaceScenarios){ + b_resultsUpToDate = false; + + // Update asset flow categories of all agents + energyModel.f_updateActiveAssetsMetaData(); + + // Switch to the live plots and do not allow the user to switch away from the live plot when the year is not yet simulated + for (UI_Results ui_results : c_UIResultsInstances) { + if (ui_results.f_getSelectedObjectData() != null) { + f_enableLivePlotsOnly(ui_results); + } + } + + // On all screens cover the resultsUI Buttons with the simulate year button + f_setAllSimulateYearScreens(); + + runSimulation(); +} + + + VOID + double + 1714130288661 + f_initialPVSystemsOrder + 85 + -690 + + false + true + true + List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); +List<GCHouse> housesWithoutPV = houses.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); +List<GCHouse> housesWithPV = new ArrayList<>(houses); +housesWithPV.removeAll(housesWithoutPV); + +c_orderedPVSystemsHouses = new ArrayList<>(housesWithoutPV); +c_orderedPVSystemsHouses.addAll(housesWithPV); + + +List<GCUtility> companies = new ArrayList<GCUtility>(energyModel.UtilityConnections.findAll( x -> true)); +List<GCUtility> companiesWithoutPV = companies.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); +List<GCUtility> companiesWithPV = companies.stream().filter( gc -> gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); +List<GCUtility> detailedCompaniesWithPV = companiesWithPV.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); +List<GCUtility> genericCompaniesWithPV = new ArrayList<>(companiesWithPV); +genericCompaniesWithPV.removeAll(detailedCompaniesWithPV); + +c_orderedPVSystemsCompanies = new ArrayList<>(companiesWithoutPV); +c_orderedPVSystemsCompanies.addAll(genericCompaniesWithPV); +c_orderedPVSystemsCompanies.addAll(detailedCompaniesWithPV); + + + + + VOID + double + 1714130342440 + f_initialElectricVehiclesOrder + 85 + -710 + + false + true + true + // First we make a copy of all the vehicle energy assets +List<J_EA> EAs = new ArrayList<>(findAll(energyModel.f_getEnergyAssets(), ea -> !(ea.getParentAgent() instanceof GCPublicCharger))); +EAs = EAs.stream().filter(ea -> ea instanceof J_EAVehicle).collect(Collectors.toList()); +// Find all the EVs at the start of the simulation +ArrayList<J_EA> otherEAs = EAs.stream().filter(ea -> !(ea instanceof J_EAEV)).collect(Collectors.toCollection(ArrayList::new)); +// We make sure that the EVs at the start of the simulation are the last in the list + + +for(J_EA vehicle : EAs){ + if(vehicle instanceof J_EAEV && !(vehicle.getParentAgent() instanceof GCUtility)){ // Companies can not get lower EV then current situation + otherEAs.add((J_EAEV) vehicle); + } +} + +c_orderedVehicles = otherEAs; + + + VOID + double + 1714131269202 + f_initialHeatingSystemsOrder + 85 + -650 + + false + true + true + List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); +List<GCHouse> housesWithoutHP = houses.stream().filter( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP ).collect(Collectors.toList()); +List<GCHouse> housesWithHP = new ArrayList<>(houses); +housesWithHP.removeAll(housesWithoutHP); + +c_orderedHeatingSystemsHouses = new ArrayList<>(housesWithoutHP); +c_orderedHeatingSystemsHouses.addAll(housesWithHP); + +List<GCUtility> companies = new ArrayList<GCUtility>(energyModel.UtilityConnections.findAll( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE && gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.CUSTOM)); +List<GCUtility> companiesWithoutHP = companies.stream().filter( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP).collect(Collectors.toList()); +List<GCUtility> companiesWithHP = companies.stream().filter( gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP ).collect(Collectors.toList()); +List<GCUtility> detailedCompaniesWithHP = companiesWithHP.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); +List<GCUtility> genericCompaniesWithHP = new ArrayList<>(companiesWithHP); +genericCompaniesWithHP.removeAll(detailedCompaniesWithHP); + +c_orderedHeatingSystemsCompanies = new ArrayList<>(companiesWithoutHP); +c_orderedHeatingSystemsCompanies.addAll(genericCompaniesWithHP); +c_orderedHeatingSystemsCompanies.addAll(detailedCompaniesWithHP); + + + + + VOID + double + 1714135623471 + f_initialAssetOrdering + 70 + -730 + + false + true + true + f_initialElectricVehiclesOrder(); +f_initialPVSystemsOrder(); +f_initialPTSystemsOrder_households(); +f_initialHeatingSystemsOrder(); +f_initialParkingSpacesOrder(); +f_initialChargerOrder(); +f_initializePrivateAndPublicParkingCarsOrder(); +f_initializeAdditionalVehicles(); +f_projectSpecificOrderedCollectionAdjustments(); + + + + + VOID + double + 1715116336665 + f_setColorsBasedOnElectricityConsumption + 1960 + 1610 + + false + true + true + + gis_area + GIS_Object + + if(gis_area.c_containedGridConnections.size() > 0){ + + double yearlyEnergyConsumption = sum( gis_area.c_containedGridConnections, x -> x.v_rapidRunData.getTotalElectricityConsumed_MWh()); + + if ( yearlyEnergyConsumption < 10){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} + else if ( yearlyEnergyConsumption < 50){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} + else if ( yearlyEnergyConsumption < 150){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} + else if ( yearlyEnergyConsumption < 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} + else if ( yearlyEnergyConsumption > 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} +} + + + VOID + double + 1715118739710 + f_setColorsBasedOnProduction + 1960 + 1680 + + false + true + true + + gis_area + GIS_Object + + if (gis_area.c_containedGridConnections.size() > 0) { + + //Define medium PV Value + double mediumPVValue_kWp = 100; + if (project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + mediumPVValue_kWp = 5; + } + + //Calculate total pv capacity on the gis object + double totalPVCapacity_kWp = 0; + for(GridConnection GC : gis_area.c_containedGridConnections){ + totalPVCapacity_kWp += GC.v_liveAssetsMetaData.totalInstalledPVPower_kW; + } + + //Set color of object based on total pv capacity + if(totalPVCapacity_kWp == 0){ + gis_area.f_style(rect_mapOverlayLegend_PVProduction1.getFillColor(), null, null, null); + } + else if (totalPVCapacity_kWp < mediumPVValue_kWp){ + gis_area.f_style(rect_mapOverlayLegend_PVProduction2.getFillColor(), null, null, null); + } + else{ + gis_area.f_style(rect_mapOverlayLegend_PVProduction3.getFillColor(), null, null, null); + } +} + + + VOID + double + 1715157302225 + f_projectSpecificSettings + -660 + 240 + + false + false + true + //Should be overridden in child interface!!! +traceln("Forgot to override project specific settings!!"); + + + VOID + double + 1715859145993 + f_UIStartup + -670 + 180 + + false + true + true + // UI elements + +//Project specific settings +f_projectSpecificSettings(); + +// Initialize the slider Asset Ordering lists +f_initialAssetOrdering(); + +//Connect the results UI +f_connectResultsUI(); + +//Initialize the UITabs +f_setUITabs(); + +//Initialize scenario radio button +f_initializeScenarioRadioButton(); + +//Initialize the legend +f_initializeLegend(); + +//Initialize map overlay buttons +f_initializeMapOverlayRadioButton(); + +//Set ui button visibility false at startup +f_createAdditionalUIs(); +button_goToUI.setVisible(false); + +//Create and set the grid topology colors (Netvlakken) +f_setGridTopologyColors(); + +//Disable cable button if no cables have been loaded in +if(c_LVCables.size() == 0 && c_MVCables.size() == 0){ + checkbox_cabels.setVisible(false); +} + +//Set order of certain layovers and submenus +f_initializePresentationOrder(); + +//Set to public model version styling if activated +if(settings.isPublicModel()){ + f_changeDefaultColorOfPrivateGC(); +} + +//Turn on update of live congestion colloring +b_updateLiveCongestionColors = true; + + + + RETURNS_VALUE + GISRegion + 1715868403475 + f_createGISObject + Functino used by the loader to create new GIS objects on the GIS map + -280 + 90 + + false + true + true + + gisTokens + double[] + + GISRegion gisregion = new GISRegion(map, gisTokens); +return gisregion; + + + VOID + double + 1716419446045 + f_enableTraceln + -640 + -120 + + false + true + true + + originalPrintStream + PrintStream + + System.setOut(originalPrintStream); + + + RETURNS_VALUE + PrintStream + 1716419448047 + f_disableTraceln + -640 + -140 + + false + true + true + PrintStream originalPrintStream = System.out; + +System.setOut(new PrintStream(new OutputStream() { + public void write(int b) { + } + })); +return originalPrintStream; + + + VOID + double + 1718263685462 + f_setColorsBasedOnConsumptionProfileHouseholds + 1960 + 1630 + + false + true + true + + gis_area + GIS_Object + + double yearlyElectricityConsumption_kWh = 0; +for( GridConnection gc : gis_area.c_containedGridConnections){ + if(gc.v_rapidRunData != null){ + yearlyElectricityConsumption_kWh += gc.v_rapidRunData.getTotalElectricityConsumed_MWh()*1000; + } + else{ + for ( J_EAConsumption consumptionAsset : gc.c_consumptionAssets){ + if( consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND ){ + yearlyElectricityConsumption_kWh += consumptionAsset.yearlyDemand_kWh; + } + } + } +} + +if ( yearlyElectricityConsumption_kWh == 0) { gis_area.f_style( v_unknownConsumptionColor, null, null, null );} +else if ( yearlyElectricityConsumption_kWh < 1500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} +else if ( yearlyElectricityConsumption_kWh < 2500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} +else if ( yearlyElectricityConsumption_kWh < 4000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} +else if ( yearlyElectricityConsumption_kWh < 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} +else if ( yearlyElectricityConsumption_kWh > 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} + + + + + VOID + double + 1718288402102 + f_updateMainInterfaceSliders + -670 + 666 + + false + true + true + uI_Tabs.f_updateSliders(); +if (uI_EnergyHub != null && uI_EnergyHub.uI_Tabs != null) { + uI_EnergyHub.uI_Tabs.f_updateSliders(); +} + + + + VOID + double + 1718552624959 + f_selectCharger + 70 + 1140 + + false + true + true + + charger + GCPublicCharger + + + objectGIS + GIS_Object + + objectGIS.gisRegion.setFillColor( v_selectionColor ); +objectGIS.gisRegion.setLineColor( orange ); + +//set info text +v_clickedObjectText = ""; //charger.p_CPOName + " laadpunt, "; +if (charger.p_address == null || charger.p_address.getAddress() == null) { + v_clickedObjectAdress = "Onbekend adres"; +} +else{ + v_clickedObjectAdress = charger.p_address.getStreetName(); +} +v_clickedObjectDetails = "No detaild info of charger available"; + +//v_clickedGridConnection = charger; +c_selectedGridConnections = new ArrayList<GridConnection>(Arrays.asList(charger)); +uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + +//Set the UI button +f_setUIButton(); + + + VOID + double + 1718566260603 + f_setColorsBasedOnGridTopology_objects + 1960 + 1730 + + false + true + true + + gis_area + GIS_Object + + if (gis_area.c_containedGridConnections.size() > 0) { + Color c = gis_area.c_containedGridConnections.get(0).p_parentNodeElectric.p_uniqueColor; + gis_area.f_style(c, black, 1.0, null); +} + + + VOID + double + 1719830600300 + f_getWeatherInfo + 940 + -280 + + false + false + true + v_outsideTemperature = roundToDecimal(energyModel.pp_ambientTemperature_degC.getCurrentValue(), 1); +v_solarIrradiance = roundToInt(energyModel.pp_PVProduction35DegSouth_fr.getCurrentValue() * 1000); + +double windspeed = roundToDecimal(energyModel.pp_windProduction_fr.getCurrentValue(), 1); +if (windspeed < 0.2){ + v_windspeed = "Laag"; +} +else if (windspeed < 0.6){ + v_windspeed = "Midden"; +} +else if (windspeed < 0.8){ + v_windspeed = "Hoog"; +} +else { + v_windspeed = "Zeer hoog"; +} + + + VOID + double + 1720793723819 + f_updateUIResultsData + 80 + 1160 + + false + true + true + for (GridConnection gc : c_selectedObjects.get(0).c_containedGridConnections) { + if (!c_selectedGridConnections.contains(gc)) { + c_selectedGridConnections.add(gc); + } +} + +if(c_selectedGridConnections.size()>1){ + v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); + uI_Results.f_updateResultsUI(v_customEnergyCoop); +} +else{ + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); +} + + + + VOID + double + 1721991420806 + f_setGridTopologyColors + -650 + 491 + + false + true + true + //Find all MV substations +List<GridNode> MVsubstations = findAll(energyModel.pop_gridNodes, GN -> GN.p_nodeType == OL_GridNodeType.SUBMV); + +if(MVsubstations != null || project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + b_gridLoopsAreDefined = true; +} + +v_amountOfDefinedGridLoops = 0; + +if(MVsubstations != null){ + //Set all unique grid topology colors for each substation and its children if the gridloops are defined + for (GridNode MVsub : MVsubstations){ + + //Create a unique color from a spectrum and assign it to the subMV + MVsub.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, MVsubstations.size()); + + //Assign unique color to all underlying grid nodes + MVsub.f_getLowerLVLConnectedGridNodes().forEach(GN -> GN.p_uniqueColor = MVsub.p_uniqueColor); + + //Update spectrum color index and total defined colours + v_amountOfDefinedGridLoops++; + } +} +else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + int totalNotToplevelGridNodes = energyModel.f_getGridNodesNotTopLevel().size(); + //Set all unique grid topology colors for each substation and its children if the gridloops are defined + for (GridNode node : energyModel.f_getGridNodesNotTopLevel()){ + + //Create a unique color from a spectrum and assign it to the subMV + node.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, totalNotToplevelGridNodes); + + //Update spectrum color index and total defined colours + v_amountOfDefinedGridLoops++; + } +} + + + VOID + double + 1721991963719 + f_styleSUBMV + -650 + 431 + + false + true + true + + gisregion + GISRegion + + gisregion.setVisible(false); + + + VOID + double + 1721992103665 + f_styleMVMV + -650 + 411 + + false + true + true + + gisregion + GISRegion + + gisregion.setFillColor(v_MVMVNodeColor); +gisregion.setLineStyle( LINE_STYLE_SOLID ); +gisregion.setLineColor( v_MVMVLineColor ); +gisregion.setLineWidth(2); + + + VOID + double + 1721049341787 + f_listFunctions + 80 + 1180 + + false + true + true + if(c_selectedObjects.get(0).c_containedGridConnections.size() > 1){ + HashMap<String, Integer> functionsList = new HashMap<String, Integer>(); + + for (int i = 0; i < c_selectedObjects.get(0).c_containedGridConnections.size(); i++) { + //split functies als er meerdere zijn + String[] splitFunctions = c_selectedObjects.get(0).c_containedGridConnections.get(i).p_purposeBAG.split(","); + + for (int j = 0; j < splitFunctions.length; j++) { + // als de key al bestaat, itereer + if (functionsList.get(splitFunctions[j]) != null) { + functionsList.put(splitFunctions[j], functionsList.get(splitFunctions[j]) + 1); + } + // zo niet, voeg toe + else { + functionsList.put(splitFunctions[j],1); + } + } + } + + /* + for (String i : functionsList.keySet()) { + traceln(i + ": " + functionsList.get(i)); + } + */ +} + + + VOID + double + 1725006890451 + f_setUIButton + 80 + 1200 + + false + true + true + switch(v_clickedObjectType){ + +case BUILDING: + if (c_selectedGridConnections.size() > 1 || !(c_selectedGridConnections.get(0) instanceof GCUtility) || !c_selectedGridConnections.get(0).v_isActive){ + button_goToUI.setVisible(false); + } + else{ + button_goToUI.setText("Ga naar het Bedrijfsportaal"); + button_goToUI.setVisible(true); + } + break; + +case ELECTROLYSER: + button_goToUI.setText("Ga naar het Waterstof Dashboard"); + button_goToUI.setVisible(true); + break; + +case BATTERY: + button_goToUI.setText("Ga naar het Batterijen Dashboard"); + button_goToUI.setVisible(true); + break; + +case CHARGER: + button_goToUI.setVisible(false); + break; + +default: + button_goToUI.setVisible(false); + break; +} + + + + RETURNS_VALUE + GISRoute + 1725266804325 + f_createGISLine + -280 + 110 + + false + true + true + + GISCoords + double[] + + + objectType + OL_GISObjectType + + +Curve curve = new Curve(); +for(int i = 0; i+3 < GISCoords.length; i += 2){ + GISMarkupSegmentLine segment = new GISMarkupSegmentLine(GISCoords[i], GISCoords[i+1], GISCoords[i+2], GISCoords[i+3]); + curve.addSegment(segment); +} + +//Create route (line) +GISRoute gisroute = new GISRoute(map, curve, true); + +//Object styling +switch(objectType){ + + case LV_CABLE: + c_LVCables.add(gisroute); + //Styling + gisroute.setLineStyle(LINE_STYLE_SOLID); + gisroute.setLineWidth(0.8); + gisroute.setLineColor(v_LVGridColor); + gisroute.setVisible(false); + break; + + case MV_CABLE: + c_MVCables.add(gisroute); + //Styling + gisroute.setLineStyle(LINE_STYLE_SOLID); + gisroute.setLineWidth(1); + gisroute.setLineColor(v_MVGridColor); + gisroute.setVisible(false); + break; +} + +return gisroute; + + + + VOID + double + 1725968656820 + f_setColorsBasedOnGridTopology_gridnodes + 1960 + 1750 + + false + true + true + + GN + GridNode + + if(GN.gisRegion != null){ + GN.gisRegion.setFillColor(GN.p_uniqueColor); + GN.gisRegion.setLineColor(GN.p_uniqueColor.brighter()); +} + + + VOID + double + 1725977409304 + f_setSliderPresets + -650 + 641 + + false + false + true + //Should be overridden in child interface!!! +traceln("Forgot to override project specific slider settings!!"); + + + VOID + double + 1726068314849 + f_projectSpecificStyling + -660 + 220 + + false + true + true + //Function used to set the colors, styling, and other parameters/functions for each specific project +//Should be overridden!! +traceln("DID NOT OVERRIDE THE PROJECT SPECIFIC STYLING!"); + + + VOID + double + 1729685968993 + f_projectSpecificOrderedCollectionAdjustments + 86 + -550 + + false + true + true + //Function that can be used to make project specific adjustments to the ordered collection +//SHOULD BE OVERRIDEN IF YOU WANT TO USE THIS + + + VOID + double + 1734442458629 + f_applyFilter + -1575 + 130 + + false + true + true + + selectedFilter + OL_FilterOptionsGC + + + selectedFilterName + String + + c_selectedFilterOptions.add(selectedFilter); + +ArrayList<GridConnection> toBeFilteredGC = new ArrayList<GridConnection>(); + +if(c_selectedFilterOptions.size()>1 && c_selectedGridConnections.size()> 0){ // Already filtering + toBeFilteredGC = new ArrayList<GridConnection>(c_selectedGridConnections); +} +else{ // First filter + toBeFilteredGC = new ArrayList<GridConnection>(energyModel.f_getActiveGridConnections()); +} + +//After a filter selecttion, reset previous clicked building/gridNode colors and text +v_previousClickedObjectType = v_clickedObjectType; +c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); +c_selectedGridConnections.clear(); +c_selectedObjects.clear(); + + +//Deselect previous selection +if( v_previousClickedObjectType != null){ + f_deselectPreviousSelect(); +} + +//Can filter return 0? (Only allowed for filters who are not inmediately active (gridLoops, nbh, etc.) +boolean filterCanReturnZero = false; + +switch(selectedFilter){ + case COMPANIES: + f_filterCompanies(toBeFilteredGC); + break; + + case HOUSES: + f_filterHouses(toBeFilteredGC); + break; + + case DETAILED: + f_filterDetailed(toBeFilteredGC); + break; + + case NONDETAILED: + f_filterEstimated(toBeFilteredGC); + break; + + case HAS_PV: + f_filterHasPV(toBeFilteredGC); + break; + + case HAS_TRANSPORT: + f_filterHasTransport(toBeFilteredGC); + break; + + case HAS_EV: + f_filterHasEV(toBeFilteredGC); + break; + + case GRIDTOPOLOGY_SELECTEDLOOP: + if(!c_filterSelectedGridLoops.isEmpty()){ + f_filterGridLoops(toBeFilteredGC); + } + else{ + + f_setForcedClickScreenText("Selecteer een lus"); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(true); + } + + if(c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.GRID_NEIGHBOURS)){ + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.GRID_NEIGHBOURS),true); + } + if(c_selectedFilterOptions.size() > 1){ + c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); + } + else{ + filterCanReturnZero = true; + } + } + break; + + case SELECTED_NEIGHBORHOOD: + if(!c_filterSelectedNeighborhoods.isEmpty()){ + f_filterNeighborhoods(toBeFilteredGC); + } + else{ + f_setForcedClickScreenText("Selecteer een buurt"); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(true); + } + if(c_selectedFilterOptions.size() > 1){ + c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); + } + else{ + filterCanReturnZero = true; + } + } + break; + case MANUAL_SELECTION: + if(c_manualFilterSelectedGC.size() > 0){ + f_filterManualSelection(toBeFilteredGC); + } + else if(c_selectedFilterOptions.size() > 1){ + if(c_manualFilterDeselectedGC.size() > 0){ + f_filterManualSelection(toBeFilteredGC); + } + else{ + c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); + } + } + else{ + filterCanReturnZero = true; + } + + break; +} + +if(c_selectedGridConnections.size() == 0 && !filterCanReturnZero){ // Not allowed to return zero, while returning zero + f_removeFilter(selectedFilter, selectedFilterName); + + //Notify filter has not been applied, cause no results are given + f_setErrorScreen("Geselecteerde filter geeft geen resultaten. De filter is gedeactiveerd.", 0, 0); +} +else if(c_selectedGridConnections.size() == 0 && filterCanReturnZero){//Allowed to return zero filtered gc, while returning zero + //Do nothing +} +else{//Filtered GC returns GC + + //Set color of all gis objects of new filter selection + v_clickedObjectType = OL_GISObjectType.BUILDING; + + for (GridConnection GC: c_selectedGridConnections){ + for (GIS_Object objectGIS : GC.c_connectedGISObjects) { + objectGIS.gisRegion.setFillColor(v_selectionColorAddBuildings); + c_selectedObjects.add(objectGIS); + } + } + + //Set graphs + if(c_selectedGridConnections.size()>1){ + v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); + uI_Results.f_updateResultsUI(v_customEnergyCoop); + } + else{ + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + } +} + + + VOID + double + 1734442462084 + f_setFilter + -1575 + 60 + + false + true + true + + selectedFilterName + String + + OL_FilterOptionsGC selectedFilter_OL = null; +switch(selectedFilterName){ + case "-": + //Do nothing + break; + case "Bedrijfspanden": + selectedFilter_OL = OL_FilterOptionsGC.COMPANIES; + break; + case "Woonhuizen": + selectedFilter_OL = OL_FilterOptionsGC.HOUSES; + break; + case "Met bekende data": + selectedFilter_OL = OL_FilterOptionsGC.DETAILED; + break; + case "Met geschatte data": + selectedFilter_OL = OL_FilterOptionsGC.NONDETAILED; + break; + case "Met zonnepanelen": + selectedFilter_OL = OL_FilterOptionsGC.HAS_PV; + break; + case "Met voertuigen": + selectedFilter_OL = OL_FilterOptionsGC.HAS_TRANSPORT; + break; + case "Met EV": + selectedFilter_OL = OL_FilterOptionsGC.HAS_EV; + break; + case "In de aangewezen 'lus'": + selectedFilter_OL = OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP; + break; + case "In de aangwezen 'buurt'": + selectedFilter_OL = OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD; + break; + case "Handmatige selectie": + selectedFilter_OL = OL_FilterOptionsGC.MANUAL_SELECTION; + break; +} + +boolean manualSelectionFilterActive = false; + +//Remove manual filter first +if(!selectedFilterName.equals("Handmatige selectie") && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + button_removeManualSelection.action(); +} + + +if(!selectedFilterName.equals("-") && !c_selectedFilterOptions.contains(selectedFilter_OL)){ // Set filter + traceln("Geselecteerde filter ( " + selectedFilterName + " ) toegevoegd."); + t_activeFilters.setText( t_activeFilters.getText() + selectedFilterName + "\n"); + f_applyFilter(selectedFilter_OL, selectedFilterName); +} +else if(c_selectedFilterOptions.contains(selectedFilter_OL)){ // Remove filter + f_removeFilter(selectedFilter_OL, selectedFilterName); +} + + + VOID + double + 1734445008646 + f_removeAllFilters + -1570 + 525 + + false + true + true + c_selectedFilterOptions.clear(); +t_activeFilters.setText(""); + +//Deselect everything and set region as main +f_clearSelectionAndSelectEnergyModel(); + + + VOID + double + 1734447122780 + f_selectGridLoop + -1530 + 310 + + false + true + true + + clickx + double + + + clicky + double + + +//Check if click was on Building, if yes, select grid building +for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ + if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ + if (b.gisRegion.isVisible()) { //only allow us to click on visible objects + if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections + GridConnection clickedGridConnection = b.c_containedGridConnections.get(0); // Find buildings powered by the same GC as the clicked building + GridNode clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; + ArrayList<GridNode> allGridNodes = new ArrayList<GridNode>(energyModel.f_getGridNodesTopLevel()); + allGridNodes.addAll(energyModel.f_getGridNodesNotTopLevel()); + + while( clickedGridConnectionConnectedGridNode.p_parentNodeID != null && + clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.SUBMV && + clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.MVMV && + clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.HVMV + ){ + String parentNodeName = clickedGridConnectionConnectedGridNode.p_parentNodeID; + if(parentNodeName != null && !parentNodeName.equals("-") && !parentNodeName.equals("")){ + clickedGridConnectionConnectedGridNode = findFirst(allGridNodes, GN -> GN.p_gridNodeID.equals(parentNodeName)); + } + else{ // At top node --> select the directly attached grid node instead, and break out of while loop. + clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; + break; + } + } + + //This deselect the previous selection of gridloops + f_setFilter("In de aangewezen 'lus'"); + + if(c_filterSelectedGridLoops.contains(clickedGridConnectionConnectedGridNode)){ + c_filterSelectedGridLoops.remove(clickedGridConnectionConnectedGridNode); + } + else{ + c_filterSelectedGridLoops.add(clickedGridConnectionConnectedGridNode); + } + + if(gr_forceMapSelection.isVisible()){ + f_setForcedClickScreenText(""); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); + } + } + + //This selects the new selection of gridloops + f_setFilter("In de aangewezen 'lus'"); + + return; + + } + } + } +} + + + + VOID + double + 1734448628428 + f_filterCompanies + -1550 + 150 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC instanceof GCUtility)); + + + + + VOID + double + 1734448687355 + f_filterHouses + -1550 + 170 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC instanceof GCHouse)); + + + + + VOID + double + 1734448688472 + f_filterDetailed + -1550 + 190 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.p_owner.p_detailedCompany)); + + + + VOID + double + 1734448689519 + f_filterEstimated + -1550 + 210 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> !GC.p_owner.p_detailedCompany)); + + + + VOID + double + 1734448690487 + f_filterHasPV + -1550 + 230 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW))); + + + + VOID + double + 1734448691508 + f_filterHasTransport + -1550 + 250 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.c_vehicleAssets.size() > 0)); + + + + + VOID + double + 1734451505770 + f_removeFilter + -1575 + 105 + + false + true + true + + selectedFilter + OL_FilterOptionsGC + + + selectedFilterName + String + + c_selectedFilterOptions.remove(selectedFilter); + +ArrayList<OL_FilterOptionsGC> toBeReappliedFilters = new ArrayList<OL_FilterOptionsGC>(c_selectedFilterOptions); +c_selectedFilterOptions.clear(); + +if(toBeReappliedFilters.size() > 0){ + for(OL_FilterOptionsGC filterOption : toBeReappliedFilters){ + f_applyFilter(filterOption, selectedFilterName); + } + String toBeAdjustedFilterText = t_activeFilters.getText(); + String newActiveFilterText = toBeAdjustedFilterText.replace(selectedFilterName + "\n", ""); + t_activeFilters.setText(newActiveFilterText); + + traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); +} +else{ // All filters removed + traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); + f_removeAllFilters(); +} + + + VOID + double + 1734517589341 + f_filterGridLoops + -1550 + 290 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + HashSet<GridConnection> gridConnectionsOnLoop = new HashSet<GridConnection>(); + +for(GridNode GridLoop : c_filterSelectedGridLoops) + if(b_gridLoopsAreDefined){ + OL_GridNodeType loopTopNodeType= GridLoop.p_nodeType; + switch(loopTopNodeType){ + case MVLV: + for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + break; + case SUBMV: + for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + break; + + case MVMV: + for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + + break; + + case HVMV: + for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + break; + } + } + else{ + for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + } + +c_selectedGridConnections = new ArrayList<>(gridConnectionsOnLoop); + + + VOID + double + 1736344958050 + f_setErrorScreen + 3410 + 930 + + false + true + true + + errorMessage + String + + + xOffset + double + + + yOffset + double + + gr_errorScreen.setPos(xOffset, yOffset); + +//Reset location and height +button_errorOK.setY(550); +rect_errorMessage.setY(380); +rect_errorMessage.setHeight(200); +t_errorMessage.setY(430); + +//Set position above all other things +f_setShapePresentationOnTop(gr_errorScreen); + +int width_numberOfCharacters = 44; + +// Set Text +Pair<String, Integer> p = v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); +errorMessage = p.getFirst(); +int numberOfLines = p.getSecond(); +int additionalLines = max(0, numberOfLines - 3); + +// Set Size +rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); +rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); +//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); +t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); + +t_errorMessage.setText(errorMessage); +gr_errorScreen.setVisible(true); + + + VOID + double + 1736442051389 + f_styleResultsUI + -650 + 800 + + false + true + true + uI_Results.f_styleResultsUIHeader(zenmocolor_blue3.getFillColor(), zenmocolor_blue3.getFillColor(), 1.0, LINE_STYLE_SOLID); +uI_Results.f_styleAllCharts(v_backgroundColor, zenmocolor_blue3.getFillColor(), 1.0, LINE_STYLE_SOLID); + + + VOID + double + 1737653178011 + f_selectNeighborhood + -1530 + 370 + + false + true + true + + clickx + double + + + clicky + double + + +//Check if click was on Building, if yes, select grid building +for ( GIS_Object region : c_GISNeighborhoods ){ + if( region.gisRegion != null && region.gisRegion.contains(clickx, clicky) ){ + if (region.gisRegion.isVisible()) { //only allow us to click on visible objects + + GIS_Object clickedNeighborhood = region; + + + //This deselects the previous selected neighborhood filter + f_setFilter("In de aangwezen 'buurt'"); + + if(c_filterSelectedNeighborhoods.contains(clickedNeighborhood)){ + c_filterSelectedNeighborhoods.remove(clickedNeighborhood); + } + else{ + c_filterSelectedNeighborhoods.add(clickedNeighborhood); + } + + if(gr_forceMapSelection.isVisible()){ + f_setForcedClickScreenText(""); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); + } + } + //This sets the new selected neighborhoods filter + f_setFilter("In de aangwezen 'buurt'"); + + return; + } + } +} + + + + VOID + double + 1737653178013 + f_filterNeighborhoods + -1550 + 350 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + ArrayList<GridConnection> gridConnectionsInNeighborhood = new ArrayList<GridConnection>(); + +for(GridConnection GC : toBeFilteredGC){ + for(GIS_Object nbh : c_filterSelectedNeighborhoods) + if( nbh.gisRegion.contains(GC.p_latitude, GC.p_longitude) ){ + gridConnectionsInNeighborhood.add(GC); + } +} + +//If NBH results in zero GC, remove last added nbh +if(gridConnectionsInNeighborhood.isEmpty() && !c_filterSelectedNeighborhoods.isEmpty()){ + c_filterSelectedNeighborhoods.remove(c_filterSelectedNeighborhoods.size() - 1); +} + +c_selectedGridConnections = new ArrayList<>(gridConnectionsInNeighborhood); + + + VOID + double + 1740043548084 + f_enableLivePlotsOnly + -270 + 770 + + false + true + true + + resultsUI + UI_Results + + if (resultsUI.f_getSelectedObjectData() != null) { + if(resultsUI.getGr_resultsUIHeader().isVisible()){ + resultsUI.getRadioButtons().setValue(0, true); + } + resultsUI.chartProfielen.getPeriodRadioButton().setValue(0, true); + resultsUI.f_enableNonLivePlotRadioButtons(false); +} +for (ShapeRadioButtonGroup rb :resultsUI.chartProfielen.getAllPeriodRadioButtons()) { + rb.setValue(0, false); +} +resultsUI.chartProfielen.getPeriodRadioButton().setValue(0, true); + +resultsUI.f_enableNonLivePlotRadioButtons(false); + + + VOID + double + 1742226689515 + f_filterManualSelection + -1550 + 415 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + ArrayList<GridConnection> resultingGridConnectionSelection = new ArrayList<GridConnection>(); + +if(c_selectedFilterOptions.size() > 1){ + resultingGridConnectionSelection.addAll(toBeFilteredGC); +} +else{//Manual selection is the only active filter -> Resulting grid connection selection should start empty +} + +for(GridConnection manualSelectedGC : c_manualFilterSelectedGC){ + if(!resultingGridConnectionSelection.contains(manualSelectedGC)){ + resultingGridConnectionSelection.add(manualSelectedGC); + } +} +for(GridConnection manualDeselectedGC : c_manualFilterDeselectedGC){ + if(resultingGridConnectionSelection.contains(manualDeselectedGC)){ + resultingGridConnectionSelection.remove(manualDeselectedGC); + } +} + + +c_selectedGridConnections = new ArrayList<>(resultingGridConnectionSelection); + + + VOID + double + 1742226787560 + f_selectManualFilteredGC + -1530 + 435 + + false + true + true + + clickx + double + + + clicky + double + + //Initialize clickedObject +GIS_Object clickedObject = null; + +//Check if click was on Building, if yes, select building +for ( GIS_Object object : energyModel.pop_GIS_Buildings ){//pop_GIS_Buildings + if( object.gisRegion != null && object.gisRegion.contains(clickx, clicky) ){ + if (object.gisRegion.isVisible()) { //only allow us to click on visible objects + if (object.c_containedGridConnections.size() > 0 ){ + clickedObject = object; + break; + } + } + } +} + +//If click was not on a building, check if click was on an EA, if yes, select EA +if(clickedObject == null){ + for ( GIS_Object object : energyModel.pop_GIS_Objects ){//pop_GIS_Buildings + if( object.gisRegion != null && object.gisRegion.contains(clickx, clicky) ){ + if (object.gisRegion.isVisible()) { //only allow us to click on visible objects + if (object.c_containedGridConnections.size() > 0 ){ + clickedObject = object; + break; + } + } + } + } +} + +//If a building or EA has been selected perform click functionality +if(clickedObject != null){ + boolean select = true; // Deselect == false; + boolean removedFromSelectedGC = false; + boolean removedFromDeselectedGC = false; + + ArrayList<GridConnection> clickedGridConnections = new ArrayList<GridConnection>(clickedObject.c_containedGridConnections); + + for (GridConnection clickedGC : clickedGridConnections){ + if(c_selectedGridConnections.contains(clickedGC)){ + c_selectedGridConnections.remove(clickedGC); + select = false; + } + + if(c_manualFilterSelectedGC.contains(clickedGC)){ + c_manualFilterSelectedGC.remove(clickedGC); + } + else if(c_manualFilterDeselectedGC.contains(clickedGC)){ + c_manualFilterDeselectedGC.remove(clickedGC); + } + } + + if(select){ + c_selectedGridConnections.addAll(clickedGridConnections); + c_manualFilterSelectedGC.addAll(clickedGridConnections); + traceln("Handmatig geselecteerd object toegevoegd aan selectie"); + } + else{ + c_manualFilterDeselectedGC.addAll(clickedGridConnections); + traceln("Handmatig geselecteerd object verwijderd van selectie"); + } + + + //Disable traceln + PrintStream originalPrintStream = f_disableTraceln(); + + //This deactivates the previous selection + f_setFilter("Handmatige selectie"); + + //This activates the new selection + f_setFilter("Handmatige selectie"); + + //Enable traceln + f_enableTraceln(originalPrintStream); + + return; +} + + + VOID + double + 1742300624199 + f_setForcedClickScreenText + 140 + -880 + + false + true + true + + forcedClickScreenText + String + + t_forcedClickMessage.setText(forcedClickScreenText); + +if(t_forcedClickMessage.getText().equals("")){ + gr_ForceMapSelectionText.setVisible(false); +} +else{ + gr_ForceMapSelectionText.setVisible(true); +} + + + VOID + double + 1743509491686 + f_setMapViewBounds + -640 + -90 + + false + true + true + + GISObjects + List<GIS_Object> + + // Initialize min and max values +double minLat = Double.MAX_VALUE; +double maxLat = Double.MIN_VALUE; +double minLon = Double.MAX_VALUE; +double maxLon = Double.MIN_VALUE; + +// Loop through all GISRegions and find the bounding box +for(GIS_Object go : GISObjects){ + + GISRegion region = go.gisRegion; + double[] points = region.getPoints(); // Get the boundary points of the region + + for (int i = 0; i < points.length; i += 2) { // i+=2 because data is in lat, lon pairs + double lat = points[i]; // Latitude + double lon = points[i + 1]; // Longitude + + + + // Update min/max latitude and longitude + minLat = Math.min(minLat, lat); + maxLat = Math.max(maxLat, lat); + minLon = Math.min(minLon, lon); + maxLon = Math.max(maxLon, lon); + } +} + +//Make it slightly bigger, so it isnt exact on the line of the regions +minLat = minLat - 0.0001; +maxLat = maxLat + 0.0001; +minLon = minLon - 0.0001; +maxLon = maxLon + 0.0001; + +// Set the map to fit the calculated bounds +map.fitBounds(minLat, minLon, maxLat, maxLon); + + + VOID + double + 1743518032245 + f_setStartView + -640 + 285 + + false + true + true + //traceln("f_setStartView() reached!"); + +if(project_data.map_centre_latitude() != null && project_data.map_centre_longitude() != null && project_data.map_centre_latitude() != 0 && project_data.map_centre_longitude() != 0){ + map.setCenterLatitude(project_data.map_centre_latitude()); + map.setCenterLongitude(project_data.map_centre_longitude()); +} +else{ + ArrayList<GIS_Object> gisObjects_for_mapViewBounds = new ArrayList<GIS_Object>(); + if((settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0) && findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION).size() > 0){ + gisObjects_for_mapViewBounds.addAll(findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION)); + } + else{ + for (GIS_Object building : energyModel.pop_GIS_Buildings) { + if(building.gisRegion.isVisible()){ + gisObjects_for_mapViewBounds.add(building); + } + } + } + f_setMapViewBounds(gisObjects_for_mapViewBounds); +} + +if(project_data.map_scale() != null){ + map.setMapScale(project_data.map_scale()); +} + +va_Interface.navigateTo(); +v_currentViewArea = va_Interface; + + + VOID + double + 1743665953113 + f_setInfoText + -2010 + 120 + + false + true + true + + infoBubble + ShapeImage + + + descriptionText + String + + + xPosition + double + + + yPosition + double + + if ( p_currentActiveInfoBubble.size() > 0 && p_currentActiveInfoBubble.get(0) == infoBubble ) { + // If we click a second time on the same bubble it should close the window + p_currentActiveInfoBubble.clear(); + gr_infoText.setVisible(false); +} +else { + p_currentActiveInfoBubble.clear(); + p_currentActiveInfoBubble.add(infoBubble); + + int width_ch = 50; + // Set Text + Pair<String, Integer> p = v_infoText.restrictWidth(descriptionText, width_ch); + t_infoTextDescription.setText(p.getFirst()); + + // Set Size + rect_infoText.setWidth(width_ch * 7.5); // about 7.5 px per char for sans serif 14 pt + rect_infoText.setHeight(50 + p.getSecond() * 20); // about 50 px for title and 20 px per line for sans serif 14 pt + + // Set Position + // The group position is on the top left, not the centre. + double margin_px = 15; + //double posX = f_getAbsolutePosition(infoBubble).getX(); + //double posY = f_getAbsolutePosition(infoBubble).getY(); + if (xPosition < (v_currentViewArea.getX() + v_currentViewArea.getWidth()/2) ) { + // bubble is on the left half, so text should appear to the right + gr_infoText.setX( xPosition + margin_px + infoBubble.getWidth()/2); + } + else { + // bubble is on the right half, so text should appear to the left + gr_infoText.setX( xPosition - margin_px + infoBubble.getWidth()/2 - rect_infoText.getWidth()); + } + + // In AnyLogic the Y-Axis is inverted + if (yPosition > (v_currentViewArea.getY() + v_currentViewArea.getHeight()/2) ) { + // bubble is on the bottom half, so text should appear above + gr_infoText.setY( yPosition - margin_px + infoBubble.getHeight()/2 - rect_infoText.getHeight()); + } + else { + // bubble is on the top half, so text should appear below + gr_infoText.setY( yPosition + margin_px + infoBubble.getHeight()/2); + } + + // Position of close button + gr_closeInfoText.setX( width_ch * 7.5 - 20 ); // 20 px offset from the right hand side + + gr_infoText.setVisible(true); +} + + + RETURNS_VALUE + Pair<ShapeGroup, Point> + 1744894817569 + f_getGroupPositionIteration + true + -1980 + 265 + + false + true + true + + pair + Pair<ShapeGroup, Point> + + return new Pair(pair.getFirst().getGroup(), new Point(pair.getFirst().getX() + pair.getSecond().getX(), pair.getFirst().getY() + pair.getSecond().getY())); + + + RETURNS_VALUE + Point + 1744894817571 + f_getAbsolutePosition + true + -2000 + 240 + + false + true + true + + shape + Shape + + // Note: Only works if the Agent is not living in the space of the interface! + +// Start with the shape position +Point point = new Point(shape.getX(), shape.getY()); +traceln("point0: " + point); + +// Find presentation the shape is in to get the offset. +if (shape.getPresentable() == this) { + // The shape is on this canvas, no additional offset +} +else { + // The shape is in a (possibly nested) presentation + traceln("shape.getPresentable(): " + shape.getPresentable()); + traceln("shapetoplevel: " + shape.getPresentable().getPresentationShape()); + for (ShapeEmbeddedObjectPresentation ap : c_presentations) { + traceln("AP: " + ap); + traceln("AG: " + ap.getEmbeddedObject()); + } + ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable()); + if (presentation == null) { + throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); + } + traceln("point1: " + point); + + point.add( new Point(presentation.getX(), presentation.getY()) ); + // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. + traceln("point2: " + point); + + point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); + + traceln("point3: " + point); + Pair<ShapeEmbeddedObjectPresentation, Point> pair = new Pair(presentation, point); + while ( pair.getFirst().getPresentable() != this ) { + pair = f_getPresentationPositionIteration(pair); + traceln("pair: " + pair); + traceln("point_i: " + pair.getSecond()); + } + point = pair.getSecond(); +} + +// Recursively add the group offsets. +ShapeGroup group = shape.getGroup(); +traceln("group x: " + group.getX()); +traceln("group y: " + group.getY()); +Pair<ShapeGroup, Point> pair = new Pair(group, point); +while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { + pair = f_getGroupPositionIteration(pair); + traceln("point_j: " + pair.getSecond()); +} +return pair.getSecond(); + + + + + +/* +(main) tabs_presentation (tabs_presentation.getEmbeddedobject() = agent1) + (agent 1) tab_elec_presentation (tab_elec_presentation.getEmbeddedobject() = agent2) + (agent 2) shape (shape.getpresentable() = agent2) + + +findfirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable() ) => tab_elec_presentation + +tab_elec_presentation.getPresentable() => agent 1, so use this in the next iteration + +findfirst(c_presentations, ap -> ap.getEmbeddedObject() == tab_elec_presentation.getPresentable() ) => tabs_presentation + +*/ + + +/* + +double presentationOffsetX; +double presentationOffsetY; +if (shape.getPresentable() == this) { + // The shape is on this canvas, no additional offset + presentationOffsetX = 0.0; + presentationOffsetY = 0.0; +} +else { + traceln("getEmbeddedObject: " + c_presentations.get(0).getEmbeddedObject()); + traceln("getEmbeddedObject: " + c_presentations.get(1).getEmbeddedObject()); + traceln("shape.getPresentable()" + shape.getPresentable()); + traceln("agent presentable: " + agent.presentation); + traceln("this presentable: " + this.presentation); + ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable()); + if (presentation == null) { + throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); + } + presentationOffsetX = presentation.getX(); + presentationOffsetY = presentation.getY(); + // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. + presentationOffsetX += presentation.getGroup().getX(); + presentationOffsetY += presentation.getGroup().getY(); + traceln("presentationOffsetX: " + presentationOffsetX); +} + +// Add the presentation offset to the shape position and then recursively add the group offsets. +Point point = new Point(shape.getX() + presentationOffsetX, shape.getY() + presentationOffsetY); +ShapeGroup group = shape.getGroup(); +Pair<ShapeGroup, Point> pair = new Pair(group, point); +while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { + pair = f_getGroupPositionIteration(pair); +} +return pair.getSecond(); + +*/ + + + + RETURNS_VALUE + Pair<ShapeEmbeddedObjectPresentation, Point> + 1744894817573 + f_getPresentationPositionIteration + true + -1980 + 285 + + false + true + true + + pair + Pair<ShapeEmbeddedObjectPresentation. Point> + + ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == pair.getFirst().getPresentable()); +if (presentation == null) { + throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); +} +Point point = pair.getSecond(); +traceln("presentation agent: " + presentation.getEmbeddedObject()); +traceln("point in presentation iteration before: " + point); +point.add( new Point(presentation.getX(), presentation.getY()) ); +// It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. +traceln("point in presentation iteration middle: " + point); +point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); +traceln("point in presentation iteration after: " + point); + +return new Pair(presentation, point); + + + VOID + double + 1744624088848 + f_harvestEnergyModelLoadData + true + -556 + -710 + + false + true + true + traceln("Start writing Electricity Load Balance data to excel!"); + +//Clear the sheet first +f_clearExportSheet(); + +//Set column names +excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); +excel_exportBalanceLoadData.setCellValue("Totale load van het Hele gebied [kWh]", "Electricity Load Balance", 1, 2); + +//Get energyModel profile +double[] loadArray_kW = energyModel.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); + +for (int i = 0; i < loadArray_kW.length ; i++) { + + //Time series + excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); + + //Data + excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 2); +} + +//Write file +excel_exportBalanceLoadData.writeFile(); + +traceln("Finished writing Electricity Load Balance data to excel!"); + + + VOID + double + 1744624088850 + f_harvestSelectedGCLoadData + true + -556 + -470 + + false + true + true + traceln("Start writing Electricity Load Balance data to excel!"); + +//Clear the sheet first +f_clearExportSheet(); + +//Initialize column index +int columnIndex = 2; + +//Initialize total balance flow for all selected GC +double[] cumulativeLoadArray_kW = new double[energyModel.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW().length]; + +//Loop over gc and add the data +for(GridConnection GC : c_selectedGridConnections){ + + //Add gc data + excel_exportBalanceLoadData.setCellValue(GC.p_ownerID, "Electricity Load Balance", 1, columnIndex); + + double[] loadArray_kW = GC.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); + + for (int i = 0; i < loadArray_kW.length; i++ ) { + excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, columnIndex); + + //Add to cumulative load array + cumulativeLoadArray_kW[i] += loadArray_kW[i]; + } + + //Add timestep column (only the first time) + if (columnIndex == 2) { + excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); + traceln("ArraySize: %s", loadArray_kW.length); + for (int i = 0; i < loadArray_kW.length ; i++) { + excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); + } + } + + //Increase columnIndex + columnIndex++; +} + +//Cumulative data column +if(c_selectedGridConnections.size() > 1){ + excel_exportBalanceLoadData.setCellValue("Totale load [kWh]", "Electricity Load Balance", 1, columnIndex); + for (int i = 0; i < cumulativeLoadArray_kW.length ; i++) { + excel_exportBalanceLoadData.setCellValue( cumulativeLoadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, columnIndex); + } +} + +//Write the file +excel_exportBalanceLoadData.writeFile(); + +traceln("Finished writing Electricity Load Balance data to excel!"); + + + VOID + double + 1744624088852 + f_harvestTotalBalanceLoadOfSelectedEnergyCoop + true + -556 + -590 + + false + true + true + traceln("Start writing Electricity Load Balance data to excel!"); + +//Clear the sheet first +f_clearExportSheet(); + +//Set column names +excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); +excel_exportBalanceLoadData.setCellValue("Totale load van de geselecteerde EnergyCoop [kWh]", "Electricity Load Balance", 1, 2); + +//Get energyModel profile +double[] loadArray_kW = v_customEnergyCoop.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); + +for (int i = 0; i < loadArray_kW.length ; i++) { + + //Time series + excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); + + //Data + excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 2); +} + +//Write file +excel_exportBalanceLoadData.writeFile(); + +traceln("Finished writing Electricity Load Balance data to excel!"); + + + VOID + double + 1744985599017 + f_setAllFileDownloadersDisabled + true + -556 + -410 + + false + true + true + fileChooser_exportBalanceLoadEnergyModel.setEnabled(false); +fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(false); +fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(false); + + + VOID + double + 1744986150240 + f_clearExportSheet + true + -556 + -390 + + false + true + true + //Clear the sheet first +for (int row = 1; row <= 35137; row++) { + for (int col = 1; col <= p_maxNrSelectedGCForExport + 2; col++) { + excel_exportBalanceLoadData.setCellValue("", "Electricity Load Balance", row, col); + } +} + + + VOID + double + 1745936595905 + f_selectGISRegion_publicModel + Function that selects gisregions after click on the map + -670 + 875 + + false + true + true + + clickx + double + + + clicky + double + + //After a click, reset previous clicked building/gridNode colors and text +v_previousClickedObjectType = v_clickedObjectType; +c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); +ArrayList<GIS_Object> buildingsConnectedToSelectedBuildingsList = new ArrayList<>(); +c_selectedGridConnections.clear(); +c_selectedObjects.clear(); + +//Deselect previous selection +if( v_previousClickedObjectType != null){ + f_deselectPreviousSelect(); +} + +//Check if click was on Gridnode, if yes, select grid node +for ( GridNode GN : energyModel.pop_gridNodes ){ + if( GN.gisRegion != null && GN.gisRegion.contains(clickx, clicky) && GN.gisRegion.isVisible() ){ + if(GN.f_getAllLowerLVLConnectedGridConnections().size() >= p_minSelectedGCForPublicAggregation){ + f_selectGridNode(GN); + } + else{ + //Data sharing not agreed? + v_clickedObjectType = OL_GISObjectType.REGION; + uI_Results.f_updateResultsUI(energyModel); + + //Enable kpi summary button + uI_Results.getCheckbox_KPISummary().setEnabled(true); + } + return; + } +} + +//Check if click was on Building, if yes, select grid building +for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ + if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ + if (b.gisRegion.isVisible()) { //only allow us to click on visible objects + if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections + if(b.c_containedGridConnections.get(0).p_owner.b_dataSharingAgreed){ + buildingsConnectedToSelectedBuildingsList = b.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building + f_selectBuilding(b, buildingsConnectedToSelectedBuildingsList); + } + else{ + //Data sharing not agreed? + v_clickedObjectType = OL_GISObjectType.REGION; + uI_Results.f_updateResultsUI(energyModel); + + //Enable kpi summary button + uI_Results.getCheckbox_KPISummary().setEnabled(true); + } + return; + } + } + } +} + +//Check if click was on remaining objects such as chargers, solarfields, parcels: if yes, select object +for ( GIS_Object GISobject : energyModel.pop_GIS_Objects ){ + if( GISobject.gisRegion != null && GISobject.gisRegion.contains(clickx, clicky) ) { + if (GISobject.gisRegion.isVisible()) { //only allow us to click on visible objects + if (GISobject.c_containedGridConnections.size() > 0 ) { // only allow objects with gridconnections + if(GISobject.c_containedGridConnections.get(0).p_owner.b_dataSharingAgreed){ + // Find buildings powered by the same GC as the clicked object + buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; + + //Find the (first) connected GC in the object + GridConnection selectedGC = GISobject.c_containedGridConnections.get(0); + + //Set the selected GIS object type + v_clickedObjectType = GISobject.p_GISObjectType; + c_selectedObjects.add(GISobject); + + //Set the correct interface view for each object type + switch(v_clickedObjectType){ + + case CHARGER: + f_selectCharger((GCPublicCharger)selectedGC, GISobject ); + break; + + + default: + buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building + f_selectBuilding(GISobject, buildingsConnectedToSelectedBuildingsList); + break; + } + } + else{ + //Data sharing not agreed? + v_clickedObjectType = OL_GISObjectType.REGION; + uI_Results.f_updateResultsUI(energyModel); + + //Enable kpi summary button + uI_Results.getCheckbox_KPISummary().setEnabled(true); + } + return; + } + } + } +} + +//Still no clicked object? :select basic region +v_clickedObjectType = OL_GISObjectType.REGION; +uI_Results.f_updateResultsUI(energyModel); + +//Enable kpi summary button +uI_Results.getCheckbox_KPISummary().setEnabled(true); + + + VOID + double + 1746085650084 + f_changeDefaultColorOfPrivateGC + -670 + 915 + + false + true + true + for(GIS_Object object : energyModel.pop_GIS_Objects){ + for(GridConnection GC : object.c_containedGridConnections){ + if(!GC.p_owner.b_dataSharingAgreed){ + object.p_defaultFillColor = transparent(object.p_defaultFillColor, 0.6);//v_dataSharingDisagreedColor; + object.p_defaultLineStyle = LINE_STYLE_DOTTED; + object.f_style(null, null, null, null); + break; + } + } +} + +for(GIS_Building building : energyModel.pop_GIS_Buildings){ + for(GridConnection GC : building.c_containedGridConnections){ + if(!GC.p_owner.b_dataSharingAgreed){ + building.p_defaultFillColor = transparent(building.p_defaultFillColor, 0.6);//v_dataSharingDisagreedColor; + building.p_defaultLineStyle = LINE_STYLE_DOTTED; + building.f_style(null, null, null, null); + break; + } + } +} + + + VOID + double + 1749741185117 + f_initialParkingSpacesOrder + 85 + -630 + + false + true + true + //Collections.shuffle(c_orderedParkingSpaces); + + + VOID + double + 1750247111856 + f_initialChargerOrder + 85 + -610 + + false + true + true + c_orderedV1GChargers = new ArrayList<J_EAChargePoint>(); +c_orderedV2GChargers = new ArrayList<J_EAChargePoint>(); +c_orderedPublicChargers = new ArrayList<GCPublicCharger>(); + +List<J_EAChargePoint> c_inactiveV1GChargers = new ArrayList<J_EAChargePoint>(); +List<J_EAChargePoint> c_inactiveV2GChargers = new ArrayList<J_EAChargePoint>(); + +for (GridConnection gc : energyModel.f_getActiveGridConnections()) { + for (J_EAChargePoint charger : gc.c_chargers) { + if (charger.getV1GCapable()) { + c_orderedV1GChargers.add(0, charger); + } + else { + c_orderedV1GChargers.add(charger); + } + if (charger.getV2GCapable()) { + c_orderedV2GChargers.add(0, charger); + } + else { + c_orderedV2GChargers.add(charger); + } + } +} + +for (GridConnection gc : energyModel.f_getPausedGridConnections()) { + for (J_EAChargePoint charger : gc.c_chargers) { + if (charger.getV1GCapable()) { + c_inactiveV1GChargers.add(0, charger); + } + else { + c_inactiveV1GChargers.add(charger); + } + if (charger.getV2GCapable()) { + c_inactiveV2GChargers.add(0, charger); + } + else { + c_inactiveV2GChargers.add(charger); + } + } +} + +c_orderedV1GChargers.addAll( c_inactiveV1GChargers ); +c_orderedV2GChargers.addAll( c_inactiveV2GChargers ); + +for (GCPublicCharger gc : energyModel.PublicChargers) { + if ( !gc.p_isChargingCentre ) { + c_orderedPublicChargers.add(gc); + } +} + +//Collections.shuffle(c_orderedPublicChargers); + + + VOID + double + 1750078798174 + f_initializeSpecialGISObjectsLegend + 1410 + 1630 + + false + true + true + int numberOfSpecialActiveGISObjectTypes = 0; + +for(OL_GISObjectType activeSpecialGISObjectType : c_modelActiveSpecialGISObjects){ + if(activeSpecialGISObjectType == OL_GISObjectType.PARKING){ + for(OL_ParkingSpaceType activeParkingSpaceType : c_modelActiveParkingSpaceTypes){ + numberOfSpecialActiveGISObjectTypes ++; + Pair<ShapeText, ShapeRectangle> legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); + f_setParkingSpaceLegendItem(activeParkingSpaceType, legendShapes.getFirst(), legendShapes.getSecond()); + } + } + else{ + numberOfSpecialActiveGISObjectTypes ++; + Pair<ShapeText, ShapeRectangle> legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); + f_setSpecialGISObjectLegendItem(activeSpecialGISObjectType, legendShapes.getFirst(), legendShapes.getSecond()); + + if(activeSpecialGISObjectType == OL_GISObjectType.CHARGER){ + numberOfSpecialActiveGISObjectTypes ++; + legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); + legendShapes.getFirst().setVisible(true); + legendShapes.getSecond().setVisible(true); + legendShapes.getFirst().setText("Laadpaal/plein (Toegevoegd)"); + legendShapes.getSecond().setFillColor(v_newChargingStationColor); + legendShapes.getSecond().setLineColor(v_newChargingStationLineColor); + } + } +} + + + VOID + double + 1750261221085 + f_setTrafoText + 50 + 1620 + + false + true + true + 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; +} + + + VOID + double + 1750079113839 + f_setSpecialGISObjectLegendItem + 1430 + 1670 + + false + true + true + + activeSpecialGISObjectType + OL_GISObjectType + + + legendText + ShapeText + + + legendRect + ShapeRectangle + + legendText.setVisible(true); +legendRect.setVisible(true); + +switch(activeSpecialGISObjectType){ + case SOLARFARM: + legendText.setText("Zonneveld"); + legendRect.setFillColor(v_solarParkColor); + legendRect.setLineColor(v_solarParkLineColor); + break; + case WINDFARM: + legendText.setText("Windmolen"); + legendRect.setFillColor(v_windFarmColor); + legendRect.setLineColor(v_windFarmLineColor); + break; + case CHARGER: + legendText.setText("Laadpaal/plein (Bestaand)"); + legendRect.setFillColor(v_chargingStationColor); + legendRect.setLineColor(v_chargingStationLineColor); + break; + case BATTERY: + legendText.setText("Batterij"); + legendRect.setFillColor(v_batteryColor); + legendRect.setLineColor(v_batteryLineColor); + break; + case PARCEL: + legendText.setText("Nieuw Perceel"); + legendRect.setFillColor(v_parcelColor); + legendRect.setLineColor(v_parcelLineColor); + break; + case ELECTROLYSER: + legendText.setText("Electrolyser"); + legendRect.setFillColor(v_electrolyserColor); + legendRect.setLineColor(v_electrolyserLineColor); + break; +} + + + VOID + double + 1750080865693 + f_initializeLegend + 1390 + 1550 + + false + true + true + //Default GIS buildings +f_initializeDefaultGISBuildingsLegend(); + +//Special gis objects +f_initializeSpecialGISObjectsLegend(); + + + VOID + double + 1750089851073 + f_setParkingSpaceLegendItem + 1430 + 1690 + + false + true + true + + activeParkingSpaceType + OL_ParkingSpaceType + + + legendText + ShapeText + + + legendRect + ShapeRectangle + + legendText.setVisible(true); +legendRect.setVisible(true); + +switch(activeParkingSpaceType){ + case PUBLIC: + legendText.setText("Parkeerplek: publiek"); + legendRect.setFillColor(v_parkingSpaceColor_public); + legendRect.setLineColor(v_parkingSpaceLineColor_public); + break; + case PRIVATE: + legendText.setText("Parkeerplek: privé"); + legendRect.setFillColor(v_parkingSpaceColor_private); + legendRect.setLineColor(v_parkingSpaceLineColor_private); + break; + case ELECTRIC: + legendText.setText("Parkeerplek: electrisch"); + legendRect.setFillColor(v_parkingSpaceColor_electric); + legendRect.setLineColor(v_parkingSpaceLineColor_electric); + break; +} + + + RETURNS_VALUE + Pair<ShapeText, ShapeRectangle> + 1750092444018 + f_getNextSpecialLegendShapes + 1430 + 1650 + + false + true + true + + legendShapesNumber + int + + ShapeText legendText; +ShapeRectangle legendRect; + +switch(legendShapesNumber){ + case 1: + legendText = t_specialGISObjectLegend1; + legendRect = rect_specialGISObjectLegend1; + break; + case 2: + legendText = t_specialGISObjectLegend2; + legendRect = rect_specialGISObjectLegend2; + break; + case 3: + legendText = t_specialGISObjectLegend3; + legendRect = rect_specialGISObjectLegend3; + break; + case 4: + legendText = t_specialGISObjectLegend4; + legendRect = rect_specialGISObjectLegend4; + break; + case 5: + legendText = t_specialGISObjectLegend5; + legendRect = rect_specialGISObjectLegend5; + break; + case 6: + legendText = t_specialGISObjectLegend6; + legendRect = rect_specialGISObjectLegend6; + break; + case 7: + legendText = t_specialGISObjectLegend7; + legendRect = rect_specialGISObjectLegend7; + break; + case 8: + legendText = t_specialGISObjectLegend8; + legendRect = rect_specialGISObjectLegend8; + break; + case 9: + legendText = t_specialGISObjectLegend9; + legendRect = rect_specialGISObjectLegend9; + break; + case 10: + legendText = t_specialGISObjectLegend10; + legendRect = rect_specialGISObjectLegend10; + break; + case 11: + legendText = t_specialGISObjectLegend11; + legendRect = rect_specialGISObjectLegend11; + break; + case 12: + legendText = t_specialGISObjectLegend12; + legendRect = rect_specialGISObjectLegend12; + break; + default: + legendText = t_specialGISObjectLegend1; + legendRect = rect_specialGISObjectLegend1; + break; +} + +return new Pair(legendText, legendRect); + + + + VOID + double + 1750162397332 + f_initializeDefaultGISBuildingsLegend + 1410 + 1570 + + false + true + true + int numberOfDefaultActiveGISObjectTypes = 1;//Always start at 2 (1 ++) for the building types, cause 'selection' is always present (for now). + +for(OL_GISBuildingTypes activeDefaultGISBuildingType : c_modelActiveDefaultGISBuildings){ + numberOfDefaultActiveGISObjectTypes ++; + Pair<ShapeText, ShapeOval> legendShapes = f_getNextDefaultLegendShapes(numberOfDefaultActiveGISObjectTypes); + f_setDefaultGISBuildingLegendItem(activeDefaultGISBuildingType, legendShapes.getFirst(), legendShapes.getSecond()); +} + + + RETURNS_VALUE + Pair<ShapeText, ShapeOval> + 1750162514744 + f_getNextDefaultLegendShapes + 1430 + 1610 + + false + true + true + + legendShapesNumber + int + + ShapeText legendText; +ShapeOval legendOval; + +switch(legendShapesNumber){ + case 1: + legendText = t_defaultLegend1; + legendOval = oval_defaultLegend1; + break; + case 2: + legendText = t_defaultLegend2; + legendOval = oval_defaultLegend2; + break; + case 3: + legendText = t_defaultLegend3; + legendOval = oval_defaultLegend3; + break; + case 4: + legendText = t_defaultLegend4; + legendOval = oval_defaultLegend4; + break; + case 5: + legendText = t_defaultLegend5; + legendOval = oval_defaultLegend5; + break; + default: + legendText = t_defaultLegend1; + legendOval = oval_defaultLegend1; +} + +return new Pair(legendText, legendOval); + + + + VOID + double + 1750165143690 + f_setDefaultGISBuildingLegendItem + 1430 + 1590 + + false + true + true + + activeDefaultGISBuildingType + OL_GISBuildingTypes + + + legendText + ShapeText + + + legendOval + ShapeOval + + legendText.setVisible(true); +legendOval.setVisible(true); + +switch(activeDefaultGISBuildingType){ + case DETAILED_COMPANY: + legendText.setText("Gedetaileerd bedrijf: " + v_numberOfSurveyCompanies); + legendOval.setFillColor(v_detailedCompanyBuildingColor); + legendOval.setLineColor(v_detailedCompanyBuildingLineColor); + break; + case DEFAULT_COMPANY: + legendText.setText("Standaard bedrijf"); + legendOval.setFillColor(v_companyBuildingColor); + legendOval.setLineColor(v_companyBuildingLineColor); + break; + case HOUSE: + legendText.setText("Huizen"); + legendOval.setFillColor(v_houseBuildingColor); + legendOval.setLineColor(v_houseBuildingLineColor); + break; + case REMAINING: + legendText.setText("Overige gebouwen"); + legendOval.setFillColor(v_restBuildingColor); + legendOval.setLineColor(v_restBuildingLineColor); + break; +} + + + + VOID + double + 1752756002220 + f_setColorsBasedOnCongestion_objects + 1960 + 1800 + + false + true + true + + gis_area + GIS_Object + + if (gis_area.c_containedGridConnections.size() > 0) { + double maxLoad_fr_gis_object = 0; + boolean capacityKnown = false; + + for(GridConnection gc : gis_area.c_containedGridConnections){ + if(gc.v_rapidRunData != null){ + double maxLoad_fr_gc = 0; + double maxLoad_fr_gc_delivery = gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown ? gc.v_rapidRunData.getPeakDelivery_kW()/gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW : 0; + double maxLoad_fr_gc_feedin = gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown ? gc.v_rapidRunData.getPeakFeedin_kW()/gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW : 0; + + switch(rb_mapOverlayLegend_congestion.getValue()){ + case 0: + maxLoad_fr_gc = maxLoad_fr_gc_delivery; + + if(gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ + capacityKnown = true; + } + break; + case 1: + maxLoad_fr_gc = maxLoad_fr_gc_feedin; + if(gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ + capacityKnown = true; + } + break; + case 2: + maxLoad_fr_gc = max(maxLoad_fr_gc_delivery, maxLoad_fr_gc_feedin); + if(maxLoad_fr_gc_delivery > maxLoad_fr_gc_feedin && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ + capacityKnown = true; + } + else if(maxLoad_fr_gc_feedin > maxLoad_fr_gc_delivery && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ + capacityKnown = true; + } + break; + } + if(maxLoad_fr_gc > maxLoad_fr_gis_object){ + maxLoad_fr_gis_object = maxLoad_fr_gc; + } + } + } + + //Set colour based on found parameters + if(!capacityKnown && project_data.project_type() != RESIDENTIAL){ + gis_area.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); + gis_area.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); + } else if (maxLoad_fr_gis_object > 1) { + gis_area.gisRegion.setFillColor(v_gridNodeColorCongested); + gis_area.gisRegion.setLineColor(v_gridLineColorCongested); + } else if (maxLoad_fr_gis_object > 0.7) { + gis_area.gisRegion.setFillColor(v_gridNodeColorStrained); + gis_area.gisRegion.setLineColor(v_gridNodeLineColorStrained); + } else { + gis_area.gisRegion.setFillColor(v_gridNodeColorUncongested); + gis_area.gisRegion.setLineColor(v_gridNodeLineColorUncongested); + } +} + + + VOID + double + 1752756016324 + f_setColorsBasedOnCongestion_gridnodes + 1960 + 1820 + + false + true + true + + gn + GridNode + + + isLiveSim + boolean + + if (gn!=null && gn.gisRegion != null){ + double maxLoad_fr = 0; + if(isLiveSim){ + maxLoad_fr = abs(gn.v_currentLoad_kW)/gn.p_capacity_kW; + } + else{ + J_LoadDurationCurves loadCurves = gn.f_getDuurkrommes(); + double maxLoad_fr_delivery = gn.p_capacity_kW > 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(0))/gn.p_capacity_kW : 0; + double maxLoad_fr_feedin = gn.p_capacity_kW > 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(loadCurves.ds_loadDurationCurveTotal_kW.size()-1))/gn.p_capacity_kW : 0; + + switch(rb_mapOverlayLegend_congestion.getValue()){ + case 0: + maxLoad_fr = maxLoad_fr_delivery; + break; + case 1: + maxLoad_fr = maxLoad_fr_feedin; + break; + case 2: + maxLoad_fr = max(maxLoad_fr_delivery, maxLoad_fr_feedin); + break; + } + } + + if(!isLiveSim && !gn.p_realCapacityAvailable && project_data.project_type() != RESIDENTIAL){ + gn.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); + gn.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); + } else if (maxLoad_fr > 1) { + gn.gisRegion.setFillColor(v_gridNodeColorCongested); + gn.gisRegion.setLineColor(v_gridLineColorCongested); + } else if (maxLoad_fr > 0.7) { + gn.gisRegion.setFillColor(v_gridNodeColorStrained); + gn.gisRegion.setLineColor(v_gridNodeLineColorStrained); + } else { + gn.gisRegion.setFillColor(v_gridNodeColorUncongested); + gn.gisRegion.setLineColor(v_gridNodeLineColorUncongested); + } + + if( gn == v_clickedGridNode && gn != v_previousClickedGridNode){ // dit zorgt ervoor dat de kleuringfunctie correct werkt in zowel live stand als pauze stand + gn.gisRegion.setFillColor( v_selectionColor ); + gn.gisRegion.setLineColor( orange ); + } +} + + + VOID + double + 1752836715726 + f_clearSelectionAndSelectEnergyModel + 50 + 1220 + + false + true + true + v_previousClickedObjectType = v_clickedObjectType; +c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); +c_selectedGridConnections.clear(); +c_selectedObjects.clear(); + +//Deselect previous selection +if( v_previousClickedObjectType != null){ + f_deselectPreviousSelect(); +} + +v_clickedObjectType = OL_GISObjectType.REGION; +uI_Results.f_updateResultsUI(energyModel); + + + + VOID + double + 1752837115143 + f_styleLVLV + -650 + 470 + + false + true + true + + gisregion + GISRegion + + gisregion.setLineStyle( LINE_STYLE_SOLID ); +gisregion.setLineColor( v_LVLVLineColor ); +gisregion.setLineWidth(2); +gisregion.setFillColor(v_LVLVNodeColor); + + + VOID + double + 1753085860778 + f_initializeMapOverlayRadioButton + 1920 + 1450 + + false + true + true + //Set active map overlay types if they are set in the project settings +if(settings.activeMapOverlayTypes() != null && settings.activeMapOverlayTypes().size() > 0){ + c_loadedMapOverlayTypes = new ArrayList<OL_MapOverlayTypes>(settings.activeMapOverlayTypes()); + if(!c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.DEFAULT)){ + c_loadedMapOverlayTypes.add(0, OL_MapOverlayTypes.DEFAULT); // Force default to be available + } +} +else{//Take the default + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.DEFAULT); + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.ELECTRICITY_CONSUMPTION); + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.PV_PRODUCTION); + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.GRID_NEIGHBOURS); + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.CONGESTION); + if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.PARKING_TYPE); + } +} + + +//Adjust the visualisation of the radiobuttons +Presentable presentable = gr_mapOverlayLegenda.getPresentable(); +boolean ispublic = true; +double x = 756; +double y = c_loadedMapOverlayTypes.size() < 6 ? 837 : 837 - 18; +double width = 130; +double height = 0;//Not needed, automatically adjust by adding options +Color textColor = Color.BLACK; +boolean enabled = true; +Font font = new Font("Dialog", Font.PLAIN, 11); +boolean vertical = true; + + +//Set words for the radiobutton options +List<String> RadioButtonOptions_list = new ArrayList<String>(); +for(OL_MapOverlayTypes mapOverlayType : c_loadedMapOverlayTypes){ + switch(mapOverlayType){ + case DEFAULT: + RadioButtonOptions_list.add("Standaard"); + break; + case ELECTRICITY_CONSUMPTION: + RadioButtonOptions_list.add("Elektriciteitsverbruik"); + break; + case PV_PRODUCTION: + RadioButtonOptions_list.add("PV Opwek"); + break; + case GRID_NEIGHBOURS: + RadioButtonOptions_list.add("Energie Buren"); + break; + case CONGESTION: + RadioButtonOptions_list.add("Netbelasting"); + break; + case ENERGY_LABEL: + RadioButtonOptions_list.add("Energielabel"); + break; + case PARKING_TYPE: + RadioButtonOptions_list.add("Parkeer type"); + break; + } +} + +String[] RadioButtonOptions = RadioButtonOptions_list.toArray(String[]::new); + +//Create the radiobutton and set the correct action. +rb_mapOverlay = new ShapeRadioButtonGroup(presentable, ispublic, x ,y, width, height, textColor, enabled, font, vertical, RadioButtonOptions){ + @Override + public void action() { + f_setMapOverlay(); + } +}; + +presentation.add(rb_mapOverlay); + +//For now: Adjust location of radiobutton title if 6 buttons +if(c_loadedMapOverlayTypes.size() > 5){ + gr_colorings.setY(-17); +} + + + VOID + double + 1753096794863 + f_setMapOverlay + 1920 + 1540 + + false + true + true + //reset legend +gr_defaultLegenda.setVisible(false); +gr_mapOverlayLegend_ElectricityConsumption.setVisible(false); +gr_mapOverlayLegend_PVProduction.setVisible(false); +gr_mapOverlayLegend_gridNeighbours.setVisible(false); +gr_mapOverlayLegend_congestion.setVisible(false); +gr_mapOverlayLegend_EnergyLabel.setVisible(false); +b_updateLiveCongestionColors = false; + +if(!b_inEnergyHubMode){ + f_clearSelectionAndSelectEnergyModel(); +} + +//Get selected map overlay type, based on loaded order of the radio buttons +OL_MapOverlayTypes selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); + +//Set the correct map overlay +switch(selectedMapOverlayType){ + case DEFAULT: + f_setMapOverlay_Default(); + break; + case ELECTRICITY_CONSUMPTION: + f_setMapOverlay_ElectricityConsumption(); + break; + case PV_PRODUCTION: + f_setMapOverlay_PVProduction(); + break; + case GRID_NEIGHBOURS: + f_setMapOverlay_GridTopology(); + break; + case CONGESTION: + f_setMapOverlay_Congestion(); + break; + case ENERGY_LABEL: + f_setMapOverlay_EnergyLabel(); + break; + case PARKING_TYPE: + f_setMapOverlay_ParkingType(); + break; +} + + + VOID + double + 1753097345978 + f_setMapOverlay_ElectricityConsumption + 1940 + 1590 + + false + true + true + //Set legend +b_updateLiveCongestionColors = true; +gr_mapOverlayLegend_ElectricityConsumption.setVisible(true); + +//Colour gis objects +if (project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnConsumptionProfileHouseholds(building); + } +} +else { + if(energyModel.v_rapidRunData == null){ + f_setErrorScreen("Dit overzicht wordt pas beschikbaar na het uitvoeren van een jaarsimulatie. In plaats daarvan is de standaard kaart geselecteerd.", 0, 0); + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); + return; + } + gr_mapOverlayLegend_ElectricityConsumption.setVisible(true); + for (GIS_Building building : energyModel.pop_GIS_Buildings){ + if(building.gisRegion.isVisible()){ + f_setColorsBasedOnElectricityConsumption(building); + } + } + /*for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_setColorsBasedOnConsumpion(object); + }*/ +} + + + VOID + double + 1753097409446 + f_setMapOverlay_PVProduction + 1940 + 1660 + + false + true + true + //Set legend +b_updateLiveCongestionColors = true; +gr_mapOverlayLegend_PVProduction.setVisible(true); + +//Colour gis objects +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnProduction(building); +} +/*for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_setColorsBasedOnProduction(object); +}*/ + + + VOID + double + 1753097484078 + f_setMapOverlay_GridTopology + 1940 + 1710 + + false + true + true + //Set legend +gr_mapOverlayLegend_gridNeighbours.setVisible(true); +b_updateLiveCongestionColors = false; + +//Colour gis objects +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnGridTopology_objects(building); +} +/*for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_setColorsBasedOnGridTopology_objects(object); +}*/ +for (GridNode GN : energyModel.pop_gridNodes){ + f_setColorsBasedOnGridTopology_gridnodes(GN); +} + + + VOID + double + 1753097518541 + f_setMapOverlay_Congestion + 1940 + 1780 + + false + true + true + if(energyModel.v_rapidRunData == null){ + f_setErrorScreen("Dit overzicht wordt pas beschikbaar na het uitvoeren van een jaarsimulatie. In plaats daarvan is de standaard kaart geselecteerd.", 0, 0); + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); + return; +} + +//Set legend +gr_mapOverlayLegend_congestion.setVisible(true); +b_updateLiveCongestionColors = false; + +//Colour gis objects +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnCongestion_objects(building); +} +/* +for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_setColorsBasedOnCongestion_objects(object); +} +*/ +for (GridNode GN : energyModel.pop_gridNodes){ + f_setColorsBasedOnCongestion_gridnodes(GN, false); +} + + + VOID + double + 1753097561639 + f_setMapOverlay_Default + 1940 + 1565 + + false + true + true + b_updateLiveCongestionColors = true; +gr_defaultLegenda.setVisible(true); +for (GIS_Building b: energyModel.pop_GIS_Buildings) { + f_styleAreas(b); +} +/*for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_styleAreas(object); +}*/ + + + VOID + double + 1753108764992 + f_setMapOverlay_EnergyLabel + 1940 + 1850 + + false + true + true + //Set legend +b_updateLiveCongestionColors = true; +gr_mapOverlayLegend_EnergyLabel.setVisible(true); + +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnEnergyLabels(building); +} + + + VOID + double + 1753440028514 + f_setShapePresentationOnTop + -640 + -60 + + false + true + true + + shape + Shape + + presentation.remove(shape); +presentation.insert(presentation.size(), shape); + + + VOID + double + 1753713001191 + f_updateOrderedListsAfterDeserialising + true + 80 + -490 + + false + true + true + + newEnergyModel + EnergyModel + + // Update references of GClists +for (int i=0; i< c_orderedPVSystemsHouses.size(); i++) { + String GCid = c_orderedPVSystemsHouses.get(i).p_gridConnectionID; + c_orderedPVSystemsHouses.set(i,findFirst(newEnergyModel.Houses, x->x.p_gridConnectionID == GCid)); +} + +for (int i=0; i< c_orderedPVSystemsCompanies.size(); i++) { + String GCid = c_orderedPVSystemsCompanies.get(i).p_gridConnectionID; + c_orderedPVSystemsCompanies.set(i,findFirst(newEnergyModel.UtilityConnections, x->x.p_gridConnectionID == GCid)); +} + +for (int i=0; i< c_orderedHeatingSystemsCompanies.size(); i++) { + String GCid = c_orderedHeatingSystemsCompanies.get(i).p_gridConnectionID; + c_orderedHeatingSystemsCompanies.set(i,findFirst(newEnergyModel.UtilityConnections, x->x.p_gridConnectionID == GCid)); +} + +for (int i=0; i< c_orderedHeatingSystemsHouses.size(); i++) { + String GCid = c_orderedHeatingSystemsHouses.get(i).p_gridConnectionID; + c_orderedHeatingSystemsHouses.set(i,findFirst(newEnergyModel.Houses, x->x.p_gridConnectionID == GCid)); +} + +for (int i=0; i< c_orderedPublicChargers.size(); i++) { + String GCid = c_orderedPublicChargers.get(i).p_gridConnectionID; + c_orderedPublicChargers.set(i,findFirst(newEnergyModel.PublicChargers, x->x.p_gridConnectionID == GCid)); +} + +// TODO: Update references of J_EAlists + + + + VOID + double + 1753440184174 + f_initializePresentationOrder + -660 + 200 + + false + true + true + //Set order of certain layovers and submenus +f_setShapePresentationOnTop(map); +f_setShapePresentationOnTop(gr_zoomButton); +f_setShapePresentationOnTop(gr_sliderClickBlocker); +f_setShapePresentationOnTop(gr_forceMapSelection); +f_setShapePresentationOnTop(gr_filterInterface); +f_setShapePresentationOnTop(gr_infoText); + + + + VOID + double + 1753445407428 + f_setForcedClickScreenVisibility + 140 + -860 + + false + true + true + + showForcedClickScreen + boolean + + gr_forceMapSelection.setVisible(showForcedClickScreen); + + + VOID + double + 1753446312775 + f_selectEnergyHubGC + 2240 + -2090 + + false + true + true + + clickx + double + + + clicky + double + + if(b_inManualFilterSelectionMode){ + f_selectManualFilteredGC(clickx, clicky); +} +else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || + c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ + f_selectGridLoop(clickx, clicky); + } + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + f_selectNeighborhood(clickx, clicky); + } +} + + + VOID + double + 1753698716095 + f_startEnergyHubConfiguration + 2240 + -2180 + + false + true + true + pauseSimulation(); + +b_inEnergyHubMode = true; +b_inEnergyHubSelectionMode = true; + +f_setForcedClickScreenText(""); +f_setForcedClickScreenVisibility(true); + +cb_showFilterInterface.setSelected(true, true); +gr_filterInterface.setPos(170, 580); + + + VOID + double + 1753698810590 + f_finalizeEnergyHubConfiguration + 2240 + -2060 + + false + true + true + if(b_inEnergyHubSelectionMode){ + if(button_completeManualSelectionMode.isVisible()){ + button_completeManualSelectionMode.action(); + } + + + //Move scenario radiobuttons over + f_getScenarioButtons().setPos( + gr_energyHubPresentation.getX() + uI_EnergyHub.rect_scenarios.getX() + 25.0, + gr_energyHubPresentation.getY() + uI_EnergyHub.rect_scenarios.getY() + 50.0 + ); + + //Set map in correct pos and navigate to e-hub view + map.setPos( + gr_energyHubPresentation.getX() + uI_EnergyHub.rect_map.getX() + 10.0, + gr_energyHubPresentation.getY() + uI_EnergyHub.rect_map.getY() + 10.0 + ); + map.setScale( 0.85, 0.85 ); + va_EHubDashboard.navigateTo(); + v_currentViewArea = va_EHubDashboard; + + //Copy selected GC and coop to e-hub dashboard + v_customEnergyCoop.p_actorID = "eHubConfiguratorCoop"; + uI_EnergyHub.v_energyHubCoop = v_customEnergyCoop; + + //Set E-hub selection mode false + b_inEnergyHubSelectionMode = false; + + uI_EnergyHub.f_initializeEnergyHubDashboard(); +} + + + + VOID + ArrayList<GridConnection> + 1753713085487 + f_updateGClistAfterDeserialisation + true + 95 + -470 + + false + true + true + + GClist + ArrayList<? extends GridConnection> + + + newEnergyModel + EnergyModel + + for (int i=0; i< GClist.size(); i++) { + String GCid = GClist.get(i).p_gridConnectionID; + GClist.set(i,findFirst(newEnergyModel.c_gridConnections, x->x.p_gridConnectionID == GCid)); +} + + + + + VOID + ArrayList<GridConnection> + 1753713662613 + f_updateJ_EAlistAfterDeserialisation + true + 110 + -450 + + false + true + true + + EAlist + ArrayList<J_EA> + + + newEnergyModel + EnergyModel + + for (int i=0; i< EAlist.size(); i++) { + String GCid = EAlist.get(i).getParentAgent();p_gridConnectionID; + EAlist.set(i,findFirst(newEnergyModel.c_gridConnections, x->x.p_gridConnectionID == GCid)); +} + + + + + VOID + double + 1753881971788 + f_createUITabs_default + -650 + 620 + + false + true + true + // CHOOSE WHICH TABS YOU WANT TO BE ABLE TO SHOW FOR YOUR PROJECT +// (OVERRIDE FUNCTION IN CHILD IF YOU WANT OTHER THAN DEFAULT) + +// Adding the (child) tabs to the tabArea population + +// If you use an extension of a tab, you must update the pointer to the instance of the interface +// Something like: tabElectricity.zero_Interface = loader_Project.zero_Interface; +// No update to the pointer is needed for the generic tabs + + +uI_Tabs.add_pop_tabElectricity(); +uI_Tabs.add_pop_tabHeating(); +uI_Tabs.add_pop_tabMobility(); + +// Group visibilities +// When using an extension of a generic tab don't forget to typecast it! +if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { + ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_ResidentialArea().setVisible(true); + ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersResidentialArea().setVisible(true); + ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_residential().setVisible(true); +} +else { + uI_Tabs.add_pop_tabEHub(); + ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_Businesspark().setVisible(true); + ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersCompanies().setVisible(true); + ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_default().setVisible(true); + ((tabEHub)uI_Tabs.pop_tabEHub.get(0)).getGroupHubSliders().setVisible(true); +} + + + VOID + double + 1753882411689 + f_initializePrivateAndPublicParkingCarsOrder + 85 + -590 + + false + true + true + //Get all public and private parked cars +c_orderedVehiclesPrivateParking = new ArrayList<J_EAVehicle>(); +List<J_EADieselVehicle> allPublicParkedCars = new ArrayList<J_EADieselVehicle>(); +for (GCHouse house : energyModel.Houses) { + if (house.p_eigenOprit) { + c_orderedVehiclesPrivateParking.addAll(house.c_vehicleAssets); + } + else{ + allPublicParkedCars.addAll(house.c_dieselVehicles); + } +} + +//Shuffle the collections to not have skewed initialization +//Collections.shuffle(c_orderedVehiclesPrivateParking); +//Collections.shuffle(allPublicParkedCars); + +//Get the total amount of public chargers +int totalChargers = c_orderedPublicChargers.size(); + +if(totalChargers > 0){ + // Fair distribution of vehicles across chargers + List<Integer> numberOfCarsPerCharger = f_getNumberOfCarsPerCharger(allPublicParkedCars.size(), totalChargers); + + // Assign vehicles to chargers + c_mappingOfVehiclesPerCharger.clear(); + int index = 0; + for (int i = 0; i < totalChargers; i++) { + GCPublicCharger charger = c_orderedPublicChargers.get(i); + int numberOfCars = numberOfCarsPerCharger.get(i); + + List<J_EADieselVehicle> assignedCars = new ArrayList<>(allPublicParkedCars.subList(index, index + numberOfCars)); + c_mappingOfVehiclesPerCharger.put(charger.p_uid, assignedCars); + + // Place vehicles depending on whether the charger is active + if (charger.v_isActive) { + for (J_EADieselVehicle car : assignedCars) { + J_ActivityTrackerTrips tripTracker = car.getTripTracker(); //Needed, as triptracker is removed when removeEnergyAsset is called. + car.removeEnergyAsset(); + car.setTripTracker(tripTracker);//Re-set the triptracker again, for storing. + } + } + + index += numberOfCars; + } +} + + + + VOID + double + 1753884000493 + f_simulateYearFromMainInterface + 1980 + 390 + + false + true + true + +gr_simulateYear.setVisible(false); +gr_loadIconYearSimulation.setVisible(true); + +new Thread( () -> { + //Run rapid run + energyModel.f_runRapidSimulation(); + + //After rapid run: remove loading screen + f_removeAllSimulateYearScreens(); + + if (c_selectedGridConnections.size() == 0){//Update main area collection + uI_Results.f_updateResultsUI(energyModel); + } + else if (c_selectedGridConnections.size() == 1){//Update selected GC area collection + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + } + else if(c_selectedGridConnections.size() > 1){//Update COOP area collection + uI_Results.f_updateResultsUI(v_customEnergyCoop); + } + if (uI_EnergyHub != null && uI_EnergyHub.v_energyHubCoop != null) { + uI_EnergyHub.uI_Results.f_updateResultsUI(uI_EnergyHub.v_energyHubCoop); + } + + //Update and show kpi summary chart after run + if(settings.showKPISummary() != null && settings.showKPISummary() && v_clickedObjectType != OL_GISObjectType.GRIDNODE){ + uI_Results.getCheckbox_KPISummary().setSelected(true, true); + } + + //Enable radio buttons again + uI_Results.f_enableNonLivePlotRadioButtons(true); + if(uI_EnergyHub != null){ + uI_EnergyHub.uI_Results.f_enableNonLivePlotRadioButtons(true); + } + if(uI_Company != null){ + uI_Company.uI_Results.f_enableNonLivePlotRadioButtons(true); + } + + b_resultsUpToDate = true; +}).start(); + + + VOID + double + 1753951802256 + f_initialPTSystemsOrder_households + 85 + -670 + + false + true + true + List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); +List<GCHouse> housesWithoutPT = houses.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW) ).collect(Collectors.toList()); +List<GCHouse> housesWithPT = new ArrayList<>(houses); +housesWithPT.removeAll(housesWithoutPT); + +c_orderedPTSystemsHouses = new ArrayList<>(housesWithoutPT); +c_orderedPTSystemsHouses.addAll(housesWithPT); + + + + VOID + double + 1754312747144 + f_setMapOverlay_ParkingType + 1940 + 1900 + + false + true + true + //Set legend +b_updateLiveCongestionColors = true; + +//Colour gis objects +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnParkingType_objects(building); +} +for (GridNode GN : energyModel.pop_gridNodes){ + f_setColorsBasedOnParkingType_gridnodes(GN); +} + + + VOID + double + 1754312755135 + f_setColorsBasedOnParkingType_objects + 1960 + 1920 + + false + true + true + + gis_area + GIS_Object + + if (gis_area.c_containedGridConnections.size() > 0) { + + //Unkown by default + Color objectColor = v_parkingSpaceColor_unkown; + Color objectLineColor = v_parkingSpaceLineColor_unkown; + + //Check if houses and if public parking + boolean containsHouses = false; + boolean containsHousesWithPublicParking = false; + for(GridConnection gc : gis_area.c_containedGridConnections){ + if(gc instanceof GCHouse){ + containsHouses = true; + if(!((GCHouse)gc).p_eigenOprit){ + containsHousesWithPublicParking = true; + } + } + } + + //Change color based on parking type if houses present + if(containsHouses){ + if(containsHousesWithPublicParking){ + objectColor = v_parkingSpaceColor_public; + objectLineColor = v_parkingSpaceLineColor_public; + } + else{ + objectColor = v_parkingSpaceColor_private; + objectLineColor = v_parkingSpaceLineColor_private; + } + } + gis_area.f_style(objectColor, objectLineColor, null, null); +} + + + VOID + double + 1754314128315 + f_setColorsBasedOnParkingType_gridnodes + 1960 + 1940 + + false + true + true + + GN + GridNode + + if(GN.gisRegion != null){ + GN.gisRegion.setFillColor(v_parkingSpaceColor_unkown); + GN.gisRegion.setLineColor(v_parkingSpaceLineColor_unkown); +} + + + RETURNS_VALUE + List<Integer> + 1756122011053 + f_getNumberOfCarsPerCharger + 110 + -570 + + false + true + true + + totalPublicParkedCars + int + + + totalPublicChargers + int + + List<Integer> numberOfCarsPerCharger = new ArrayList<>(); +if(totalPublicChargers > 0){ + + + int baseNumberOfCars = (int) floor(totalPublicParkedCars / totalPublicChargers); //Could also simply be totalPublicParkedCars / totalPublicChargers, as int/int is already floored, but just to make sure what should happen here it is written in full + int remainingCars = totalPublicParkedCars % totalPublicChargers; // extra vehicles that can be distributed + + for (int i = 0; i < totalPublicChargers; i++) { + if (i < remainingCars) { + numberOfCarsPerCharger.add(baseNumberOfCars + 1); // some chargers get one extra + } else { + numberOfCarsPerCharger.add(baseNumberOfCars); + } + } +} + +return numberOfCarsPerCharger; + + + RETURNS_VALUE + ShapeRadioButtonGroup + 1756369604291 + f_getScenarioButtons + -1020 + 100 + + false + true + true + return rb_scenarios; + + + VOID + double + 1756994047356 + f_enableAllPlots + -290 + 680 + + false + true + true + + resultsUI + UI_Results + + + selectedObjectInterface + I_EnergyData + + if (resultsUI.f_getSelectedObjectData() != null) { + uI_Results.f_updateResultsUI(selectedObjectInterface); + uI_Results.f_enableNonLivePlotRadioButtons(true); +} + + + VOID + double + 1756995218301 + f_setAllSimulateYearScreens + -290 + 700 + + false + true + true + gr_simulateYear.setVisible(true); +if(uI_EnergyHub != null){ + uI_EnergyHub.gr_simulateYearEnergyHub.setVisible(true); +} +if(uI_Company != null){ + uI_Company.gr_simulateYearScreen.setVisible(true); +} + + + VOID + double + 1756997038652 + f_removeAllSimulateYearScreens + -290 + 720 + + false + true + true + gr_simulateYear.setVisible(false); +gr_loadIconYearSimulation.setVisible(false); +if(uI_EnergyHub != null){ + uI_EnergyHub.gr_simulateYearEnergyHub.setVisible(false); + uI_EnergyHub.gr_loadIconYearSimulationEnergyHub.setVisible(false); +} +if(uI_Company != null){ + uI_Company.gr_simulateYearScreen.setVisible(false); + uI_Company.gr_loadIcon.setVisible(false); +} + + + VOID + double + 1760014973975 + f_cancelEnergyHubConfiguration + 2250 + -2160 + + false + true + true + button_clearFilters.action(); + +b_inEnergyHubMode = false; +b_inEnergyHubSelectionMode = false; + +f_setForcedClickScreenText(""); +f_setForcedClickScreenVisibility(false); + +cb_showFilterInterface.setSelected(false, true); + + + VOID + double + 1760085891920 + f_filterHasEV + -1550 + 270 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.c_electricVehicles.size() > 0)); +//Werkt nog niet helemaal naar behoren, want ghost assets worden nog niet aangemaakt, +//en dus hebben bedrijven met ghost ev geen c_electricVehicles en dus komen niet door deze filter. +// --> Als ghost vehicles ook worden aangemaakt, werkt het wel. + + + VOID + double + 1760955904715 + f_initializeAdditionalVehicles + 85 + -520 + + false + true + true + for(GridConnection GC : energyModel.UtilityConnections){ + c_additionalVehicles.put(GC.p_uid, new ArrayList<J_EAVehicle>()); +} + + + VOID + double + 1760978860758 + f_createAdditionalUIs + -280 + 400 + + false + true + true + //Energy hub dashboard +if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ + uI_EnergyHub = add_pop_UI_EnergyHub(); +} + +//Private companyUI dashboard +if(energyModel.UtilityConnections.size() > 0){ + uI_Company = add_pop_UI_Company(); +} + +/* +//Hydrogen dashboard NOT FINISHED +for(GCEnergyConversion conversionGC : energyModel.EnergyConversionSites){ + for(J_EAConversion conversionEA : conversionGC.c_conversionAssets){ + if(conversionEA instanceof J_EAConversionElectrolyser){ + uI_Hydrogen = add_pop_UI_Hydrogen(); + break; + } + } +} + +//Battery dashboard NOT FINISHED +for(GCGridBattery batteryGC : energyModel.GridBatteries){ + if(batteryGC.c_connectedGISObjects.size()>0){ + uI_Battery = add_pop_UI_Battery(); + break; + } +} +*/ + + + VOID + double + 1761060882101 + f_setCompaniesScenario + -1160 + 445 + + false + true + true + + scenarioMap + LinkedHashMap + + //Solution for now +int companyUIScenarioRBIndex = 0; +if(scenarioMap == c_scenarioMap_Current){ + companyUIScenarioRBIndex = 0; +} +else if(scenarioMap == c_scenarioMap_Future){ + companyUIScenarioRBIndex = 1; +} +else{ + throw new RuntimeException("Tried to call the setCompaniesScenario function with a non existing companyUI scenario"); +} + +//Set companyUI to correct radio button setting +uI_Company.b_runningMainInterfaceScenarioSettings = true; +for (GCUtility GC : energyModel.UtilityConnections){ + uI_Company.f_setCompanyUI(GC); + uI_Company.getRb_scenariosPrivateUI().setValue(companyUIScenarioRBIndex, true); +} +uI_Company.b_runningMainInterfaceScenarioSettings = false; + + + VOID + double + 1761117997540 + f_initializeScenarioRadioButton + -1180 + 60 + + false + true + true + //Set the default visualisation of the radiobuttons +Presentable presentable = this.presentation.getPresentable(); +boolean ispublic = true; +double x = rb_scenarios_template.getX(); +double y = rb_scenarios_template.getY(); +double width = rb_scenarios_template.getWidth(); +double height = 0;//Not needed, automatically adjust by adding options +Color textColor = Color.BLACK; +boolean enabled = true; +Font font = new Font("Dialog", Font.PLAIN, 14); +boolean vertical = true; + +//Set words for the radiobutton options +String[] RadioButtonOptions = f_getScenarioOptions(); + +//Check if it contains the custom option +boolean containsCustomOption = false; +for(String scenarioOption : RadioButtonOptions){ + if(scenarioOption.equals("Custom")){ + containsCustomOption = true; + } +} + +if(!containsCustomOption){ + traceln("WARNING: Scenario radiobutton option 'Custom' was not included in the custom scenario options, it has automatically been added!"); + RadioButtonOptions = Arrays.copyOf(RadioButtonOptions, RadioButtonOptions.length + 1); + RadioButtonOptions[RadioButtonOptions.length - 1] = "Custom"; +} + +//Create the radiobutton and set the correct action. +rb_scenarios = new ShapeRadioButtonGroup(presentable, ispublic, x ,y, width, height, textColor, enabled, font, vertical, RadioButtonOptions){ + @Override + public void action() { + f_scenarioRadioButtonAction(); + } +}; + +presentation.add(rb_scenarios); + +//For now: Adjust location of radiobutton title if 6 buttons +if(c_loadedMapOverlayTypes.size() > 5){ + gr_colorings.setY(-17); +} + + + RETURNS_VALUE + String + 1761119066060 + f_setSelectedScenario + -1170 + 200 + + false + true + true + //Default scenario switch statement, override this function if you want to add/change scenario options! +String selected_scenario = ""; + +switch(rb_scenarios.getValue()){ + case 0: + selected_scenario = "Huidige situatie"; + f_setScenario_Current(); + + break; + case 1: + if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ + selected_scenario = "Toekomstplannen"; + f_setScenario_Future(); + } + else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + selected_scenario = "Custom"; + t_scenarioDescription.setText(t_scenario_custom); + } + break; + case 2: + selected_scenario = "Custom"; + t_scenarioDescription.setText(t_scenario_custom); + break; + + default: + traceln("Unsupported scenario selected"); +} + +return selected_scenario; + + + RETURNS_VALUE + String[] + 1761119264046 + f_getScenarioOptions + -1150 + 80 + + false + true + true + //OVERRIDE THIS FUNCTION IF YOU WANT TO ADJUST THE SCENARIO OPTIONS. +// -> MAKE SURE TO ALWAYS INCLUDE A CUSTOM +String[] scenarioOptions = null; +if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ + scenarioOptions = new String[]{"Huidige situatie", "Toekomstplannen", "Custom"}; +} +else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + scenarioOptions = new String[]{"Huidige situatie", "Custom"}; +} +return scenarioOptions; + + + VOID + double + 1761119479231 + f_setScenario_Future + -1160 + 270 + + false + true + true + if(c_scenarioMap_Future != null){ + f_setCompaniesScenario(c_scenarioMap_Future); +} +//Set specifc assets active/non-active +f_projectSpecificScenarioSettings("Future"); + +//Set the scenario text +t_scenarioDescription.setText(t_scenario_future); + + + VOID + double + 1761119479233 + f_setScenario_Current + -1160 + 225 + + false + true + true + if(c_scenarioMap_Current != null){ + f_setCompaniesScenario(c_scenarioMap_Current); +} +//Reset sliders for households +if(project_data.project_type() == OL_ProjectType.RESIDENTIAL && p_residentialScenario_Current != null){ + f_setResidentialScenario_Current(); +} + + +//Set specifc assets active/non-active +f_projectSpecificScenarioSettings("Current"); + +//Set the scenario text +t_scenarioDescription.setText(t_scenario_current); + + + VOID + double + 1761119842140 + f_resetSpecialSlidersAndButtons + -1160 + 365 + + false + true + true + uI_Tabs.pop_tabEHub.get(0).getButton_remove_nfato().action(); + + + + + + + +//Project specific sliders and buttons reset +f_resetProjectSpecificSlidersAndButtons(); + + + VOID + double + 1761121949197 + f_resetProjectSpecificSlidersAndButtons + -1140 + 385 + + false + true + true + //OVERRIDE THIS FUNCTION IF YOU WANT TO RESET CERTAIN CUSTOM SLIDERS +//AND BUTTONS THAT ARE NOT IN THE GENERIC LOADERFACE + + + VOID + double + 1761122139097 + f_projectSpecificScenarioSettings + -1160 + 415 + + false + true + true + + selectedScenario + String + + //OVERRIDE IF THIS IS NEEDED FOR YOUR SPECIFIC PROJECT + +//Example code: +/* +//Find specific scenario assets +GridConnection testGC_new = findFirst(energyModel.UtilityConnections, GC -> GC.p_gridConnectionID.equals("testGC_nieuwBouw")); +GIS_Building testBuilding_additionalBuilding = findFirst(energyModel.pop_GIS_Buildings, B -> B.p_id.equals("testBuilding_additionalBuilding")); + +switch(selectedScenario){ + case "Current": + //Pause assets + testGC_new.f_setActive(false); + testBuilding_additionalBuilding.gisRegion.setVisible(false); + break; + + case "Future": + //Unpause assets + testGC_new.f_setActive(true); + testBuilding_additionalBuilding.gisRegion.setVisible(true); + break; +} +*/ + + + + VOID + double + 1761132028131 + f_setResidentialScenario_Current + -1160 + 465 + + false + true + true + ////Electricity +tabElectricity tabElec = uI_Tabs.pop_tabElectricity.get(0); + +double pv_pct = p_residentialScenario_Current.getHousesWithPV_pct(); +tabElec.sl_householdPVResidentialArea_pct.setValue(roundToInt(pv_pct), true); + +double battery_pct = p_residentialScenario_Current.getPvHousesWithBattery_pct(); +tabElec.sl_householdBatteriesResidentialArea_pct.setValue(roundToInt(battery_pct), true); + +//Electric cooking +double cooking_pct = p_residentialScenario_Current.getCooking_pct(); +tabElec.sl_householdElectricCookingResidentialArea_pct.setValue(roundToInt(cooking_pct), true); + +//Consumption growth +double electricityDemandIncrease_pct = p_residentialScenario_Current.getElectricityDemandIncrease_pct(); +tabElec.sl_electricityDemandIncreaseResidentialArea_pct.setValue(roundToInt(electricityDemandIncrease_pct), true); + +//Gridbatteries +double averageNeighbourhoodBatterySize_kWh = p_residentialScenario_Current.getAverageNeighbourhoodBatterySize_kWh(); +tabElec.sl_gridBatteriesResidentialArea_kWh.setValue(averageNeighbourhoodBatterySize_kWh, true); + +////Heating +tabHeating tabHeat = uI_Tabs.pop_tabHeating.get(0); + +double housesWithGasBurners_pct = p_residentialScenario_Current.getHousesWithGasBurners_pct(); +double housesWithHybridHeatpump_pct = p_residentialScenario_Current.getHousesWithHybridHeatpump_pct(); +double housesWithElectricHeatpump_pct = p_residentialScenario_Current.getHousesWithElectricHeatpump_pct(); +boolean cb_householdHTDistrictHeatingActive = p_residentialScenario_Current.getCb_householdHTDistrictHeatingActive(); +boolean cb_householdLTDistrictHeatingActive = p_residentialScenario_Current.getCb_householdLTDistrictHeatingActive(); + +if(cb_householdHTDistrictHeatingActive || cb_householdLTDistrictHeatingActive){ + tabHeat.sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, false); + tabHeat.sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, false); + tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, false); + if(cb_householdHTDistrictHeatingActive){ + tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); + tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, true); + } + else if(cb_householdLTDistrictHeatingActive){ + tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); + tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, true); + } +} +else{ + tabHeat.sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, true); + tabHeat.sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, true); + tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, true); + tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); + tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, false); +} + + +//Houses with Airco +double pctOfHousesWithAirco = p_residentialScenario_Current.getHousesWithAirco_pct(); +tabHeat.sl_householdAircoResidentialArea_pct.setValue(pctOfHousesWithAirco, true); + +//Houses with better isolation +double pctOfHousesWithImprovedInsulation = p_residentialScenario_Current.getHousesWithImprovedInsulation_pct(); +tabHeat.sl_householdHeatDemandReductionResidentialArea_pct.setValue(roundToInt(pctOfHousesWithImprovedInsulation), true); + +//PT +double nbHousesWithPT_pct = p_residentialScenario_Current.getNbHousesWithPT_pct(); +tabHeat.sl_rooftopPTHouses_pct.setValue(roundToInt(nbHousesWithPT_pct), true); + + + +////Mobility +tabMobility tabMob = uI_Tabs.pop_tabMobility.get(0); + +//Private EV +double privateEVs_pct = p_residentialScenario_Current.getPrivateEVs_pct(); +double privateEVsThatSupportV2G_pct = p_residentialScenario_Current.getPrivateEVsThatSupportV2G_pct(); +tabMob.sl_privateEVsResidentialArea_pct.setValue(roundToInt(privateEVs_pct), true); +tabMob.sl_EVsThatSupportV2G_pct.setValue(roundToInt(privateEVsThatSupportV2G_pct), true); + +//Selected charging mode +String selectedChargingAttitudeStringPrivateEV = p_residentialScenario_Current.getSelectedChargingAttitudeStringPrivateEVs(); +boolean V2GActivePrivateEV = p_residentialScenario_Current.getV2GActivePrivateEVs(); + +tabMob.cb_chargingAttitudePrivateParkedCars.setValue(selectedChargingAttitudeStringPrivateEV, true); +tabMob.cb_activateV2GPrivateParkedCars.setSelected(V2GActivePrivateEV, true); + +//Chargers +double activePublicChargers_pct = p_residentialScenario_Current.getActivePublicChargers_pct(); +tabMob.sl_publicChargersResidentialArea_pct.setValue(roundToInt(activePublicChargers_pct), true); + +double V1G_pct = p_residentialScenario_Current.getChargersV1G_pct(); +double V2G_pct = p_residentialScenario_Current.getChargersV2G_pct(); +tabMob.sl_chargersThatSupportV1G_pct.setValue(roundToInt(V1G_pct), true); +tabMob.sl_chargersThatSupportV2G_pct.setValue(roundToInt(V2G_pct), true); + +//Selected charging mode +String selectedChargingAttitudeStringChargers = p_residentialScenario_Current.getSelectedChargingAttitudeStringChargers(); +boolean V2GActiveChargers = p_residentialScenario_Current.getV2GActiveChargers(); + +tabMob.cb_chargingAttitudePrivatePublicChargers.setValue(selectedChargingAttitudeStringChargers, true); +tabMob.cb_activateV2GPublicChargers.setSelected(V2GActiveChargers, true); + + + VOID + double + 1761134737334 + f_storeResidentialScenario_Current + -1180 + 130 + + false + true + true + //Create the class that will store the initial slider settings of a residential model +p_residentialScenario_Current = new J_SliderSettings_Residential(); + +////Electricity +if(uI_Tabs.pop_tabElectricity.size() > 0){ + tabElectricity tabElec = uI_Tabs.pop_tabElectricity.get(0); + + double housesWithPV_pct = tabElec.sl_householdPVResidentialArea_pct.getValue(); + p_residentialScenario_Current.setHousesWithPV_pct(housesWithPV_pct); + + double pvHousesWithBattery_pct = tabElec.sl_householdBatteriesResidentialArea_pct.getValue(); + p_residentialScenario_Current.setPvHousesWithBattery_pct(pvHousesWithBattery_pct); + + + //Electric cooking + double cooking_pct = tabElec.sl_householdElectricCookingResidentialArea_pct.getValue(); + p_residentialScenario_Current.setCooking_pct(cooking_pct); + + //Consumption growth + double electricityDemandIncrease_pct = tabElec.sl_electricityDemandIncreaseResidentialArea_pct.getValue(); + p_residentialScenario_Current.setElectricityDemandIncrease_pct(electricityDemandIncrease_pct); + + //Gridbatteries + double averageNeighbourhoodBatterySize_kWh = tabElec.sl_gridBatteriesResidentialArea_kWh.getValue(); + p_residentialScenario_Current.setAverageNeighbourhoodBatterySize_kWh(averageNeighbourhoodBatterySize_kWh); +} + +////Heating +if(uI_Tabs.pop_tabHeating.size() > 0){ + tabHeating tabHeat = uI_Tabs.pop_tabHeating.get(0); + + double housesWithGasBurners_pct = tabHeat.sl_householdGasBurnerResidentialArea_pct.getValue(); + double housesWithHybridHeatpump_pct = tabHeat.sl_householdHybridHeatpumpResidentialArea.getValue(); + double housesWithElectricHeatpump_pct = tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.getValue(); + boolean cb_householdHTDistrictHeatingActive = tabHeat.cb_householdHTDistrictHeatingResidentialArea.isSelected(); + boolean cb_householdLTDistrictHeatingActive = tabHeat.cb_householdLTDistrictHeatingResidentialArea.isSelected(); + + p_residentialScenario_Current.setHousesWithGasBurners_pct(housesWithGasBurners_pct); + p_residentialScenario_Current.setHousesWithHybridHeatpump_pct(housesWithHybridHeatpump_pct); + p_residentialScenario_Current.setHousesWithElectricHeatpump_pct(housesWithElectricHeatpump_pct); + p_residentialScenario_Current.setCb_householdHTDistrictHeatingActive(cb_householdHTDistrictHeatingActive); + p_residentialScenario_Current.setCb_householdLTDistrictHeatingActive(cb_householdLTDistrictHeatingActive); + + + //Houses with Airco + double housesWithAirco_pct = tabHeat.sl_householdAircoResidentialArea_pct.getValue(); + p_residentialScenario_Current.setHousesWithAirco_pct(housesWithAirco_pct); + + //Houses with better isolation + double housesWithImprovedInsulation_pct = tabHeat.sl_householdHeatDemandReductionResidentialArea_pct.getValue(); + p_residentialScenario_Current.setHousesWithImprovedInsulation_pct(housesWithImprovedInsulation_pct); + + //PT + double nbHousesWithPT_pct = tabHeat.sl_rooftopPTHouses_pct.getValue(); + p_residentialScenario_Current.setNbHousesWithPT_pct(nbHousesWithPT_pct); +} + +////Mobility +if(uI_Tabs.pop_tabMobility.size() > 0){ + tabMobility tabMob = uI_Tabs.pop_tabMobility.get(0); + + //Private EV + double privateEVs_pct = tabMob.sl_privateEVsResidentialArea_pct.getValue(); + double privateEVsThatSupportV2G_pct = tabMob.sl_EVsThatSupportV2G_pct.getValue(); + p_residentialScenario_Current.setPrivateEVs_pct(privateEVs_pct); + p_residentialScenario_Current.setPrivateEVsThatSupportV2G_pct(privateEVsThatSupportV2G_pct); + + //Selected charging mode + String selectedChargingAttitudeStringPrivateEVs = tabMob.cb_chargingAttitudePrivateParkedCars.getValue(); + boolean V2GActivePrivateEVs = tabMob.cb_activateV2GPrivateParkedCars.isSelected(); + p_residentialScenario_Current.setSelectedChargingAttitudeStringPrivateEVs(selectedChargingAttitudeStringPrivateEVs); + p_residentialScenario_Current.setV2GActivePrivateEVs(V2GActivePrivateEVs); + + //Chargers + double activePublicChargers_pct = tabMob.sl_publicChargersResidentialArea_pct.getValue(); + double chargersV1G_pct = tabMob.sl_chargersThatSupportV1G_pct.getValue(); + double chargersV2G_pct = tabMob.sl_chargersThatSupportV2G_pct.getValue(); + + p_residentialScenario_Current.setActivePublicChargers_pct(activePublicChargers_pct); + p_residentialScenario_Current.setChargersV1G_pct(chargersV1G_pct); + p_residentialScenario_Current.setChargersV2G_pct(chargersV2G_pct); + + //Selected charging mode + String selectedChargingAttitudeStringChargers = tabMob.cb_chargingAttitudePrivatePublicChargers.getValue(); + boolean V2GActiveChargers = tabMob.cb_activateV2GPublicChargers.isSelected(); + p_residentialScenario_Current.setSelectedChargingAttitudeStringChargers(selectedChargingAttitudeStringChargers); + p_residentialScenario_Current.setV2GActiveChargers(V2GActiveChargers); +} + + + RETURNS_VALUE + String + 1762253228735 + f_getDateAndTimeString + 940 + -340 + + false + true + true + Date date = energyModel.f_getDate(); + +SimpleDateFormat formatter = new SimpleDateFormat(); +formatter.applyPattern("dd MMM yyyy, kk:mm"); + +return formatter.format(date); + + + RETURNS_VALUE + String + 1762253251373 + f_getDateString + 940 + -320 + + false + true + true + Date date = energyModel.f_getDate(); + +SimpleDateFormat formatter = new SimpleDateFormat(); +formatter.applyPattern("dd MMM yyyy"); + +return formatter.format(date); + + + VOID + double + 1762356801733 + f_setLoadingScreen + 3080 + 930 + + false + true + true + + visibility + boolean + + + xOffset + double + + + yOffset + double + + if (visibility) { + // Screen Size / View Area is 1920 x 980, so centre at 960, 490 + // Icon Size is 180 x 180, so top left at 960 - 90 = 870, 490 - 90 = 400 + double xPos = 870 + xOffset; + double yPos = 400 + yOffset; + + image_loadingScreenIcon.setPos(xPos, yPos); + + // Make sure the image is at the top of the presentation level + f_setShapePresentationOnTop(image_loadingScreenIcon); + image_loadingScreenIcon.setVisible(true); +} +else { + image_loadingScreenIcon.setVisible(false); +} + + + VOID + double + 1762533624267 + f_scenarioRadioButtonAction + -1180 + 180 + + false + true + true + //Set boolean of running main interface scenario true +b_runningMainInterfaceScenarios = true; + +////Set selected scenario +String selected_scenario = f_setSelectedScenario(); + +//Set scenario name text to the correct scenario +t_scenarioName.setText("Scenario: " + selected_scenario); +traceln("Selected scenario: \"" + selected_scenario + "\""); + +//Deselect the selected building, if selected GC is now paused +if(c_selectedGridConnections.size()>0 && !c_selectedGridConnections.get(0).v_isActive){ + f_clearSelectionAndSelectEnergyModel(); +} + +//Set boolean of running main interface scenario false +b_runningMainInterfaceScenarios = false; + +if(!selected_scenario.equals("Custom")){ + f_resetSettings(); + + f_updateMainInterfaceSliders(); + + //Colour recolor pv map again if it is active + if(c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); + } +} + + + +/* +//Pause simulation and set loading screen +pauseSimulation(); +f_setLoadingScreen(true, 0, 0); + +new Thread( () -> { + + //Set selected scenario + String selected_scenario = f_setSelectedScenario(); + + //Set scenario name text to the correct scenario + t_scenarioName.setText("Scenario: " + selected_scenario); + traceln("Selected scenario: \"" + selected_scenario + "\""); + + //Deselect the selected building, if selected GC is now paused + if(c_selectedGridConnections.size()>0 && !c_selectedGridConnections.get(0).v_isActive){ + f_clearSelectionAndSelectEnergyModel(); + } + + //Set boolean of running main interface scenario true + b_runningMainInterfaceScenarios = false; + + if(!selected_scenario.equals("Custom")){ + f_resetSettings(); + + f_updateMainInterfaceSliders(); + + //Colour recolor pv map again if it is active + if(c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); + } + } + + //Resume live simulation and remove loading screen + runSimulation(); + f_setLoadingScreen(false, 0, 0); + +}).start(); +*/ + + + VOID + double + 1762775121080 + f_setScenarioToCustom + -1160 + 315 + + false + true + true + String[] scenarioOptions = f_getScenarioOptions(); + +int customOptionIndex = 0; +for(String scenarioOption : scenarioOptions){ + if(scenarioOption.equals("Custom")){ + break; + } + customOptionIndex++; +} + +rb_scenarios.setValue(customOptionIndex, true); + + + + + 1744624088854 + excel_exportBalanceLoadData + true + -555 + -365 + + false + true + true + + zerointerfaceloader + Export_ModelData.xlsx + + false + true + true + + + + + 1658477103135 + connections + 50 + -230 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1708522361909 + pop_UI_Company + -260 + 460 + + false + true + true + + zerointerfaceloader + UI_company + + + + zerointerfaceloader + UI_company + 1708522361868 + + + + + p_companyName + + + p_maxAddedVehicles + + + p_scenarioSettings_Current + + + p_scenarioSettings_Future + + + p_gridConnection + + + true + + 0 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + EMPTY + + 1658477089963 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1709049456144 + pop_UI_Battery + -260 + 540 + + false + true + true + + zerointerfaceloader + UI_Battery + + + + zerointerfaceloader + UI_Battery + 1709049456141 + + + + + p_amountOfGISObjects + + + p_amountOfGC + + + true + + 0 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + EMPTY + + 1658477089962 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1716193013122 + uI_Results + -670 + 760 + + false + true + true + 1716193014596 + + digital_twin_results + UI_Results + + + + digital_twin_results + UI_Results + 1704197366556 + + + + + energyModel + + energyModel + + + + p_cutOff_MWh + + + gr_infoText + + gr_infoText + + + + gr_closeInfoText + + gr_closeInfoText + + + + t_infoTextDescription + + t_infoTextDescription + + + + rect_infoText + + rect_infoText + + + + p_currentActiveInfoBubble + + p_currentActiveInfoBubble + + + + false + + 100 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089961 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1717506326727 + pop_UI_Hydrogen + -260 + 500 + + false + true + true + + zerointerfaceloader + UI_Hydrogen + + + + zerointerfaceloader + UI_Hydrogen + 1717506309785 + + + + + p_amountOfGISObjects + + + p_amountOfGC + + + true + + 0 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + EMPTY + + 1658477089960 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722252541830 + uI_Tabs + -670 + 581 + + false + true + true + 1722252542596 + + zerointerfaceloader + UI_Tabs + + + + zerointerfaceloader + UI_Tabs + 1722245292191 + + + + false + + 100 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089959 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722252541830 + pop_UI_EnergyHub + -260 + 420 + + false + true + true + 1747229957336 + + zerointerfaceloader + UI_EnergyHub + + + + zerointerfaceloader + UI_EnergyHub + 1709049506460 + + + + + p_energyHubBackGroundColor + + + p_energyHubLineColor + + + p_energyHubLineWidth + + + p_energyHubLineStyle + + + true + + 0 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + "" + + EMPTY + + 0 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + + + 1658477103139 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1756124196459 + rect_sliderCollectionOrdering + 0 + -800 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -14774017 + null + SOLID + 1220 + 400 + 0.0 + -1 + null + + + 1701947860073 + rect_canvas + -600 + -200 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 6000 + 2400 + 0.0 + -1 + null + + + 1701952231399 + rect_gismap + 400 + 85 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1020 + 675 + 0.0 + + zenmocolor_blue3.getFillColor() + null + + + 1747229984708 + gr_energyHubPresentation + 2600 + -2200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1747229957336 + pop_UI_EnergyHub_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 52.565832561661324 + 6.28960063917648 + + + + + 1724074923402 + gr_logos + 940 + -10 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074980260 + rect_logoBackground + -960 + -70 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1960 + 160 + 0.0 + 682673374 + v_backgroundColor + null + + + 1724074987235 + image_tueLogo + 730 + 25 + + true + true + false + SHAPE_DRAW_2D3D + getExperimentHost().openWebSite("https://www.tue.nl/en/"); + false + 0 + 205.802 + 60 + 0.0 + + + zerointerfaceloader + logo_TUe_red.png + + + zerointerfaceloader + logo_TUe_white.png + + + false + + + 1731938214224 + image_luxLogo + -858 + 13 + + true + true + false + SHAPE_DRAW_2D3D + //Go to website on click +getExperimentHost().openWebSite("https://lux.energy/"); + + false + 0 + 216 + 90.947 + 0.0 + + + zerointerfaceloader + logo_lux-energy-twin.png + + + false + + + 1758877617096 + image_zenmoLogo + 532 + 16 + + true + true + false + SHAPE_DRAW_2D3D + getExperimentHost().openWebSite("https://zenmo.com/"); + false + 0 + 170 + 73 + 0.0 + + + zerointerfaceloader + logo_zenmo.png + + + false + + + + + 1665052211228 + rect_mainFunctions + -700 + 0 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16744448 + null + SOLID + 680 + 1060 + 0.0 + -1 + null + + + 1705481955546 + rect_simulationEngine + -270 + 860 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16744448 + null + SOLID + 250 + 200 + 0.0 + -1 + null + + + 1665052603927 + rect_input + -700 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16744448 + null + SOLID + 169 + 40 + 0.0 + -1 + null + + + 1665052191319 + t_input + -640 + 5 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16744448 + Input + + SansSerif + 18 + + + LEFT + + + 1690205003572 + line_simulationEngine + -230 + 890 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 170 + 0 + 0 + + + 1690205003577 + t_simulationEngine + -151 + 870 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simulation engine + + SansSerif + 14 + + + CENTER + + + 1690975123923 + t_date + 420 + 54 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Datum + energyModel.v_isRapidRun ? f_getDateString() : f_getDateAndTimeString() + + SansSerif + 16 + + + LEFT + + + 1696520897606 + gr_zoomButton + 1330 + 680 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1696520897608 + arc_zoomIn + -2.5319999999999965 + -20.114000000000004 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -13882324 + null + SOLID + 0 + 0.0 + 17.53 + 40 + -179.1999969482422 + 178.1999969482422 + -13882324 + null + + + 1696520897610 + arc_zoomOut + -2.483000000000004 + 8.137 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -13882324 + null + SOLID + 0 + 0.0 + 17.483 + 40 + 1.2000000476837158 + 178.1999969482422 + -13882324 + null + + + 1696520897612 + rect_zoomButton + -20 + -20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -13882324 + null + SOLID + 35 + 28 + 0.0 + -13882324 + null + + + 1696520897614 + line_zoomButtonSeperator + -16 + -5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 1 + 0 + 1 + 0 + 27 + 0 + 0 + + + 1696520897616 + line_zoomIn1 + -9 + -21 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -1 + null + SOLID + 1 + 0 + 1 + 0 + 12 + 0 + 0 + + + 1696520897618 + line_zoomIn2 + -3 + -27 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -1 + null + SOLID + 1 + 0 + 1 + 0 + 0 + 12 + 0 + + + 1696520897620 + line_zoomOut + -10 + 8 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -1 + null + SOLID + 1 + 0 + 1 + 0 + 15 + 0 + 0 + + + 1696520897622 + rect_zoomIn + -20 + -35 + + true + true + false + SHAPE_DRAW_2D3D + map.zoomIn(); + false + 0 + 10 + 1 + + null + SOLID + 35 + 30 + 0.0 + + null + + + 1696520897624 + rect_zoomOut + -20 + -5 + + true + true + false + SHAPE_DRAW_2D3D + map.zoomOut(); + false + 0 + 10 + 1 + + null + SOLID + 35 + 30 + 0.0 + + null + + + + + 1696837759915 + t_legendaColors + 380 + 1020 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Legenda Colors + + SansSerif + 18 + + + LEFT + + + 1696863329245 + t_mapClickingFunctions + 40 + 1020 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Map connections and clicking + + SansSerif + 18 + + + LEFT + + + 1702552223737 + t_stylingFunctions + -680 + 301 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Interface styling: + + SansSerif + 14 + + + LEFT + + + 1704210756310 + gr_clickedObjectInfo + 370 + 220 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1713259123999 + rect_clickedObjectInfo + 40 + -131 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + zenmocolor_blue3.getFillColor() + null + SOLID + 555 + 20 + 0.0 + -1 + zenmocolor_blue3.getFillColor() + null + + + 1701879145306 + t_clickedObjectInfo + 321 + -129 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer een gebouw + v_clickedObjectText.equals("None") ? +"Selecteer een gebouw of trafostation" : +v_clickedObjectText + + SansSerif + 12 + + + CENTER + + + + + 1705663500141 + t_buildingColors + 680 + 1030 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Building colors + + SansSerif + 14 + + + LEFT + + + 1705663820235 + t_gridnodeColors + 1022 + 1030 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + GridNode colors + + SansSerif + 14 + + + LEFT + + + 1705664522164 + t_specificBuildingColors + 680 + 1250 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Specific building colors + + SansSerif + 14 + + + LEFT + + + 1705667994053 + t_areaColors + 1300 + 1180 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Area colors + + SansSerif + 14 + + + LEFT + + + 1706004011983 + txt_generalColors + 1300 + 1030 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + General styling + + SansSerif + 14 + + + LEFT + + + false + 1708522580070 + button_goToUI + 1140 + 87 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if(energyModel.v_rapidRunData != null){ + switch(v_clickedObjectType){ + + case BUILDING: + uI_Company.f_setCompanyUI(c_selectedGridConnections.get(0)); + uI_Company.va_companyUI.navigateTo(); + v_currentViewArea = uI_Company.va_companyUI; + break; + + case ELECTROLYSER: + //uI_Hydrogen.f_setHydrogenUI(c_selectedGridConnections.get(0)); + uI_Hydrogen.va_hydrogenUI.navigateTo(); + v_currentViewArea = uI_Hydrogen.va_hydrogenUI; + break; + + case BATTERY: + //uI_Battery.f_setBatteryUI(c_selectedGridConnections.get(0)); + uI_Battery.va_batteryUI.navigateTo(); + v_currentViewArea = uI_Battery.va_batteryUI; + break; + + case SOLARFARM: + case WINDFARM: + case CHARGER: + default: + break; + } +} +else{ + f_setErrorScreen("Je kan alleen naar de companyUI gaan als er een jaar simulatie is voltooid.", 0, 0); +} + + + + + Ga naar bedrijfs interface + + + + 1708595212229 + txt_additionalUIs + -290 + 370 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Additional UIs: + + SansSerif + 14 + + + LEFT + + + false + 1709718299889 + rb_scenarios_template + 19.333 + 144.667 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + false + true + f_scenarioRadioButtonAction(); + + + + 0 + VERTICAL + + + + false + + + + 1709718299891 + t_scenarios + 19.333 + 118.667 + + true + true + false + true + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer een scenario + + Calibri + 20 + + + LEFT + + + 1709718299897 + gr_scenarioDescription + 199.333 + 374.667 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1709718299901 + t_scenarioDescription + 0.667 + -24.667 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Het huidige scenario bevat de energie dynamieken van dit moment. +Dit omvat o.a. de huidige zonnepanelen op de daken van huizen en +bedrijven, het aantal voertuigen per type, de electriciteitsconsumptie +van het gebied, en de huidige gasconsumptie voor verwarming. + + SansSerif + 11 + + + CENTER + + + 1709718299903 + t_scenarioName + 0 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Huidig scenario + + Calibri + 16 + + + CENTER + + + + + 1710174312959 + t_resultsUIFunctions + -680 + 730 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Results UI initialization + + SansSerif + 14 + + + LEFT + + + 1713429772427 + t_scenarioDictionaries + -290 + 290 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Scenario dictionaries + + SansSerif + 12 + + + LEFT + + + 1713431901010 + t_initializationFunctions + -680 + 150 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Interface initialization functions + + SansSerif + 14 + + + LEFT + + + 1715951689412 + t_inputParameters + -680 + 50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Input Parameters + + SansSerif + 14 + + + LEFT + + + false + 1716988295617 + button_gotoEngine + -260 + 960 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + energyModel.va_engine.navigateTo(); + + + + Go to Engine + + + + 1719217632486 + line_ordereringDescription + 40 + -755 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 210 + 0 + 0 + + + 1719217632488 + t_ordereringDescription + 40 + -780 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Initial conditions & ordering + + SansSerif + 16 + + + LEFT + + + 1719829894799 + t_outsideTemperature + 1326 + 17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -7631989 + Buitentemperatuur: 23 graden + "Buiten temperatuur " + v_outsideTemperature + " graden" + + Cambria + 10 + + + RIGHT + + + 1719829988146 + t_solarIrradiance + 1326 + 42 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -7631989 + Zonne instraling: 12 w/m2 + "Zonneinstraling " + v_solarIrradiance + " W/m2" + + Cambria + 10 + + + RIGHT + + + 1719829993001 + t_windSpeed + 1326 + 67 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -7631989 + Windsnelheid: hoog + "Windsnelheid: " + v_windspeed + + Cambria + 10 + + + RIGHT + + + 1719847144211 + plot_outsideTemperature + 1335 + 12 + + true + true + false + SHAPE_DRAW_2D3D + true + + 1751013532916 + true + 1719907200000 + + 0 + HOUR + + + 1 + HOUR + + + false + 84 + 23 + + -16777216 + + 0 + 0 + 84 + 23 + -1 + -16777216 + -6632142 + + + SOUTH + -16777216 + 30 + + + NONE + NONE + -10496 + + false + MOVEMENT_WITH_TIME + MODEL_TIME_UNIT + -5 + 28 + FIXED + true + LINEAR + + Title + 1719847144208 + my_dataset + -16776961 + v_outsideTemperature + true + NONE + 1.0 + + 96 + 96 + true + HH_mm + + + 1719848137592 + plot_solarIrradiance + 1335 + 38 + + true + true + false + SHAPE_DRAW_2D3D + true + + 1751013532918 + true + 1719907200000 + + 0 + HOUR + + + 1 + HOUR + + + false + 84 + 23 + + -16777216 + + 0 + 0 + 84 + 23 + -1 + -16777216 + -6632142 + + + SOUTH + -16777216 + 30 + + + NONE + NONE + -10496 + + false + MOVEMENT_WITH_TIME + MODEL_TIME_UNIT + 0 + 1000 + FIXED + true + LINEAR + + Title + 1719848137589 + my_dataset + -10496 + v_solarIrradiance + true + NONE + 1.0 + + 96 + 96 + true + HH_mm + + + 1720909739871 + gr_multipleBuildingInfo + 1040 + 55 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1720904897811 + button_nextBuilding + -65 + 32 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + v_selectedGridConnectionIndex < v_nbGridConnectionsInSelectedBuilding + if (v_selectedGridConnectionIndex < v_nbGridConnectionsInSelectedBuilding ){ + v_selectedGridConnectionIndex += 1; + + c_selectedGridConnections = new ArrayList<>(); + + if(v_customEnergyCoop != null){ + energyModel.f_removeEnergyCoop(v_customEnergyCoop); + v_customEnergyCoop = null; + } + + if( v_selectedGridConnectionIndex > 0){ + c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + } + /* + else { + c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); + v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); + uI_Results.f_updateResultsUI(v_customEnergyCoop); + } + */ + /* + //Update the resultsUI + f_updateUIResultsData(); + */ + + //Set dashboard UI button + f_setUIButton(); +} + + + + Toon volgend adres + + + + false + 1720904921271 + button_previousBuilding + -65 + 53 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + v_selectedGridConnectionIndex > 0 + if (v_selectedGridConnectionIndex > 0){ + c_selectedGridConnections = new ArrayList<>(); + v_selectedGridConnectionIndex -= 1; + + if( v_selectedGridConnectionIndex > 0){ + c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + } + else { + c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); + + v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); + uI_Results.f_updateResultsUI(v_customEnergyCoop); + } + + /* + //Update the resultsUI + f_updateUIResultsData(); + */ + + //Set dashboard UI button + f_setUIButton(); +} + + + + + + + Toon vorig adres + + + + 1720908988631 + t_multipleBuildingInfo + -360 + 57 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Je kijkt naar de som van alle 5 addressen samen in het geselecteerde pand + v_selectedGridConnectionIndex > 0 && c_selectedGridConnections.size() > 0 && c_selectedGridConnections.get(0).p_owner.p_detailedCompany ? +"Je kijkt naar: " + c_selectedGridConnections.get(0).p_ownerID + ", " + c_selectedGridConnections.get(0).p_address.getAddress() +: +v_selectedGridConnectionIndex > 0 ? +"Je kijkt naar het " + (v_selectedGridConnectionIndex ) + "e adres in het geselecteerde pand" +: +"Je kijkt naar de som van alle " + v_nbGridConnectionsInSelectedBuilding + " addressen in dit pand" + + SansSerif + 11 + + + CENTER + + + + + 1721819768547 + rect_CustomColors + 1880 + 1400 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -10496 + null + SOLID + 630 + 610 + 0.0 + -1 + null + + + 1721819794985 + txt_mapOverlayFunctionalities + 1900 + 1410 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Map Overlay Functionalities + + + SansSerif + 18 + + + LEFT + + + 1722252542596 + uI_Tabs_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 52.51902183517265 + 6.169494834925871 + + + 1724419174775 + rect_scenarioText + -1210 + 0 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 460 + 700 + 0.0 + -1 + null + + + 1724419379552 + txt_scenarioFunctions + -1190 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Scenario functions, text and settings + + SansSerif + 14 + + + LEFT + + + false + 1725017697644 + checkbox_cabels + 20 + 460 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + for(GISRoute GISCable : c_LVCables){ + GISCable.setVisible(b_showCables); +} + +for(GISRoute GISCable : c_MVCables){ + GISCable.setVisible(b_showCables); +} + + + + + Toon stroom kabels + false + true + b_showCables + + + + 1725020138710 + map + 410 + 130 + + true + true + false + true + SHAPE_DRAW_2D3D + if(b_inEnergyHubMode ){ + if(b_inEnergyHubSelectionMode){ + f_selectEnergyHubGC(clickx, clicky); + } +} +else if(b_inManualFilterSelectionMode){ + f_selectManualFilteredGC(clickx, clicky); +} +else{ + if (uI_Tabs.pop_tabEHub.size() > 0 && uI_Tabs.pop_tabEHub.get(0).b_NFATOListener) { + uI_Tabs.pop_tabEHub.get(0).f_checkGISRegion(clickx, clicky); + } + else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || + c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ + f_selectGridLoop(clickx, clicky); + } + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + f_selectNeighborhood(clickx, clicky); + } + } + + else { + if(c_selectedFilterOptions.size() > 0){ + f_removeAllFilters(); + } + f_selectGISRegion(clickx, clicky); + } +} + false + 1000 + 620 + if(b_inEnergyHubMode ){ + if(b_inEnergyHubSelectionMode){ + f_selectEnergyHubGC(clickx, clicky); + } +} +else if(b_inManualFilterSelectionMode){ + f_selectManualFilteredGC(clickx, clicky); +} +else{ + if (uI_Tabs.pop_tabEHub.size() > 0 && uI_Tabs.pop_tabEHub.get(0).b_NFATOListener) { + uI_Tabs.pop_tabEHub.get(0).f_checkGISRegion(clickx, clicky); + } + else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || + c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ + f_selectGridLoop(clickx, clicky); + } + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + f_selectNeighborhood(clickx, clicky); + } + } + + else { + if(c_selectedFilterOptions.size() > 0){ + f_removeAllFilters(); + } + f_selectGISRegion(clickx, clicky); + } +} + + 52.539123187983904 + 6.173604854475837 + 25000 + -4144960 + -1 + true + false + https://a.tile.openstreetmap.org/[zoom]/[x]/[y].png + WEB_SERVICE + CREATE_STRAIGHT_LINE + CAR + FASTEST + DIJKSTRABI + false + + + true + 1000 + + + 1725456122345 + txt_sliderInitialization + -680 + 551 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Slider Initialization + + SansSerif + 14 + + + LEFT + + + 1725525689286 + txt_GISObjectCreationFunctions + -290 + 60 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + GIS Object creation functions + + SansSerif + 14 + + + LEFT + + + 1730113808401 + gr_uI_Results_presentation + 1440 + 230 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1716193014596 + uI_Results_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 52.52173648990926 + 6.109451573117503 + + + + + 1734442437753 + rect_filterFunctions + -1620 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 360 + 560 + 0.0 + -1 + null + + + 1734443343976 + t_selectionColors + 380 + 1050 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selection colors + + SansSerif + 14 + + + LEFT + + + 1734443865835 + txt_filterFunctions + -1580 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Filter Functions + + SansSerif + 14 + + + LEFT + + + false + 1734444497900 + cb_showFilterInterface + 20 + 480 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + cb_showFilterInterface.isEnabled() + true + !settings.isPublicModel() + gr_filterInterface.setVisible(cb_showFilterInterface.isSelected()); + +if(!cb_showFilterInterface.isSelected()){ + button_clearFilters.action(); + gr_sliderClickBlocker.setVisible(false); +} +else{ + gr_sliderClickBlocker.setVisible(true); + gr_filterInterface.setPos(170, 710); +} + + + + Filter opties + false + + + + 1734444441402 + gr_filterInterface + -1470 + 750 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1734443987142 + rect_filterInterface + -150 + -180 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 350 + 350 + 0.0 + -1 + null + + + 1734443492902 + txt_filterDescription + -130 + -140 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer gebouwen: + + SansSerif + 12 + + + LEFT + + + false + 1734442617547 + cb_filterOptions + -10 + -140 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + !gr_ForceMapSelectionText.isVisible() + f_setFilter(cb_filterOptions.getValue()); + +cb_filterOptions.setValueIndex(0); + + + + false + + + + + + + + + + + false + + + + 1734443541801 + txt_activeFilters + -130 + -110 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geen Actieve Filters. + !t_activeFilters.getText().equals("") ? "Actieve filters:" : "Geen Actieve Filters." + + SansSerif + 12 + + + LEFT + + + 1734444104065 + t_activeFilters + -130 + -90 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + + + SansSerif + 12 + + + LEFT + + + 1734444671650 + txt_filterInterface + 25 + -170 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Filter opties + + SansSerif + 14 + + + CENTER + + + false + 1734446701124 + button_clearFilters + 40 + 130 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + c_filterSelectedGridLoops.clear(); +c_filterSelectedNeighborhoods.clear(); +c_manualFilterSelectedGC.clear(); +c_manualFilterDeselectedGC.clear(); +b_inManualFilterSelectionMode = false; +if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + f_setFilter("Handmatige selectie"); +} + +f_setForcedClickScreenText(""); +if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); +} + +f_removeAllFilters(); +traceln("Alle filters zijn verwijderd."); + + + + Verwijder alle filters + + + + 1734524446136 + t_selectedGridLoop + -130 + 140 + + true + true + false + SHAPE_DRAW_2D + c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) + false + 0 + 0.0 + -16777216 + + c_filterSelectedGridLoops.size() == 1 ? "Geselecteerde lus: " + c_filterSelectedGridLoops.get(0).p_gridNodeID : c_filterSelectedGridLoops.size() > 1 ? "Meerdere lussen geselecteerd." : "Geen lus geselecteerd." + + SansSerif + 12 + + + LEFT + + + 1737640715642 + t_selectedNBh + -130 + 117 + + true + true + false + SHAPE_DRAW_2D + c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD) + false + 0 + 0.0 + -16777216 + + c_filterSelectedNeighborhoods.size() == 1 ? "Geselecteerde buurt: " + c_filterSelectedNeighborhoods.get(0).p_id : c_filterSelectedNeighborhoods.size() > 1 ? "Meerdere buurten geselecteerd." : "Geen buurt geselecteerd." + + SansSerif + 12 + + + LEFT + + + false + 1742227694564 + button_removeManualSelection + 40 + 85 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + !(c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty()) + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + c_manualFilterSelectedGC.clear(); + c_manualFilterDeselectedGC.clear(); + + f_setForcedClickScreenText(""); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); + } + + b_inManualFilterSelectionMode = false; + if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + f_setFilter("Handmatige selectie"); + } +} + + + + Wis handmatige selectie + + + + false + 1743092954558 + button_manualFilterSelection + 40 + 50 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + !gr_ForceMapSelectionText.isVisible() || b_inManualFilterSelectionMode + if(!b_inManualFilterSelectionMode){ + b_inManualFilterSelectionMode = true; + + f_setForcedClickScreenText("(De)Selecteer gebouwen"); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(true); + } + + if(!c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + f_setFilter("Handmatige selectie"); + } +} +else{ + b_inManualFilterSelectionMode = false; + + f_setForcedClickScreenText(""); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); + } + + if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + f_setFilter("Handmatige selectie"); + } +} + + + + Handmatige selectie + b_inManualFilterSelectionMode ? "Selectie voltooien" : "Handmatige selectie" + + + + + + 1736337963311 + gr_errorScreen + 3380 + -100 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1736344526647 + rect_errorScreenGrayOut + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + //traceln(); + false + 0 + 10 + 1 + -2049715245 + null + SOLID + 1920 + 980 + 0.0 + -2049715245 + null + + + 1736443451929 + rect_errorScreenClickBlocking + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + double click_block = 0; + false + 0 + 10 + 1 + -2049715245 + null + null + SOLID + 1920 + 980 + 0.0 + -2049715245 + null + null + + + 1747320252784 + rect_errorMessage + 690 + 380 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 4 + -65536 + null + SOLID + 540 + 200 + 0.0 + -1 + null + 10 + + + 1736337707551 + t_errorMessage + 960 + 430 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + TYPE YOUR ERROR MESSAGE HERE + + SansSerif + 24 + + + CENTER + + + 1736338014404 + button_errorOK + 960 + 550 + + true + true + false + SHAPE_DRAW_2D3D + gr_errorScreen.setVisible(false); + false + 0 + 0.0 + + + 1736338014406 + rect_errorOK + -60 + -20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 120 + 40 + 0.0 + -1 + null + + + 1736338014408 + txt_errorOK + 0 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Ok + + SansSerif + 18 + + + CENTER + + + + + + + 1742482935391 + gr_sliderClickBlocker + -440 + -1860 + + true + false + false + true + SHAPE_DRAW_2D3D + 200 + 750 + false + 0 + 0.0 + + + 1742482847835 + rect_sliderClickBlocker + -200 + -240 + + true + true + false + SHAPE_DRAW_2D3D + int clickBlocker; + false + 0 + 10 + 1 + + null + SOLID + 400 + 470 + 0.0 + -1 + new Color(255, 255, 255, 0) + null + + + 1742482890780 + rect_sliderClickBlocker2 + -200 + -240 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 400 + 470 + 0.0 + 16777215 + null + + + + + 1744624088806 + gr_writeDataToExcel + true + -410 + -730 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744624088808 + rect_exportToExcelFunctions + -190 + -120 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 450 + 530 + 0.0 + -1 + null + + + false + 1744624088810 + fileChooser_exportBalanceLoadEnergyModel + -156 + -30 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + false + fileChooser_exportBalanceLoadEnergyModel.setEnabled(false); + + + + Klik om kwartierwaarden excel te downloaden (Totaal gebied) + DOWNLOAD + .xlsx, .xls + Export_ModelData.xlsx + + + + false + 1744624088812 + button_exportBalanceLoadEnergyModel + -156 + -70 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_setAllFileDownloadersDisabled(); + +f_harvestEnergyModelLoadData(); + +fileChooser_exportBalanceLoadEnergyModel.setEnabled(true); + + + + Schrijf kwartierwaarden naar excel (hele gebied) + + + + 1744624088814 + txt_writeToExcelFunctions + -150 + -100 + + true + true + false + true + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Write data to excel (Un-ignore if you want to use this) + + SansSerif + 14 + + + LEFT + + + false + 1744624088816 + button_exportBalanceLoadSelectedCompanies + -156 + 170 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + c_selectedGridConnections.size() > 0 && c_selectedGridConnections.size()< p_maxNrSelectedGCForExport + 1 + f_setAllFileDownloadersDisabled(); + +f_harvestSelectedGCLoadData(); + +fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(true); + + + + Schrijf kwartierwaarden naar excel (Geselecteerde bedrijven) + + + + false + 1744624088818 + fileChooser_exportBalanceLoadSelectedCompanies + -156 + 210 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + false + fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(false); + + + + Klik om kwartierwaarden excel te downloaden (Geselecteerde bedrijven) + DOWNLOAD + .xlsx, .xls + Export_ModelData.xlsx + + + + false + 1744624088820 + fileChooser_exportBalanceLoadSelectedEnergyCoop + -156 + 90 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + false + fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(false); + + + + Klik om kwartierwaarden excel te downloaden (Totaal geselecteerde COOP) + DOWNLOAD + .xlsx, .xls + Export_ModelData.xlsx + + + + false + 1744624088822 + button_exportBalanceLoadSelectedEnergyCoop + -156 + 50 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + c_selectedGridConnections.size() > 1 && v_customEnergyCoop != null + f_setAllFileDownloadersDisabled(); + +f_harvestTotalBalanceLoadOfSelectedEnergyCoop(); + +fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(true); + + + + Schrijf kwartierwaarden naar excel (Totaal van Geselecteerde Coop) + + + + + + 1745935981029 + txt_publicModelFunctionalities + -680 + 845 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Public model functionalities + + SansSerif + 12 + + + LEFT + + + 1746110300955 + rect_ìnfoBubbleFunctions + -2070 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 360 + 350 + 0.0 + -1 + null + + + 1746110305368 + txt_infoBubbleFunctions + -2040 + 30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Info Bubble Functions + + SansSerif + 14 + + + LEFT + + + 1746187848442 + gr_publicVersionWarningMessage + 460 + -2160 + + true + true + false + SHAPE_DRAW_2D3D + 740 + 40 + settings.isPublicModel() + false + 0 + 0.0 + + + 1746027175818 + txt_publicVersion + -20 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -65536 + Dit is een publieke versie met beperkte functionaliteiten + + SansSerif + 24 + + + CENTER + + + 1746187821228 + i_publicVersionWarningMessage + 304 + -14 + + true + true + false + SHAPE_DRAW_2D3D + f_setInfoText(i_publicVersionWarningMessage, v_infoText.publicVersionWarning, i_publicVersionWarningMessage.getX() + gr_publicVersionWarningMessage.getX(), i_publicVersionWarningMessage.getY() + gr_publicVersionWarningMessage.getY()); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1750078687228 + rect_dynamicLegend + 1360 + 1400 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -65536 + null + SOLID + 470 + 310 + 0.0 + -1 + null + + + 1750078716831 + txt_dynamicLegend + 1380 + 1420 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Dynamic legend functionality + + SansSerif + 18 + + + LEFT + + + 1752231354833 + txt_visualObjects + -290 + 140 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + GIS Objects pure for visuals + + SansSerif + 14 + + + LEFT + + + 1746110287596 + gr_infoText + -2260 + 360 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1746110662246 + rect_infoText + 0 + 0 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 620 + 170 + 0.0 + -1 + null + 10 + + + 1746110287600 + gr_closeInfoText + 600 + 20 + + true + true + false + SHAPE_DRAW_2D3D + p_currentActiveInfoBubble.clear(); +gr_infoText.setVisible(false); + false + 0 + 0.0 + + + 1746110287602 + oval_closeInfoText + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 12 + 40 + 0.0 + -12566464 + null + + + 1746110287604 + line_closeInfoText1 + -6 + 6 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + null + SOLID + 1 + 0 + 1 + 0 + 12 + -12 + 0 + + + 1746110287606 + line_closeInfoText2 + 6 + 6 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + null + SOLID + 1 + 0 + 1 + 0 + -12 + -12 + 0 + + + + + 1746110287608 + t_infoTextHeader + 20 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Extra Informatie + + Calibri + 18 + + + LEFT + + + 1746110287610 + t_infoTextDescription + 20 + 50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, +quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat +nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui +officia deserunt mollit anim id est laborum." + + SansSerif + 14 + + + LEFT + + + + + 1742296970246 + gr_forceMapSelection + 1080 + -1480 + + true + false + false + SHAPE_DRAW_2D3D + 960 + 500 + false + 0 + 0.0 + + + 1742297070582 + rect_forceMapSelectionClickBlocker1 + -960 + -500 + + true + true + false + SHAPE_DRAW_2D3D + int clickblocker; + false + 0 + 10 + 1 + + null + SOLID + 410 + 980 + 0.0 + 16777215 + null + + + 1742297242137 + rect_forceMapSelectionClickBlocker2 + -550 + -500 + + true + true + false + SHAPE_DRAW_2D3D + int clickblocker; + false + 0 + 10 + 1 + + null + SOLID + 1000 + 130 + 0.0 + 16777215 + null + + + 1742297244098 + rect_forceMapSelectionClickBlocker3 + -550 + 250 + + true + true + false + SHAPE_DRAW_2D3D + int clickblocker; + false + 0 + 10 + 1 + + null + SOLID + 1000 + 230 + 0.0 + 16777215 + null + + + 1742297246008 + rect_forceMapSelectionClickBlocker4 + 450 + -500 + + true + true + false + SHAPE_DRAW_2D3D + int clickblocker; + false + 0 + 10 + 1 + + null + SOLID + 510 + 980 + 0.0 + 16777215 + null + + + 1742296784951 + rect_forceMapSelection1 + -960 + -620 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 410 + 1200 + 0.0 + -1765752640 + v_forcedClickScreenColor + null + + + 1742296859875 + rect_forceMapSelection2 + -550 + -620 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1000 + 250 + 0.0 + -1765752640 + v_forcedClickScreenColor + null + + + 1742296941081 + rect_forceMapSelection3 + -550 + 250 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1000 + 330 + 0.0 + -1765752640 + v_forcedClickScreenColor + null + + + 1742296952388 + rect_forceMapSelection4 + 450 + -620 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 510 + 1200 + 0.0 + -1765752640 + v_forcedClickScreenColor + null + + + 1753446087501 + gr_ForceMapSelectionText + -40 + -320 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1742300401759 + rect_selectText + -440 + -40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 2 + -16777216 + null + SOLID + 860 + 70 + 0.0 + -1 + null + 10 + + + false + 1753445072603 + button_completeManualSelectionMode + 220 + -30 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + gr_ForceMapSelectionText.isVisible() && b_inManualFilterSelectionMode + true + button_completeManualSelectionMode.isVisible() + if(b_inManualFilterSelectionMode){ + button_manualFilterSelection.action(); +} + + + + Voltooi handmatige selectie + + + + 1742300418297 + t_forcedClickMessage + -10 + -30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + + + SansSerif + 36 + + + CENTER + + + + + 1760015470890 + gr_energyHubSelectionButtons + 10 + -240 + + true + true + false + SHAPE_DRAW_2D + b_inEnergyHubSelectionMode //&& gr_forceMapSelection.isVisible() + false + 0 + 0.0 + + + 1760020289242 + gr_completeEnergyHubSelection_grayedOut + -770 + 550 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + + + 1760020289244 + button_completeSelection_grayedOut + -140 + -40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 3 + -8355712 + null + SOLID + 275 + 75 + 0.0 + -2302756 + null + 10 + + + 1760020289246 + txt_completeEnergyHubSelection_grayedOut + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -8355712 + Voltooien + + SansSerif + 28 + + + CENTER + + + + + 1760015470892 + gr_completeEnergyHubSelection + -770 + 550 + + true + true + false + SHAPE_DRAW_2D + c_selectedGridConnections.size()>1 + f_finalizeEnergyHubConfiguration(); + false + 0 + 0.0 + + + 1760015470894 + button_completeSelection + -140 + -40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 275 + 75 + 0.0 + -1 + null + 10 + + + 1760015470896 + txt_completeEnergyHubSelection + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Voltooien + + SansSerif + 28 + + + CENTER + + + + + 1760015470898 + gr_energieHubConfiguratorTxt + -60 + -190 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + + + 1760015470900 + rect_energyHubConfigurator + -500 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 2 + -16777216 + uI_EnergyHub.p_energyHubLineColor + null + SOLID + 1000 + 90 + 0.0 + -1 + uI_EnergyHub.p_energyHubBackGroundColor + null + 10 + + + 1760015470902 + txt_energyHubConfigurator + 0 + -35 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energie Hub Configurator + + SansSerif + 48 + + + CENTER + + + + + 1760015470904 + gr_cancelEnergyHubConfiguration + -820 + 630 + + true + true + false + SHAPE_DRAW_2D + f_cancelEnergyHubConfiguration(); + false + 0 + 0.0 + + + 1760015470906 + button_cancelEnergyHubConfiguration + -90 + -30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 3 + -2345659 + null + SOLID + 275 + 75 + 0.0 + -1 + null + 10 + + + 1760015470908 + txt_cancelEnergyHubConfiguration + 48 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Annuleer + + SansSerif + 28 + + + CENTER + + + + + + + + + 1753440008648 + gr_supportFunctions + -540 + -110 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1716419413991 + rect_supportFunctions + -140 + -80 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 300 + 160 + 0.0 + -1 + null + + + 1716419425042 + t_supportFunctions + -120 + -70 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Support functions + + SansSerif + 14 + + + LEFT + + + + + 1701951640330 + gr_legenda + 910 + 880 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1701951640332 + rect_legendaBackground + true + -510 + -110 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1020 + 210 + 0.0 + -542254 + zenmocolor_red3.getFillColor() + null + + + 1701951640336 + rect_legenda + -500 + -90 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -6632142 + zenmocolor_blue3.getFillColor() + null + SOLID + 1000 + 183 + 0.0 + -1 + null + + + 1701951640338 + t_legenda + -470 + -110 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Legenda + + Calibri + 18 + + + LEFT + + + 1701951640396 + line_legendaSeperator1 + -165 + -70 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + 0 + 140 + 0 + + + 1724074247375 + line_legendaSeperator2 + -10 + -70 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + 0 + 140 + 0 + + + 1724074154126 + gr_infrastructure + -340 + 5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074154148 + t_infrastructure + -60 + -79 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Infrastructuur + + Calibri + 16 + + + LEFT + + + 1724074154158 + line_infrastructure + -120 + -59 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + 271 + 0 + 0 + + + 1724074839746 + gr_gridnodes + -75 + -19 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074853961 + polyline_congestedGridnode + -55 + 40 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + v_gridLineColorCongested + null + SOLID + 1 + 0 + 1 + 0 + + v_gridNodeColorCongested + null + + + 0 + 0 + 0 + + + 10 + -14 + 0 + + + 20 + 0 + 0 + + + 0 + 0 + 0 + + + false + + + 1724074853963 + txt_congestedGridnode + -25 + 25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trafo overbelast + + SansSerif + 12 + + + LEFT + + + 1724074853967 + polyline_gridnode + -55 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + v_MVLVLineColor + null + SOLID + 1 + 0 + 1 + 0 + + v_MVLVNodeColor + null + + + 0 + 0 + 0 + + + 10 + -14 + 0 + + + 20 + 0 + 0 + + + 0 + 0 + 0 + + + false + + + 1724074853969 + txt_gridnode + -25 + -21 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trafo stabiel + + SansSerif + 12 + + + LEFT + + + 1724074853971 + polyline_strainedGridnode + -55 + 15 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + v_gridNodeLineColorStrained + null + SOLID + 1 + 0 + 1 + 0 + + v_gridNodeColorStrained + null + + + 0 + 0 + 0 + + + 10 + -14 + 0 + + + 20 + 0 + 0 + + + 0 + 0 + 0 + + + false + + + 1724074853973 + txt_strainedGridnode + -25 + 2 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trafo belast + + SansSerif + 12 + + + LEFT + + + + + 1724074839748 + gr_cables + 75 + 5 + + true + true + false + SHAPE_DRAW_2D3D + b_showCables + false + 0 + 0.0 + + + 1724074864095 + t_HV + true + -15 + 15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + HS-net + + SansSerif + 12 + + + LEFT + + + 1724074864097 + line_HV + true + -40 + 25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2.5 + -16776961 + v_HVGridColor + null + SOLID + 1 + 0 + 1 + 0 + 10 + 0 + 0 + + + 1724074870571 + t_MV + -15 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + MS-net + + SansSerif + 12 + + + LEFT + + + 1724074870573 + t_LV + -15 + -25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + LS-net + + SansSerif + 12 + + + LEFT + + + 1724074870575 + line_LV + -40 + -15 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2.5 + -6737204 + v_LVGridColor + null + SOLID + 1 + 0 + 1 + 0 + 10 + 0 + 0 + + + 1724074870577 + line_MV + -40 + -40 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2.5 + -12156236 + v_MVGridColor + null + SOLID + 1 + 0 + 1 + 0 + 10 + 0 + 0 + + + 1724074875518 + t_gasNetwork + true + -15 + -2.5 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Gasnet + + SansSerif + 12 + + + LEFT + + + 1724074875520 + oval_gasNetwork + true + -35 + 5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 5.75 + 40 + 0.0 + -1 + v_gasGridColor + null + + + + + + + 1724074493431 + gr_buildings + 80 + 10 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074500599 + t_buildings + 50 + -84 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Gebouwen + + Calibri + 16 + + + LEFT + + + 1724074502826 + line_buildings + 380 + -64 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + -458 + 0 + 0 + + + 1724074508882 + gr_colorings + -180 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074508886 + txt_colorings + 4 + -71 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Kleur gebouwen o.b.v.: + + SansSerif + 11 + + + CENTER + + + + + + + 1753868816347 + gr_mapOverlayLegenda + 1750 + 840 + + true + true + false + SHAPE_DRAW_2D3D + 70 + 20 + false + 0 + 0.0 + + + 1753868816349 + gr_mapOverlayLegend_ElectricityConsumption + 180 + -10 + + true + false + false + SHAPE_DRAW_2D3D + 0 + -10 + false + 0 + 0.0 + + + 1753868816351 + rect_mapOverlayLegend_ElectricityConsumption1 + -60 + -52 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -1 + null + + + 1753868816353 + rect_mapOverlayLegend_ElectricityConsumption2 + -60 + -28 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -32 + null + + + 1753868816355 + rect_mapOverlayLegend_ElectricityConsumption3 + -60 + -4 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -263774 + null + + + 1753868816357 + rect_mapOverlayLegend_ElectricityConsumption4 + -60 + 20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -1063822 + null + + + 1753868816359 + rect_mapOverlayLegend_ElectricityConsumption5 + -60 + 44 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -3318692 + null + + + 1753868816361 + txt_mapOverlayLegend_ElectricityConsumption1 + -20 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 10 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 1500 kWh / jaar" : "< 10 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816363 + txt_mapOverlayLegend_ElectricityConsumption2 + -20 + -28 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 50 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 2500 kWh / jaar" : "< 50 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816365 + txt_mapOverlayLegend_ElectricityConsumption3 + -20 + -3 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 150 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 4000 kWh / jaar" : "< 150 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816367 + txt_mapOverlayLegend_ElectricityConsumption4 + -20 + 21 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 500 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 6000 kWh / jaar" : "< 500 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816369 + txt_mapOverlayLegend_ElectricityConsumption5 + -20 + 45 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + > 500 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "> 6000 kWh / jaar" : "> 500 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + + + 1753868816371 + gr_defaultLegenda + 10 + 10 + + true + true + false + SHAPE_DRAW_2D3D + 10 + 10 + false + 0 + 0.0 + + + 1753868816373 + oval_defaultLegend4 + -60 + 10 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + null + + + 1753868816375 + t_defaultLegend2 + -39.5 + -47.5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Gedetaileerd bedrijf + + SansSerif + 12 + + + LEFT + + + 1753868816377 + t_defaultLegend5 + -39.5 + 27.5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Overig + + SansSerif + 12 + + + LEFT + + + 1753868816379 + oval_defaultLegend5 + -60 + 35 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + null + + + 1753868816381 + t_defaultLegend3 + -39.5 + -22.5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Bedrijf + + SansSerif + 12 + + + LEFT + + + 1753868816383 + oval_defaultLegend2 + -60 + -40 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + null + + + 1753868816385 + t_defaultLegend4 + -39.5 + 2.5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Huis + + SansSerif + 12 + + + LEFT + + + 1753868816387 + oval_defaultLegend3 + -60 + -15 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + null + + + 1753868816389 + t_defaultLegend1 + -39.5 + -72.5 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selectie + + SansSerif + 12 + + + LEFT + + + 1753868816391 + oval_defaultLegend1 + -60 + -65 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + v_selectionColor + null + + + + + 1753868816393 + gr_mapOverlayLegend_PVProduction + 380 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + -10 + false + 0 + 0.0 + + + 1753868816395 + rect_mapOverlayLegend_PVProduction1 + -60 + -52 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -1 + null + + + 1753868816397 + rect_mapOverlayLegend_PVProduction2 + -60 + -28 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -256 + null + + + 1753868816399 + rect_mapOverlayLegend_PVProduction3 + -60 + -4 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -10496 + null + + + 1753868816401 + txt_mapOverlayLegend_PVProduction1 + -20 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geen opwek + + SansSerif + 10 + + + LEFT + + + 1753868816403 + txt_mapOverlayLegend_PVProduction2 + -20 + -28 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 100 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 5000 kWh / jaar" : "< 100 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816405 + txt_mapOverlayLegend_PVProduction3 + -20 + -3 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + > 100 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "> 5000 kWh / jaar" : "> 100 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + + + 1753868816407 + gr_mapOverlayLegend_gridNeighbours + 600 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + -10 + false + 0 + 0.0 + + + 1753868816409 + rect_mapOverlayLegend_gridNeighbours1 + -60 + -52 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -8355712 + null + + + 1753868816411 + rect_mapOverlayLegend_gridNeighbours2 + -60 + -28 + + true + true + false + SHAPE_DRAW_2D3D + txt_mapOverlayLegend_gridNeighbours2.isVisible() + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -16776961 + null + + + 1753868816413 + rect_mapOverlayLegend_gridNeighbours3 + -60 + -4 + + true + true + false + SHAPE_DRAW_2D3D + txt_mapOverlayLegend_gridNeighbours3.isVisible() + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -65536 + null + + + 1753868816415 + txt_mapOverlayLegend_gridNeighbours1 + -20 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Onbekend + + SansSerif + 10 + + + LEFT + + + 1753868816417 + txt_mapOverlayLegend_gridNeighbours2 + -20 + -28 + + true + true + false + SHAPE_DRAW_2D + v_amountOfDefinedGridLoops > 0 + false + 0 + 0.0 + -16777216 + Lus 1 + + SansSerif + 10 + + + LEFT + + + 1753868816419 + txt_mapOverlayLegend_gridNeighbours3 + -20 + -3 + + true + true + false + SHAPE_DRAW_2D + v_amountOfDefinedGridLoops > 1 + false + 0 + 0.0 + -16777216 + Lus 2 + + SansSerif + 10 + + + LEFT + + + 1753868816421 + rect_mapOverlayLegend_gridNeighbours4 + -60 + 20 + + true + true + false + SHAPE_DRAW_2D3D + txt_mapOverlayLegend_gridNeighbours4.isVisible() + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -16711936 + null + + + 1753868816423 + txt_mapOverlayLegend_gridNeighbours4 + -20 + 20 + + true + true + false + SHAPE_DRAW_2D + v_amountOfDefinedGridLoops > 2 + false + 0 + 0.0 + -16777216 + Lus 3 + + SansSerif + 10 + + + LEFT + + + 1753868816425 + txt_mapOverlayLegend_gridNeighbours5 + -18 + 50 + + true + false + false + SHAPE_DRAW_2D + v_amountOfDefinedGridLoops > 4 + false + 0 + 0.0 + -16777216 + Etc. + + SansSerif + 10 + + + LEFT + + + + + 1753868816427 + gr_mapOverlayLegend_congestion + 800 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 10 + -10 + false + 0 + 0.0 + + + false + 1753868816429 + rb_mapOverlayLegend_congestion + -80 + 5 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + rb_mapOverlay.setValue(rb_mapOverlay.getValue(), true); + + + + VERTICAL + + + + false + + + + 1753868816431 + txt_mapOverlayLegend_congestion3 + -80 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Type belasting: + + SansSerif + 11 + + + LEFT + + + 1753868816433 + rect_mapOverlayLegend_congestion1 + -80 + -55 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -8355712 + null + + + 1753868816435 + txt_mapOverlayLegend_congestion1 + -40 + -55 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Onbekende capaciteit + + SansSerif + 10 + + + LEFT + + + 1753868816437 + i_mapOverlayLegend_congestion_Degrees + 60 + -33 + + true + true + false + SHAPE_DRAW_2D3D + f_setInfoText(i_mapOverlayLegend_congestion_Degrees, v_infoText.i_mapOverlayLegend_congestion_Degrees, i_mapOverlayLegend_congestion_Degrees.getX() + gr_mapOverlayLegend_congestion.getX() + gr_mapOverlayLegenda.getX() + gr_legenda.getX(), i_mapOverlayLegend_congestion_Degrees.getY() + gr_mapOverlayLegend_congestion.getY() + gr_mapOverlayLegenda.getY() + gr_legenda.getY()); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1753868816439 + gr_rect_mapOverlayLegend_congestion2 + -65 + -25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753868816441 + rect_mapOverlayLegend_congestion21 + -15 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 8 + 15 + 0.0 + -16744448 + null + + + 1753868816443 + rect_mapOverlayLegend_congestion22 + -7 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 9 + 15 + 0.0 + -23296 + null + + + 1753868816445 + rect_mapOverlayLegend_congestion23 + 2 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 8 + 15 + 0.0 + -65536 + null + + + + + 1753868816447 + txt_mapOverlayLegend_congestion2 + -40 + -30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Stabiel - Overbelast + + SansSerif + 10 + + + LEFT + + + 1753868816449 + i_mapOverlayLegend_congestion_Types + -5 + -12 + + true + true + false + SHAPE_DRAW_2D3D + f_setInfoText(i_mapOverlayLegend_congestion_Types, v_infoText.i_mapOverlayLegend_congestion_Types, i_mapOverlayLegend_congestion_Types.getX() + gr_mapOverlayLegend_congestion.getX() + gr_mapOverlayLegenda.getX() + gr_legenda.getX(), i_mapOverlayLegend_congestion_Types.getY() + gr_mapOverlayLegend_congestion.getY() + gr_mapOverlayLegenda.getY() + gr_legenda.getY()); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1758020855460 + gr_mapOverlayLegend_EnergyLabel + 985 + -5 + + true + false + false + SHAPE_DRAW_2D3D + 10 + -20 + false + 0 + 0.0 + + + 1758020855462 + rect_mapOverlayLegend_EnergyLabelA + -60 + -52 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -16751616 + v_energyLabelAColor + null + + + 1758020855464 + rect_mapOverlayLegend_EnergyLabelB + -60 + -35 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -16744448 + v_energyLabelBColor + null + + + 1758020855466 + rect_mapOverlayLegend_EnergyLabelC + -60 + -18 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -6632142 + v_energyLabelCColor + null + + + 1758020855468 + rect_mapOverlayLegend_EnergyLabelD + -60 + -1 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -10496 + v_energyLabelDColor + null + + + 1758020855470 + rect_mapOverlayLegend_EnergyLabelE + -60 + 16 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -23296 + v_energyLabelEColor + null + + + 1758020855472 + txt_mapOverlayLegend_EnergyLabelA + -20 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel A + + SansSerif + 10 + + + LEFT + + + 1758020855474 + txt_mapOverlayLegend_EnergyLabelB + -20 + -35 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel B + + SansSerif + 10 + + + LEFT + + + 1758020855476 + txt_mapOverlayLegend_EnergyLabelC + -20 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel C + + SansSerif + 10 + + + LEFT + + + 1758020855478 + txt_mapOverlayLegend_EnergyLabelD + -20 + 0 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel D + + SansSerif + 10 + + + LEFT + + + 1758020855480 + txt_mapOverlayLegend_EnergyLabelE + -20 + 17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel E + + SansSerif + 10 + + + LEFT + + + 1758022404682 + rect_mapOverlayLegend_EnergyLabelF + -60 + 33 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -47872 + v_energyLabelFColor + null + + + 1758022404684 + txt_mapOverlayLegend_EnergyLabelF + -20 + 34 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel F + + SansSerif + 10 + + + LEFT + + + 1758022520158 + rect_mapOverlayLegend_EnergyLabelG + -60 + 50 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -65536 + v_energyLabelGColor + null + + + 1758022520160 + txt_mapOverlayLegend_EnergyLabelG + -20 + 51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel G + + SansSerif + 10 + + + LEFT + + + 1758026700134 + rect_mapOverlayLegend_EnergyLabelUnknown + -60 + 67 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -8355712 + v_energyLabelUnknownColor + null + + + 1758026700136 + txt_mapOverlayLegend_EnergyLabelUnknown + -20 + 68 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Onbekend + + SansSerif + 10 + + + LEFT + + + + + + + 1750161603547 + gr_specificGISObjectLegend + 440 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074583633 + rect_specialGISObjectLegend1 + -180 + -40 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1724074583635 + t_specialGISObjectLegend1 + -150 + -40 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079302589 + rect_specialGISObjectLegend2 + -180 + -20 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079302591 + t_specialGISObjectLegend2 + -150 + -20 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079303790 + rect_specialGISObjectLegend3 + -180 + 0 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079303792 + t_specialGISObjectLegend3 + -150 + 0 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079304863 + rect_specialGISObjectLegend4 + -180 + 20 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079304865 + t_specialGISObjectLegend4 + -150 + 20 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079305949 + rect_specialGISObjectLegend5 + -180 + 40 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079305951 + t_specialGISObjectLegend5 + -150 + 40 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079521906 + rect_specialGISObjectLegend6 + -180 + 60 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079521908 + t_specialGISObjectLegend6 + -150 + 60 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093126455 + gr_extendedLegend + 170 + 960 + + true + false + false + SHAPE_DRAW_2D3D + 120 + -5 + false + 0 + 0.0 + + + 1750093048056 + rect_extendedLegend_line + true + -100 + -100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 200 + 205 + 0.0 + -542254 + rect_legendaBackground.getFillColor() + null + + + 1760980017754 + rect_extendedLegendLine + -114 + -85 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -6632142 + rect_legenda.getLineColor() + null + SOLID + 204 + 183 + 0.0 + -1 + null + + + 1750092986493 + rect_extendedLegend + -115 + -84.5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 0 + + null + SOLID + 204 + 182 + 0.0 + -1 + null + + + 1750093291589 + rect_specialGISObjectLegend7 + -90 + -35 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093291591 + t_specialGISObjectLegend7 + -60 + -35 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093292693 + rect_specialGISObjectLegend8 + -90 + -15 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093292695 + t_specialGISObjectLegend8 + -60 + -15 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093293851 + rect_specialGISObjectLegend9 + -90 + 5 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093293853 + t_specialGISObjectLegend9 + -60 + 5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093295400 + rect_specialGISObjectLegend10 + -90 + 25 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093295402 + t_specialGISObjectLegend10 + -60 + 25 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093296550 + rect_specialGISObjectLegend11 + -90 + 45 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093296552 + t_specialGISObjectLegend11 + -60 + 45 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093324907 + rect_specialGISObjectLegend12 + -90 + 65 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093324909 + t_specialGISObjectLegend12 + -60 + 65 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093436378 + line + -115 + -49 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + 192 + 0 + 0 + + + + + 1750092915668 + t_seeMoreLegend + 0 + -70 + + true + true + false + SHAPE_DRAW_2D + t_specialGISObjectLegend7.isVisible(); + if(!gr_extendedLegend.isVisible()){ + gr_extendedLegend.setVisible(true); + t_seeMoreLegend.setText("Zie minder..."); +} +else{ + gr_extendedLegend.setVisible(false); + t_seeMoreLegend.setText("Zie meer..."); +} + false + 0 + 0.0 + -14774017 + Zie meer... + + SansSerif + 10 + + + LEFT + + + + + + + 1753883303789 + gr_simulateYearScreen + 1920 + 160 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1709717180404 + gr_loadIconYearSimulation + -261 + -25 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1709717180406 + rect_loadIconSmall + -219 + -50 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + zenmocolor_blue1.getFillColor() + null + DASHED + 460 + 250 + 0.0 + -369756683 + null + + + 1709717180408 + image_loadIconSmall + -19 + 60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 60 + 60 + 0.0 + + + zerointerfaceloader + icon_loading.gif + + + false + + + 1709717180410 + t_loadIconSmall + 12 + 15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Jaar wordt gesimuleerd + + SansSerif + 22 + + + CENTER + + + + + 1709717180367 + gr_simulateYear + 270 + 20 + + true + false + false + SHAPE_DRAW_2D3D + -250 + 20 + false + 0 + 0.0 + + + 1709717180369 + rect_simulateYearScreenSmall + -230 + -95 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + DASHED + 460 + 185 + 0.0 + -1 + zenmocolor_blue2.getFillColor() + null + + + 1709717180371 + gr_simulateYearButton + 10 + 50 + + true + true + false + SHAPE_DRAW_2D3D + f_simulateYearFromMainInterface(); + false + 0 + 0.0 + + + 1709717180373 + t_simulateYearToCalculateCostsSmall + 10 + -60 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simuleer jaar voor KPI's + + SansSerif + 22 + + + CENTER + + + 1709717180375 + image_simulateYearToCalculateCostsSmall + -200 + -75 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 60 + 60 + 0.0 + + + zerointerfaceloader + icon_greater_than.png + + + false + + + + + + + + + 1758032385328 + txt_cablesAndPipesColors + 380 + 1150 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Cables and pipes colors + + SansSerif + 14 + + + LEFT + + + 1758032461183 + txt_mapOverlayColors + 380 + 1270 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Specific map overlay colors + + SansSerif + 14 + + + LEFT + + + 1758878134333 + zenmocolor_blue3 + 1920 + 1260 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -4069658 + null + + + 1758878337017 + zenmocolor_blue + 1920 + 1020 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -16744828 + null + + + 1758878373971 + zenmocolor_blue1 + 1920 + 1100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -14115680 + null + + + 1758878411330 + zenmocolor_yellow + 2020 + 1020 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -212480 + null + + + 1758878483028 + zenmocolor_yellow1 + 2020 + 1100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -405954 + null + + + 1758878529753 + zenmocolor_yellow2 + 2020 + 1180 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -402308 + null + + + 1758878532475 + zenmocolor_yellow3 + 2020 + 1260 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -398405 + null + + + 1758878539502 + zenmocolor_red + 1820 + 1020 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -1834917 + null + + + 1758878547235 + zenmocolor_red1 + 1820 + 1100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -1426815 + null + + + 1758878550221 + zenmocolor_red2 + 1820 + 1180 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -886359 + null + + + 1758878552357 + zenmocolor_red3 + 1820 + 1260 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -542254 + null + + + 1758878556881 + zenmocolor_blue2 + 1920 + 1180 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -10502977 + null + + + 1758882933738 + line1 + 10 + 300 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -402308 + null + SOLID + 1 + 0 + 1 + 0 + 375 + 0 + 0 + + + 1758882973077 + line2 + 10 + 440 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -402308 + null + SOLID + 1 + 0 + 1 + 0 + 375 + 0 + 0 + + + 1758882977187 + line3 + 5 + 100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -402308 + null + SOLID + 1 + 0 + 1 + 0 + 375 + 0 + 0 + + + 1761138344359 + txt_projectSpecificScenarios + -1190 + 500 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Project specific scenarios + + SansSerif + 14 + + + LEFT + + + 1762354401486 + image_loadingScreenIcon + 3470 + 3040 + 680 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 180 + 180 + 0.0 + + + zerointerfaceloader + icon_loading.gif + + + false + + + + + 1699290897134 + level1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + + + 1696520909213 + va_Interface + 0 + 0 + + false + true + false + + <Width>1920</Width> + <Height>980</Height> + </Area> + <Area> + <Id>1747229303402</Id> + <Name>va_EHubDashboard</Name> + <X>2600</X> + <Y>-2200</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Title/> + <Width>1920</Width> + <Height>980</Height> + </Area> + </Areas> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1726584205735</Id> + <Name>Zero_Loader</Name> + <Import>import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.databind.node.TextNode; +import com.fasterxml.jackson.databind.node.NumericNode; +import com.fasterxml.jackson.core.type.TypeReference; + +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.annotation.JsonAutoDetect; + +import java.io.FileOutputStream; +import java.util.stream.Stream; +import java.util.stream.IntStream; +import java.util.Dictionary.*; +import java.util.Hashtable.*; +import java.util.*; +import java.util.stream.Collectors; +import org.apache.commons.lang3.tuple.Triple; + +import java.io.*; +import java.io.File; +import java.io.IOException; +//import java.util.Date; +import java.text.SimpleDateFormat; +import com.fasterxml.jackson.databind.node.JsonNodeFactory; + + +//Possibility to turn of traceln +import java.io.OutputStream; +import java.io.PrintStream; + +//Import survey API library +import com.zenmo.vallum.Vallum; +import com.zenmo.zummon.companysurvey.TimeSeries; + +import zeroPackage.ZeroMath; +import com.zenmo.zummon.companysurvey.PandIDKt; +import com.zenmo.vallum.PandKt; +import kotlinx.datetime.DateTimeUnit; + +import com.zenmo.zummon.companysurvey.HeatingType; +import com.querydsl.core.types.dsl.CaseBuilder; + +import energy.lux.uplux.*; +import java.util.UUID;</Import> + <Generic>false</Generic> + <GenericParameter> + <Id>1726584205730</Id> + <Name>1726584205730</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>GIS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>false</AutoCreate> + <Id>1658477089958</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1658563200000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>p_timeStep_h</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1726584205731</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1726584205903</CurrentLevel> + <ConnectionsId>1726584206083</ConnectionsId> + <Variables> + <Variable Class="PlainVariable"> + <Id>1726584205883</Id> + <Name>v_timeOfModelStart_ms</Name> + <X>1560</X> + <Y>140</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1726584205885</Id> + <Name>v_modelStartUpDuration_s</Name> + <X>1560</X> + <Y>160</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1726584205887</Id> + <Name>v_simStartYear</Name> + <X>1560</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1733235094633</Id> + <Name>v_numberOfSurveyCompanies</Name> + <X>1560</X> + <Y>240</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1733389557748</Id> + <Name>v_simStartHour_h</Name> + <Description>The hour 0 is defined as january 1st, 00:00h in the year energyModel.p_year</Description> + <X>1560</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1733390702422</Id> + <Name>v_simDuration_h</Name> + <X>1560</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>8760</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1737972861302</Id> + <Name>map_buildingData_Vallum</Name> + <X>-370</X> + <Y>395</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Map<String, com.zenmo.bag.Pand></Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1753450969530</Id> + <Name>v_objectMapper</Name> + <X>2100</X> + <Y>49</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>ObjectMapper</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1755876520422</Id> + <Name>v_probabilityForAdditionalCar_privateParking</Name> + <X>1560</X> + <Y>190</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1755876547633</Id> + <Name>v_probabilityForAdditionalCar_publicParking</Name> + <X>1560</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206064</Id> + <Name>zero_Interface</Name> + <X>30</X> + <Y>910</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>Zero_Interface</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206062</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206070</Id> + <Name>defaultProfiles_data</Name> + <X>-370</X> + <Y>280</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>DefaultProfiles_data</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206068</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206073</Id> + <Name>project_data</Name> + <Description>Should be filled with the Project_data record created in the startup of the project model</Description> + <X>-370</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>Project_data</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206071</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206076</Id> + <Name>settings</Name> + <Description>Should be filled with the settings record created in the startup of the project model</Description> + <X>-370</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>Settings</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206074</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206079</Id> + <Name>user</Name> + <X>-370</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>User</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206077</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1762184918471</Id> + <Name>p_userIdToken</Name> + <X>2280</X> + <Y>50</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>String</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1762184918469</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1761907535651</Id> + <Name>p_remainingTotals</Name> + <X>1560</X> + <Y>290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>J_RemainingTotalsManager</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>new J_RemainingTotalsManager(avgc_data)</Code> + </DefaultValue> + <ParameterEditor> + <Id>1761907535649</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205737</Id> + <Name>c_gridNodeIDsInScope</Name> + <X>1560</X> + <Y>320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>String</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205739</Id> + <Name>c_companyBuilding_data</Name> + <X>-370</X> + <Y>415</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205741</Id> + <Name>c_gridNode_data</Name> + <X>-370</X> + <Y>360</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GridNode_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205743</Id> + <Name>c_surveyCompanyBuilding_data</Name> + <X>-380</X> + <Y>910</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="private" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205745</Id> + <Name>c_houseBuilding_data</Name> + <X>-370</X> + <Y>435</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205747</Id> + <Name>c_solarfarm_data</Name> + <X>-370</X> + <Y>482</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Solarfarm_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205749</Id> + <Name>c_windfarm_data</Name> + <X>-370</X> + <Y>502</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Windfarm_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205751</Id> + <Name>c_electrolyser_data</Name> + <X>-370</X> + <Y>521</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Electrolyser_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205753</Id> + <Name>c_battery_data</Name> + <X>-370</X> + <Y>540</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Battery_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205755</Id> + <Name>c_cable_data</Name> + <X>-370</X> + <Y>650</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Cable_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205757</Id> + <Name>c_neighbourhood_data</Name> + <X>-370</X> + <Y>590</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Neighbourhood_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205759</Id> + <Name>c_remainingBuilding_data</Name> + <X>-370</X> + <Y>455</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205763</Id> + <Name>c_chargingstation_data</Name> + <X>-370</X> + <Y>560</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Chargingstation_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205765</Id> + <Name>c_parcel_data</Name> + <X>-370</X> + <Y>630</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Parcel_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1737744140895</Id> + <Name>c_vallumBuilding_data</Name> + <X>-380</X> + <Y>930</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1748944117397</Id> + <Name>c_customProfiles_data</Name> + <X>-370</X> + <Y>300</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>CustomProfile_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1749631164240</Id> + <Name>c_gridNodeIDsWithProfiles</Name> + <X>1560</X> + <Y>350</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>String</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1749649688266</Id> + <Name>c_chargerProfiles_data</Name> + <X>-370</X> + <Y>320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>ChargerProfile_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1749738339329</Id> + <Name>c_parkingSpace_data</Name> + <X>-370</X> + <Y>610</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>ParkingSpace_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1759135072429</Id> + <Name>c_GISregions</Name> + <X>2100</X> + <Y>149</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>LinkedHashMap</CollectionClass> + <ElementClass>String</ElementClass> + <ValueElementClass>GISRegion</ValueElementClass> + </Properties> + </Variable> + </Variables> + <Functions> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205769</Id> + <Name>f_createGISRegions</Name> + <Description>Creates the outline of the simulated area</Description> + <X>1546.739</X> + <Y>539</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>// Create neighborhoods and draw them +for (Neighbourhood_data NBH : c_neighbourhood_data) { + GIS_Object area = energyModel.add_pop_GIS_Objects(); + + area.p_id = NBH.districtname(); + area.p_GISObjectType = OL_GISObjectType.valueOf(NBH.neighbourhoodtype()); + + //Create gisregion + area.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(NBH.polygon(), area.p_GISObjectType)); + + //Style area + zero_Interface.f_styleSimulationAreas(area); + zero_Interface.c_GISNeighborhoods.add(area); + + + //Energy totals + p_remainingTotals.addNBH(NBH); +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205771</Id> + <Name>f_createGridConnections</Name> + <X>90</X> + <Y>250</Y> + <Label> + <X>11</X> + <Y>1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Energy production sites +f_createSolarParks(); +f_createWindFarms(); + +//Other infra assets +f_createChargingStations(); +f_createElectrolysers(); +f_createBatteries(); + +//Consumers +f_createCompanies(); +f_createHouses();</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205773</Id> + <Name>f_configureEngine_default</Name> + <Description>Generieke functie die flexibele modelconfiguratie mogelijk maakt op basis van externe data. Expliciet gemodelleerd om profiling en volgorde van initialisatie te kunnen controleren. + +@param: none +@return: none +@since: Sprint 6 +@author: Jorrit</Description> + <X>79</X> + <Y>191</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Set basic input files +energyModel.p_truckTripsCsv = inputCSVtruckTrips; +energyModel.p_householdTripsCsv = inputCSVhouseholdTrips; +energyModel.p_cookingPatternCsv = inputCSVcookingActivities; + +//Initialize specific slider GC +f_initializeSpecificSliderGC(); + +//Actors +f_createActors(); + +//Grid nodes +f_createGridNodes(); + +//Create regions and initialize energy totals per region +f_createGISRegions(); + +//Grid connections +f_createGridConnections(); + +//Additional GIS objects +f_createAdditionalGISObjects(); + +//Initialize the engine +energyModel.p_runStartTime_h = v_simStartHour_h; +energyModel.p_runEndTime_h = v_simStartHour_h + v_simDuration_h; +energyModel.f_initializeEngine(); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205775</Id> + <Name>f_createGridNodes</Name> + <X>50</X> + <Y>540</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//double latitude_c; +//double longitude_c; +OL_GridNodeType nodeType; +GISRegion gisregion; + +// Grid operator (for now only one in the area) +GridOperator Grid_Operator = findFirst(energyModel.pop_gridOperators, p->p.p_actorID.equals(project_data.grid_operator())) ; + +for (GridNode_data GN_data : c_gridNode_data) { + // if no scope selected, or if node has 'all scopes' in input file or if the node specific scope is selected (exists in the arrayList) + if( settings.subscopesToSimulate() == null || settings.subscopesToSimulate().isEmpty() || GN_data.subscope() == null || settings.subscopesToSimulate().indexOf(GN_data.subscope()) > -1 ){ + if (GN_data.status()) { + GridNode GN = energyModel.add_pop_gridNodes(); + GN.p_gridNodeID = GN_data.gridnode_id(); + c_gridNodeIDsInScope.add(GN.p_gridNodeID); + + // Check wether transformer capacity is known or estimated + GN.p_capacity_kW = GN_data.capacity_kw(); + GN.p_originalCapacity_kW = GN.p_capacity_kW; + GN.p_realCapacityAvailable = GN_data.is_capacity_available(); + + // Basic GN information + //GN.p_nodeStatus = GN_data.status(); + GN.p_description = GN_data.description(); + String nodeTypeString = GN_data.type(); + + // Connect + GN.p_parentNodeID = GN_data.parent_node_id(); // Needs to be manually defined in the excel file of the nodes! + GN.p_ownerGridOperator = Grid_Operator; + + //Define node type + switch (nodeTypeString) { + case "LVLV": + GN.p_nodeType = OL_GridNodeType.LVLV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + break; + case "MVLV": + GN.p_nodeType = OL_GridNodeType.MVLV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + break; + case "SUBMV": + GN.p_nodeType = OL_GridNodeType.SUBMV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + zero_Interface.b_gridLoopsAreDefined = true; + break; + case "MVMV": + GN.p_nodeType = OL_GridNodeType.MVMV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + break; + case "HVMV": + GN.p_nodeType = OL_GridNodeType.HVMV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + break; + default: + traceln("There is a gridnode in your input file with an incorrect node type"); + break; + } + + //Define GN location + GN.p_latitude = GN_data.latitude(); + GN.p_longitude = GN_data.longitude(); + GN.setLatLon(GN.p_latitude, GN.p_longitude); + + //Create gis region + GN.gisRegion = zero_Interface.f_createGISObject(f_createGISNodesTokens(GN)); + zero_Interface.f_styleGridNodes(GN); + + //Grid operator nodes + Grid_Operator.c_electricityGridNodes.add(GN); + + + //Gridnode service area + if (GN_data.service_area_polygon() != null){ + //Create service area gis object + //GIS_Object serviceArea = f_createGISObject(GN.p_gridNodeID + ": service area", GN.p_latitude, GN.p_longitude, GN_data.service_area_polygon()); + GN.p_serviceAreaGisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(GN_data.service_area_polygon(), OL_GISObjectType.GN_SERVICE_AREA)); + + //Add to hashmap + zero_Interface.c_GISNetplanes.add( GN.p_serviceAreaGisRegion ); + } + + //Gridnode profile + if(GN_data.profile_data_kWh() != null){ + f_addGridNodeProfile(GN, GN_data.profile_data_kWh()); + } + } + } +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double[]</ReturnType> + <Id>1726584205777</Id> + <Name>f_createGISObjectsTokens</Name> + <X>1565.241</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>RegionCoords</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>GISObjectType</Name> + <Type>OL_GISObjectType</Type> + </Parameter> + <Body>if (RegionCoords.startsWith("MultiPolygon")){ + RegionCoords = RegionCoords.replace("MultiPolygon (((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace(")))",""); +} +else if(RegionCoords.startsWith("MULTIPOLYGON")){ + RegionCoords = RegionCoords.replace("MULTIPOLYGON (((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace(")))",""); +} +else if(RegionCoords.startsWith("Poly")){ + RegionCoords = RegionCoords.replace("Polygon ((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace("))",""); +} +else if(RegionCoords.startsWith("POLYGON")){ + RegionCoords = RegionCoords.replace("POLYGON ((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace("))",""); +} +else if(RegionCoords.startsWith("MultiLineString")){ + RegionCoords = RegionCoords.replace("MultiLineString ((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace("))",""); +} +else if(RegionCoords.startsWith("LineString")){ + RegionCoords = RegionCoords.replace("LineString (",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace(")",""); +} +else { + traceln("GIS coordinaten in de excel data die niet starten met Multi of Poly"); +} + + + +if(RegionCoords.contains(")(") || RegionCoords.contains(") (") || RegionCoords.contains(") (")){ + if (GISObjectType == OL_GISObjectType.ANTI_LAYER){ + RegionCoords = RegionCoords.replace(")("," "); // Combine all polies into one! + RegionCoords = RegionCoords.replace(") ("," "); // Combine all polies into one! + } + else{ + RegionCoords = RegionCoords.split("\\)")[0]; + } +} + +RegionCoords = RegionCoords.replace(" "," "); +String delims = " "; +String[] tokens; +tokens = RegionCoords.split(delims); + +int nbCoords = tokens.length; +double[] GISCoords = new double[nbCoords]; + +for (int i=0; i<nbCoords; i++) { + if (i % 2 == 0) { // latitudes + GISCoords[i]=Double.parseDouble(tokens[i+1]); + } else { // longitudes + GISCoords[i]=Double.parseDouble(tokens[i-1]); + } +} +return GISCoords;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205779</Id> + <Name>f_importExcelTablesToDB</Name> + <Description>Automatisch inladen van excel files uit de model map naar de database. + +@author: Ate +@since: 14-12-23</Description> + <X>-390</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//inputHouseholdTrips.readFile(); +//inputCookingActivities.readFile(); +//inputTruckTrips.readFile(); + +//inputCSVcookingActivities.readFile(); +//inputCSVcookingActivities. + +if(settings.reloadDatabase()){ + + //Get the database names that are selected for reloading + List<String[]> databaseNames = project_data.databaseNames(); + + //Get the model database + ModelDatabase modelDB = getEngine().getModelDatabase(); + + //Loop over all databases + for(String[] databaseName : databaseNames){ + + //Create the file path string + String filePathString = "data_" + project_data.project_name() + "/" + databaseName[0] + "_" + project_data.project_name() + ".xlsx"; + + //If file exists, load it into the database + File f = new File(filePathString); + if(f.exists() && !f.isDirectory()) { + Database myFileDatabase = new Database(this, databaseName[1], filePathString); + modelDB.importFromExternalDB(myFileDatabase.getConnection(), databaseName[1], databaseName[1], true, false); + traceln("Database %s has been updated.", databaseName[1]); + } else { // if file does not exist, clear the database to make sure there are no wrong values in the simulation! + executeStatement("DELETE FROM " + databaseName[1] + " c"); + traceln("File not found, database %s has been cleared!", databaseName[1]); + } + } + + //Overwrite specific database values + f_overwriteSpecificDatabaseValues(); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205785</Id> + <Name>f_createSolarParks</Name> + <Description>Function used to generate solar parks: grid connections and park owner (connection owner actor)</Description> + <X>430.001</X> + <Y>790.001</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>ConnectionOwner owner; +GCEnergyProduction solarpark; + +List<String> existing_actors = new ArrayList(); +List<String> existing_solarFields = new ArrayList(); + +for (Solarfarm_data dataSolarfarm : f_getSolarfarmsInSubScope(c_solarfarm_data)) { // MOET NOG CHECK OF ZONNEVELD ACTOR AL BESTAAT OP, zo ja --> Zonneveld koppelen aan elkaar en niet 2 GC en 2 actoren maken. + + if (!existing_solarFields.contains( dataSolarfarm.gc_id() )) { + solarpark = energyModel.add_EnergyProductionSites(); + + solarpark.set_p_gridConnectionID( dataSolarfarm.gc_id() ); + solarpark.set_p_name( dataSolarfarm.gc_name() ); + + //Check wether it can be changed using sliders + solarpark.p_isSliderGC = dataSolarfarm.isSliderGC(); + + //Grid Capacity + solarpark.v_liveConnectionMetaData.physicalCapacity_kW = dataSolarfarm.connection_capacity_kw(); + if ( dataSolarfarm.connection_capacity_kw() > 0 ) { + solarpark.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + if ( dataSolarfarm.contracted_feed_in_capacity_kw() != null) { + solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.contracted_feed_in_capacity_kw(); + solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else { + solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.connection_capacity_kw(); + solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + + //solarpark.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + solarpark.set_p_ownerID( dataSolarfarm.owner_id() ); + solarpark.set_p_parentNodeElectricID( dataSolarfarm.gridnode_id() ); + + solarpark.v_isActive = dataSolarfarm.initially_active() ; + + //Add EA + f_addEnergyProduction(solarpark, OL_EnergyAssetType.PHOTOVOLTAIC, "Solar farm" , dataSolarfarm.capacity_electric_kw()); + + + if (!existing_actors.contains(solarpark.p_ownerID)){ // check if owner exists already, if not, create new owner. + owner = energyModel.add_pop_connectionOwners(); + + owner.set_p_actorID( dataSolarfarm.owner_id()); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.SOLARFARM_OP ); + owner.b_dataSharingAgreed = true; + existing_actors.add(owner.p_actorID); + } + else { // Owner exists already: add new GC to existing owner + owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataSolarfarm.owner_id())); + } + + solarpark.set_p_owner( owner ); + + existing_solarFields.add(solarpark.p_gridConnectionID); + } + else { // solarpark and its owner exist already, only create new gis building which is added to the park + solarpark = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataSolarfarm.gc_id()) ); + owner = solarpark.p_owner; + + } + + if (dataSolarfarm.polygon() != null) { + //Create GIS object for the solar park + GIS_Object area = f_createGISObject( dataSolarfarm.gc_name(), dataSolarfarm.latitude(), dataSolarfarm.longitude(), dataSolarfarm.polygon(), OL_GISObjectType.SOLARFARM); + + //Add to collections + area.c_containedGridConnections.add(solarpark); + solarpark.c_connectedGISObjects.add(area); + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_solarParkColor ); + area.set_p_defaultLineColor( zero_Interface.v_solarParkLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } +} +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205787</Id> + <Name>f_createBatteries</Name> + <Description>Function used to create (neighborhood) battery grid connection and actor</Description> + <X>430.001</X> + <Y>930</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>for (Battery_data dataBattery : f_getBatteriesInSubScope(c_battery_data)) { // MOET NOG CHECK OF battery ACTOR AL BESTAAT OP, zo ja --> battery koppelen aan elkaar en niet 2 GC en 2 actoren maken. + + ConnectionOwner owner = energyModel.add_pop_connectionOwners(); + GCGridBattery gridbattery = energyModel.add_GridBatteries(); + + //Owner parameters + owner.set_p_actorID( dataBattery.owner_id() ); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.BATTERY_OP ); + owner.b_dataSharingAgreed = true; + + //GC parameters + gridbattery.set_p_gridConnectionID( dataBattery.gc_id () ); + gridbattery.set_p_name( dataBattery.gc_name() ); + gridbattery.set_p_ownerID( dataBattery.owner_id() ); + gridbattery.set_p_owner( owner ); + gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); + + //Check wether it can be changed using sliders + gridbattery.p_isSliderGC = dataBattery.isSliderGC(); + + //Grid Capacity + gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); + if ( dataBattery.connection_capacity_kw() > 0 ) { + gridbattery.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + if ( dataBattery.contracted_delivery_capacity_kw() != null ) { + gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.contracted_delivery_capacity_kw(); + gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; + } + else { + gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.connection_capacity_kw(); + gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + } + if ( dataBattery.contracted_feed_in_capacity_kw() != null ) { + gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.contracted_feed_in_capacity_kw(); + gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else { + gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.connection_capacity_kw(); + gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + gridbattery.set_p_parentNodeElectricID( dataBattery.gridnode_id() ); + //gridbattery.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + + switch (dataBattery.operation_mode()) { + case PRICE: + gridbattery.f_setBatteryManagement(new J_BatteryManagementPrice(gridbattery)); + break; + case PEAK_SHAVING_PARENT_NODE: + J_BatteryManagementPeakShaving batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); + GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals(gridbattery.p_parentNodeElectricID)); + if (gn == null) { + throw new RuntimeException("Could not find GridNode with ID: " + gridbattery.p_parentNodeElectricID + " for GCGridBattery"); + } + batteryAlgorithm.setTarget(gn); + gridbattery.f_setBatteryManagement(batteryAlgorithm); + break; + case PEAK_SHAVING_COOP: + // target agent is still null, should be set at the moment of coop creation + batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); + batteryAlgorithm.setTargetType( OL_ResultScope.ENERGYCOOP ); + gridbattery.f_setBatteryManagement(batteryAlgorithm); + break; + default: + throw new RuntimeException("Battery Operation Mode: " + dataBattery.operation_mode() + " is not supported for GCGridBattery."); + } + + //Get initial state + gridbattery.v_isActive = dataBattery.initially_active(); + + if (dataBattery.polygon() != null) { + //Create gis object for the battery + GIS_Object area = f_createGISObject( dataBattery.gc_name(), dataBattery.latitude(), dataBattery.longitude(), dataBattery.polygon(), OL_GISObjectType.BATTERY); + + //Add to collections + gridbattery.c_connectedGISObjects.add(area); + area.c_containedGridConnections.add(gridbattery); + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_batteryColor ); + area.set_p_defaultLineColor( zero_Interface.v_batteryLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } + //Create energy asset for the battery + f_addStorage(gridbattery, dataBattery.capacity_electric_kw(), dataBattery.storage_capacity_kwh(), OL_EnergyAssetType.STORAGE_ELECTRIC ); + +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205789</Id> + <Name>f_createElectrolysers</Name> + <Description>Function used to create electrolyser grid connections and actors</Description> + <X>430</X> + <Y>910</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>ConnectionOwner owner; +List<String> existing_actors = new ArrayList(); + + +for (Electrolyser_data dataElectrolyser : f_getElectrolysersInSubScope(c_electrolyser_data)) { + GCEnergyConversion H2Electrolyser = energyModel.add_EnergyConversionSites(); + + H2Electrolyser.set_p_gridConnectionID( dataElectrolyser.gc_id() ); + H2Electrolyser.set_p_name( dataElectrolyser.gc_name() ); + //H2Electrolyser.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + H2Electrolyser.set_p_ownerID( dataElectrolyser.owner_id() ); + H2Electrolyser.set_p_parentNodeElectricID( dataElectrolyser.gridnode_id() ); + + //Grid Capacity + H2Electrolyser.v_liveConnectionMetaData.physicalCapacity_kW = dataElectrolyser.connection_capacity_kw(); + if ( dataElectrolyser.connection_capacity_kw() > 0 ) { + H2Electrolyser.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + if ( dataElectrolyser.contracted_delivery_capacity_kw() != null ) { + H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.contracted_delivery_capacity_kw(); + H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; + } + else { + H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.connection_capacity_kw(); + H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + } + if ( dataElectrolyser.contracted_feed_in_capacity_kw() != null ) { + H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.contracted_feed_in_capacity_kw(); + H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else { + H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.connection_capacity_kw(); + H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + + + H2Electrolyser.v_isActive = dataElectrolyser.initially_active(); + H2Electrolyser.p_minProductionRatio = dataElectrolyser.min_production_ratio(); + + //Electrolyser operation mode + H2Electrolyser.set_p_electrolyserOperationMode( dataElectrolyser.default_operation_mode()); + + //Create EA for the electrolyser GC + J_EAConversionElectrolyser h2ElectrolyserEA = new J_EAConversionElectrolyser(H2Electrolyser, dataElectrolyser.capacity_electric_kw(), dataElectrolyser.conversion_efficiency(), energyModel.p_timeStep_h, OL_ElectrolyserState.STANDBY, dataElectrolyser.load_change_time_s(), dataElectrolyser.start_up_time_shutdown_s(), dataElectrolyser.start_up_time_standby_s(), dataElectrolyser.start_up_time_idle_s()); + + if (!existing_actors.contains(H2Electrolyser.p_ownerID)){ // check if owner exists already, if not, create new owner. + owner = energyModel.add_pop_connectionOwners(); + + owner.set_p_actorID( H2Electrolyser.p_ownerID ); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.ELECTROLYSER_OP ); + owner.b_dataSharingAgreed = true; + } + else { // Owner exists already: add new GC to existing owner + owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataElectrolyser.owner_id())); + } + + H2Electrolyser.set_p_owner( owner ); + + if (dataElectrolyser.polygon() != null) { + //Create GIS object for the electrolyser + GIS_Object area = f_createGISObject( dataElectrolyser.gc_name(), dataElectrolyser.latitude(), dataElectrolyser.longitude(), dataElectrolyser.polygon(), OL_GISObjectType.ELECTROLYSER); + + //Add to collections + area.c_containedGridConnections.add(H2Electrolyser); + H2Electrolyser.c_connectedGISObjects.add(area); + + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_electrolyserColor ); + area.set_p_defaultLineColor( zero_Interface.v_electrolyserLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205791</Id> + <Name>f_createWindFarms</Name> + <Description>Function used to create all windfarm grid connections, actors, EAs and GISObjects</Description> + <X>430.001</X> + <Y>810</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>ConnectionOwner owner; +GCEnergyProduction windfarm; + +List<String> existing_actors = new ArrayList(); +List<String> existing_windFarms = new ArrayList(); + +for (Windfarm_data dataWindfarm : f_getWindfarmsInSubScope(c_windfarm_data)) { + if (!existing_windFarms.contains(dataWindfarm.gc_id())) { // Check if windfarm exists already, if not, create new windfarm GC + turbine + windfarm = energyModel.add_EnergyProductionSites(); + + windfarm.set_p_gridConnectionID( dataWindfarm.gc_id() ); + windfarm.set_p_name( dataWindfarm.gc_name() ); + + //Check wether it can be changed using sliders + windfarm.p_isSliderGC = dataWindfarm.isSliderGC(); + + //Grid capacity + windfarm.v_liveConnectionMetaData.physicalCapacity_kW = dataWindfarm.connection_capacity_kw(); + if ( dataWindfarm.connection_capacity_kw() > 0 ) { + windfarm.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + if ( dataWindfarm.contracted_feed_in_capacity_kw() != null) { + windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.contracted_feed_in_capacity_kw(); + windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else { + windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.connection_capacity_kw(); + windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + //windfarm.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + windfarm.set_p_ownerID( dataWindfarm.owner_id() ); + windfarm.set_p_parentNodeElectricID( dataWindfarm.gridnode_id() ); + + //Get initial state + windfarm.v_isActive = dataWindfarm.initially_active(); + + //Create EA for the windturbine GC + f_addEnergyProduction(windfarm, OL_EnergyAssetType.WINDMILL, "Windmill onshore", dataWindfarm.capacity_electric_kw()); + + if (!existing_actors.contains(windfarm.p_ownerID)){ // check if owner exists already, if not, create new owner. + owner = energyModel.add_pop_connectionOwners(); + + owner.set_p_actorID( windfarm.p_ownerID ); + //owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.WINDFARM_OP ); + owner.b_dataSharingAgreed = true; + } + else { // Owner exists already: add new GC to existing owner + owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataWindfarm.owner_id())); + } + + windfarm.set_p_owner( owner ); + + existing_windFarms.add(windfarm.p_gridConnectionID); + } + else { // winfarm and its owner exist already, only create new gis building which is added to the farm + windfarm = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataWindfarm.gc_id()) ); + owner = windfarm.p_owner; + + } + + //Create GIS object for the windfarm + if (dataWindfarm.polygon() != null) { + GIS_Object area = f_createGISObject( dataWindfarm.gc_name(), dataWindfarm.latitude(), dataWindfarm.longitude(), dataWindfarm.polygon(), OL_GISObjectType.WINDFARM ); + + //Add to collections + area.c_containedGridConnections.add(windfarm); + windfarm.c_connectedGISObjects.add(area); + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_windFarmColor ); + area.set_p_defaultLineColor( zero_Interface.v_windFarmLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double[]</ReturnType> + <Id>1726584205793</Id> + <Name>f_createGISNodesTokens</Name> + <X>70</X> + <Y>560</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GN</Name> + <Type>GridNode</Type> + </Parameter> + <Body>double scaling_factor_LVLV = zero_Interface.v_LVLVNodeSize; +double scaling_factor_MVLV = zero_Interface.v_MVLVNodeSize; +double scaling_factor_MVMV = zero_Interface.v_MVMVNodeSize; +double scaling_factor_HVMV = zero_Interface.v_HVMVNodeSize; + +int nb_GISCoords; +String node_shape = "TRIANGLE"; +double scaling_factor_gridnode = 0; + +switch( GN.p_nodeType ) { + case LVLV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_LVLV; + break; + case MVLV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_MVLV; + break; + case SUBMV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_MVLV; + break; + case MVMV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_MVMV; + break; + case HVMV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_HVMV; + break; + case HT: + nb_GISCoords = 6; + break; + case MT: + nb_GISCoords = 6; + break; + case LT: + nb_GISCoords = 6; + break; + case LT5thgen: + nb_GISCoords = 6; + break; + default: + nb_GISCoords = 6; +} + +double[] GISCoords = new double[nb_GISCoords]; + + +switch(node_shape){ + + case "TRIANGLE": + //latitudes + GISCoords[0]=GN.p_latitude; + GISCoords[2]=GN.p_latitude - scaling_factor_gridnode*0.00001; + GISCoords[4]=GN.p_latitude - scaling_factor_gridnode*0.00001; + + //longitudes + GISCoords[1]=GN.p_longitude; + GISCoords[3]=GN.p_longitude + scaling_factor_gridnode*0.00001; + GISCoords[5]=GN.p_longitude - scaling_factor_gridnode*0.00001; + break; + case "DIAMOND": + //latitudes + GISCoords[0]=GN.p_latitude; + GISCoords[2]=GN.p_latitude - scaling_factor_gridnode*0.00001; + GISCoords[4]=GN.p_latitude; + GISCoords[6]=GN.p_latitude + scaling_factor_gridnode*0.00001; + + //longitudes + GISCoords[1]=GN.p_longitude; + GISCoords[3]=GN.p_longitude + scaling_factor_gridnode*0.00001; + GISCoords[5]=GN.p_longitude + scaling_factor_gridnode*0.00001*2; + GISCoords[7]=GN.p_longitude + scaling_factor_gridnode*0.00001; + break; + /* + case "CIRCLE": + // if you want Circle coordinates --> + //x = r * cos(t) + a + //y = r * sin(t) + b + //t is an angle between 0 and 2π (more steps is more circle points, about 10-12 should suffice. --> adjust nb_GISCoords accordingly + // r is the radius: 0.000009 degrees in latitude is about 1 meter + // a and b are latitude and longitude + break; + */ +} + +return GISCoords; + + + + + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205795</Id> + <Name>f_createEnergyActors</Name> + <Description>Function used to generate specific actors like grid operator, energy supplier and energy coop. Actors used to create variable pricing.</Description> + <X>60</X> + <Y>460</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>// Create the grid operator +GridOperator GO = energyModel.add_pop_gridOperators(); + +GO.p_actorID = project_data.grid_operator(); +GO.p_hasCongestionPricing = project_data.hasCongestionPricing() != null ? project_data.hasCongestionPricing() : false; + + +// Create the energy coop +if (project_data.energy_coop() != null && !project_data.energy_coop().equals("None")){ + + EnergyCoop EC = energyModel.add_pop_energyCoops(); + + EC.p_actorID = project_data.energy_coop(); + EC.p_gridOperator = GO; + //EC.p_CoopParent = EC.p_actorID; // WAT BETEKENT COOP PARENT?? +} + + +// Energy supplier +if (project_data.energy_supplier() != null && !project_data.energy_supplier().equals("None")){ + + EnergySupplier ES = energyModel.add_pop_energySuppliers(); + + ES.p_actorID = project_data.energy_supplier(); +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205799</Id> + <Name>f_createGenericCompanies</Name> + <Description>Creating the companies (using a single GC) + owned buildings, that have not filled in the survey. If created, they will be simulated using average values, scaled with the totals (CBS data) of the area.</Description> + <X>430</X> + <Y>523</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Initialize variables +List<GCUtility> generic_company_GCs = new ArrayList(); +HashMap<GridConnection, Double> map_GC_to_installedBuildingPV = new HashMap(); + +//Get buildings in scope +List<Building_data> buildingDataGenericCompanies = f_getBuildingsInSubScope(c_companyBuilding_data); + +//Add generic companies to the legend if in model +if(buildingDataGenericCompanies.size()>0){ + zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DEFAULT_COMPANY); +} + +//Loop over the remaining buildings in c_CompanyBuilding_data (Survey buildings have been removed from this collection) +for (Building_data genericCompany : buildingDataGenericCompanies) { + + GCUtility companyGC = findFirst(generic_company_GCs, GC -> GC.p_gridConnectionID.equals(genericCompany.address_id())); + + if(companyGC == null){ + //Create new companyGC + companyGC = energyModel.add_UtilityConnections(); + + //Update counter and collections + generic_company_GCs.add(companyGC); + map_GC_to_installedBuildingPV.put(companyGC, 0.0); + + //Set parameters for the Grid Connection + companyGC.p_gridConnectionID = genericCompany.address_id(); + + // Check that is needed until connectioncapacity is no longer in 'Panden' excel + if (genericCompany.contracted_capacity_kw() == null || genericCompany.contracted_capacity_kw() <= 0) { + companyGC.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; + } + else{ + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = genericCompany.contracted_capacity_kw(); + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; + companyGC.v_liveConnectionMetaData.physicalCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; + } + + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + + //set GC Adress + companyGC.p_address = new J_Address(); + companyGC.p_address.setStreetName(genericCompany.streetname()); + if (genericCompany.house_number() == null) { + companyGC.p_address.setHouseNumber(0); + } + else { + companyGC.p_address.setHouseNumber(genericCompany.house_number()); + } + companyGC.p_address.setHouseLetter(genericCompany.house_letter()); + companyGC.p_address.setHouseAddition(genericCompany.house_addition()); + companyGC.p_address.setPostalcode(genericCompany.postalcode()); + companyGC.p_address.setCity(genericCompany.city()); + + + //Set location of GC + companyGC.p_latitude = genericCompany.latitude(); + companyGC.p_longitude = genericCompany.longitude(); + companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); + + //Update remaining totals (AFTER Lat/Lon has been defined!) + p_remainingTotals.adjustTotalNumberOfAnonymousCompanies(companyGC, 1); + p_remainingTotals.adjustTotalFloorSurfaceAnonymousCompanies_m2(companyGC, genericCompany.address_floor_surface_m2()); + + //Connect GC to grid node + companyGC.p_parentNodeElectricID = genericCompany.gridnode_id (); + + + // Create new actor and assign GC to that + ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company + + COC.p_actorID = genericCompany.address_id(); + COC.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; + COC.p_detailedCompany = false; + COC.b_dataSharingAgreed = true; + + companyGC.p_owner = COC; + companyGC.p_ownerID = COC.p_actorID; + } + + //Check wheter this building already exists + GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(genericCompany.building_id())); + + if(existingBuilding == null){//Create new GIS building and connect + GIS_Building b = f_createGISBuilding( genericCompany, companyGC ); + + companyGC.p_roofSurfaceArea_m2 += b.p_roofSurfaceArea_m2; + map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + (genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0)); + + //Style building + b.p_defaultFillColor = zero_Interface.v_companyBuildingColor; + b.p_defaultLineColor = zero_Interface.v_companyBuildingLineColor; + zero_Interface.f_styleAreas(b); + } + else{// Connect with existing building + //Redistribute the PV installed + List<GridConnection> currentConnectedGCWithBuilding_notDetailed = findAll(existingBuilding.c_containedGridConnections, gc -> !gc.p_owner.p_detailedCompany); + int currentAmountOfConnectedGCWithBuilding_notDetailed = currentConnectedGCWithBuilding_notDetailed.size(); + + double buildingPV = genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0; + double newPVDistributionForAllAttachedGC_kW = buildingPV/(currentAmountOfConnectedGCWithBuilding_notDetailed+1); + double deltaPV_earlierConnectedGC_kW = newPVDistributionForAllAttachedGC_kW - (buildingPV/currentAmountOfConnectedGCWithBuilding_notDetailed); + + for(GridConnection earlierConnectedGC : currentConnectedGCWithBuilding_notDetailed){ + map_GC_to_installedBuildingPV.put(earlierConnectedGC, map_GC_to_installedBuildingPV.get(earlierConnectedGC) + deltaPV_earlierConnectedGC_kW); + if(map_GC_to_installedBuildingPV.get(earlierConnectedGC) < 0){ + new RuntimeException("Negative installed PV for GC: " + earlierConnectedGC.p_gridConnectionID + " after redistribution of PV on the building. This should never be possible!"); + } + } + + map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + newPVDistributionForAllAttachedGC_kW); + + //Connect to the existing building + f_connectGCToExistingBuilding(companyGC, existingBuilding, genericCompany); + } + + companyGC.p_floorSurfaceArea_m2 += genericCompany.address_floor_surface_m2(); +} + +//Finalize the remaining totals distribution +p_remainingTotals.finalizeRemainingTotalsDistributionCompanies(); + +//Add EA to all generic companies (Has to be after the remaining totals finalization, so cant happen at the same time as the creation of the GC and their buildings) +for (GridConnection GCcompany : generic_company_GCs ) { + f_iEAGenericCompanies(GCcompany, map_GC_to_installedBuildingPV.get(GCcompany)); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>GIS_Building</ReturnType> + <Id>1726584205801</Id> + <Name>f_createGISBuilding</Name> + <Description>Creates the GIS object(s) building(s) for the companies and houses</Description> + <X>1547.621</X> + <Y>580</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>buildingData</Name> + <Type>Building_data</Type> + </Parameter> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>GIS_Building b = energyModel.add_pop_GIS_Buildings(); + +b.p_id = buildingData.building_id(); +b.p_GISObjectType = OL_GISObjectType.BUILDING; +b.p_buildingYear = buildingData.build_year(); +b.p_status = buildingData.status(); +b.p_useType = buildingData.purpose(); + +// Adres data +b.p_annotation = buildingData.annotation(); + +//Create gisregion +b.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(buildingData.polygon(), b.p_GISObjectType)); + +//Use the first point of the polygon as lat lon +double[] gisregion_points = b.gisRegion.getPoints(); // get all points of the gisArea of the building in the format lat1,lon1,lat2,lon2, etc. + +//position and coordinates +b.p_latitude = gisregion_points[0]; +b.p_longitude = gisregion_points[1]; + +//Set latlon +b.setLatLon(b.p_latitude, b.p_longitude); + + +//Define roof surface area (with Null checks and gisregion area as back up) +b.p_roofSurfaceArea_m2 = buildingData.polygon_area_m2() != null ? buildingData.polygon_area_m2() : b.gisRegion.area(); + +//Define floor surface area (with Null check, and make it 0 if unkown, else counting errors due to order of loadin of building data) +b.p_floorSurfaceArea_m2 = buildingData.address_floor_surface_m2() != null ? buildingData.address_floor_surface_m2() : 0; + +//Add to collections +b.c_containedGridConnections.add(parentGC); +parentGC.c_connectedGISObjects.add(b); + + +return b;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205803</Id> + <Name>f_addElectricityDemandProfile</Name> + <X>900</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityDemand_kWh</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>pvPower_kW</Name> + <Type>Double</Type> + </Parameter> + <Parameter> + <Name>hasQuarterlyData</Name> + <Type>boolean</Type> + </Parameter> + <Parameter> + <Name>profileName</Name> + <Type>String</Type> + </Parameter> + <Body>if ( hasQuarterlyData == true ) { // Add quarterly electricity data pattern if available + + //Initialize the arrays + List<Double> yearlyElectricityFeedin_kWh_list = null; + List<Double> yearlyElectricityProduction_kWh_list = null; + + //Check for PV, and if so: check for additional quarterhourly values + if(pvPower_kW != null && pvPower_kW > 0){ + //Check for feedin values availability, if available: fill the list, if not, list = null; + try { + if(selectFirstValue(Double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption LIMIT 1;") != null){ + yearlyElectricityFeedin_kWh_list = selectValues(double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption;"); + } + } + catch(Exception e) { + //Do nothing, cause initialized with null; + } + + //Check for bruto production values availability, if available: fill the list, if not, list = null; + try { + if(selectFirstValue(Double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption LIMIT 1;") != null){ + yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption;"); + } + } + catch(Exception e) { + //Do nothing, cause initialized with null; + } + } + + //Get the delivery values + List<Double> yearlyElectricityDelivery_kWh_list = selectValues(double.class, "SELECT " + profileName + "_demand FROM comp_elec_consumption;"); + + + //Convert lists into arrays + double[] yearlyElectricityDelivery_kWh_array = (yearlyElectricityDelivery_kWh_list != null) ? yearlyElectricityDelivery_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; + double[] yearlyElectricityFeedin_kWh_array = (yearlyElectricityFeedin_kWh_list != null) ? yearlyElectricityFeedin_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; + double[] yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; + + + //Preprocess and add the profiles + f_createPreprocessedElectricityProfile_PV(parentGC, yearlyElectricityDelivery_kWh_array, yearlyElectricityFeedin_kWh_array, yearlyElectricityProduction_kWh_array, pvPower_kW, null); + +} + +else { // Add regular electricity and consumption profiles + J_EAConsumption profile = new J_EAConsumption(parentGC, OL_EnergyAssetType.ELECTRICITY_DEMAND, profileName, yearlyElectricityDemand_kWh, OL_EnergyCarriers.ELECTRICITY, energyModel.p_timeStep_h, null); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205807</Id> + <Name>f_createGISParcels</Name> + <Description>Creates "empty" parcels on the gismap, these parcels do not contain buildings or gridconnections. Currently no need for the function to return the GIS_Object.</Description> + <X>1547.621</X> + <Y>600</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Add GISObject type to the legenda +if(c_parcel_data.size()>0){ + zero_Interface.c_modelActiveSpecialGISObjects.add(OL_GISObjectType.PARCEL); +} + +for (Parcel_data dataParcel : c_parcel_data) { + + GIS_Parcel parcel = energyModel.add_pop_GIS_Parcels(); + + parcel.set_p_latitude( dataParcel.latitude() ); + parcel.set_p_longitude( dataParcel.longitude() ); + parcel.setLatLon(parcel.p_latitude, parcel.p_longitude); + parcel.set_p_id( dataParcel.parcel_id() ); + parcel.set_p_GISObjectType(OL_GISObjectType.PARCEL); + + //Building + styling the gisregion and putting it on the map + GISRegion gisregion = zero_Interface.f_createGISObject(f_createGISObjectsTokens( dataParcel.polygon(), parcel.p_GISObjectType)); + parcel.gisRegion = gisregion; + + parcel.set_p_defaultFillColor( zero_Interface.v_parcelColor ); + parcel.set_p_defaultLineColor( zero_Interface.v_parcelLineColor ); + parcel.set_p_defaultLineStyle( LineStyle.LINE_STYLE_DASHED ); + zero_Interface.f_styleAreas(parcel); +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205809</Id> + <Name>f_addEnergyProduction</Name> + <X>900</X> + <Y>200</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>asset_type</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>asset_name</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>installedPower_kW</Name> + <Type>double</Type> + </Parameter> + <Body>double assetCapacity_kW = 0; +double timestep_h = energyModel.p_timeStep_h; +J_ProfilePointer profilePointer = null; +OL_EnergyCarriers energyCarrier = OL_EnergyCarriers.ELECTRICITY; +switch (asset_type){ + +case PHOTOVOLTAIC: + energyCarrier = OL_EnergyCarriers.ELECTRICITY; + profilePointer = energyModel.pp_PVProduction35DegSouth_fr; + assetCapacity_kW = installedPower_kW; + break; + +case WINDMILL: + energyCarrier = OL_EnergyCarriers.ELECTRICITY; + profilePointer=energyModel.pp_windProduction_fr; + assetCapacity_kW = installedPower_kW; + break; + +case PHOTOTHERMAL: //NOT USED YET + energyCarrier = OL_EnergyCarriers.HEAT; + profilePointer = energyModel.pp_PVProduction35DegSouth_fr; // Voor nu om te testen! Misschien valt dit wel te gebruiken met bepaalde efficientie factor! + assetCapacity_kW = installedPower_kW; + break; +} + +J_EAProduction production_asset = new J_EAProduction(parentGC, asset_type, asset_name, energyCarrier, assetCapacity_kW, timestep_h, profilePointer); + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>GIS_Object</ReturnType> + <Id>1726584205811</Id> + <Name>f_createGISObject</Name> + <Description>Creates the GIS object for the area EA (windfarms, solarparks, electrolysers, batteries, etc.)</Description> + <X>1547.621</X> + <Y>560</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>name</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>latitude</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>longitude</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>polygon</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>GISObjectType</Name> + <Type>OL_GISObjectType</Type> + </Parameter> + <Body>GIS_Object area = energyModel.add_pop_GIS_Objects(); + +area.p_id = name; +area.p_GISObjectType = GISObjectType; + +//position and coordinates +area.p_latitude = latitude; +area.p_longitude = longitude; +area.setLatLon(area.p_latitude, area.p_longitude); + +//Create gisregion +area.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(polygon, area.p_GISObjectType)); + +//Add GISObject type to the legenda +zero_Interface.c_modelActiveSpecialGISObjects.add(area.p_GISObjectType); + +return area; +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205815</Id> + <Name>f_createSurveyCompanies_Zorm</Name> + <X>429.001</X> + <Y>129</Y> + <Label> + <X>10.999</X> + <Y>1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Get the survey data +List<com.zenmo.zummon.companysurvey.Survey> surveys = f_getSurveys(); +traceln("Size of survey List: %s", surveys.size()); + +//Get the building data +try{ + map_buildingData_Vallum = com.zenmo.vallum.PandKt.fetchBagPanden(surveys); +} +catch (Exception e){ //if api of bag is down, leave bag buildings empty and display error message + zero_Interface.f_setErrorScreen("BAG API is offline, het is mogelijk dat bepaalde panden niet zijn ingeladen!", 0, 0); +} + + +traceln("Companies that filled in the survey:"); +for (var survey : surveys) { + + traceln(survey.getCompanyName()); + + //Create connection owner + ConnectionOwner survey_owner = energyModel.add_pop_connectionOwners(); + survey_owner.p_actorID = survey.getCompanyName(); + //survey_owner.p_actorType = OL_ActorType.CONNECTIONOWNER; + survey_owner.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; + survey_owner.p_detailedCompany = true; + survey_owner.b_dataSharingAgreed = survey.getDataSharingAgreed(); + + for (var address : survey.getAddresses()) { + + //Update number of survey companies (locations) + v_numberOfSurveyCompanies++; + + for (var gridConnection: address.getGridConnections()) { + + //Check if it has (or will have) a direct connection with the grid (either gas or electric), if not: skip this gc. + boolean hasNaturalGasConnection = (gridConnection.getNaturalGas().getHasConnection() != null)? gridConnection.getNaturalGas().getHasConnection() : false; + boolean hasExpansionRequest = (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null ) ? gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() : false; + + if (!gridConnection.getElectricity().getHasConnection() && !hasExpansionRequest && !hasNaturalGasConnection){ + traceln("surveyGC with sequence: " + gridConnection.getSequence() + " is not created, as it has no connection to the grid, future grid connection or current gas connection."); + continue; + } + + //Create GC + GCUtility companyGC = energyModel.add_UtilityConnections(); + + //Set parameters for the Grid Connection + companyGC.p_ownerID = survey.getCompanyName(); + companyGC.p_gridConnectionID = gridConnection.getSequence().toString() ; + + //Find actor and connect GC + companyGC.p_owner = survey_owner; + + //Adress data + companyGC.p_address = new J_Address(); + companyGC.p_address.setStreetName(address.getStreet().substring(0,1).toUpperCase() + address.getStreet().substring(1).toLowerCase()); + companyGC.p_address.setHouseNumber(address.getHouseNumber()); + companyGC.p_address.setHouseLetter(address.getHouseLetter().equals("") ? null : address.getHouseLetter()); + companyGC.p_address.setHouseAddition(address.getHouseNumberSuffix().equals("") ? null : address.getHouseNumberSuffix()); + companyGC.p_address.setPostalcode(address.getPostalCode().equals("") ? null : address.getPostalCode().toUpperCase().replaceAll("\\s","")); + companyGC.p_address.setCity(address.getCity().substring(0,1).toUpperCase() + address.getCity().substring(1).toLowerCase()); + + //Get attached building info + List<Building_data> buildings = f_getSurveyGCBuildingData(companyGC, gridConnection); + + //Total new additional floor/roof surface area + double totalNewFloorSurfaceAreaGC_m2 = 0; + double totalNewRoofSurfaceAreaGC_m2 = 0; + + //Create the GIS buildings + for (Building_data buildingData : buildings) { + GIS_Building gisBuilding = findFirst(energyModel.pop_GIS_Buildings, b -> b.p_id.equals(buildingData.building_id())); // Check if building already exists in engine + if (gisBuilding != null) { + // Connect GC to existing building in engine + f_connectGCToExistingBuilding(companyGC, gisBuilding, buildingData); + } + else{ + gisBuilding = f_createGISBuilding( buildingData, companyGC); + } + + //Set name of building + if(gisBuilding.p_annotation == null){ + gisBuilding.p_annotation = companyGC.p_ownerID; + } + + //Accumulate surface areas + totalNewFloorSurfaceAreaGC_m2 += buildingData.address_floor_surface_m2(); + totalNewRoofSurfaceAreaGC_m2 += gisBuilding.p_roofSurfaceArea_m2; + + //Set trafo ID + companyGC.p_parentNodeElectricID = buildingData.gridnode_id(); + + //Style building + gisBuilding.p_defaultFillColor = zero_Interface.v_detailedCompanyBuildingColor; + gisBuilding.p_defaultLineColor = zero_Interface.v_detailedCompanyBuildingLineColor; + zero_Interface.f_styleAreas(gisBuilding); + + } + + //Add (combined) building data to GC (latitude and longitude + area) + companyGC.p_floorSurfaceArea_m2 += totalNewFloorSurfaceAreaGC_m2; + companyGC.p_roofSurfaceArea_m2 += totalNewRoofSurfaceAreaGC_m2; + + + if(!companyGC.c_connectedGISObjects.isEmpty()){ + companyGC.p_longitude = companyGC.c_connectedGISObjects.get(0).p_longitude; // Get longitude of first building (only used to get nearest trafo) + companyGC.p_latitude = companyGC.c_connectedGISObjects.get(0).p_latitude; // Get latitude of first building (only used to get nearest trafo) + + if(buildings.isEmpty()){ //GC will not have gotten a gridnode assigned, + for (var PID : gridConnection.getPandIds() ) { + Building_data surveyBuildingData = findFirst(c_surveyCompanyBuilding_data, b -> b.building_id().equals(PID.getValue())); + if(surveyBuildingData != null){ + companyGC.p_parentNodeElectricID = surveyBuildingData.gridnode_id(); + break; + } + } + } + + //In Subscope check + if(companyGC.p_parentNodeElectricID != null && !c_gridNodeIDsInScope.contains(companyGC.p_parentNodeElectricID)){ + //--> Company not in subscope -> PAUSE AND REMOVE FROM ASSIGNED GRIDNODE + companyGC.p_parentNodeElectricID = null; + companyGC.v_isActive = false; + } + } + else{ + traceln("Gridconnection %s with owner %s has no buildings!!!", companyGC.p_gridConnectionID, companyGC.p_ownerID); + } + + //Set lat lon + companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); + + //Energy asset initialization + f_iEASurveyCompanies_Zorm(companyGC, gridConnection); + } + } +} + +//If survey companies are present, add to the ui legend +if(v_numberOfSurveyCompanies>0){ + //Add to the legend + zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DETAILED_COMPANY); + + //Pass the number of survey companies to interface for the dynamic legend + zero_Interface.v_numberOfSurveyCompanies = v_numberOfSurveyCompanies; +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<com.zenmo.zummon.companysurvey.Survey></ReturnType> + <Id>1726584205819</Id> + <Name>f_getSurveys</Name> + <X>449</X> + <Y>149</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Connect with API to database +Vallum vallum = new Vallum(user.PROJECT_CLIENT_ID(), user.PROJECT_CLIENT_SECRET()); + + +List<com.zenmo.zummon.companysurvey.Survey> surveys = new ArrayList(); + + +String[] zorm_project_names; +if(project_data.zorm_project_names() != null){ + zorm_project_names = project_data.zorm_project_names(); +} +else{ + zorm_project_names = new String[]{project_data.project_name()}; +} + +surveys = vallum.getEnabledSurveysByProjectNames(zorm_project_names); + +//Clear vallum user data +user.clearVallumUser(); + +return surveys;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205821</Id> + <Name>f_createActors</Name> + <X>90</X> + <Y>231</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Create specific actors like Grid operator, energy supplier, energy coop +f_createEnergyActors();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>OL_GridConnectionHeatingType</ReturnType> + <Id>1726584205825</Id> + <Name>f_getHeatingTypeSurvey</Name> + <Description>This function determines the heatingType (OL_GridConnectionHeatingType) from the list of heating types (zummon.companysurvey.HeatingType)</Description> + <X>480</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>// This function determines a heatingType for the GC, which will be passed on to the function that determines the heating management +OL_GridConnectionHeatingType heatingType = null; + +if (surveyGC.getHeat().getHeatingTypes().size() > 1) { + // We currently only recognize a couple of combinations that we assume are meant as hybrid heatpumps + if (surveyGC.getHeat().getHeatingTypes().size() == 2) { + if (surveyGC.getHeat().getHeatingTypes().contains(HeatingType.GAS_BOILER)) { + if (surveyGC.getHeat().getHeatingTypes().contains(HeatingType.HYBRID_HEATPUMP) || surveyGC.getHeat().getHeatingTypes().contains(HeatingType.ELECTRIC_HEATPUMP)) { + heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; + } + } + } +} +else if (surveyGC.getHeat().getHeatingTypes().size() == 1) { + // We translate the survey enum to the OL_GridConnectionHeatingType + switch(surveyGC.getHeat().getHeatingTypes().get(0)) { + case GAS_BOILER: + heatingType = OL_GridConnectionHeatingType.GAS_BURNER; + break; + case HYBRID_HEATPUMP: + heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; + break; + case ELECTRIC_HEATPUMP: + heatingType = OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP; + break; + case DISTRICT_HEATING: + heatingType = OL_GridConnectionHeatingType.DISTRICTHEAT; + break; + case COMBINED_HEAT_AND_POWER: + heatingType = OL_GridConnectionHeatingType.GAS_CHP; + break; + case OTHER: + heatingType = OL_GridConnectionHeatingType.CUSTOM; + break; + default: + throw new RuntimeException("Incorrect heating: " + surveyGC.getHeat().getHeatingTypes().get(0) + " detected for '" + engineGC.p_ownerID + "'"); + } +} +else if (surveyGC.getHeat().getHeatingTypes().size() == 0) { + // There is no heating type in the survey, but there is gas consumption (either yearly total or hourly values) + if ( (surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) + || ( surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear() ) ) { + // We assume that all gas consumption is to heat the building(s) + heatingType = OL_GridConnectionHeatingType.GAS_BURNER; + } + else { + heatingType = OL_GridConnectionHeatingType.NONE; + } +} +if (heatingType == null) { + heatingType = OL_GridConnectionHeatingType.CUSTOM; +} + +return heatingType;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_EAEV</ReturnType> + <Id>1726584205827</Id> + <Name>f_addElectricVehicle</Name> + <X>900</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>vehicle_type</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>isDefaultVehicle</Name> + <Type>boolean</Type> + </Parameter> + <Parameter> + <Name>annualTravelDistance_km</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>maxChargingPower_kW</Name> + <Type>double</Type> + </Parameter> + <Body>double storageCapacity_kWh = 0; +double energyConsumption_kWhpkm = 0; +double capacityElectricity_kW = 0; +double stateOfCharge_fr = 1; // Initial state of charge +double timestep_h = energyModel.p_timeStep_h; +double vehicleScaling = 1.0; + +switch(vehicle_type){ + + /* + case ELECTRIC_VEHICLE_COMUTERS: // ??? Hoe laad je andere laadprofielen in.?? Deze moet ander laadprofiel dan de Standaard Electric_vehicle + capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; + storageCapacity_kWh = avgc_data.p_avgEVStorageCar_kWh; + energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; + break; + */ + + case ELECTRIC_VEHICLE: + capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; + storageCapacity_kWh = avgc_data.p_avgEVStorageCar_kWh; + energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; + break; + + case ELECTRIC_VAN: + capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerVan_kW; + storageCapacity_kWh = avgc_data.p_avgEVStorageVan_kWh; + energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; + break; + + case ELECTRIC_TRUCK: + capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerTruck_kW; + storageCapacity_kWh = avgc_data.p_avgEVStorageTruck_kWh; + energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; + break; + +} + +if (!isDefaultVehicle && maxChargingPower_kW > 0){ + capacityElectricity_kW = maxChargingPower_kW; +} +if (!isDefaultVehicle && maxChargingPower_kW <= 0) { + traceln("Trying to create an EV with no/negative maxChargingPower_kW: %s", maxChargingPower_kW); +} + +//Create the EV vehicle energy asset with the set parameters + links +J_EAEV electricVehicle = new J_EAEV(parentGC, capacityElectricity_kW, storageCapacity_kWh, stateOfCharge_fr, timestep_h, energyConsumption_kWhpkm, vehicleScaling, vehicle_type, null); + +if (!isDefaultVehicle && annualTravelDistance_km > 1000){ + electricVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); +} +else if (vehicle_type == OL_EnergyAssetType.ELECTRIC_VAN){ + electricVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); +} + +return electricVehicle;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_EADieselVehicle</ReturnType> + <Id>1726584205829</Id> + <Name>f_addDieselVehicle</Name> + <X>900</X> + <Y>760</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>vehicle_type</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>isDefaultVehicle</Name> + <Type>Boolean</Type> + </Parameter> + <Parameter> + <Name>annualTravelDistance_km</Name> + <Type>double</Type> + </Parameter> + <Body>double energyConsumption_kWhpkm = 0; +double vehicleScaling = 1.0; + +//Diesel car +switch (vehicle_type){ + + case DIESEL_VEHICLE: + energyConsumption_kWhpkm = roundToDecimal(uniform(0.7, 1.3),2) * avgc_data.p_avgDieselConsumptionCar_kWhpkm; + break; + + case DIESEL_VAN: + energyConsumption_kWhpkm = avgc_data.p_avgDieselConsumptionVan_kWhpkm; + break; + + case DIESEL_TRUCK: + energyConsumption_kWhpkm = avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + break; +} + +//Create EA +J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); + +//Set annual travel distance +if (!isDefaultVehicle && annualTravelDistance_km > 1000){ + dieselVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); +} +else if (vehicle_type == OL_EnergyAssetType.DIESEL_VAN){ + dieselVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); +} + +return dieselVehicle; + + + +</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205831</Id> + <Name>f_addStorage</Name> + <X>900</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>storagePower_kw</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>storageCapacity_kWh</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>storageType</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Body>J_EAStorage storage = null; + +switch (storageType){ + + case STORAGE_ELECTRIC: + double initialStateOfCharge_fr = 0.5; + storage = new J_EAStorageElectric(parentGC, storagePower_kw, storageCapacity_kWh, initialStateOfCharge_fr, energyModel.p_timeStep_h); + //traceln("Battery with StorageCapacity_kWh: %s", storageCapacity_kWh); + break; + + case STORAGE_HEAT: + double lossFactor_WpK = 0; // For now no losses, waiting for new setup heating assets before this can be implemented correctly (its JEA_Building depedent) + double minTemperature_degC = avgc_data.p_avgMinHeatBufferTemperature_degC; + double maxTemperature_degC = avgc_data.p_avgMaxHeatBufferTemperature_degC; + double initialTemperature_degC = (minTemperature_degC + maxTemperature_degC) / 2; + double setTemperature_degC = initialTemperature_degC; + //double storageCapacity_kg = (storageCapacity_kWh*3.6e6)/(avgc_data.p_waterHeatCapacity_JpkgK * (maxTemperature_degC - minTemperature_degC)); + //double heatCapacity_JpK = avgc_data.p_waterHeatCapacity_JpkgK * storageCapacity_kg; + //in short -> + double heatCapacity_JpK = storageCapacity_kWh*3.6e6 / (maxTemperature_degC - minTemperature_degC); + new J_EAStorageHeat(parentGC, storageType, storagePower_kw, lossFactor_WpK, energyModel.p_timeStep_h, initialTemperature_degC, minTemperature_degC, maxTemperature_degC, setTemperature_degC, heatCapacity_JpK, OL_AmbientTempType.AMBIENT_AIR ); + + break; + + case STORAGE_GAS: + + break; + + default: + + return; +} +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205833</Id> + <Name>f_iEAGenericCompanies</Name> + <Description>Initialisation of the Energy assets using average values for companies that have not filled in the survey (yet) combined with totals (floor surface, electricity/yr, gas/yr and trucks) of the simulated area.</Description> + <X>450</X> + <Y>543</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>pv_installed_kwp</Name> + <Type>Double</Type> + </Parameter> + <Body>//Create current & future scenario parameter list +J_scenario_Current current_scenario_list = new J_scenario_Current(); +zero_Interface.c_scenarioMap_Current.put(companyGC.p_uid, current_scenario_list); + +J_scenario_Future future_scenario_list = new J_scenario_Future(); +zero_Interface.c_scenarioMap_Future.put(companyGC.p_uid, future_scenario_list); + +//Set parent +current_scenario_list.setParentAgent(companyGC); +future_scenario_list.setParentAgent(companyGC); + +//Add current grid capacity to current (and future, feedin, physical, as no data on plans so assumption it is/stays the same) scenario list +current_scenario_list.setCurrentContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); +future_scenario_list.setRequestedContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); +current_scenario_list.setCurrentContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); +future_scenario_list.setRequestedContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); +current_scenario_list.setCurrentPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); +future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); + +//Basic heating and electricity demand profiles +if (companyGC.p_floorSurfaceArea_m2 > 0){ + + if(p_remainingTotals.getRemainingElectricityDeliveryCompanies_kWh(companyGC) > 0){ + //Buidling Base electricity load + double Remaining_electricity_demand_kWh_p_m2_yr = p_remainingTotals.getElectricityDeliveryOfAnonymousCompanies_kWhpm2(companyGC); + double yearlyElectricityDemand_kWh = Remaining_electricity_demand_kWh_p_m2_yr * companyGC.p_floorSurfaceArea_m2; + + //Add base load profile + f_addElectricityDemandProfile(companyGC, yearlyElectricityDemand_kWh, null, false, "default_office_electricity_demand_fr"); + } + + if(p_remainingTotals.getRemainingGasDeliveryCompanies_m3(companyGC) > 0){ + //Building Gas demand profile (purely heating) + double Remaining_gas_demand_m3_p_m2_yr = p_remainingTotals.getGasDeliveryOfAnonymousCompanies_m3pm2(companyGC); + double yearlyGasDemand_m3 = Remaining_gas_demand_m3_p_m2_yr*companyGC.p_floorSurfaceArea_m2; + double ratioGasUsedForHeating = 1; + + //Add heat demand profile + OL_GridConnectionHeatingType heatingType = avgc_data.p_avgCompanyHeatingMethod; + double maxHeatOutputPower_kW = f_createHeatProfileFromAnnualGasTotal(companyGC, heatingType, yearlyGasDemand_m3, ratioGasUsedForHeating); + f_addHeatAsset(companyGC, heatingType, maxHeatOutputPower_kW); + companyGC.f_addHeatManagement(heatingType, false); + + //Set current scenario heating type + current_scenario_list.setCurrentHeatingType(heatingType); + future_scenario_list.setPlannedHeatingType(heatingType); + } +} + + +//Production asset (PV) ??????????????????????????????????????????? willen we die toevoegen aan generieke bedrijven? +if(pv_installed_kwp != null && pv_installed_kwp > 0){ + f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", pv_installed_kwp); +} + + +//add to scenario: current & future +current_scenario_list.setCurrentBatteryPower_kW(0f); +current_scenario_list.setCurrentBatteryCapacity_kWh(0f); +future_scenario_list.setPlannedBatteryPower_kW(0f); +future_scenario_list.setPlannedBatteryCapacity_kWh(0f); + + +//Transport (total remaining cars, vans and trucks (total as defined in project selection - survey company usage) + +//Cars +if(p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.CAR) > 0){ + int nbCars = 0; + int ceiledRemainingNumberOfCarsPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.CAR); + for (int k = 0; k < ceiledRemainingNumberOfCarsPerCompany; k++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.CAR, - 1); + nbCars++; + } + + //Reduce remaining number of anonymous companies that still can get vehicles + p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.CAR, - 1); + + //Set current scenario cars + current_scenario_list.setCurrentDieselCars(nbCars); + //Set planned scenario cars + future_scenario_list.setPlannedEVCars(0); +} + +//Vans +if(p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN) > 0){ + int nbVans = 0; + int ceiledRemainingNumberOfVansPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.VAN); + for (int k = 0; k< ceiledRemainingNumberOfVansPerCompany; k++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, true, 0); + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - 1); + nbVans++; + } + + //Reduce remaining number of anonymous companies that still can get vehicles + p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.VAN, - 1); + + //Set current scenario vans + current_scenario_list.setCurrentDieselVans(nbVans); + //Set planned scenario vans + future_scenario_list.setPlannedEVVans(0); +} + +//Trucks +if (p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK) > 0){ + int nbTrucks= 0; + int ceiledRemainingNumberOfTrucksPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.TRUCK); + for (int k = 0; k< ceiledRemainingNumberOfTrucksPerCompany; k++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, true, 0); + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK, - 1); + nbTrucks++; + } + + //Reduce remaining number of anonymous companies that still can get vehicles + p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.TRUCK, - 1); + + //Set current scenario trucks + current_scenario_list.setCurrentDieselTrucks(nbTrucks); + //Set planned scenario trucks + future_scenario_list.setPlannedEVTrucks(0); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205835</Id> + <Name>f_createRemainingBuildings</Name> + <X>1546.739</X> + <Y>639</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//If remaining buildings in model, add to legend +if(c_remainingBuilding_data.size()>0){ + zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.REMAINING); +} + +for (Building_data remainingBuilding_data : c_remainingBuilding_data) { + + GIS_Building building = energyModel.add_pop_GIS_Buildings(); + building.p_id = remainingBuilding_data.building_id(); + building.p_longitude = remainingBuilding_data.longitude(); + building.p_latitude = remainingBuilding_data.latitude(); + building.setLatLon(building.p_latitude, building.p_longitude); + building.p_GISObjectType = OL_GISObjectType.REMAINING_BUILDING; + + //Building + styling the gisregion and putting it on the map + building.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(remainingBuilding_data.polygon(), building.p_GISObjectType)); + + building.p_defaultFillColor = zero_Interface.v_restBuildingColor; + building.p_defaultLineColor = zero_Interface.v_restBuildingLineColor; + zero_Interface.f_styleAreas(building); +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205837</Id> + <Name>f_addTransportHydrogen</Name> + <X>900</X> + <Y>780</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>vehicle_type</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>isDefaultVehicle</Name> + <Type>boolean</Type> + </Parameter> + <Parameter> + <Name>annualTravelDistance_km</Name> + <Type>double</Type> + </Parameter> + <Body>double energyConsumption_kWhpkm = 0; +double vehicleScaling = 1.0; + +//Hydrogen car +switch (vehicle_type){ + + case HYDROGEN_VEHICLE: + energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionCar_kWhpkm; + break; + + case HYDROGEN_VAN: + energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionVan_kWhpkm; + break; + + case HYDROGEN_TRUCK: + energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; + break; +} + +//Create EA +J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); + +//Set annual travel distance +if (!isDefaultVehicle && annualTravelDistance_km > 1000){ + hydrogenVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); +} +else if (vehicle_type == OL_EnergyAssetType.HYDROGEN_VAN){ + hydrogenVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205845</Id> + <Name>f_addChargingDemandProfile</Name> + <X>900</X> + <Y>720</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GC</Name> + <Type>GCPublicCharger</Type> + </Parameter> + <Parameter> + <Name>profileName</Name> + <Type>String</Type> + </Parameter> + <Body>J_EAProfile profile = new J_EAProfile(GC, OL_EnergyCarriers.ELECTRICITY, null, OL_AssetFlowCategories.evChargingPower_kW, energyModel.p_timeStep_h); +profile.energyAssetName = "charging profile"; +List<Double> quarterlyEnergyDemand_kWh = selectValues(double.class, "SELECT " + profileName + " FROM charging_profiles;"); +profile.a_energyProfile_kWh = quarterlyEnergyDemand_kWh.stream().mapToDouble(d -> max(0,d)).map( d -> d / 4).toArray();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>GISRegion</ReturnType> + <Id>1726584205847</Id> + <Name>f_createGISRegionChargingStation</Name> + <X>1547.621</X> + <Y>620</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>lat</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>lon</Name> + <Type>double</Type> + </Parameter> + <Body>//create shape Coords +int nb_points = 6; +double[] GISCoords = new double[nb_points * 2]; + +for (int i=0; i < nb_points ; i++){ + double size = 0.00004; + GISCoords[i * 2] = size * cos( i * ( 2 * Math.PI ) / nb_points) + lat; + GISCoords[i * 2 + 1] = 1.64 * size * sin( i * ( 2 * Math.PI ) / nb_points) + lon; +} + +//Create the region +GISRegion gisregion = zero_Interface.f_createGISObject( GISCoords ); + +return gisregion; +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205849</Id> + <Name>f_createChargingStations</Name> + <X>431</X> + <Y>831</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Initialize parameters +int laadpaal_nr = 1; +int laadstation_nr = 1; + +//Loop over charging stations +for (Chargingstation_data dataChargingStation : f_getChargingstationsInSubScope(c_chargingstation_data)){ + + GCPublicCharger chargingStation = energyModel.add_PublicChargers(); + + chargingStation.set_p_gridConnectionID( dataChargingStation.gc_id()); + chargingStation.set_p_name( dataChargingStation.gc_name() ); + + //Electric Capacity + if (dataChargingStation.connection_capacity_kw() != null) { + // Assume the connection capacity is both physical and contracted. + chargingStation.v_liveConnectionMetaData.physicalCapacity_kW = dataChargingStation.connection_capacity_kw(); + chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataChargingStation.connection_capacity_kw(); + chargingStation.v_liveConnectionMetaData.physicalCapacityKnown = true; + chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; + } + + //chargingStation.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + + //Set parent node + chargingStation.p_parentNodeElectricID = dataChargingStation.gridnode_id(); + + //Is active at start? + chargingStation.v_isActive = dataChargingStation.initially_active(); + + //chargingStation.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.SIMPLE); + + //Create and connect owner + ConnectionOwner owner = energyModel.add_pop_connectionOwners(); + + chargingStation.set_p_ownerID( dataChargingStation.owner_id()); + owner.set_p_actorID( chargingStation.p_ownerID ); + //owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.CHARGEPOINT_OP ); + owner.b_dataSharingAgreed = true; + + chargingStation.set_p_owner( owner ); + + + //Check if centre or single + chargingStation.p_isChargingCentre = dataChargingStation.is_charging_centre(); + if (chargingStation.p_isChargingCentre) { + + if (chargingStation.p_ownerID == null){ + chargingStation.p_ownerID = "Publiek laadstation " + laadstation_nr; + laadstation_nr++; + } + + chargingStation.set_p_nbOfChargers( dataChargingStation.number_of_chargers() ); + chargingStation.set_p_maxChargingPower_kW( dataChargingStation.power_per_charger_kw() ); + + //If check on connection capacity to prevent more charging than possible + if(chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW > chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW){ + chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW; + } + + //Set vehicle type + chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); + + //Create vehicles that charge at the charging centre + if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ + List<J_ChargingSession> chargerProfile = f_getChargerProfile(); + boolean V1GCapable = randomTrue(avgc_data.p_v1gProbability); + boolean V2GCapable = randomTrue(avgc_data.p_v2gProbability); + new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); + } + else{ + for(int k = 0; k < chargingStation.p_nbOfChargers*avgc_data.p_avgVehiclesPerChargePoint; k++ ){ + f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); + } + } + + + if (dataChargingStation.polygon() != null) { + //Create EA GIS object (building) for the charging centre + GIS_Object area = f_createGISObject( dataChargingStation.gc_name(), dataChargingStation.latitude(), dataChargingStation.longitude(), dataChargingStation.polygon(), OL_GISObjectType.CHARGER ); + + //Set gis object type + area.p_GISObjectType = OL_GISObjectType.CHARGER; + + //Add to collections + area.c_containedGridConnections.add(chargingStation); + chargingStation.c_connectedGISObjects.add(area); + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); + area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } + else{ + traceln("No gisobject created for charge centre: " + chargingStation.p_name); + } + } + else { + + if (chargingStation.p_ownerID == null){ + chargingStation.p_ownerID = "Publieke laadpaal " + laadpaal_nr; + laadpaal_nr++; + } + + //Set charging power + chargingStation.set_p_maxChargingPower_kW( dataChargingStation.power_per_charger_kw() ); + + //Set vehicle type + chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); + + //Create vehicles that charge at the charging station + if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ + List<J_ChargingSession> chargerProfile = f_getChargerProfile(); + boolean V1GCapable = true; //randomTrue(avgc_data.p_v1gProbability); + boolean V2GCapable = true; //randomTrue(avgc_data.p_v2gProbability); + new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); + } + else{ + for(int k = 0; k < avgc_data.p_avgVehiclesPerChargePoint; k++ ){ + f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); + } + } + + + //Create GIS object for the chargingStation + GIS_Object area = energyModel.add_pop_GIS_Objects(); + + //position and coordinates + area.p_latitude = dataChargingStation.latitude(); + area.p_longitude = dataChargingStation.longitude(); + area.setLatLon(area.p_latitude, area.p_longitude); + + //Create gisregion + area.gisRegion = f_createGISRegionChargingStation( area.p_latitude, area.p_longitude ); + + //Set area type + area.p_GISObjectType = OL_GISObjectType.CHARGER; + + chargingStation.c_connectedGISObjects.add(area); + area.c_containedGridConnections.add(chargingStation); + if(chargingStation.v_isActive){ + area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); + area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); + } + else{ + area.set_p_defaultFillColor( zero_Interface.v_newChargingStationColor ); + area.set_p_defaultLineColor( zero_Interface.v_newChargingStationLineColor ); + } + zero_Interface.f_styleAreas(area); + + zero_Interface.c_modelActiveSpecialGISObjects.add(area.p_GISObjectType); + } +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205853</Id> + <Name>f_createInterface</Name> + <X>30</X> + <Y>930</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//OVERRIDE THE zero_Interface parameter here +//zero_Interface = YOUR INTERFACE; +throw new RuntimeException("Didnt replace the generic interface with a project interface!");</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205859</Id> + <Name>f_createGISCables</Name> + <X>1547.621</X> + <Y>660</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Create cables +for (Cable_data dataCable : c_cable_data) { + if(dataCable.line().contains("Multi")){ + continue; + } + zero_Interface.f_createGISLine(f_createGISObjectsTokens(dataCable.line(), dataCable.type()), dataCable.type()); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205861</Id> + <Name>f_createPreprocessedElectricityProfile_PV</Name> + <Description>Principe: +verbruik = levering + productie - teruglevering</Description> + <X>920</X> + <Y>130</Y> + <Label> + <X>9</X> + <Y>-1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityDelivery_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityFeedin_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityProduction_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>pvPower_kW</Name> + <Type>Double</Type> + </Parameter> + <Parameter> + <Name>yearlyHeatPumpElectricityConsumption_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Body>//Create the profile +J_EAProfile profile = new J_EAProfile(parentGC, OL_EnergyCarriers.ELECTRICITY, null, OL_AssetFlowCategories.fixedConsumptionElectric_kW, energyModel.p_timeStep_h); +profile.setStartTime_h(v_simStartHour_h); +profile.energyAssetName = parentGC.p_ownerID + " custom profile"; +double extraConsumption_kWh = 0; + +//Initialize parameters +double nettDelivery_kWh; + +//Preprocessing and adding new array to the J_EAProfile +if (yearlyElectricityProduction_kWh != null && yearlyElectricityFeedin_kWh != null) { // When delivery, feedin and production profiles are available + double[] yearlyElectricityConsumption_kWh = new double[yearlyElectricityDelivery_kWh.length]; + for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { + yearlyElectricityConsumption_kWh[i] = yearlyElectricityDelivery_kWh[i] - yearlyElectricityFeedin_kWh[i] + yearlyElectricityProduction_kWh[i]; + extraConsumption_kWh += -min(yearlyElectricityConsumption_kWh[i],0); + yearlyElectricityConsumption_kWh[i] = max(0,yearlyElectricityConsumption_kWh[i]); + } + profile.a_energyProfile_kWh = yearlyElectricityConsumption_kWh; + nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum() - Arrays.stream(yearlyElectricityFeedin_kWh).sum(); + //traceln("Calculating consumption profile on delivery, feedin and production profiles for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); +} else if (pvPower_kW != null && pvPower_kW > 0) { // When only delivery, feedin profiles are available, in addition to PV power, make explicit consumption and production arrays using delivery profile and PV installed power [kW] + double[] yearlyElectricityConsumption_kWh = new double[yearlyElectricityDelivery_kWh.length]; + if (yearlyElectricityFeedin_kWh != null) { // Terugleveringsdata beschikbaar + //traceln("Estimating electricity consumption based on delivery and feedin profiles with pv power estimate for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); + double addedConsumption_kWh = 0; + for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { + double pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); + double estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); + addedConsumption_kWh += max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); + yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); + } + //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); + } else { // Zonder terugleveringsdata, alleen afname + traceln("Estimating electricity consumption based on delivery profile and pv power for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); + double pvPowerEstimate_kW = 0; + double estimatedConsumption_kWh = 0; + double addedConsumption_kWh = 0; + for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { + pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); + + if (yearlyElectricityDelivery_kWh[i] != 0) { // Only update consumption if delivery is non-zero, otherwise hold previously estimated consumption constant + estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + pvPowerEstimate_kW*0.25; + //addedConsumption_kWh += pvPowerEstimate_kW * 0.25; + } else { + estimatedConsumption_kWh = min(pvPowerEstimate_kW*0.25, estimatedConsumption_kWh); // Take minimum to prevent to much consumption when there is not enough sun in model sun, compared to real sun data!! + + //addedConsumption_kWh += max(0, estimatedConsumption_kWh - pvPowerEstimate_kW*0.25);//* 0.25; + } + yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); + } + //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); + } + profile.a_energyProfile_kWh = yearlyElectricityConsumption_kWh; + nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); +} else { // No PV production + profile.a_energyProfile_kWh = yearlyElectricityDelivery_kWh; + nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); +} + +//Adjust remaining totals +p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(parentGC, - nettDelivery_kWh); + +if (extraConsumption_kWh > 1) { + traceln("Preprocessing of delivery and production data led to negative consumption of: %s kWh", extraConsumption_kWh); + traceln("Consumption profile was capped to 0kW"); +} + +if(yearlyHeatPumpElectricityConsumption_kWh != null){ + for(int i = 0; i < yearlyHeatPumpElectricityConsumption_kWh.length; i++){ + yearlyHeatPumpElectricityConsumption_kWh[i] = max(0,yearlyHeatPumpElectricityConsumption_kWh[i]); + } + double[] preProcessedDefaultConsumptionProfile = new double[profile.a_energyProfile_kWh.length]; + for(int i = 0; i < preProcessedDefaultConsumptionProfile.length; i++){ + preProcessedDefaultConsumptionProfile[i] = max(0,profile.a_energyProfile_kWh[i] - yearlyHeatPumpElectricityConsumption_kWh[i]); + } + profile.a_energyProfile_kWh = preProcessedDefaultConsumptionProfile; + + J_EAProfile profileHeatPumpElectricityConsumption = new J_EAProfile(parentGC, OL_EnergyCarriers.ELECTRICITY, yearlyHeatPumpElectricityConsumption_kWh, OL_AssetFlowCategories.heatPumpElectricityConsumption_kW, energyModel.p_timeStep_h); + profileHeatPumpElectricityConsumption.setStartTime_h(v_simStartHour_h); + profileHeatPumpElectricityConsumption.energyAssetName = parentGC.p_ownerID + " custom heat pump electricity consumption profile"; +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205865</Id> + <Name>f_startUpLoader_default</Name> + <X>60</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>traceln("---------------------------"); +traceln("======= STARTING UP ======="); +traceln("---------------------------"); +traceln(""); + +double startTime = System.currentTimeMillis(); +v_timeOfModelStart_ms = startTime; + +//Get simulation start time +f_getSimulationTimeVariables(); + +//Send avgc data to engine +avgc_data.f_setAVGC_data(); + +// Set default heating strategies +f_setDefaultHeatingStrategies(); + +//Import excel data to the anylogic database +f_importExcelTablesToDB(); + +//Fill the record collections +f_readDatabase(); + +//Initialize model totals +p_remainingTotals.initializeModelTotals(project_data); + +//Weather market data +f_setEngineProfiles(); + +//Create the project interface +f_createInterface(); + +//Initialize the pointers on the interface +f_initializeInterfacePointers(); + +//Project specific styling (Needs to happen before configuring the engine) +zero_Interface.f_projectSpecificStyling(); + +// Populate the model +f_configureEngine_default(); + +//Start up of the User Interface (Needs to happen after configuring the engine) +zero_Interface.f_UIStartup(); + +//Ending of the start up +double endTime = System.currentTimeMillis(); +double duration = endTime - startTime; +v_modelStartUpDuration_s = roundToDecimal(duration / 1000, 3); + +traceln(" "); +traceln("*** Start up finished *** "); +traceln("*** Start up duration: "+ v_modelStartUpDuration_s + " s ***"); +traceln(" "); + + +//Simulate full year simulation for initial KPIs +if( settings.runHeadlessAtStartup() ){ + energyModel.f_runRapidSimulation(); // Do a full year run to have KPIs right away! + + if(project_data.project_type() == BUSINESSPARK){ + for(GCUtility GC : energyModel.UtilityConnections){ + if(GC.p_owner.p_detailedCompany){ // For now only detailed companies + GC.v_originalRapidRunData = GC.v_rapidRunData; + } + } + } + zero_Interface.gr_simulateYear.setVisible(false); + zero_Interface.gr_loadIconYearSimulation.setVisible(false); + zero_Interface.b_resultsUpToDate = true; + zero_Interface.uI_Results.f_enableNonLivePlotRadioButtons(true); +} +else { + zero_Interface.f_resetSettings(); +} + +zero_Interface.uI_Results.f_updateResultsUI(energyModel); + +//Clear all data record collections after loader is done +f_clearDataRecords();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205867</Id> + <Name>f_readDatabase</Name> + <X>-390</X> + <Y>190</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Override this function and: +//Fill the data parameters and collections using your own functions here</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205869</Id> + <Name>f_clearDataRecords</Name> + <X>-390</X> + <Y>700</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Function used to clear all data record collections after the loader is done +//-> no longer needed, by clearing it is send to the garbage collector -> saves memory + +/* +genericProfiles_data = null; +c_GridNode_data.clear(); +c_SurveyCompanyBuilding_data.clear(); +c_GenericCompanyBuilding_data.clear(); +c_HouseBuilding_data.clear(); +c_remainingBuilding_data.clear(); +c_Solarfarm_data.clear(); +c_Windfarm_data.clear(); +c_Electrolyser_data.clear(); +c_Battery_data.clear(); +c_Chargingstation_data.clear(); +c_Neighbourhood_data.clear(); +c_Parcel_data.clear(); +c_Cable_data_LV.clear(); +c_Cable_data_MV.clear(); +*/ +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205871</Id> + <Name>f_createSurveyCompanies_Excel</Name> + <X>430</X> + <Y>498</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>traceln("Survey companies excel should be overridden with your own code");</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205873</Id> + <Name>f_createCompanies</Name> + <X>420</X> + <Y>110</Y> + <Label> + <X>11</X> + <Y>1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Create survey companies based on survey inload structure +switch(project_data.survey_type()){ + + case ZORM: + f_createSurveyCompanies_Zorm(); + break; + + case EXCEL: + f_createSurveyCompanies_Excel(); + break; + + case NONE: + //Do nothing. + break; +} + +//Create generic companies +f_createGenericCompanies();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205881</Id> + <Name>f_createAdditionalGISObjects</Name> + <X>90</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Parking spaces +f_createParkingSpots(); + +//Parcels +f_createGISParcels(); + +//Remaining buildings (no GC or EA) +f_createRemainingBuildings(); + +//Cables +f_createGISCables();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1727792666396</Id> + <Name>f_overwriteSpecificDatabaseValues</Name> + <X>-390</X> + <Y>140</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//SHOULD BE OVERRIDDEN + +//Function used to overwrite specific database values after the databases have been loaded in +//Usecases for example are adjusting floor surface area to 0, to cause no consumption, etc. +// --> without the loss of data in your database sources itself + +//Example code +/* +//Adjust building floor surface area to 0 to cause no consumption (empty buildings) + +List<String> buildingIDS = new ArrayList<String>(); + +// Define the building ids that need to have no consumption +String buildingID_XXXX = "XXXX"; + +buildingIDS.add(buildingID_XXXX); + + +for(String buildingID : buildingIDS){ + update(buildings) + .where(buildings.building_id.eq(buildingID)) + .set(buildings.cumulative_floor_surface_m2, 0.0) + .execute(); +} +*/</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double[]</ReturnType> + <Id>1728035809860</Id> + <Name>f_convertFloatArrayToDoubleArray</Name> + <X>1550</X> + <Y>880</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>floatArray</Name> + <Type>float[]</Type> + </Parameter> + <Body>if (floatArray == null) { + return null; +} +double[] doubleArray = new double[floatArray.length]; +for (int i = 0; i < floatArray.length; i++) { + doubleArray[i] = floatArray[i]; +} +return doubleArray;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1728039545686</Id> + <Name>f_getPreprocessedElectricityConsumptionTotal</Name> + <X>920</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>annualElectricityDelivery_kWh</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>annualElectricityFeedin_kWh</Name> + <Type>Integer</Type> + </Parameter> + <Parameter> + <Name>annualElectricityProduction_kWh</Name> + <Type>Integer</Type> + </Parameter> + <Parameter> + <Name>pvPower_kW</Name> + <Type>Double</Type> + </Parameter> + <Body>double annualElectricityConsumption_kWh = 0; +if(annualElectricityFeedin_kWh != null){ + if(annualElectricityProduction_kWh != null){ + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh - annualElectricityFeedin_kWh + annualElectricityProduction_kWh; + } + else if(pvPower_kW != null && pvPower_kW > 0){ + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh - annualElectricityFeedin_kWh + pvPower_kW*avgc_data.p_avgFullLoadHoursPV_hr; + } + else{//Geen opwek + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; + } +} +else if(pvPower_kW != null && pvPower_kW > 0){ + //WAT HIER?? Voor nu consumption = delivery + //Maar: moet preprocessing van standaard profiel worden, waar gelijktijdigheid gecheckt wordt! + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; +} +else{ + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; +} +return annualElectricityConsumption_kWh; +</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1732112209863</Id> + <Name>f_createCustomPVAsset</Name> + <X>900</X> + <Y>220</Y> + <Label> + <X>9</X> + <Y>-1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityProduction_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>pvPower_kW</Name> + <Type>Double</Type> + </Parameter> + <Body>if (yearlyElectricityProduction_kWh.length != 35040) { + traceln("Skipping creation of PV asset: need 35040 data points, got %d", yearlyElectricityProduction_kWh.length); + return; +} + +// Generate custom PV production asset using production data! +double[] a_arguments = IntStream.range(0, 35040).mapToDouble(i -> v_simStartHour_h + i*0.25).toArray(); // time axis + +// From kWh/quarter to normalized power +double totalProduction_kWh = Arrays.stream(yearlyElectricityProduction_kWh).sum(); +double fullLoadHours_h = totalProduction_kWh / pvPower_kW; +double[] a_normalizedPower_fr = Arrays.stream(yearlyElectricityProduction_kWh).map(i -> 4 * i / totalProduction_kWh * fullLoadHours_h ).toArray(); + +//traceln("Full load hours of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).sum()/4); +//traceln("Max of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).max()); + +TableFunction tf_customPVproduction_fr = new TableFunction(a_arguments, a_normalizedPower_fr, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); +J_ProfilePointer profilePointer = new J_ProfilePointer((parentGC.p_ownerID + "_PVproduction") , tf_customPVproduction_fr); +energyModel.f_addProfile(profilePointer); +J_EAProduction production_asset = new J_EAProduction(parentGC, OL_EnergyAssetType.PHOTOVOLTAIC, (parentGC.p_ownerID + "_rooftopPV"), OL_EnergyCarriers.ELECTRICITY, (double)pvPower_kW, energyModel.p_timeStep_h, profilePointer); + +traceln("Custom PV asset added to GC: " + parentGC.p_ownerID); +//traceln("Custom PV asset added to %s with installed power %s kW and %s full load hours!", parentGC.p_ownerID, pvPower_kW, fullLoadHours_h); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1732112244908</Id> + <Name>f_iEASurveyCompanies_Zorm</Name> + <X>448</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>gridConnection</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>//Initialize boolean that sets the creation of currently existing electric (demand) EA +boolean createElectricEA = true; + +//Create current scenario parameter list +J_scenario_Current current_scenario_list = new J_scenario_Current(); +zero_Interface.c_scenarioMap_Current.put(companyGC.p_uid, current_scenario_list); + +//Create future scenario parameter list +J_scenario_Future future_scenario_list = new J_scenario_Future(); +zero_Interface.c_scenarioMap_Future.put(companyGC.p_uid, future_scenario_list); + + + +//Get PV power (used for preprocessing and estimating grid capacity if unknown) +Double pvPower_kW = (gridConnection.getSupply().getPvInstalledKwp() != null) ? new Double(gridConnection.getSupply().getPvInstalledKwp()) : null; + + +////Electricity (connection and consumption) +//Initialize contract capacity with 0 for when companies fill in survey already but currently have no connection yet +companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = 0.0; +companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = 0.0; +companyGC.v_liveConnectionMetaData.physicalCapacity_kW = 0.0; + +f_createDieselTractors(companyGC, gridConnection.getTransport().getAgriculture()); + +//Check for electricity connection and data +if (gridConnection.getElectricity().getHasConnection()){ + + //Connection capacities + if(gridConnection.getElectricity().getContractedConnectionCapacityKw() != null && gridConnection.getElectricity().getContractedConnectionCapacityKw() >= 0){ + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = gridConnection.getElectricity().getContractedConnectionCapacityKw(); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; + } + else if((gridConnection.getElectricity().getContractedConnectionCapacityKw() == null || + gridConnection.getElectricity().getContractedConnectionCapacityKw() < 0) && + (gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() == null || + gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() <= 0)) { + traceln("SURVEYOWNER HAS NOT FILLED IN DELIVERY OR PHYSICAL CONNECTION CAPACITY!!!"); + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + } + else{ + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw()); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + } + + + //Check if contract capacity feedin has been filled in: if not, make the same as pv capacity + if(gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() >= 0){ + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw()); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else{ + if(pvPower_kW != null){ + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = pvPower_kW; + } + else{ + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = 0.0; + } + companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + //Check if physical capacity has been filled in: if not, make the same as maximum of contract delivery and feedin + if(gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() > 0){ + companyGC.v_liveConnectionMetaData.physicalCapacity_kW = (double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw(); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + else{ + companyGC.v_liveConnectionMetaData.physicalCapacity_kW = max(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW, companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.physicalCapacityKnown = false; + } + + + //Add to current scenario list + current_scenario_list.setCurrentContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); + current_scenario_list.setCurrentContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); + current_scenario_list.setCurrentPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); + + + //Electricity consumption profile + String profileName = "default_office_electricity_demand_fr"; + + //Check if quarter hourly values are available in vallum + boolean createdTimeSeriesAssets = f_createElectricityTimeSeriesAssets(companyGC, gridConnection); + + if(createdTimeSeriesAssets){ + if(!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile or total is known. + createElectricEA = false; + } + } + else{ //(!createdTimeSeriesAssets) { // + double yearlyElectricityConsumption_kWh = 0; + try { // Check if quarterly hour values are available in excel database + if(selectFirstValue(Double.class, "SELECT " + "ccid" + gridConnection.getSequence().toString() + "_demand FROM comp_elec_consumption LIMIT 1;") != null){ + companyGC.v_hasQuarterHourlyValues = true; + profileName = "ccid" + companyGC.p_gridConnectionID; + + //Check if solar was already producing in simualtion year (Check for now: if year production = 0 , no solar yet, if year production = null, no data: so assume there was solar already) + if(gridConnection.getElectricity().getAnnualElectricityProduction_kWh() != null && gridConnection.getElectricity().getAnnualElectricityProduction_kWh () == 0){ + pvPower_kW = null; + } + + if (!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile is present. + createElectricEA = false; + } + } + } + catch(Exception e) { + //Data not available, do nothing and leave v_hasQuarterHourlyValues on false. + } + + if(companyGC.v_hasQuarterHourlyValues == false){//Calculate yearly consumption based on yearly delivery (and yearly feedin, production or solarpanels if available) + //Get totals + double yearlyElectricityDelivery_kWh = (gridConnection.getElectricity().getAnnualElectricityDemandKwh() != null) ? gridConnection.getElectricity().getAnnualElectricityDemandKwh() : 0; // Yearly electricity consumption (0 if value is null) + Integer yearlyElectricityFeedin_kWh = gridConnection.getElectricity().getAnnualElectricityFeedIn_kWh(); + Integer yearlyElectricityProduction_kWh = gridConnection.getElectricity().getAnnualElectricityProduction_kWh(); + + //Calculate consumption + yearlyElectricityConsumption_kWh = f_getPreprocessedElectricityConsumptionTotal(companyGC, yearlyElectricityDelivery_kWh, yearlyElectricityFeedin_kWh, yearlyElectricityProduction_kWh, pvPower_kW); + + //If no electricity consumption, determine the consumption based on average values and floor surface and connection capacity + if(yearlyElectricityConsumption_kWh == 0){ + yearlyElectricityConsumption_kWh = avgc_data.p_avgCompanyElectricityConsumption_kWhpm2*companyGC.p_floorSurfaceArea_m2; + + //Check if it is within the contracted limits (peak should at least be 20% lower than contracted capacity + if(yearlyElectricityConsumption_kWh*defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr() > 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW){ + yearlyElectricityConsumption_kWh = 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW/defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr(); + } + + } + else if(!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile or total is known. + createElectricEA = false; + } + + //Update total Yearly electricity consumption (only when no timestep data available, cause when thats avaiable, it happens in the preprocessing function) + if (yearlyElectricityDelivery_kWh != 0){ + p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(companyGC, - yearlyElectricityDelivery_kWh); + } + else{ + p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(companyGC, - yearlyElectricityConsumption_kWh); + } + } + + //Add base electricity demand profile (with profile if available, with generic pattern if only yearly data is available) + f_addElectricityDemandProfile(companyGC, yearlyElectricityConsumption_kWh, pvPower_kW, companyGC.v_hasQuarterHourlyValues, profileName); + } +} + +//If everything is 0 set the GC as non active +if(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.physicalCapacity_kW == 0){ + companyGC.v_isActive = false; +} + +//Grid expansion request +if (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null && gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator()){ + future_scenario_list.setRequestedContractDeliveryCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); + future_scenario_list.setRequestedContractFeedinCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); + future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(max(companyGC.v_liveConnectionMetaData.physicalCapacity_kW, max(future_scenario_list.getRequestedContractDeliveryCapacity_kW(), future_scenario_list.getRequestedContractFeedinCapacity_kW()))); +} +else{ + future_scenario_list.setRequestedContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); + future_scenario_list.setRequestedContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); + future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); +} + + +////Supply (pv, wind, etc.) +if (gridConnection.getSupply().getHasSupply() != null && gridConnection.getSupply().getHasSupply()){ + //gridConnection.getElectricity().getAnnualElectricityProductionKwh() // Staat niet meer in het formulier! + + double[] yearlyElectricityProduction_kWh_array = null; + + var quarterHourlyProduction_kWh = gridConnection.getElectricity().getQuarterHourlyProduction_kWh(); + if (quarterHourlyProduction_kWh != null && quarterHourlyProduction_kWh.hasNumberOfValuesForOneYear()) { + yearlyElectricityProduction_kWh_array = f_timeSeriesToQuarterHourlyDoubleArray(quarterHourlyProduction_kWh); + } + + if(yearlyElectricityProduction_kWh_array == null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ + try { + if(selectFirstValue(Double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption LIMIT 1;") != null){ + List<Double> yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption;"); + yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; + } + } + catch(Exception e) { + } + } + if (yearlyElectricityProduction_kWh_array != null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0 && !gridConnection.getHeat().getHeatingTypes().contains(com.zenmo.zummon.companysurvey.HeatingType.COMBINED_HEAT_AND_POWER)){ + f_createCustomPVAsset(companyGC, yearlyElectricityProduction_kWh_array, (double)gridConnection.getSupply().getPvInstalledKwp()); // Create custom PV asset when production data is available! + current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); + } else if (gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ + //gridConnection.getSupply().getPvOrientation(); // Wat doen we hier mee????? Nog niets! + f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", gridConnection.getSupply().getPvInstalledKwp()); + + //add to scenario: current + current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); + //current_scenario_list.currentPV_orient = gridConnection.getSupply().getPvOrientation(); + } + //Wind + if (gridConnection.getSupply().getWindInstalledKw() != null && gridConnection.getSupply().getWindInstalledKw() > 0){ + f_addEnergyProduction(companyGC, OL_EnergyAssetType.WINDMILL, "Wind mill", gridConnection.getSupply().getWindInstalledKw()); + + //add to scenario: current + current_scenario_list.setCurrentWind_kW(gridConnection.getSupply().getWindInstalledKw()); + } +} + +//Planned supply (PV) +if (gridConnection.getSupply().getPvPlanned() != null && gridConnection.getSupply().getPvPlanned()){ + future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW() + (gridConnection.getSupply().getPvPlannedKwp() != null ? gridConnection.getSupply().getPvPlannedKwp() : 0)); + future_scenario_list.setPlannedPV_year(gridConnection.getSupply().getPvPlannedYear()); + //gridConnection.getSupply().getPvPlannedOrientation(); +} +else{ + future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW()); +} + +//Planned supply (Wind) +if (gridConnection.getSupply().getWindPlannedKw() != null && gridConnection.getSupply().getWindPlannedKw() > 0){ + future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW() + (gridConnection.getSupply().getWindPlannedKw() != null ? gridConnection.getSupply().getWindPlannedKw() : 0)); + // plannedWind_year // ??? +} +else{ + future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW()); +} + +////Heating and gas +OL_GridConnectionHeatingType heatingType = f_heatingSurveyCompany(companyGC, gridConnection); + +//add heating type to scenario: current and future +current_scenario_list.setCurrentHeatingType(heatingType); +future_scenario_list.setPlannedHeatingType(heatingType); + + +// Electric Storage +Float battery_power_kW = 0f; +Float battery_capacity_kWh = 0f; + +if (gridConnection.getStorage().getHasBattery() != null && gridConnection.getStorage().getHasBattery() && createElectricEA){ // Check if battery present and if electric demand EA should be created + if (gridConnection.getStorage().getBatteryPowerKw() != null){ + battery_power_kW = gridConnection.getStorage().getBatteryPowerKw(); + } + if (gridConnection.getStorage().getBatteryCapacityKwh() != null){ + battery_capacity_kWh = gridConnection.getStorage().getBatteryCapacityKwh(); + } + + if (battery_power_kW > 0 && battery_capacity_kWh > 0) { + f_addStorage(companyGC, battery_power_kW, battery_capacity_kWh, OL_EnergyAssetType.STORAGE_ELECTRIC); + companyGC.f_setBatteryManagement(new J_BatteryManagementSelfConsumption(companyGC)); + } +} + +//add to scenario: current +current_scenario_list.setCurrentBatteryCapacity_kWh(battery_capacity_kWh); +current_scenario_list.setCurrentBatteryPower_kW(battery_power_kW); + + + +if (gridConnection.getStorage().getHasThermalStorage() != null && gridConnection.getStorage().getHasThermalStorage()){ // Check for thermal storage + //gridConnection.getStorage().getThermalStorageKw() + //J_EAStorageHeat(Agent parentAgent, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { + //J_EAStorageHeat(companyGC, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { + //Denk ook aan aansturing?!! +} + +if (gridConnection.getStorage().getHasPlannedBattery() != null && gridConnection.getStorage().getHasPlannedBattery()){ // Check for planned battery + future_scenario_list.setPlannedBatteryCapacity_kWh((gridConnection.getStorage().getPlannedBatteryCapacityKwh() != null ? gridConnection.getStorage().getPlannedBatteryCapacityKwh() : 0) + current_scenario_list.getCurrentBatteryCapacity_kWh()); + future_scenario_list.setPlannedBatteryPower_kW((gridConnection.getStorage().getPlannedBatteryPowerKw() != null ? gridConnection.getStorage().getPlannedBatteryPowerKw() : 0) + current_scenario_list.getCurrentBatteryPower_kW()); +} +else{ +future_scenario_list.setPlannedBatteryCapacity_kWh(current_scenario_list.getCurrentBatteryCapacity_kWh()); +future_scenario_list.setPlannedBatteryPower_kW(current_scenario_list.getCurrentBatteryPower_kW()); +} + + + +////Transport + +//Cars of comuters and visitors +int nbDailyCarVisitors_notNull = (gridConnection.getTransport().getNumDailyCarVisitors() != null) ? gridConnection.getTransport().getNumDailyCarVisitors() : 0; +int nbDailyCarCommuters_notNull = (gridConnection.getTransport().getNumDailyCarAndVanCommuters() != null) ? gridConnection.getTransport().getNumDailyCarAndVanCommuters() : 0; + +if (nbDailyCarCommuters_notNull + nbDailyCarVisitors_notNull > 0){ + + int nbEVCarsComute = (gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() != null) ? gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() : 0; // Wat doen we hier mee???? + int nbDieselCarsComute = gridConnection.getTransport().getNumDailyCarAndVanCommuters() + nbDailyCarVisitors_notNull - nbEVCarsComute; + + boolean isDefaultVehicle = true; + double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; + + for (int i = 0; i< nbDieselCarsComute; i++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, 0); + } + + + //check if charge power is filled in + if (nbEVCarsComute > 0 && gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ + if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() <= 0) { + traceln("Survey data contains no/negative Car maxChargingPower_kW: %s", gridConnection.getTransport().getCars().getPowerPerChargePointKw()); + } + else{ + maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); + isDefaultVehicle = false; + } + } + + if (createElectricEA){ // Check if electric demand EA should be created + for (int j = 0; j< nbEVCarsComute; j++){ + f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, 0, maxChargingPower_kW); + } + } + + //add to scenario: current + current_scenario_list.setCurrentEVCars(nbEVCarsComute); + current_scenario_list.setCurrentDieselCars(nbDieselCarsComute); + + //Initialize future cars + future_scenario_list.setPlannedEVCars(current_scenario_list.getCurrentEVCars()); + +} + + +//Business vehicles +if (gridConnection.getTransport().getHasVehicles() != null && gridConnection.getTransport().getHasVehicles()){ + + //Cars + if (gridConnection.getTransport().getCars().getNumCars() != null && gridConnection.getTransport().getCars().getNumCars() != 0){ + + + //Update remaning amount of cars (company owned only) + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - gridConnection.getTransport().getCars().getNumCars()); + + //Get amount of EV and diesel cars + Integer nbEVCars = gridConnection.getTransport().getCars().getNumElectricCars(); + if (nbEVCars == null) { + nbEVCars = 0; + } + int nbDieselCars = gridConnection.getTransport().getCars().getNumCars() - nbEVCars; + + //Initialize parameters + boolean isDefaultVehicle = true; + double annualTravelDistance_km = 0; + double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; + + //check if annual travel distance is filled in + if (gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm() != null){ + annualTravelDistance_km = gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm(); + isDefaultVehicle = false; + } + + //create diesel vehicle + for (int i = 0; i< nbDieselCars; i++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, annualTravelDistance_km); + } + + //Get number of chargepoints if filled in + //int numberOfChargepointsBusinessCars = gridConnection.getTransport().getCars().getNumChargePoints() != null ? gridConnection.getTransport().getCars().getNumChargePoints() : 0; + + //check if charge power is filled in + if (nbEVCars > 0 && gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ + if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() <= 0) { + traceln("Survey data contains no/negative Car maxChargingPower_kW: %s", gridConnection.getTransport().getCars().getPowerPerChargePointKw()); + } + else{ + maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); + isDefaultVehicle = false; + } + } + + //create EV + if (createElectricEA){ // Check if electric demand EA should be created + for (int j = 0; j< nbEVCars; j++){ + f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); + } + } + + //add to scenario: current + current_scenario_list.setCurrentEVCars(((current_scenario_list.getCurrentEVCars() != null) ? current_scenario_list.getCurrentEVCars() : 0) + nbEVCars); + current_scenario_list.setCurrentDieselCars(((current_scenario_list.getCurrentDieselCars() != null) ? current_scenario_list.getCurrentDieselCars() : 0) + nbDieselCars); + current_scenario_list.setCurrentEVCarChargePower_kW(maxChargingPower_kW); + + //Update Planned cars + future_scenario_list.setPlannedEVCars((gridConnection.getTransport().getCars().getNumPlannedElectricCars() != null ? gridConnection.getTransport().getCars().getNumPlannedElectricCars() : 0) + current_scenario_list.getCurrentEVCars()); + future_scenario_list.setPlannedHydrogenCars((gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() != null) ? gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() : 0); + + } + + + //Vans + if (gridConnection.getTransport().getVans().getNumVans() != null && gridConnection.getTransport().getVans().getNumVans() != 0){ + + //Update remaning amount of vans + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - gridConnection.getTransport().getVans().getNumVans()); + + Integer nbEVVans = gridConnection.getTransport().getVans().getNumElectricVans(); + if (nbEVVans == null) { + nbEVVans = 0; + } + int nbDieselVans = gridConnection.getTransport().getVans().getNumVans() - nbEVVans; + + boolean isDefaultVehicle = true; + double annualTravelDistance_km = 0; + double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerVan_kW; + + //check if annual travel distance is filled in + if (gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm() != null){ + annualTravelDistance_km = gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm(); + isDefaultVehicle = false; + } + + //create diesel vehicles + for (int i = 0; i< nbDieselVans; i++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, isDefaultVehicle, annualTravelDistance_km); + } + + //Get number of chargepoints if filled in + //int numberOfChargepointsVans = gridConnection.getTransport().getVans().getNumChargePoints() != null ? gridConnection.getTransport().getVans().getNumChargePoints() : 0; + + + //check if charge power is filled in + if (nbEVVans > 0 && gridConnection.getTransport().getVans().getPowerPerChargePointKw() != null){ + if (gridConnection.getTransport().getVans().getPowerPerChargePointKw() < 0) { + traceln("Survey data contains no/negative Van maxChargingPower_kW: %s", gridConnection.getTransport().getVans().getPowerPerChargePointKw()); + } + else{ + maxChargingPower_kW = gridConnection.getTransport().getVans().getPowerPerChargePointKw(); + isDefaultVehicle = false; + } + } + + //create electric vehicles + if (createElectricEA){ // Check if electric demand EA should be created + for (int j = 0; j< nbEVVans; j++){ + f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VAN, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); + } + } + + //add to scenario: current + current_scenario_list.setCurrentEVVans(nbEVVans); + current_scenario_list.setCurrentDieselVans(nbDieselVans); + current_scenario_list.setCurrentEVVanChargePower_kW(maxChargingPower_kW); + + //Planned + future_scenario_list.setPlannedEVVans((gridConnection.getTransport().getVans().getNumPlannedElectricVans() != null ? gridConnection.getTransport().getVans().getNumPlannedElectricVans() : 0) + current_scenario_list.getCurrentEVVans()); + future_scenario_list.setPlannedHydrogenVans((gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() != null) ? gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() : 0); + } + + + + //Trucks + if (gridConnection.getTransport().getTrucks().getNumTrucks() != null && gridConnection.getTransport().getTrucks().getNumTrucks() != 0){ + + //Update remaning amount of trucks + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK, - gridConnection.getTransport().getTrucks().getNumTrucks()); + + Integer nbEVTrucks = gridConnection.getTransport().getTrucks().getNumElectricTrucks(); + if (nbEVTrucks == null) { + nbEVTrucks = 0; + } + int nbDieselTrucks = gridConnection.getTransport().getTrucks().getNumTrucks() - nbEVTrucks; + + boolean isDefaultVehicle = true; + double annualTravelDistance_km = 0; + double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerTruck_kW; + + //check if annual travel distance is filled in + if (gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm() != null){ + annualTravelDistance_km = gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm(); + isDefaultVehicle = false; + } + + //create diesel vehicles + for (int i = 0; i< nbDieselTrucks; i++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, isDefaultVehicle, annualTravelDistance_km); + } + + //Get number of chargepoints if filled in + //int numberOfChargepointsVans = gridConnection.getTransport().getTrucks().getNumChargePoints() != null ? gridConnection.getTransport().getTrucks().getNumChargePoints() : 0; + + + //check if charge power is filled in + if (nbEVTrucks > 0 && gridConnection.getTransport().getTrucks().getPowerPerChargePointKw() != null){ + if (gridConnection.getTransport().getTrucks().getPowerPerChargePointKw() <= 0) { + traceln("Survey data contains no/negative Truck maxChargingPower_kW: %s", gridConnection.getTransport().getTrucks().getPowerPerChargePointKw()); + } + else{ + maxChargingPower_kW = gridConnection.getTransport().getTrucks().getPowerPerChargePointKw(); + isDefaultVehicle = false; + } + } + + //create electric vehicles + if (createElectricEA){ // Check if electric demand EA should be created + for (int j = 0; j< nbEVTrucks; j++){ + f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_TRUCK, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); + } + } + + //add to scenario: current + current_scenario_list.setCurrentEVTrucks(nbEVTrucks); + current_scenario_list.setCurrentDieselTrucks(nbDieselTrucks); + current_scenario_list.setCurrentEVTruckChargePower_kW(maxChargingPower_kW); + + //Planned + future_scenario_list.setPlannedEVTrucks((gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() != null ? gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() : 0) + current_scenario_list.getCurrentEVTrucks()); + future_scenario_list.setPlannedHydrogenTrucks((gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() != null) ? gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() : 0); + } + + + //Other + if (Objects.nonNull(gridConnection.getTransport().getOtherVehicles().getHasOtherVehicles())){ + + // Wat doen we hier mee??? + + } +} +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>Building_data</ReturnType> + <Id>1737741603780</Id> + <Name>f_createBuildingData_Vallum</Name> + <X>470</X> + <Y>190</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>PandID</Name> + <Type>String</Type> + </Parameter> + <Body>com.zenmo.bag.Pand pand_data_vallum = map_buildingData_Vallum.get(PandID); + +Building_data building_data_record = null; +if(pand_data_vallum != null){ // Only happens if building has been selected in survey, that is no longer available in BAG (Destroyed for example). + //Calculate surface area + GISRegion gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(pand_data_vallum.getGeometry().toString(), OL_GISObjectType.BUILDING)); + double surfaceArea_m2 = gisRegion.area(); + gisRegion.remove(); + + + //Create a building_data record + building_data_record = Building_data.builder(). + + address_id("verblijfsobject." + PandID). + building_id(PandID). + streetname(companyGC.p_address.getStreetName()). + house_number(companyGC.p_address.getHouseNumber()). + house_letter(companyGC.p_address.getHouseLetter()). + house_addition(companyGC.p_address.getHouseAddition()). + postalcode(companyGC.p_address.getPostalcode()). + city(companyGC.p_address.getPostalcode()). + build_year(pand_data_vallum.getBouwjaar()). + status(pand_data_vallum.getStatus()). + //purpose(row.get( buildings.purpose )). + address_floor_surface_m2(surfaceArea_m2). + polygon_area_m2(surfaceArea_m2). + annotation(companyGC.p_owner.p_actorID). + //extra_info(row.get( buildings.extra_info )). + //gridnode_id(row.get( buildings.gridnode_id )). + //latitude(row.get( buildings.latitude )). + //longitude(row.get( buildings.longitude )). + polygon(pand_data_vallum.getGeometry().toString()). + build(); +} +else{ + traceln("WARNING: SELECTED BUILDING IN SURVEY IS NO LONGER IN THE BAG DATABASE -> BUILDING CAN/HAS NOT BE(EN) CREATED!"); +} + +return building_data_record;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1737712184349</Id> + <Name>f_createDieselTractors</Name> + <X>900</X> + <Y>800</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGridConnection</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>agricultureSurveyData</Name> + <Type>com.zenmo.zummon.companysurvey.Agriculture</Type> + </Parameter> + <Body>final double annualDiesel_L = Optional.ofNullable(agricultureSurveyData.getAnnualDieselUsage_L()).orElse(0.0); +final int numTractors = Optional.ofNullable(agricultureSurveyData.getNumTractors()).orElse(annualDiesel_L > 0.0 ? 1 : 0); + +if (numTractors > 0 && annualDiesel_L <= 0.0) { + // TODO: this should be in Tractor constructor + throw new RuntimeException("Tractor diesel usage missing for " + companyGridConnection.p_gridConnectionID); +} + +CustomProfile_data tractorProfile = findFirst(c_customProfiles_data, profile -> profile.customProfileID().equals("TractorProfile")); ///???? + +for (int i = 0; i < numTractors; i++) { + if(tractorProfile == null){ + throw new RuntimeException("Trying to make a tractor, without having loaded in a tractor profile for GC: " + companyGridConnection.p_gridConnectionID); + } + new J_EADieselTractor(companyGridConnection, annualDiesel_L / numTractors, tractorProfile.getValuesArray(), energyModel.p_timeStep_h); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1738248965949</Id> + <Name>f_createElectricityTimeSeriesAssets</Name> + <X>460</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gridConnection</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>gridConnectionSurvey</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>var electricitySurvey = gridConnectionSurvey.getElectricity(); + +double[] deliveryTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyDelivery_kWh()); +if (deliveryTimeSeries_kWh == null) { + // delivery is the minimum we require to do anything with timeseries data + return false; +} + +double[] feedInTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyFeedIn_kWh()); +double[] productionTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyProduction_kWh()); + +Double pvPower_kW = Optional.ofNullable(gridConnectionSurvey.getSupply().getPvInstalledKwp()) + .map(it -> (double) it) + .orElse(null); + +double[] heatPumpElectricityTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(gridConnectionSurvey.getHeat().getHeatPumpElectricityConsumptionTimeSeries_kWh()); + +//Preprocess the arrays and create the consumption pattern +f_createPreprocessedElectricityProfile_PV(gridConnection, deliveryTimeSeries_kWh, feedInTimeSeries_kWh, productionTimeSeries_kWh, pvPower_kW, heatPumpElectricityTimeSeries_kWh); + +gridConnection.v_hasQuarterHourlyValues = true; + +return true;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double[]</ReturnType> + <Id>1738572338816</Id> + <Name>f_timeSeriesToQuarterHourlyDoubleArray</Name> + <X>1550</X> + <Y>910</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>timeSeries</Name> + <Type>com.zenmo.zummon.companysurvey.TimeSeries</Type> + </Parameter> + <Body>int targetYear = v_simStartYear; +if (timeSeries == null) { + return null; +} + +if (!timeSeries.hasNumberOfValuesForOneYear()) { + traceln("Time series has too few values for one year"); + return null; +} + +return f_convertFloatArrayToDoubleArray(timeSeries.convertToQuarterHourly().getFullYearOrFudgeIt(targetYear));</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1742915722586</Id> + <Name>f_connectGCToExistingBuilding</Name> + <X>1550</X> + <Y>790</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>connectingGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>existingBuilding</Name> + <Type>GIS_Building</Type> + </Parameter> + <Parameter> + <Name>connectingBuildingData</Name> + <Type>Building_data</Type> + </Parameter> + <Body>//Get the total roof surface of the building +double buildingRoofSurface = existingBuilding.p_roofSurfaceArea_m2; + +//Building roof surface removal from all earlier connected GC (so excluding the new one!) +int currentAmountOfConnectedGCWithBuilding = existingBuilding.c_containedGridConnections.size(); +for(GridConnection earlierConnectedGC : existingBuilding.c_containedGridConnections){ + earlierConnectedGC.p_roofSurfaceArea_m2 -= buildingRoofSurface/currentAmountOfConnectedGCWithBuilding; + + if(earlierConnectedGC.p_roofSurfaceArea_m2 < 0){ + new RuntimeException("Negative roofsurface for GC: " + earlierConnectedGC.p_gridConnectionID + " after removal of earlier distributed building roofsurface. This should never be possible!"); + } +} + +//Connect new GC to the building now +existingBuilding.c_containedGridConnections.add(connectingGC); +connectingGC.c_connectedGISObjects.add(existingBuilding); + + +//Adding the newly distributed roof surfaces to the gc (now including the new one!) +int newAmountOfConnectedGCWithBuilding = currentAmountOfConnectedGCWithBuilding + 1; +for(GridConnection connectedGC : existingBuilding.c_containedGridConnections){ + connectedGC.p_roofSurfaceArea_m2 += buildingRoofSurface/newAmountOfConnectedGCWithBuilding; +} + +//Also add the new connecting building data address floor surface +existingBuilding.p_floorSurfaceArea_m2 += connectingBuildingData.address_floor_surface_m2();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1745336570663</Id> + <Name>f_addHeatAsset</Name> + <X>900</X> + <Y>500</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatAssetType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Parameter> + <Name>maxHeatOutputPower_kW</Name> + <Type>double</Type> + </Parameter> + <Body>//Initialize parameters +double heatOutputCapacityGasBurner_kW; +double inputCapacityElectric_kW; +double efficiency; +double baseTemperature_degC; +double outputTemperature_degC; +OL_AmbientTempType ambientTempType; +double sourceAssetHeatPower_kW; +double belowZeroHeatpumpEtaReductionFactor; +if(parentGC.p_BuildingThermalAsset == null){ + maxHeatOutputPower_kW = maxHeatOutputPower_kW*2; // Make the asset capacity twice as high, to make sure it can handle the load in other scenarios with more heat consumption. +} + +switch (heatAssetType){ // There is always only one heatingType, If there are many assets the type is CUSTOM + + case GAS_BURNER: + heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); + J_EAConversionGasBurner gasBurner = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW , avgc_data.p_avgEfficiencyGasBurner_fr, energyModel.p_timeStep_h, 90); + break; + + case HYBRID_HEATPUMP: + + //Add primary heating asset (heatpump) (if its not part of the basic profile already + inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW / 3); //-- /3, kan nog kleiner want is hybride zodat gasbrander ook bij springt, dus kleiner MOETEN aanname voor hoe klein onderzoeken + efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; + baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType); + + zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); + + //Add secondary heating asset (gasburner) + heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); + efficiency = avgc_data.p_avgEfficiencyGasBurner_fr; + outputTemperature_degC = avgc_data.p_avgOutputTemperatureGasBurner_degC; + + J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC); + break; + + case ELECTRIC_HEATPUMP: + //Add primary heating asset (heatpump) + inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW); // Could be a lot smaller due to high cop + efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; + baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); + break; + + case GAS_CHP: + + double outputCapacityElectric_kW = (maxHeatOutputPower_kW/avgc_data.p_avgEfficiencyCHP_thermal_fr) * avgc_data.p_avgEfficiencyCHP_electric_fr; + outputTemperature_degC = avgc_data.p_avgOutputTemperatureCHP_degC; + efficiency = avgc_data.p_avgEfficiencyCHP_thermal_fr + avgc_data.p_avgEfficiencyCHP_electric_fr; + + new J_EAConversionGasCHP(parentGC, outputCapacityElectric_kW, maxHeatOutputPower_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC ); + break; + + case DISTRICTHEAT: + double heatOutputCapacityDeliverySet_kW = max(avgc_data.p_minDistrictHeatingDeliverySetOutputCapacity_kW, maxHeatOutputPower_kW); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; + efficiency = avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; + + new J_EAConversionHeatDeliverySet(parentGC, heatOutputCapacityDeliverySet_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC); + + //Add GC to heat grid + GridNode heatgrid = findFirst(energyModel.pop_gridNodes, node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + if(heatgrid == null){ + heatgrid = f_createHeatGridNode(); + } + parentGC.p_parentNodeHeatID = heatgrid.p_gridNodeID; + break; + + case CUSTOM: + f_addCustomHeatAsset(parentGC, maxHeatOutputPower_kW); + break; + + default: + traceln("HEATING TYPE NOT FOUND FOR GC: " + parentGC); +} </Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>GridNode</ReturnType> + <Id>1747300761144</Id> + <Name>f_createHeatGridNode</Name> + <X>50</X> + <Y>600</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>GridNode GN_heat = energyModel.add_pop_gridNodes(); +GN_heat.p_gridNodeID = "Heatgrid"; + +// Check wether transformer capacity is known or estimated +GN_heat.p_capacity_kW = 1000000; +GN_heat.p_realCapacityAvailable = false; + +// Basic GN information +GN_heat.p_description = "Warmtenet"; + +/* +//Owner +GN_heat.p_ownerGridOperator = Grid_Operator; +*/ + +//Define node type +GN_heat.p_nodeType = OL_GridNodeType.HT; +GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + +//Define GN location +GN_heat.p_latitude = 0; +GN_heat.p_longitude = 0; +GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + +//Create gis region +/* +GN.gisRegion = zero_Interface.f_createGISObject(f_createGISNodesTokens(GN)); +zero_Interface.f_styleGridNodes(GN); +zero_Interface.c_GISNodes.add(GN.gisRegion); +*/ + +return GN_heat;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747829476305</Id> + <Name>f_addSliderSolarfarm</Name> + <X>50</X> + <Y>340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>sliderGCID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>gridNodeID</Name> + <Type>String</Type> + </Parameter> + <Body>c_solarfarm_data.add(0, Solarfarm_data.builder(). +isSliderGC(true). + +gc_id(sliderGCID). +gc_name("Slider solarfarm"). +owner_id("Slider solarfarm owner"). +streetname(null). +house_number(null). +house_letter(null). +house_addition(null). +postalcode(null). +city(null). +gridnode_id(gridNodeID). +initially_active(false). + +capacity_electric_kw(0.0). +connection_capacity_kw(0.0). +contracted_delivery_capacity_kw(0.0). +contracted_feed_in_capacity_kw(0.0). + +latitude(0). +longitude(0). +polygon(null). +build());</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747829476307</Id> + <Name>f_addSliderWindfarm</Name> + <X>50</X> + <Y>360</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>sliderGCID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>gridNodeID</Name> + <Type>String</Type> + </Parameter> + <Body>c_windfarm_data.add(0, Windfarm_data.builder(). +isSliderGC(true). + +gc_id(sliderGCID). +gc_name("Slider windfarm"). +owner_id("Slider windfarm owner"). +streetname(null). +house_number(null). +house_letter(null). +house_addition(null). +postalcode(null). +city(null). +gridnode_id(gridNodeID). +initially_active(false). + +capacity_electric_kw(0.0). +connection_capacity_kw(0.0). +contracted_delivery_capacity_kw(0.0). +contracted_feed_in_capacity_kw(0.0). + +latitude(0). +longitude(0). +polygon(null). +build()); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747829476311</Id> + <Name>f_addSliderBattery</Name> + <X>50</X> + <Y>378</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>sliderGCID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>gridNodeID</Name> + <Type>String</Type> + </Parameter> + <Body>c_battery_data.add(0, Battery_data.builder(). +isSliderGC(true). + +gc_id(sliderGCID). +gc_name("Slider battery"). +owner_id("Slider battery owner"). +streetname(null). +house_number(null). +house_letter(null). +house_addition(null). +postalcode(null). +city(null). +gridnode_id(gridNodeID). +initially_active(false). + +capacity_electric_kw(0.0). +connection_capacity_kw(0.0). +contracted_delivery_capacity_kw(0.0). +contracted_feed_in_capacity_kw(0.0). + +storage_capacity_kwh(0.0). +operation_mode(OL_BatteryOperationMode.PEAK_SHAVING_PARENT_NODE). +latitude(0). +longitude(0). +polygon(null). +build());</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747830228830</Id> + <Name>f_initializeSpecificSliderGC</Name> + <X>90</X> + <Y>212</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Create slider GC data packages for assetGC that do not have a sliderGC data package yet +Solarfarm_data sliderSolarfarm_data = findFirst(c_solarfarm_data, sf_data -> sf_data.isSliderGC()); +Windfarm_data sliderWindfarm_data = findFirst(c_windfarm_data, wf_data -> wf_data.isSliderGC()); +Battery_data sliderBattery_data = findFirst(c_battery_data, bat_data -> bat_data.isSliderGC()); + +//Get top gridnode id +GridNode_data topGridNode = findFirst(c_gridNode_data, node_data -> node_data.type().equals("HVMV")); +if ( topGridNode == null ) { + throw new RuntimeException("Unable to find top GridNode of type HVMV to create slider assets."); +} +String topGridNodeID = topGridNode.gridnode_id(); + +//Create data package for e-hub dashboard slider gcs +if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ + f_addSliderSolarfarm("EnergyHub solarfarm slider", topGridNodeID); + f_addSliderWindfarm("EnergyHub windfarm slider", topGridNodeID); + f_addSliderBattery("EnergyHub battery slider", topGridNodeID); +} + +//If no slider data package is present yet for the main: add one as well. +if(sliderSolarfarm_data == null){ + f_addSliderSolarfarm("Main solarfarm slider", topGridNodeID); +} +if(sliderWindfarm_data == null){ + f_addSliderWindfarm("Main windfarm slider", topGridNodeID); +} +if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + for(GridNode_data nodeData : c_gridNode_data){ + f_addSliderBattery("Main battery slider", nodeData.gridnode_id()); + } +} +else{ + if(sliderBattery_data == null){ + f_addSliderBattery("Main battery slider", topGridNodeID); + } +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_ProfilePointer</ReturnType> + <Id>1749125189323</Id> + <Name>f_createEngineProfile</Name> + <Description>Functie van gillis voor inladen weer data!</Description> + <X>99</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>profileID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>arguments</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>values</Name> + <Type>double[]</Type> + </Parameter> + <Body>TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); +J_ProfilePointer profilePointer = new J_ProfilePointer(profileID, tf_profile); +energyModel.f_addProfile(profilePointer); +return profilePointer;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749138089965</Id> + <Name>f_setEngineProfiles</Name> + <Description>Functie van gillis voor inladen weer data!</Description> + <X>80</X> + <Y>130</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Profile Arguments +double[] a_arguments_hr = ListUtil.doubleListToArray(defaultProfiles_data.arguments_hr()); + +//Weather data +double[] a_ambientTemperatureProfile_degC = ListUtil.doubleListToArray(defaultProfiles_data.ambientTemperatureProfile_degC()); +double[] a_PVProductionProfile35DegSouth_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile35DegSouth_fr()); +double[] a_PVProductionProfile15DegEastWest_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile15DegEastWest_fr()); +double[] a_windProductionProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.windProductionProfile_fr()); + +//EPEX data +double[] a_epexProfile_eurpMWh = ListUtil.doubleListToArray(defaultProfiles_data.epexProfile_eurpMWh()); + +//Various demand data +double[] a_defaultHouseElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseElectricityDemandProfile_fr()); +double[] a_defaultHouseHotWaterDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseHotWaterDemandProfile_fr()); +double[] a_defaultHouseCookingDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseCookingDemandProfile_fr()); +double[] a_defaultOfficeElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultOfficeElectricityDemandProfile_fr()); +double[] a_defaultBuildingHeatDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultBuildingHeatDemandProfile_fr()); + +//Create Weather engine profiles +energyModel.pp_ambientTemperature_degC = f_createEngineProfile("ambient_temperature_degC", a_arguments_hr, a_ambientTemperatureProfile_degC); +energyModel.pp_PVProduction35DegSouth_fr = f_createEngineProfile("pv_production_south_fr", a_arguments_hr, a_PVProductionProfile35DegSouth_fr); +energyModel.pp_PVProduction15DegEastWest_fr = f_createEngineProfile("pv_production_eastwest_fr", a_arguments_hr, a_PVProductionProfile15DegEastWest_fr); +energyModel.pp_windProduction_fr = f_createEngineProfile("wind_production_fr", a_arguments_hr, a_windProductionProfile_fr); + +//Create Epex engine profile +energyModel.pp_dayAheadElectricityPricing_eurpMWh = f_createEngineProfile("epex_price_eurpMWh", a_arguments_hr, a_epexProfile_eurpMWh); + +//Create Consumption engine profiles: +f_createEngineProfile("default_house_electricity_demand_fr", a_arguments_hr, a_defaultHouseElectricityDemandProfile_fr); +f_createEngineProfile("default_house_hot_water_demand_fr", a_arguments_hr, a_defaultHouseHotWaterDemandProfile_fr); +f_createEngineProfile("default_house_cooking_demand_fr", a_arguments_hr, a_defaultHouseCookingDemandProfile_fr); +f_createEngineProfile("default_office_electricity_demand_fr", a_arguments_hr, a_defaultOfficeElectricityDemandProfile_fr); +f_createEngineProfile("default_building_heat_demand_fr", a_arguments_hr, a_defaultBuildingHeatDemandProfile_fr); + + +//Create custom engine profiles +for(CustomProfile_data customProfile : c_customProfiles_data){ + f_createEngineProfile(customProfile.customProfileID(), customProfile.getArgumentsArray(), customProfile.getValuesArray()); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749628581470</Id> + <Name>f_addGridNodeProfile</Name> + <X>70</X> + <Y>580</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gridnode</Name> + <Type>GridNode</Type> + </Parameter> + <Parameter> + <Name>profile_data_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Body>//Create gridconnection where the profile is attached to +GridConnection GC_GridNode_profile = energyModel.add_pop_gridConnections(); + +//Set GC id +GC_GridNode_profile.p_gridConnectionID = "GridNode " + gridnode.p_gridNodeID + " profile GC"; + +//Set gridnode as parent +GC_GridNode_profile.p_parentNodeElectricID = gridnode.p_gridNodeID; + +//Set capacity same as gridnode +GC_GridNode_profile.v_liveConnectionMetaData.physicalCapacity_kW = gridnode.p_capacity_kW; +GC_GridNode_profile.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = gridnode.p_capacity_kW; +GC_GridNode_profile.v_liveConnectionMetaData.contractedFeedinCapacity_kW = gridnode.p_capacity_kW; + +GC_GridNode_profile.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; +GC_GridNode_profile.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; +GC_GridNode_profile.v_liveConnectionMetaData.physicalCapacityKnown = false; + +//Set lat lon same as gridnode +GC_GridNode_profile.p_latitude = gridnode.p_latitude; // Get latitude of first building (only used to get nearest trafo) +GC_GridNode_profile.p_longitude = gridnode.p_longitude; // Get longitude of first building (only used to get nearest trafo) + +if(project_data.gridnode_profile_timestep_hr() == null){ + new RuntimeException("Trying to load in gridnode profiles, without specifying the timestep of the data in the project_data"); +} + +double profileTimestep_hr = project_data.gridnode_profile_timestep_hr(); + +//Add profile to the GC +J_EAProfile profile = new J_EAProfile(GC_GridNode_profile, OL_EnergyCarriers.ELECTRICITY, profile_data_kWh, OL_AssetFlowCategories.fixedConsumptionElectric_kW, profileTimestep_hr); +profile.setStartTime_h(v_simStartHour_h); +profile.energyAssetName = "GridNode " + gridnode.p_gridNodeID + " profile"; + +//Set boolean has profile data true +gridnode.p_hasProfileData = true; +c_gridNodeIDsWithProfiles.add(gridnode.p_gridNodeID);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_ChargingSession</ReturnType> + <Id>1749648772203</Id> + <Name>f_createChargingSession</Name> + <X>490</X> + <Y>890</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>chargingSessionData</Name> + <Type>String</Type> + </Parameter> + <Body>String[] chargingSessionInfo = chargingSessionData.split("/"); + +double startIndex = Double.parseDouble(chargingSessionInfo[0]); +double endIndex = Double.parseDouble(chargingSessionInfo[1]); +double chargingDemand_kWh = Double.parseDouble(chargingSessionInfo[2]); +double batteryCap_kWh = Double.parseDouble(chargingSessionInfo[3]); +double chargingPower_kW = Double.parseDouble(chargingSessionInfo[5]); +int socket = Integer.parseInt(chargingSessionInfo[6]); + +//Cap charging demand to what is actual possible according to chargetime interval * charge power +chargingDemand_kWh = min(chargingPower_kW * (endIndex - startIndex) * 0.25, chargingDemand_kWh); + +return new J_ChargingSession(startIndex, endIndex, chargingDemand_kWh, batteryCap_kWh, chargingPower_kW, socket, 0.25);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<J_ChargingSession> </ReturnType> + <Id>1749649169603</Id> + <Name>f_createNewChargerProfile</Name> + <X>470</X> + <Y>870</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>chargerProfileData</Name> + <Type>ChargerProfile_data</Type> + </Parameter> + <Body>// example: 2/54/50.3/72.1/21.8/10.8/2 +List<String> chargerProfileDataValues = chargerProfileData.valuesList(); +List<J_ChargingSession> chargerProfile = new ArrayList<J_ChargingSession>(); + +for(int i = 0; i < chargerProfileDataValues.size(); i++){ + chargerProfile.add(f_createChargingSession(chargerProfileDataValues.get(i))); +} + +return chargerProfile;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<J_ChargingSession> </ReturnType> + <Id>1749649390125</Id> + <Name>f_getChargerProfile</Name> + <X>450</X> + <Y>850</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<J_ChargingSession> chargerProfile; +int randomIndex; + +if(c_chargerProfiles_data.size()>0){ + randomIndex = uniform_discr(0, c_chargerProfiles_data.size() - 1); + chargerProfile = f_createNewChargerProfile(c_chargerProfiles_data.get(randomIndex)); + c_chargerProfiles_data.remove(randomIndex); + energyModel.c_chargerProfiles.add(chargerProfile); +} +else{ + randomIndex = uniform_discr(0, energyModel.c_chargerProfiles.size() - 1); + chargerProfile = energyModel.c_chargerProfiles.get(randomIndex); +} + +return chargerProfile;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749726189312</Id> + <Name>f_addCookingAsset</Name> + <X>900</X> + <Y>620</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gc</Name> + <Type>GCHouse</Type> + </Parameter> + <Parameter> + <Name>CookingType</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>cookingDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Body>double yearlyCookingDemand_kWh = cookingDemand_kwhpa; + +if(cookingDemand_kwhpa == 0){ + //yearlyCookingDemand_kWh = uniform_discr(200,600); //way to high compared to referentiewoningen + yearlyCookingDemand_kWh = uniform_discr(70,130); + // traceln("Cooking demand unknown"); +} + +switch(CookingType){ + + case ELECTRIC_HOB: + new J_EAConsumption(gc, OL_EnergyAssetType.ELECTRIC_HOB, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.ELECTRICITY, energyModel.p_timeStep_h, null); + gc.p_cookingMethod = OL_HouseholdCookingMethod.ELECTRIC; + break; + + case GAS_PIT: + new J_EAConsumption(gc, OL_EnergyAssetType.GAS_PIT, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.METHANE, energyModel.p_timeStep_h, null); + gc.p_cookingMethod = OL_HouseholdCookingMethod.GAS; + break; +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749726279652</Id> + <Name>f_addHotWaterDemand</Name> + <X>900</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>houseGC</Name> + <Type>GCHouse</Type> + </Parameter> + <Parameter> + <Name>surface_m2</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>hotWaterDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Body>double yearlyHWD_kWh = hotWaterDemand_kwhpa; +if(hotWaterDemand_kwhpa == 0){ + int aantalBewoners; + if( surface_m2 > 150){ + aantalBewoners = uniform_discr(2,6); + } + else if (surface_m2 > 50){ + aantalBewoners = uniform_discr(1,4); + } + else { + aantalBewoners = uniform_discr(1,2); + } + + yearlyHWD_kWh = 1000 + aantalBewoners * 150; //Aangepast Naud 13-11-2025 omdat waardes van PBL totaal niet aansloten bij oude aantal bewoners * 600 //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix +} +//TEST +//yearlyHWD_kWh += 0; + +J_EAConsumption hotwaterDemand = new J_EAConsumption( houseGC, OL_EnergyAssetType.HOT_WATER_CONSUMPTION, "default_house_hot_water_demand_fr", yearlyHWD_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, null); + +//traceln("yearlyHWD_kWh "+ yearlyHWD_kWh); +if( surface_m2 > 200){ + //traceln("House created with " + surface_m2 + "m2 surace area, will have large hot water demand"); +} +if (surface_m2 < 25){ + //traceln("House created with " + surface_m2 + "m2 surace area, will have low hot water demand"); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749727623536</Id> + <Name>f_addBuildingHeatModel</Name> + <X>900</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>floorArea_m2</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>heatDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Body>double maxPowerHeat_kW = 1000; //Dit is hoeveel vermogen het huis kan afgeven/opnemen, mag willekeurige waarden hebben. Wordt alleen gebruikt in rekenstap van ratio of capacity +double lossfactor_WpK; //Dit is wat bepaalt hoeveel warmte het huis verliest/opneemt per tijdstap per delta_T +double initialTemp = uniform_discr(15,22); //starttemperatuur +double heatCapacity_JpK; //hoeveel lucht zit er in je huis dat je moet verwarmen? +double solarAbsorptionFactor_m2; //hoeveel m2 effectieve dak en muur oppervlakte er is dat opwarmt door zonneinstraling + +//Heat demand from PBL referentiewoningen used for HeatCapacity and lossFactor_WpK +if(heatDemand_kwhpa > 0){ //Not missing in data + lossfactor_WpK = heatDemand_kwhpa / 63; // = manually calibrated value tested on 3 neighborhoods +} +else{ + switch (parentGC.p_energyLabel){ + case A: + lossfactor_WpK = 0.35 * floorArea_m2; + break; + case B: + lossfactor_WpK = 0.45 * floorArea_m2; + break; + case C: + lossfactor_WpK = 0.65 * floorArea_m2; + break; + case D: + lossfactor_WpK = 0.85 * floorArea_m2; + break; + case E: + lossfactor_WpK = 1.05 * floorArea_m2; + break; + case F: + lossfactor_WpK = 1.25 * floorArea_m2; + break; + case G: + lossfactor_WpK = 1.45 * floorArea_m2; + break; + case NONE: + default: + lossfactor_WpK = uniform (0.85, 1.2) * floorArea_m2; + } +} +lossfactor_WpK = roundToDecimal(lossfactor_WpK,2); +solarAbsorptionFactor_m2 = floorArea_m2 * 0.01; //solar irradiance [W/m2] + +heatCapacity_JpK = floorArea_m2 * 50000; //What is the 5000 based upon? + +parentGC.p_BuildingThermalAsset = new J_EABuilding( parentGC, maxPowerHeat_kW, lossfactor_WpK, energyModel.p_timeStep_h, initialTemp, heatCapacity_JpK, solarAbsorptionFactor_m2 ); +energyModel.c_ambientDependentAssets.add( parentGC.p_BuildingThermalAsset ); + +//FOR NOW DEFAULT NO INTERIOR/EXTERIOR HEAT BUFFERS -> NOT NECESSARY +/* +double delayHeatReleaseInteriorHeatsink_hr = 0; +double lossToExteriorFromInteriorHeatSink_fr; +if(randomTrue(0.2)){ + delayHeatReleaseInteriorHeatsink_hr = 3; +} +else { + delayHeatReleaseInteriorHeatsink_hr = 0.5; +} + +parentGC.p_BuildingThermalAsset.addInteriorHeatBuffer(delayHeatReleaseInteriorHeatsink_hr); + +double delayHeatReleaseRoofAndWall_hr = 8.0; +parentGC.p_BuildingThermalAsset.addExteriorHeatBuffer(delayHeatReleaseRoofAndWall_hr); +*/</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Building_data></ReturnType> + <Id>1749728889982</Id> + <Name>f_getBuildingsInSubScope</Name> + <X>50</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialBuildingList</Name> + <Type>List<Building_data></Type> + </Parameter> + <Body>List<Building_data> scopedBuildingList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedBuildingList.addAll(initialBuildingList); +} +else{ + for (Building_data dataBuilding : initialBuildingList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataBuilding.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedBuildingList.add(dataBuilding); + } + } + } +} +return scopedBuildingList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749728889984</Id> + <Name>f_createHouses</Name> + <Description>Creates the houses using a single GC, and their building. After creation, they will be simulated using average values.</Description> + <X>420</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<Building_data> buildingDataHouses = f_getBuildingsInSubScope(c_houseBuilding_data); + +traceln("Aantal panden met woonfunctie in BAG data: " + buildingDataHouses.size()); + +int i = 0; + + +if(buildingDataHouses.size()>0){ + //Add houses to the legend if in model + zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.HOUSE); + + //PreCalculate the probabilities for an additional Car for houses + f_calculateProbabilitiesForAdditionalCar(buildingDataHouses); +} + + + +for (Building_data houseBuildingData : buildingDataHouses) { + GCHouse GCH = energyModel.add_Houses(); + ConnectionOwner COH = energyModel.add_pop_connectionOwners(); + + //Set parameters for the Grid Connection + GCH.p_gridConnectionID = houseBuildingData.address_id(); + GCH.p_ownerID = "Woonhuis" + Integer.toString(i); //aanname : huiseigenaar is eigenbaas + + GCH.p_purposeBAG = houseBuildingData.purpose(); + + //pand gegevens + GCH.p_bouwjaar = houseBuildingData.build_year(); + GCH.p_eigenOprit = houseBuildingData.has_private_parking() != null ? houseBuildingData.has_private_parking() : false; + + //Nageisoleerd + if (houseBuildingData.energy_label() != null){ // && houseBuildingData.energy_label() != OL_GridConnectionIsolationLabel.NONE) { + GCH.p_energyLabel = houseBuildingData.energy_label(); + } + else { + if (GCH.p_bouwjaar < 1980) { + GCH.p_energyLabel = OL_GridConnectionIsolationLabel.D; + } + else if (GCH.p_bouwjaar < 1996) { + GCH.p_energyLabel = OL_GridConnectionIsolationLabel.C; + } + else if (GCH.p_bouwjaar < 2008) { + GCH.p_energyLabel = OL_GridConnectionIsolationLabel.B; + } + else { + GCH.p_energyLabel = OL_GridConnectionIsolationLabel.A; + } + } + //aansluiting gegevens + GCH.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; + GCH.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; + GCH.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; + + GCH.v_liveConnectionMetaData.physicalCapacityKnown = false; + GCH.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + GCH.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + + // Address data + GCH.p_address = new J_Address(); + GCH.p_address.setStreetName( houseBuildingData.streetname()); + if (houseBuildingData.house_number() == null) { + GCH.p_address.setHouseNumber( 0 ); + } else { + GCH.p_address.setHouseNumber( houseBuildingData.house_number()); + } + GCH.p_address.setHouseLetter( houseBuildingData.house_letter()); + GCH.p_address.setHouseAddition( houseBuildingData.house_addition()); + GCH.p_address.setPostalcode( houseBuildingData.postalcode()); + GCH.p_address.setCity( houseBuildingData.city()); + + //locatie + GCH.p_longitude = houseBuildingData.longitude(); + GCH.p_latitude = houseBuildingData.latitude(); + GCH.setLatLon(GCH.p_latitude, GCH.p_longitude); + + //Connect GC to grid node + GCH.p_parentNodeElectricID = houseBuildingData.gridnode_id(); + + //Set parameters for the Actor: ConnectionOwner + COH.p_actorID = GCH.p_ownerID; + COH.p_connectionOwnerType = OL_ConnectionOwnerType.HOUSEHOLD; + COH.p_detailedCompany = false; + GCH.p_owner = COH; + + + //Check wheter this building already exists + GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(houseBuildingData.building_id())); + + if(existingBuilding == null){//Create new GIS building and connect + GIS_Building b = f_createGISBuilding( houseBuildingData, GCH ); + GCH.p_roofSurfaceArea_m2 = houseBuildingData.polygon_area_m2(); + + //Style building + b.p_defaultFillColor = zero_Interface.v_houseBuildingColor; + b.p_defaultLineColor = zero_Interface.v_houseBuildingLineColor; + zero_Interface.f_styleAreas(b); + } + else{// Connect with existing building + f_connectGCToExistingBuilding(GCH, existingBuilding, houseBuildingData); + } + + //Floor surface of GC + GCH.p_floorSurfaceArea_m2 = houseBuildingData.address_floor_surface_m2(); + + //Instantiate energy assets + double annualElectricityConsumption_kwhpa; + double annualNaturalGasConsumption_kwhpa; + double annualSpaceHeatingConsumption_kwhpa; + double annualDHWConsumption_kwhpa; + double annualCookingConsumption_kwhpa; + try { + annualElectricityConsumption_kwhpa = houseBuildingData.electricity_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualElectricityConsumption_kwhpa = Double.valueOf(uniform_discr(1200, 3800)); + } + try { + annualNaturalGasConsumption_kwhpa = houseBuildingData.gas_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualNaturalGasConsumption_kwhpa = Double.valueOf(uniform_discr(600, 2000)); + } + try { + annualSpaceHeatingConsumption_kwhpa = houseBuildingData.space_heating_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualSpaceHeatingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.85; //assumed share gas space heating + traceln("DOESTHISHAPPEN??"); + } + try { + annualDHWConsumption_kwhpa = houseBuildingData.dhw_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualDHWConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.1; //assumed share gas dhw heating + } + try { + annualCookingConsumption_kwhpa = houseBuildingData.cooking_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualCookingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.05; //assumed share gas cooking + } + //GCH.p_initialPVpanels = houseBuildingData.pv_default(); + GCH.v_liveAssetsMetaData.initialPV_kW = houseBuildingData.pv_installed_kwp() != null ? houseBuildingData.pv_installed_kwp() : 0; + GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.v_liveAssetsMetaData.initialPV_kW > 0 ? GCH.v_liveAssetsMetaData.initialPV_kW : houseBuildingData.pv_potential_kwp(); // To prevent sliders from changing outcomes + + // TODO: Above we load in data of gas use, but the houses always have a thermal model?? + f_addEnergyAssetsToHouses(GCH, annualElectricityConsumption_kwhpa, annualSpaceHeatingConsumption_kwhpa, annualDHWConsumption_kwhpa, annualCookingConsumption_kwhpa ); + + i ++; +} + +//Backup for when pv_potential kWp is null, needs to be after all houses have been made, so rooftop surface is distributed correctly +for(GCHouse GCH : energyModel.Houses){ + if(GCH.v_liveAssetsMetaData.PVPotential_kW == null){ + GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.p_roofSurfaceArea_m2*avgc_data.p_avgRatioRoofPotentialPV*avgc_data.p_avgPVPower_kWpm2; + } +} + +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749728889986</Id> + <Name>f_addEnergyAssetsToHouses</Name> + <Description>Initialisation of the Energy assets using average values for houses</Description> + <X>440</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>house</Name> + <Type>GCHouse</Type> + </Parameter> + <Parameter> + <Name>electricityDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>spaceHeatingDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>dhwDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>cookingDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Body>//Add generic electricity demand profile +GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals( house.p_parentNodeElectricID)); + +if ( ! gn.p_hasProfileData ){ + f_addElectricityDemandProfile(house, electricityDemand_kwhpa, null, false, "default_house_electricity_demand_fr"); +} + +//Add building heat model and asset +f_addBuildingHeatModel(house, house.p_floorSurfaceArea_m2, spaceHeatingDemand_kwhpa); + +//Determine required heating capacity for the heating asset +double maximalTemperatureDifference_K = 30.0; // Approximation +double maxHeatOutputPower_kW = house.p_BuildingThermalAsset.getLossFactor_WpK() * maximalTemperatureDifference_K / 1000; + + +//Add heat demand profile +OL_GridConnectionHeatingType heatingType = avgc_data.p_avgHouseHeatingMethod; +f_addHeatAsset(house, heatingType, maxHeatOutputPower_kW); +house.f_addHeatManagement(heatingType, false); +house.f_setHeatingPreferences(f_getHouseHeatingPreferences()); + +//Add hot water and cooking demand +f_addHotWaterDemand(house, house.p_floorSurfaceArea_m2, dhwDemand_kwhpa); +f_addCookingAsset(house, OL_EnergyAssetType.GAS_PIT, cookingDemand_kwhpa); + + +//Add pv +double installedRooftopSolar_kW = house.v_liveAssetsMetaData.initialPV_kW != null ? house.v_liveAssetsMetaData.initialPV_kW : 0; +if (gn.p_hasProfileData){ //dont count production if there is measured data on Node + installedRooftopSolar_kW = 0; +} + +if (installedRooftopSolar_kW > 0) { + f_addEnergyProduction(house, OL_EnergyAssetType.PHOTOVOLTAIC, "Residential Solar", installedRooftopSolar_kW ); +} + +//Add cars +f_addCarsToHouses(house); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_HeatingPreferences</ReturnType> + <Id>1749728889988</Id> + <Name>f_getHouseHeatingPreferences</Name> + <X>460</X> + <Y>700</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>double nightTimeSetPoint_degC = 18; +double dayTimeSetPoint_degC = 20; +double startOfDayTime_h = 8; +double startOfNightTime_h = 23; + +if( randomTrue(0.5) ){ //50% kans op ochtend ritme + nightTimeSetPoint_degC = uniform_discr(12,18); + dayTimeSetPoint_degC = uniform_discr(18, 24); + startOfDayTime_h = uniform_discr(5,10) + uniform_discr(0,4) / 4.0; + startOfNightTime_h = uniform_discr(21,23); + +} +else if (randomTrue(0.5) ){ // 25% kans op hele dag aan + nightTimeSetPoint_degC = uniform_discr(18,21); + dayTimeSetPoint_degC = nightTimeSetPoint_degC; + startOfDayTime_h = -1; + startOfNightTime_h = 25; + +} +else { // 25% kans op smiddags/savonds aan + nightTimeSetPoint_degC = uniform_discr(14,18); + dayTimeSetPoint_degC = uniform_discr(18, 24); + startOfDayTime_h = uniform_discr(14, 16) + uniform_discr(0,4) / 4.0; + startOfNightTime_h = uniform_discr(21,23); +} + +double maxComfortTemperature_degC = dayTimeSetPoint_degC + 2; +double minComfortTemperature_degC = dayTimeSetPoint_degC - 2; + +//Create heating preferences class +J_HeatingPreferences heatingPreferences = new J_HeatingPreferences(startOfDayTime_h, startOfNightTime_h, dayTimeSetPoint_degC, nightTimeSetPoint_degC, maxComfortTemperature_degC, minComfortTemperature_degC); + +return heatingPreferences;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749729268458</Id> + <Name>f_createParkingSpots</Name> + <X>430</X> + <Y>950</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<GCEnergyProduction> carportGCList = new ArrayList<GCEnergyProduction>(); + +for (ParkingSpace_data dataParkingSpace : f_getParkingSpacesInSubScope(c_parkingSpace_data)){ + + //Create parking gis object + GIS_Object parkingSpace = f_createGISObject(dataParkingSpace.parking_id(), dataParkingSpace.latitude(), dataParkingSpace.longitude(), dataParkingSpace.polygon(), OL_GISObjectType.PARKING); + String parkingSpaceType = dataParkingSpace.type().toString().substring(0, 1).toUpperCase() + dataParkingSpace.type().toString().substring(1).toLowerCase(); + parkingSpace.p_annotation = "Parkeerplek: " + parkingSpaceType + ", " + dataParkingSpace.additional_info(); + + //Set correct color and legend collection based on parking type + switch(dataParkingSpace.type()){ + case PRIVATE: + case DISABLED: + case KISS_AND_RIDE: + parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_private; + parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_private; + zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PRIVATE); + break; + case PUBLIC: + parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_public; + parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_public; + zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PUBLIC); + break; + case ELECTRIC: + parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_electric; + parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_electric; + zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.ELECTRIC); + break; + } + + //Add to ordered collection on the interface + zero_Interface.c_orderedParkingSpaces.add(parkingSpace); + + //Style gis object + parkingSpace.f_style(null, null, null, null); + + //Get energyProduction GC + GCEnergyProduction carportGC = findFirst(carportGCList, gc -> gc.p_parentNodeElectricID.equals(dataParkingSpace.gridnode_id())); + + if(carportGC == null){ // If non existend -> Create one. + carportGC = energyModel.add_EnergyProductionSites(); + + carportGC.p_gridConnectionID = "Parking space gridconnection: " + dataParkingSpace.parking_id(); + carportGC.v_liveConnectionMetaData.physicalCapacity_kW = dataParkingSpace.pv_potential_kwp(); + carportGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = 0.0; + carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataParkingSpace.pv_potential_kwp(); + + carportGC.v_liveConnectionMetaData.physicalCapacityKnown = false; + carportGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + carportGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + + carportGC.p_parentNodeElectricID = dataParkingSpace.gridnode_id(); + + carportGC.p_latitude = dataParkingSpace.latitude(); + carportGC.p_longitude = dataParkingSpace.longitude(); + + //Address + carportGC.p_address = new J_Address(); + carportGC.p_address.setStreetName(dataParkingSpace.street()); + + //CO + ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company + + COC.p_actorID = "Parking space connection owner: " + dataParkingSpace.parking_id(); + COC.p_connectionOwnerType = OL_ConnectionOwnerType.PARKINGSPACE_OP; + COC.p_detailedCompany = false; + COC.b_dataSharingAgreed = true; + + carportGC.p_owner = COC; + carportGC.p_ownerID = COC.p_actorID; + + //Add to collections + parkingSpace.c_containedGridConnections.add(carportGC); + carportGC.c_connectedGISObjects.add(parkingSpace); + carportGCList.add(carportGC); + } + else{ + carportGC.v_liveConnectionMetaData.physicalCapacity_kW += dataParkingSpace.pv_potential_kwp(); + carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW += dataParkingSpace.pv_potential_kwp(); + + //Add to collections + parkingSpace.c_containedGridConnections.add(carportGC); + carportGC.c_connectedGISObjects.add(parkingSpace); + } + + //Update pv potential of carport energy production site + carportGC.v_liveAssetsMetaData.PVPotential_kW += dataParkingSpace.pv_potential_kwp() != null ? dataParkingSpace.pv_potential_kwp() : 0; +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Solarfarm_data></ReturnType> + <Id>1749739602491</Id> + <Name>f_getSolarfarmsInSubScope</Name> + <X>50</X> + <Y>700</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialSolarfarmsList</Name> + <Type>List<Solarfarm_data></Type> + </Parameter> + <Body>List<Solarfarm_data> scopedSolarfarmsList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedSolarfarmsList.addAll(initialSolarfarmsList); +} +else{ + for (Solarfarm_data dataSolarfarm : initialSolarfarmsList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataSolarfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedSolarfarmsList.add(dataSolarfarm); + } + } + } +} +return scopedSolarfarmsList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Windfarm_data></ReturnType> + <Id>1750857080998</Id> + <Name>f_getWindfarmsInSubScope</Name> + <X>50</X> + <Y>720</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialWindfarmsList</Name> + <Type>List<Windfarm_data></Type> + </Parameter> + <Body>List<Windfarm_data> scopedWindfarmsList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedWindfarmsList.addAll(initialWindfarmsList); +} +else{ + for (Windfarm_data dataWindfarm : initialWindfarmsList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataWindfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedWindfarmsList.add(dataWindfarm); + } + } + } +} +return scopedWindfarmsList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Chargingstation_data></ReturnType> + <Id>1750857082460</Id> + <Name>f_getChargingstationsInSubScope</Name> + <X>50</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialChargingstationsList</Name> + <Type>List<Chargingstation_data></Type> + </Parameter> + <Body>List<Chargingstation_data> scopedChargingstationsList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedChargingstationsList.addAll(initialChargingstationsList); +} +else{ + for (Chargingstation_data dataChargingstation : initialChargingstationsList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataChargingstation.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedChargingstationsList.add(dataChargingstation); + } + } + } +} +return scopedChargingstationsList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Electrolyser_data></ReturnType> + <Id>1750857083468</Id> + <Name>f_getElectrolysersInSubScope</Name> + <X>50</X> + <Y>760</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialElectrolysersList</Name> + <Type>List<Electrolyser_data></Type> + </Parameter> + <Body>List<Electrolyser_data> scopedElectrolysersList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedElectrolysersList.addAll(initialElectrolysersList); +} +else{ + for (Electrolyser_data dataElectrolyser : initialElectrolysersList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataElectrolyser.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedElectrolysersList.add(dataElectrolyser); + } + } + } +} +return scopedElectrolysersList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<ParkingSpace_data></ReturnType> + <Id>1750857084547</Id> + <Name>f_getParkingSpacesInSubScope</Name> + <X>50</X> + <Y>800</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialParkingSpaceList</Name> + <Type>List<ParkingSpace_data></Type> + </Parameter> + <Body>List<ParkingSpace_data> scopedParkingSpacesList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedParkingSpacesList.addAll(initialParkingSpaceList); +} +else{ + for (ParkingSpace_data dataParkingSpace : initialParkingSpaceList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataParkingSpace.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedParkingSpacesList.add(dataParkingSpace); + } + } + } +} +return scopedParkingSpacesList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Battery_data></ReturnType> + <Id>1750861476829</Id> + <Name>f_getBatteriesInSubScope</Name> + <X>50</X> + <Y>780</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialBatteriesList</Name> + <Type>List<Battery_data></Type> + </Parameter> + <Body>List<Battery_data> scopedBatteriesList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedBatteriesList.addAll(initialBatteriesList); +} +else{ + for (Battery_data dataBattery : initialBatteriesList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataBattery.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedBatteriesList.add(dataBattery); + } + } + } +} +return scopedBatteriesList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Building_data></ReturnType> + <Id>1752239414416</Id> + <Name>f_getSurveyGCBuildingData</Name> + <X>450</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>vallumGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>List<Building_data> connectedBuildingsData = new ArrayList<Building_data>(); + +if ( vallumGC.getPandIds() != null && !vallumGC.getPandIds().isEmpty()) { + for (var PID : vallumGC.getPandIds() ) { + List<Building_data> buildingsDataSameID = findAll(c_companyBuilding_data, b -> b.building_id().equals(PID.getValue())); + Building_data connectedBuildingData = null; + if(buildingsDataSameID.size() == 1){ // Only one building package with same id, so this building package belongs to this GC + connectedBuildingData = buildingsDataSameID.get(0); + } + else{//Multiple building packages with this building id -> Find the right one based on address, if none are found: pick a package without address + connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() != null && buildingData.house_number() == companyGC.p_address.getHouseNumber()); + if(connectedBuildingData == null){ //If no matching house numbers, find first object that has no house number. + connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() == null); + } + } + + if (connectedBuildingData != null) { + // Remove from company building data and add to survey + c_companyBuilding_data.remove(connectedBuildingData); + c_surveyCompanyBuilding_data.add(connectedBuildingData); + // Set trafo ID + companyGC.p_parentNodeElectricID = connectedBuildingData.gridnode_id(); + } + else if (map_buildingData_Vallum != null && !map_buildingData_Vallum.isEmpty()) { + // Create new building package + connectedBuildingData = f_createBuildingData_Vallum(companyGC, PID.getValue()); + c_vallumBuilding_data.add(connectedBuildingData); + } + + if (connectedBuildingData != null) { + connectedBuildingsData.add(connectedBuildingData); + } + } +} +else {// No building connected in zorm? -> check if it is manually connected in excel (using gc_id column) + connectedBuildingsData = findAll(c_companyBuilding_data, b -> b.gc_id() != null && b.gc_id().equals(companyGC.p_gridConnectionID)); + if(connectedBuildingsData == null || connectedBuildingsData.size() == 0){ + traceln("GC %s has no building in zorm and also no manual connection with building in excel", companyGC.p_gridConnectionID); + } + else{ + c_companyBuilding_data.removeAll(connectedBuildingsData); + } +} + +return connectedBuildingsData;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_ProfilePointer</ReturnType> + <Id>1753349205424</Id> + <Name>f_createEngineProfile1</Name> + <Description>Functie van gillis voor inladen weer data!</Description> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2069</X> + <Y>450</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>profileID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>arguments</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>values</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>energyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); +J_ProfilePointer profilePointer; +if (energyModel.f_findProfile(profileID)!=null) { + profilePointer=energyModel.f_findProfile(profileID); + profilePointer.setTableFunction(tf_profile); +} else { + profilePointer = new J_ProfilePointer(profileID, tf_profile); + energyModel.f_addProfile(profilePointer); +} +return profilePointer;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753349205426</Id> + <Name>f_setEngineInputDataAfterDeserialisation</Name> + <Description>Functie van gillis voor inladen weer data!</Description> + <X>2083</X> + <Y>260</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>deserializedEnergyModel.p_truckTripsCsv = inputCSVtruckTrips; +deserializedEnergyModel.p_householdTripsCsv = inputCSVhouseholdTrips; +deserializedEnergyModel.p_cookingPatternCsv = inputCSVcookingActivities; +deserializedEnergyModel.avgc_data = energyModel.avgc_data; +deserializedEnergyModel.c_defaultHeatingStrategies = energyModel.c_defaultHeatingStrategies;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>OL_GridConnectionHeatingType</ReturnType> + <Id>1753799111185</Id> + <Name>f_heatingSurveyCompany</Name> + <X>460</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>// Set heatingType +OL_GridConnectionHeatingType heatingType = f_getHeatingTypeSurvey(engineGC, surveyGC); + +if(heatingType == OL_GridConnectionHeatingType.CUSTOM){ + f_addCustomHeatingSetup(engineGC, surveyGC); +} +else{ + // Create building profiles, peakHeatConsumption_kW is null if there is no heat consumption + Double peakHeatConsumption_kW = f_createSurveyHeatProfiles( engineGC, surveyGC, heatingType ); + + // Create EA conversions + if (peakHeatConsumption_kW != null) { + f_addHeatAsset(engineGC, heatingType, peakHeatConsumption_kW); + } + + if (surveyGC.getStorage() != null && surveyGC.getStorage().getHasThermalStorage() != null) { + //if (surveyGC.getStorage().getThermalStorageKw() != null) { + //double storagePower_kW = surveyGC.getStorage().getThermalStorageKw(); + //} + // TODO: find a way to determine the storage capacity + // f_addStorage(parentGC, storagePower_kw, storageCapacity_kWh, storageType); + } + + // Heating management (needs: heatingType & assets such as building thermal model or profiles, survey companies never have a thermal building mdoel) + boolean isGhost = heatingType != OL_GridConnectionHeatingType.NONE && peakHeatConsumption_kW == null; + + //Add heating management + engineGC.f_addHeatManagement(heatingType, isGhost); +} + +return heatingType;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>Double</ReturnType> + <Id>1753801098736</Id> + <Name>f_createSurveyHeatProfiles</Name> + <X>480</X> + <Y>310</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Body>////Gas and Heating +if (surveyGC.getNaturalGas().getHasConnection() != null && surveyGC.getNaturalGas().getHasConnection() ) { + switch (heatingType) { + case HYBRID_HEATPUMP: + // Exception for hybrid heatpumps, when it will be a ghost asset make gas profile + if (!settings.createCurrentElectricityEA() && (engineGC.v_hasQuarterHourlyValues || f_surveyHasGasData(surveyGC)) ) { + f_createGasProfileFromSurvey( engineGC, surveyGC ); + return null; + } + else { + // We know there is no data, hence we directly call the estimate function + return f_createHeatProfileFromEstimates(engineGC); + } + case GAS_BURNER: + case GAS_CHP: + // heat consumption profiel + return f_createHeatProfileFromGasSurvey( engineGC, surveyGC, heatingType ); + default: + if (surveyGC.getNaturalGas().getPercentageUsedForHeating() != null && surveyGC.getNaturalGas().getPercentageUsedForHeating() != 0.0) { + // TODO: Find a solution to surveys filled in without heatingType that is not this hacky + if (surveyGC.getNaturalGas().getEan().equals("123456789012345678")) { + return null; + } + throw new RuntimeException("Gas data used for heating in survey, but no corresponding heating type"); + } + else { + f_createGasProfileFromSurvey( engineGC, surveyGC ); + return null; + } + } +} +else if ( heatingType == OL_GridConnectionHeatingType.DISTRICTHEAT || heatingType == OL_GridConnectionHeatingType.LT_DISTRICTHEAT ) { + return f_createHeatProfileFromSurvey(engineGC, surveyGC); +} +else if ( heatingType == OL_GridConnectionHeatingType.NONE ) { + return null; +} +else { + if(!settings.createCurrentElectricityEA() && engineGC.v_hasQuarterHourlyValues){ + if(heatingType == OL_GridConnectionHeatingType.HYBRID_HEATPUMP){ + return null; // Could create an estimated gas profile here: not done for now. + } + if(heatingType == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP){ + return null; + } + } + return f_createHeatProfileFromEstimates(engineGC); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1753803212846</Id> + <Name>f_surveyHasGasData</Name> + <X>500</X> + <Y>330</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>if ( surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { + return true; +} +else if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { + return true; +} +else { + return false; +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753804393557</Id> + <Name>f_createGasProfileFromGasTS</Name> + <X>520</X> + <Y>370</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>// Gas delivery profile in m3 +double[] profile_m3 = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getNaturalGas().getHourlyDelivery_m3()); + +//Calculate yearly gas delivery +double yearlyGasDelivery_m3 = Arrays.stream(profile_m3).sum(); + +// We assume all delivery is consumption and convert m3 to kWh +ZeroMath.arrayMultiply(profile_m3, avgc_data.p_gas_kWhpm3); +// Then we create the profile asset and name it +J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.METHANE, profile_m3, null, energyModel.p_timeStep_h); +j_ea.energyAssetName = engineGC.p_ownerID + " custom gas profile"; + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753449467888</Id> + <Name>f_reconstructGridConnections</Name> + <X>2083.333</X> + <Y>302</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>ArrayList<GridConnection> allConnections = new ArrayList<>(); +allConnections.addAll(deserializedEnergyModel.c_gridConnections); +allConnections.addAll(deserializedEnergyModel.c_pausedGridConnections); + +for(GridConnection GC : allConnections){ + GC.energyModel = deserializedEnergyModel; + if (GC instanceof GCHouse){ + //toMove.add(GC); + f_reconstructAgent(GC, deserializedEnergyModel.Houses, deserializedEnergyModel); + } else if (GC instanceof GCEnergyProduction) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyProductionSites, deserializedEnergyModel); + } else if (GC instanceof GCEnergyConversion) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyConversionSites, deserializedEnergyModel); + } else if (GC instanceof GCGridBattery) { + f_reconstructAgent(GC, deserializedEnergyModel.GridBatteries, deserializedEnergyModel); + } else if (GC instanceof GCNeighborhood) { + f_reconstructAgent(GC, deserializedEnergyModel.Neighborhoods, deserializedEnergyModel); + } else if (GC instanceof GCPublicCharger) { + f_reconstructAgent(GC, deserializedEnergyModel.PublicChargers, deserializedEnergyModel); + } else if (GC instanceof GCUtility) { + f_reconstructAgent(GC, deserializedEnergyModel.UtilityConnections, deserializedEnergyModel); + } + //GC.f_startAfterDeserialisation(); +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753883660006</Id> + <Name>f_createHeatProfileFromAnnualGasTotal</Name> + <X>900</X> + <Y>365</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Parameter> + <Name>yearlyGasDelivery_m3</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>ratioGasUsedForHeating</Name> + <Type>double</Type> + </Parameter> + <Body>// First check what the heat conversion efficiency is from gas +double gasToHeatEfficiency = f_getGasToHeatEfficiency(heatingType); +// Finally, multiply the gas delivery with the total conversion factor to get the heat consumption +double yearlyConsumptionHeat_kWh = yearlyGasDelivery_m3 * avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating; +// We assume the heat consumption follows a standard profile +String profileName = "default_building_heat_demand_fr"; +J_ProfilePointer profilePointer = energyModel.f_findProfile(profileName); +new J_EAConsumption(engineGC, OL_EnergyAssetType.HEAT_DEMAND, profileName, yearlyConsumptionHeat_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, profilePointer); + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +} + +return yearlyConsumptionHeat_kWh * max(profilePointer.getAllValues())/energyModel.p_timeStep_h;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753883738731</Id> + <Name>f_createGasProfileFromAnnualGasTotal</Name> + <X>900</X> + <Y>320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyGasDelivery_m3</Name> + <Type>double</Type> + </Parameter> + <Body>// We assume all delivery is consumption and convert m3 to kWh +double yearlyGasConsumption_kWh = yearlyGasDelivery_m3 * avgc_data.p_gas_kWhpm3; +// We assume the gas consumption follows a standard heat consumption profile +String profileName = "default_building_heat_demand_fr"; +new J_EAConsumption(engineGC, OL_EnergyAssetType.METHANE_DEMAND, profileName, yearlyGasConsumption_kWh, OL_EnergyCarriers.METHANE, energyModel.p_timeStep_h, null); + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753449467890</Id> + <Name>f_reconstructEnergyModel</Name> + <X>2083.333</X> + <Y>282</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>energyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>// Code Instead of Agent.goToPopulation() (which resets all parameters to default!) +/* +try{ // Reflection trick to get to Agent.owner private field + energyModel.forceSetOwner(energyModel, pop_energyModels); +} catch (Exception e) { + e.printStackTrace(); +} +*/ + +Agent root = this.getRootAgent(); +energyModel.restoreOwner(this); + +energyModel.setEngine(getEngine()); +energyModel.instantiateBaseStructure_xjal(); +energyModel.setEnvironment(this.getEnvironment()); + +traceln("EnergyModel owner: %s", energyModel.getOwner()); + +energyModel.create(); // What does this do? Does it affect default values? +//energyModel.start(); // Why is this needed?</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753884183970</Id> + <Name>f_createGasProfileFromSurvey</Name> + <X>500</X> + <Y>350</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { + f_createGasProfileFromGasTS( engineGC, surveyGC ); +} +else if (surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { + double yearlyGasDelivery_m3 = surveyGC.getNaturalGas().getAnnualDelivery_m3(); + f_createGasProfileFromAnnualGasTotal( engineGC, yearlyGasDelivery_m3 ); +} +else { + f_createGasProfileFromEstimates( engineGC ); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753884186444</Id> + <Name>f_createHeatProfileFromGasSurvey</Name> + <X>500</X> + <Y>390</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Body>if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { + return f_createHeatProfileFromGasTS( engineGC, surveyGC, heatingType ); +} +else if ( surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { + double yearlyGasDelivery_m3 = surveyGC.getNaturalGas().getAnnualDelivery_m3(); + double ratioGasUsedForHeating = f_getRatioGasUsedForHeating(surveyGC); + return f_createHeatProfileFromAnnualGasTotal( engineGC, heatingType, yearlyGasDelivery_m3, ratioGasUsedForHeating ); +} +else { + return f_createHeatProfileFromEstimates( engineGC ); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753949286953</Id> + <Name>f_createHeatProfileFromGasTS</Name> + <X>520</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Body>// Gas profile +double[] profile_m3 = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getNaturalGas().getHourlyDelivery_m3()); + +double yearlyGasDelivery_m3 = Arrays.stream(profile_m3).sum(); + +// First check what the heat conversion efficiency is from gas +double gasToHeatEfficiency = f_getGasToHeatEfficiency(heatingType); +// Then check which part of the gas consumption is used for heating +double ratioGasUsedForHeating = f_getRatioGasUsedForHeating(surveyGC); +// Finally, multiply the gas profile with the total conversion factor to get the heat profile +double[] profile_kWh = ZeroMath.arrayMultiply(profile_m3, avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating); +// Then we create the profile asset and name it +J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.HEAT, profile_kWh, null , energyModel.p_timeStep_h); +j_ea.energyAssetName = engineGC.p_ownerID + " custom building heat profile"; + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +} + +return max(profile_m3)/energyModel.p_timeStep_h;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753449467892</Id> + <Name>f_reconstructAgent</Name> + <X>2095</X> + <Y>379</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>agent</Name> + <Type>Agent</Type> + </Parameter> + <Parameter> + <Name>pop</Name> + <Type>AgentArrayList</Type> + </Parameter> + <Parameter> + <Name>energyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>/* // Code Instead of Agent.goToPopulation() (which resets many variables to default!) +try{ // Reflection trick to get to Agent.owner private field + if (agent instanceof GridNode) { + ((GridNode)agent).forceSetOwner(agent,pop); + } else if (agent instanceof GridConnection) { + ((GridConnection)agent).forceSetOwner(agent,pop); + } else if (agent instanceof Actor) { + ((Actor)agent).forceSetOwner(agent,pop); + } else if (agent instanceof GIS_Object) { + ((GIS_Object)agent).forceSetOwner(agent,pop); + } +} catch (Exception e) { + e.printStackTrace(); +}*/ + +agent.restoreOwner(energyModel); // simply sets agent.d = root, should replace reflection hack +agent.restoreCollection_xjal(pop); // simple sets agent.j = pop, should replace reflection hack + +agent.setEngine(getEngine()); +agent.instantiateBaseStructure_xjal(); +agent.setEnvironment(pop.getEnvironment()); + +pop._add(agent); // Add to the population +//int popSize = pop.size(); +//pop.callCreate(agent, popSize); // Update population object +agent.create();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753951013582</Id> + <Name>f_getGasToHeatEfficiency</Name> + <X>920</X> + <Y>385</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Body>switch (heatingType){ + case GAS_BURNER: + case HYBRID_HEATPUMP: + return avgc_data.p_avgEfficiencyGasBurner_fr; + case GAS_CHP: + return avgc_data.p_avgEfficiencyCHP_thermal_fr; + default: + throw new RuntimeException("Unable to find Gas to Heat efficiency of heatingType: " + heatingType); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753951039103</Id> + <Name>f_getRatioGasUsedForHeating</Name> + <X>540</X> + <Y>430</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>if (surveyGC.getNaturalGas().getPercentageUsedForHeating() != null) { + return surveyGC.getNaturalGas().getPercentageUsedForHeating() / 100.0; +} +else { + return 1.0; +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753955686832</Id> + <Name>f_createGasProfileFromEstimates</Name> + <X>900</X> + <Y>340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>double yearlyGasDelivery_m3 = engineGC.p_floorSurfaceArea_m2 * avgc_data.p_avgCompanyGasConsumption_m3pm2; +f_createGasProfileFromAnnualGasTotal(engineGC, yearlyGasDelivery_m3); + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753961830063</Id> + <Name>f_createHeatProfileFromEstimates</Name> + <X>900</X> + <Y>430</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>double yearlyGasConsumption_m3 = engineGC.p_floorSurfaceArea_m2 * avgc_data.p_avgCompanyGasConsumption_m3pm2; +double yearlyHeatConsumption_kWh = yearlyGasConsumption_m3 * avgc_data.p_gas_kWhpm3; +return f_createHeatProfileFromAnnualHeatTotal( engineGC, yearlyHeatConsumption_kWh );</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753964366889</Id> + <Name>f_createHeatProfileFromHeatTS</Name> + <X>520</X> + <Y>470</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>// Heat profile +double[] profile = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getHeat().getHeatDeliveryTimeSeries_kWh()); +// We multiply by the delivery set efficiency to go from delivery to consumption +// TODO: Fix this for LT_DISTRICTHEAT, they have a different efficiency! +ZeroMath.arrayMultiply(profile, avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr); +// Then we create the profile asset and name it +J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.HEAT, profile, null , energyModel.p_timeStep_h); +j_ea.energyAssetName = engineGC.p_ownerID + " custom building heat profile"; + +return max(profile)/energyModel.p_timeStep_h;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753449467894</Id> + <Name>f_reconstructGridConnections1</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2070</X> + <Y>480</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>energyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>// Code Instead of Agent.goToPopulation() (which resets many variables to default!) +GC.energyModel = energyModel; +try{ // Reflection trick to get to Agent.owner private field + GC.forceSetOwner(GC,pop); +} catch (Exception e) { + e.printStackTrace(); +} + +traceln("GC owner: %s", GC.getOwner()); +GC.setEngine(getEngine()); +GC.instantiateBaseStructure_xjal(); +GC.setEnvironment(pop.getEnvironment()); + +pop._add(GC); // Add to the population +int popSize = pop.size(); +pop.callCreate(GC, popSize); // Update population object +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753451091785</Id> + <Name>f_addMixins_old</Name> + <X>2390</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>v_objectMapper.addMixIn(Agent.class, AgentMixin.class); +v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); +//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); +//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); +//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); +v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); + +v_objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, IgnoreClassMixin.class); +//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); + +// Weirdness regarding material handling toolbox +v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753964605708</Id> + <Name>f_createHeatProfileFromAnnualHeatTotal</Name> + <X>900</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyConsumptionHeat_kWh</Name> + <Type>double</Type> + </Parameter> + <Body>// We assume the heat consumption follows a standard profile +String profileName = "default_building_heat_demand_fr"; +J_ProfilePointer profilePointer = energyModel.f_findProfile(profileName); +new J_EAConsumption(engineGC, OL_EnergyAssetType.HEAT_DEMAND, profileName, yearlyConsumptionHeat_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, profilePointer); + +return yearlyConsumptionHeat_kWh * max(profilePointer.getAllValues())/energyModel.p_timeStep_h;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753964654729</Id> + <Name>f_createHeatProfileFromSurvey</Name> + <X>500</X> + <Y>450</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>if (surveyGC.getHeat() != null && surveyGC.getHeat().getHeatDeliveryTimeSeries_kWh() != null) { + return f_createHeatProfileFromHeatTS(engineGC, surveyGC); +} +else if (surveyGC.getHeat() != null && surveyGC.getHeat().getAnnualDistrictHeatingDelivery_GJ() != null) { + double yearlyHeatDelivery_kWh = surveyGC.getHeat().getAnnualDistrictHeatingDelivery_GJ()*277.777778 ; + // TODO: Fix this for LT_DISTRICTHEAT, they have a different efficiency! + double yearlyHeatConsumption_kWh = yearlyHeatDelivery_kWh * avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; + return f_createHeatProfileFromAnnualHeatTotal(engineGC, yearlyHeatConsumption_kWh); +} +else { + return f_createHeatProfileFromEstimates(engineGC); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753968816374</Id> + <Name>f_setDefaultHeatingStrategies</Name> + <X>80</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>// Triples ( heatingType, hasThermalBuilding, hasHeatBuffer ) +Triple<OL_GridConnectionHeatingType, Boolean, Boolean> triple = null; + +triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrol.class ); +triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrol.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementProfileHybridHeatPump.class ); +triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrolHybridHeatpump.class ); +triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrolHybridHeatpump.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class );</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754048849906</Id> + <Name>f_addCustomHeatingSetup</Name> + <X>480</X> + <Y>290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>throw new RuntimeException("HeatingType is CUSTOM. You must override the function: f_addCustomHeatingSetup!");</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753712630322</Id> + <Name>f_reconstructActors</Name> + <X>2083</X> + <Y>322</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>for(Actor AC : deserializedEnergyModel.c_actors){ + + if (AC instanceof ConnectionOwner) { + ((ConnectionOwner)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_connectionOwners, deserializedEnergyModel); + } else if (AC instanceof EnergySupplier) { + ((EnergySupplier)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energySuppliers, deserializedEnergyModel); + } else if (AC instanceof EnergyCoop) { + ((EnergyCoop)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energyCoops, deserializedEnergyModel); + //((EnergyCoop)AC).f_startAfterDeserialisation(); + } else if (AC instanceof GridOperator) { + ((GridOperator)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_gridOperators, deserializedEnergyModel); + } + } +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754050106254</Id> + <Name>f_addCustomHeatAsset</Name> + <X>920</X> + <Y>520</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>maxHeatOutputPower_kW</Name> + <Type>double</Type> + </Parameter> + <Body>throw new RuntimeException("HeatingType is CUSTOM. You must override the function: f_addCustomHeatAsset!");</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753712697685</Id> + <Name>f_reconstructGIS_Objects</Name> + <X>2083</X> + <Y>362</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Parameter> + <Name>c_GISObjects</Name> + <Type>ArrayList<GIS_Object></Type> + </Parameter> + <Body>for(GIS_Object GO : c_GISObjects){ + GO.gisRegion = c_GISregions.get(GO.p_id); + + if (GO instanceof GIS_Building) { + ((GIS_Building)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Buildings, deserializedEnergyModel); + } else if (GO instanceof GIS_Parcel) { + ((GIS_Parcel)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Parcels, deserializedEnergyModel); + } else { + GO.energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Objects, deserializedEnergyModel); + //GO.f_startAfterDeserialisation(); + } + GO.f_resetStyle(); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753712761420</Id> + <Name>f_reconstructGridNodes</Name> + <X>2083</X> + <Y>342</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Parameter> + <Name>c_gridNodes</Name> + <Type>ArrayList<GridNode></Type> + </Parameter> + <Body>for(GridNode GN : c_gridNodes){ + GN.energyModel = deserializedEnergyModel; + f_reconstructAgent(GN, deserializedEnergyModel.pop_gridNodes, deserializedEnergyModel); +} +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1755866291695</Id> + <Name>f_addCarsToHouses</Name> + <X>460</X> + <Y>720</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>house</Name> + <Type>GCHouse</Type> + </Parameter> + <Body>double probabilityForLeftOverCar = house.p_eigenOprit ? v_probabilityForAdditionalCar_privateParking : v_probabilityForAdditionalCar_publicParking; +int amountOfOwnedCars = (int) floor(avgc_data.p_avgNrOfCarsPerHouse) + (randomTrue(probabilityForLeftOverCar) ? 1 : 0); + +////Create Vehicles based on the amount of owned cars +for(int i = 0; i < amountOfOwnedCars ; i++){ + double tripTrackerScaling = 1; + + if(i>0){//If more than 1 car: 2+ cars all have smaller travel average travel distance + tripTrackerScaling *= avgc_data.p_avgAnnualTravelDistanceSecondVSFirstCar_fr; + } + //Oprit? -> only then you should have a chance to start with EV (public ev is not supported by sliders, public chargepoint is then used instead) + if( house.p_eigenOprit){ + if (randomTrue( avgc_data.p_shareOfElectricVehicleOwnership)){ + J_EAEV ev = f_addElectricVehicle(house, OL_EnergyAssetType.ELECTRIC_VEHICLE, true, 0, 0); + ev.tripTracker.setAnnualDistance_km(ev.tripTracker.getAnnualDistance_km()*tripTrackerScaling); + } + else{ + J_EADieselVehicle dieselVehicle = f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); + dieselVehicle.tripTracker.setAnnualDistance_km(dieselVehicle.tripTracker.getAnnualDistance_km()*tripTrackerScaling); + } + } + else { + J_EADieselVehicle dieselVehicle = f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); + dieselVehicle.tripTracker.setAnnualDistance_km(dieselVehicle.tripTracker.getAnnualDistance_km()*tripTrackerScaling); + } +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1755876470177</Id> + <Name>f_calculateProbabilitiesForAdditionalCar</Name> + <X>440</X> + <Y>660</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>buildingDataHouses</Name> + <Type>List<Building_data></Type> + </Parameter> + <Body>//Precalculate the amount of households and households that have private parking for vehicle distribution +int totalNumberOfHouses = 0; +int numberOfHousesPrivateParking = 0; +for (Building_data houseBuildingData : buildingDataHouses) { + totalNumberOfHouses++; + if(houseBuildingData.has_private_parking() != null && houseBuildingData.has_private_parking()){ + numberOfHousesPrivateParking++; + } +} + +//Determine the total cars in the area based on the average of the area +int totalCars = roundToInt(avgc_data.p_avgNrOfCarsPerHouse * totalNumberOfHouses); +int numberOfHousesPublicParking = totalNumberOfHouses - numberOfHousesPrivateParking; + +//Calculate the base number of cars that everyone gets, and the total leftover cars that should be distributed +int baseCars = (int) floor(avgc_data.p_avgNrOfCarsPerHouse); +int leftOverCars = totalCars - baseCars * totalNumberOfHouses; + +// Determine leftover cars distributed for private and public parking (bias to private parking) +int leftOverForPrivateParking = min(leftOverCars, numberOfHousesPrivateParking); +int leftOverForPublicParking = max(0, leftOverCars - leftOverForPrivateParking); + +//Calculate the leftover car probability for private and public parking +v_probabilityForAdditionalCar_privateParking = ((double) leftOverForPrivateParking) / numberOfHousesPrivateParking; // Calculate probability for leftover car for private parking +v_probabilityForAdditionalCar_publicParking = ((double) leftOverForPublicParking) / numberOfHousesPublicParking; // Calculate probability for leftover car for public parking +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1756395236522</Id> + <Name>f_initializeInterfacePointers</Name> + <X>30</X> + <Y>950</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Set parameters/pointers in the interface +zero_Interface.zero_loader = this; +zero_Interface.energyModel = energyModel; +zero_Interface.uI_Results.energyModel = energyModel; +zero_Interface.project_data = project_data; +zero_Interface.settings = settings; +zero_Interface.user = user; +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1756735137677</Id> + <Name>f_reconstructOrderedCollections</Name> + <X>2080</X> + <Y>400</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>saveObject</Name> + <Type>J_ModelSave</Type> + </Parameter> + <Body>zero_Interface.c_orderedPVSystemsCompanies = saveObject.c_orderedPVSystemsCompanies; +zero_Interface.c_orderedPVSystemsHouses = saveObject.c_orderedPVSystemsHouses; +zero_Interface.c_orderedVehicles = saveObject.c_orderedVehicles; +zero_Interface.c_orderedHeatingSystemsCompanies = saveObject.c_orderedHeatingSystemsCompanies; +zero_Interface.c_orderedHeatingSystemsHouses = saveObject.c_orderedHeatingSystemsHouses; +zero_Interface.c_orderedVehiclesPrivateParking = saveObject.c_orderedVehiclesPrivateParking; +zero_Interface.c_orderedParkingSpaces = saveObject.c_orderedParkingSpaces; +zero_Interface.c_orderedV1GChargers = saveObject.c_orderedV1GChargers; +zero_Interface.c_orderedV2GChargers = saveObject.c_orderedV2GChargers; +zero_Interface.c_orderedPublicChargers = saveObject.c_orderedPublicChargers; +zero_Interface.c_mappingOfVehiclesPerCharger = saveObject.c_mappingOfVehiclesPerCharger; +zero_Interface.c_scenarioMap_Current = saveObject.c_scenarioMap_Current; +zero_Interface.c_scenarioMap_Future = saveObject.c_scenarioMap_Future; + + +/* +List<ConnectionOwner> c_COCompanies = findAll(zero_Interface.energyModel.pop_connectionOwners, p -> p.p_connectionOwnerType == OL_ConnectionOwnerType.COMPANY); + + +int i = 0; +for (ConnectionOwner CO : c_COCompanies) { + UI_company companyUI = zero_Interface.c_companyUIs.get(CO.p_connectionOwnerIndexNr); + companyUI.p_company = CO; + companyUI.c_ownedGridConnections = companyUI.p_company.f_getOwnedGridConnections(); + companyUI.c_additionalVehicles = saveObject.c_additionalVehicleHashMaps.get(i); + companyUI.f_setSelectedGCSliders(); + i++; +} +*/ +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1758714675284</Id> + <Name>f_getSimulationTimeVariables</Name> + <X>80</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Sim start year +v_simStartYear = getExperiment().getEngine().getStartDate().getYear() + 1900; // 1900 years because of Java convention + +// Create date at start of simulation year to use to calculate v_simStartHour_h +Date d = new Date(); +d.setYear(v_simStartYear - 1900); // 1900 jaar Compenseren door anylogic bug +d.setMonth(0); +d.setHours(0); +d.setSeconds(0); +d.setMinutes(0); +d.setDate(1); + +//Calculate sim start hour +v_simStartHour_h = roundToInt((getExperiment().getEngine().getStartDate().getTime() - d.getTime())/1000.0/60/60); //Get time is in ms -> converted into hours + +//Fix for if start is within summer time, the v_simStartHour_h is not correct anymore +double summerTimeStart_h = avgc_data.map_yearlySummerWinterTimeStartHour.get(v_simStartYear).getFirst(); +double winterTimeStart_h = avgc_data.map_yearlySummerWinterTimeStartHour.get(v_simStartYear).getSecond(); +if(v_simStartHour_h > summerTimeStart_h && v_simStartHour_h < winterTimeStart_h){ + v_simStartHour_h += 1; +} + + + +//Set sim duration if it is set +if(getExperiment().getEngine().getStopDate() != null){ //If experiment has set time, it gets bias + v_simDuration_h = roundToInt(((double)getExperiment().getEngine().getStopDate().getTime() - getExperiment().getEngine().getStartDate().getTime())/1000.0/60/60); //Get time is in ms -> converted into hours + if(v_simStartHour_h > summerTimeStart_h && v_simStartHour_h + v_simDuration_h > winterTimeStart_h){//Compensate if start time is in summer time, and end time is in winter time -> simulation would otherwise have 1 hour too much + v_simDuration_h -= 1; + } + if(v_simStartHour_h < summerTimeStart_h && v_simStartHour_h + v_simDuration_h < winterTimeStart_h){//Compensate if start time is in winter time, and end time is in summer time -> simulation would otherwise have 1 hour too less + v_simDuration_h += 1; + } +} +else if(settings.simDuration_h() != null){//Else if manual set, use that instead + v_simDuration_h = settings.simDuration_h(); +} + +if (v_simStartHour_h % 24 != 0) { + throw new RuntimeException("Impossible to run a model that does not start at midnight. Please check the start in the simulation settings."); +} +if (v_simDuration_h % 24 != 0) { + throw new RuntimeException("Impossible to run a model that does not have a runtime that is an exact multiple of a day. Please check the start and endtime in the simulation settings."); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1759128970777</Id> + <Name>f_addMixins</Name> + <X>2100</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>v_objectMapper.addMixIn(Agent.class, AgentMixin.class); +//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); + +//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); +//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); + +//Ignore classes + +v_objectMapper.addMixIn(java.awt.Font.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(java.awt.Color.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(java.awt.Paint.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeLine.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeLineFill.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeText.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(DataSet.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(Level.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(TableFunction.class, IgnoreClassMixin.class); +//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeModelElementsGroup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeButton.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.analysis.TimePlot.class, IgnoreClassMixin.class); + + +// Weirdness regarding material handling toolbox +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1759133710571</Id> + <Name>f_loadScenario</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2080</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>index</Name> + <Type>int</Type> + </Parameter> + <Body>if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { + zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's in te laden. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + return; +} +traceln("Loading modelSave..."); +//pauseSimulation(); + +// Collect GIS_Objects into hashmap, to link to new EnergyModel. +zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +pauseSimulation(); +try { + v_objectMapper = new ObjectMapper(); + f_addMixins(); + + var repository = UserScenarioRepository.builder() + .userId(UUID.fromString(zero_Interface.user.userIdToken())) + .modelName(zero_Interface.project_data.project_name()) + .build(); + + var scenarioList = repository.listUserScenarios(); + + // Deserialize the JSON into a new EnergyModel instance: + var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(index).getId()); + + /*int n = 200; // how many characters you want + byte[] buffer = new byte[n]; + int read = jsonStream.read(buffer, 0, n); + + if (read > 0) { + String preview = new String(buffer, 0, read, "UTF-8"); + System.out.println(preview); + }*/ + + //jsonStream.close(); + + //traceln("jsonStream: %s", jsonStream.toString().substring(0,30)); + J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); + //J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); + + EnergyModel deserializedEnergyModel = saveObject.energyModel; + + // Reconstruct all Agents + f_reconstructEnergyModel(deserializedEnergyModel); + f_reconstructGridConnections(deserializedEnergyModel); + f_reconstructActors(deserializedEnergyModel); + f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); + + f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); + + // Get profilePointer tableFunctions from 'original' energyModel + deserializedEnergyModel.c_profiles.forEach(x->{ + J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); + x.setTableFunction(origProfile.getTableFunction()); + }); + // get heatingTypeHashmap from 'old' energyModel. + deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; + + zero_Interface.zero_loader.energyModel = deserializedEnergyModel; + zero_Interface.energyModel = deserializedEnergyModel; + zero_Interface.uI_Results.energyModel = deserializedEnergyModel; + uI_Results.energyModel = deserializedEnergyModel; + + deserializedEnergyModel.f_startAfterDeserialisation(); + + f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); + + + // Putting back the ordered collections in the interface + f_reconstructOrderedCollections(saveObject); + + //zero_Interface.f_clearSelectionAndSelectEnergyModel(); + + /* + zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); + uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); + zero_Interface.f_updateMainInterfaceSliders(); + + zero_Interface.f_resetSettings(); + */ + + ///button_exit.action(); + + ///zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); + // v_energyHubCoop not updated to point to 'new' coop + //uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); + + ///zero_Interface.f_simulateYearFromMainInterface(); + + v_energyHubCoop = findFirst(zero_Interface.energyModel.pop_energyCoops,x->x.p_actorID.equals("eHubConfiguratorCoop")); + if (v_energyHubCoop == null){ + throw new RuntimeException("No energyCoop found with p_actorID = eHubConfiguratorCoop"); + } + zero_Interface.v_customEnergyCoop = v_energyHubCoop; + // Update the E-Hub Dashboard with the loaded E-Hub from savefile + f_initializeEnergyHubMemberNames(); + uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); + uI_Results.f_updateResultsUI(v_energyHubCoop); + + // Update the main interface with the loaded E-Hub from savefile + zero_Interface.c_selectedGridConnections = new ArrayList<>(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()); + + // Reset all colors on the GIS map + zero_Interface.energyModel.pop_GIS_Buildings.forEach(x -> zero_Interface.f_styleAreas(x)); + zero_Interface.energyModel.pop_GIS_Objects.forEach(x -> zero_Interface.f_styleAreas(x)); + zero_Interface.energyModel.pop_GIS_Parcels.forEach(x -> zero_Interface.f_styleAreas(x)); + + // Color all selected GC + for (GridConnection gc : zero_Interface.c_selectedGridConnections) { + gc.c_connectedGISObjects.forEach(x -> x.gisRegion.setFillColor(zero_Interface.v_selectionColor)); + } + + // Simulate a year + gr_simulateYearEnergyHub.setVisible(false); + gr_loadIconYearSimulationEnergyHub.setVisible(true); + + + zero_Interface.f_simulateYearFromMainInterface(); + + traceln("ModelSave loaded succesfully!"); + + //zero_Interface.b_inEnergyHubSelectionMode = true; + //zero_Interface.f_finalizeEnergyHubConfiguration(); + + //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); + + /* + Date startDate = getExperiment().getEngine().getStartDate(); + int day = getExperiment().getEngine().getDayOfMonth(); + int month = getExperiment().getEngine().getMonth(); + traceln("day: " + day); + traceln("month: " + month); + startDate.setMonth(startDate.getMonth() - month); + startDate.setDate(startDate.getDate() - day); + getExperiment().getEngine().setStartDate(startDate); + */ + +} catch (IOException e) { + e.printStackTrace(); +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>java.util.UUID</ReturnType> + <Id>1762185034341</Id> + <Name>f_getUserUUID</Name> + <X>2280</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>p_userIdToken</Name> + <Type>String</Type> + </Parameter> + <Body>java.util.UUID usedId = new JWTDecoder().jwtToUserId(p_userIdToken); +return usedId; +</Body> + </Function> + </Functions> + <Connectivity> + <TextFile> + <Id>1756980503493</Id> + <Name>inputCSVcookingActivities</Name> + <X>-369</X> + <Y>759</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <FileType>FILE</FileType> + <Url>null</Url> + <ResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>data_Generic/inputECookerPatterns.csv</ClassName> + </ResourceReference> + <FileMode>READ</FileMode> + <CharsetName>null</CharsetName> + <Separators>,</Separators> + </TextFile> + <TextFile> + <Id>1756980506290</Id> + <Name>inputCSVhouseholdTrips</Name> + <X>-369</X> + <Y>799</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <FileType>FILE</FileType> + <Url>null</Url> + <ResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>data_Generic/AlbatrossProcessedVehicleTrips.csv</ClassName> + </ResourceReference> + <FileMode>READ</FileMode> + <CharsetName>null</CharsetName> + <Separators>,</Separators> + </TextFile> + <TextFile> + <Id>1756980507645</Id> + <Name>inputCSVtruckTrips</Name> + <X>-369</X> + <Y>779</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <FileType>FILE</FileType> + <Url>null</Url> + <ResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>data_Generic/inputTruckTripPatterns.csv</ClassName> + </ResourceReference> + <FileMode>READ</FileMode> + <CharsetName>null</CharsetName> + <Separators>,</Separators> + </TextFile> + </Connectivity> + <AgentLinks> + <AgentLink> + <Id>1726584206083</Id> + <Name>connections</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <EmbeddedObjects> + <EmbeddedObject> + <Id>1726584206041</Id> + <Name>energyModel</Name> + <X>30</X> + <Y>890</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zero_engine</PackageName> + <ClassName>EnergyModel</ClassName> + </ActiveObjectClass> + <GenericParameterSubstitute> + <GenericParameterSubstituteReference> + <PackageName>zero_engine</PackageName> + <ClassName>EnergyModel</ClassName> + <ItemName>1658477103138</ItemName> + </GenericParameterSubstituteReference> + </GenericParameterSubstitute> + <Parameters> + <Parameter> + <Name>p_timeStep_h</Name> + </Parameter> + <Parameter> + <Name>p_forecastTime_h</Name> + </Parameter> + <Parameter> + <Name>p_year</Name> + </Parameter> + <Parameter> + <Name>avgc_data</Name> + </Parameter> + <Parameter> + <Name>b_parallelizeConnectionOwners</Name> + </Parameter> + <Parameter> + <Name>b_parallelizeGridConnections</Name> + </Parameter> + <Parameter> + <Name>b_enableDLR</Name> + </Parameter> + <Parameter> + <Name>p_winterWeekNumber</Name> + </Parameter> + <Parameter> + <Name>p_summerWeekNumber</Name> + </Parameter> + <Parameter> + <Name>p_runStartTime_h</Name> + </Parameter> + <Parameter> + <Name>p_runEndTime_h</Name> + </Parameter> + <Parameter> + <Name>b_isInitialized</Name> + </Parameter> + <Parameter> + <Name>b_storePreviousRapidRunData</Name> + </Parameter> + <Parameter> + <Name>p_regionName</Name> + </Parameter> + <Parameter> + <Name>p_truckTripsCsv</Name> + </Parameter> + <Parameter> + <Name>p_householdTripsCsv</Name> + </Parameter> + <Parameter> + <Name>p_cookingPatternCsv</Name> + </Parameter> + <Parameter> + <Name>b_isDeserialised</Name> + </Parameter> + </Parameters> + <ReplicationFlag>false</ReplicationFlag> + <Replication Class="CodeValue"> + <Code>100</Code> + </Replication> + <CollectionType>ARRAY_LIST_BASED</CollectionType> + <InEnvironment>true</InEnvironment> + <InitialLocationType>XYZ</InitialLocationType> + <XCode Class="CodeValue"> + <Code>0</Code> + </XCode> + <YCode Class="CodeValue"> + <Code>0</Code> + </YCode> + <ZCode Class="CodeValue"> + <Code>0</Code> + </ZCode> + <ColumnCode Class="CodeValue"> + <Code>0</Code> + </ColumnCode> + <RowCode Class="CodeValue"> + <Code>0</Code> + </RowCode> + <LocationNameCode Class="CodeValue"> + <Code>""</Code> + </LocationNameCode> + <InitializationType>SPECIFIED_NUMBER</InitializationType> + <InitializationDatabaseTableQuery> + <Id>1658477089957</Id> + <TableReference/> + </InitializationDatabaseTableQuery> + <InitializationDatabaseType>ONE_AGENT_PER_DATABASE_RECORD</InitializationDatabaseType> + <QuantityColumn/> + </EmbeddedObject> + <EmbeddedObject> + <Id>1726584829907</Id> + <Name>avgc_data</Name> + <X>-370</X> + <Y>830</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>AVGC_data</ClassName> + </ActiveObjectClass> + <GenericParameterSubstitute> + <GenericParameterSubstituteReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>AVGC_data</ClassName> + <ItemName>1726584205523</ItemName> + </GenericParameterSubstituteReference> + </GenericParameterSubstitute> + <Parameters> + <Parameter> + <Name>p_avgHouseConnectionCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgHouseHeatingMethod</Name> + </Parameter> + <Parameter> + <Name>p_avgUtilityConnectionCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgUtilityHeatingMethod</Name> + </Parameter> + <Parameter> + <Name>p_avgHouseElectricityConsumption_kWh_yr</Name> + </Parameter> + <Parameter> + <Name>p_avgHouseGasConsumption_m3_yr</Name> + </Parameter> + <Parameter> + <Name>p_shareOfElectricVehicleOwnership</Name> + </Parameter> + <Parameter> + <Name>p_ratioHouseInstalledPV</Name> + </Parameter> + <Parameter> + <Name>p_avgHousePVInstallationPower_kWp</Name> + </Parameter> + <Parameter> + <Name>p_avgEVStorageCar_kWh</Name> + </Parameter> + <Parameter> + <Name>p_avgEVMaxChargePowerCar_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgEVStorageVan_kWh</Name> + </Parameter> + <Parameter> + <Name>p_avgEVStorageTruck_kWh</Name> + </Parameter> + <Parameter> + <Name>p_avgEVMaxChargePowerVan_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgEVMaxChargePowerTruck_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgEVEnergyConsumptionCar_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgEVEnergyConsumptionVan_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgEVEnergyConsumptionTruck_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_gas_kWhpm3</Name> + </Parameter> + <Parameter> + <Name>p_hydrogenEnergyDensity_kWh_Nm3</Name> + </Parameter> + <Parameter> + <Name>p_hydrogenDensity_kg_Nm3</Name> + </Parameter> + <Parameter> + <Name>p_oxygenDensity_kg_Nm3</Name> + </Parameter> + <Parameter> + <Name>p_oxygenProduction_kgO2pkgH2</Name> + </Parameter> + <Parameter> + <Name>p_hydrogenSpecificEnergy_kWh_kg</Name> + </Parameter> + <Parameter> + <Name>p_diesel_kWhpl</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionCar_kmpl</Name> + </Parameter> + <Parameter> + <Name>p_avgGasolineConsumptionCar_kmpl</Name> + </Parameter> + <Parameter> + <Name>p_gasoline_kWhpl</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionCar_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgGasolineConsumptionCar_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionVan_kmpl</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionVan_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionTruck_kmpl</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionTruck_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgCOPHeatpump</Name> + </Parameter> + <Parameter> + <Name>p_avgUtilityPVPower_kWp</Name> + </Parameter> + <Parameter> + <Name>p_ratioElectricTrucks</Name> + </Parameter> + <Parameter> + <Name>p_avgCompanyHeatingMethod</Name> + </Parameter> + <Parameter> + <Name>p_avgPVPower_kWpm2</Name> + </Parameter> + <Parameter> + <Name>p_avgRatioBatteryCapacity_v_Power</Name> + </Parameter> + <Parameter> + <Name>p_avgHydrogenConsumptionCar_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgHydrogenConsumptionVan_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgHydrogenConsumptionTruck_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgRatioRoofPotentialPV</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyHeatpump_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureElectricHeatpump_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyGasBurner_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureGasBurner_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyHydrogenBurner_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureHydrogenBurner_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgVehiclesPerChargePoint</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistanceVan_km</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistanceCompanyCar_km</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistanceTruck_km</Name> + </Parameter> + <Parameter> + <Name>p_avgFullLoadHoursPV_hr</Name> + </Parameter> + <Parameter> + <Name>p_avgCompanyElectricityConsumption_kWhpm2</Name> + </Parameter> + <Parameter> + <Name>p_avgCompanyGasConsumption_m3pm2</Name> + </Parameter> + <Parameter> + <Name>p_avgCompanyHeatConsumption_kWhpm2</Name> + </Parameter> + <Parameter> + <Name>p_avgSolarFieldPower_kWppha</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyCHP_thermal_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyCHP_electric_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureCHP_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyDistrictHeatingDeliverySet_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureDistrictHeatingDeliverySet_degC</Name> + </Parameter> + <Parameter> + <Name>p_v2gProbability</Name> + </Parameter> + <Parameter> + <Name>p_v1gProbability</Name> + </Parameter> + <Parameter> + <Name>p_avgEVsPerPublicCharger</Name> + </Parameter> + <Parameter> + <Name>p_avgPTPower_kWpm2</Name> + </Parameter> + <Parameter> + <Name>p_avgHeatBufferWaterVolumePerHPPower_m3pkW</Name> + </Parameter> + <Parameter> + <Name>p_avgHeatBufferWaterVolumePerPTSurface_m3pm2</Name> + </Parameter> + <Parameter> + <Name>p_waterHeatCapacity_JpkgK</Name> + </Parameter> + <Parameter> + <Name>p_waterDensity_kgpm3</Name> + </Parameter> + <Parameter> + <Name>p_avgMaxHeatBufferTemperature_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgMinHeatBufferTemperature_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgPTPanelSize_m2</Name> + </Parameter> + <Parameter> + <Name>p_avgRatioHouseBatteryStorageCapacity_v_PVPower</Name> + </Parameter> + <Parameter> + <Name>p_avgNrOfCarsPerHouse</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistancePrivateCar_km</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistanceSecondVSFirstCar_fr</Name> + </Parameter> + <Parameter> + <Name>map_yearlySummerWinterTimeStartHour</Name> + </Parameter> + <Parameter> + <Name>p_minHeatpumpElectricCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_minGasBurnerOutputCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_minHydrogenBurnerOutputCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_minDistrictHeatingDeliverySetOutputCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureHybridHeatpump_degC</Name> + </Parameter> + </Parameters> + <ReplicationFlag>false</ReplicationFlag> + <Replication Class="CodeValue"> + <Code>100</Code> + </Replication> + <CollectionType>ARRAY_LIST_BASED</CollectionType> + <InEnvironment>true</InEnvironment> + <InitialLocationType>XYZ</InitialLocationType> + <XCode Class="CodeValue"> + <Code>0</Code> + </XCode> + <YCode Class="CodeValue"> + <Code>0</Code> + </YCode> + <ZCode Class="CodeValue"> + <Code>0</Code> + </ZCode> + <ColumnCode Class="CodeValue"> + <Code>0</Code> + </ColumnCode> + <RowCode Class="CodeValue"> + <Code>0</Code> + </RowCode> + <LocationNameCode Class="CodeValue"> + <Code>""</Code> + </LocationNameCode> + <InitializationType>SPECIFIED_NUMBER</InitializationType> + <InitializationDatabaseTableQuery> + <Id>1658477089956</Id> + <TableReference/> + </InitializationDatabaseTableQuery> + <InitializationDatabaseType>ONE_AGENT_PER_DATABASE_RECORD</InitializationDatabaseType> + <QuantityColumn/> + </EmbeddedObject> + </EmbeddedObjects> + <Presentation> + <Level> + <Id>1726584205903</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1726584205905</Id> + <Name>rect_canvas</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16744448</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>1920</Width> + <Height>980</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1726584205907</Id> + <Name>rect_projectDataTracking</Name> + <X>1520</X> + <Y>20</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-65536</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>380</Width> + <Height>360</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1726584205909</Id> + <Name>rect_loader</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16744448</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>169</Width> + <Height>40</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205911</Id> + <Name>txt_input</Name> + <X>55</X> + <Y>7</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16744448</Color> + <Text>Loader</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205915</Id> + <Name>rect_connectedModels</Name> + <X>0</X> + <Y>840</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16744448</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>290</Width> + <Height>140</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205917</Id> + <Name>t_connectedModels</Name> + <X>20</X> + <Y>850</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Connected Models</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205921</Id> + <Name>txt_projectDataTracking</Name> + <X>1540</X> + <Y>40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Time and data Tracking</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205923</Id> + <Name>rect_defaultStartup</Name> + <X>20</X> + <Y>50</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>240</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1726584205925</Id> + <Name>rect_dataCollections</Name> + <X>-440</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-360334</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>437</Width> + <Height>980</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1726584205927</Id> + <Name>rect_GridNodeFunctions</Name> + <X>20</X> + <Y>500</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>120</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205929</Id> + <Name>txt_loaderStartupDefault</Name> + <X>40</X> + <Y>60</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Loader default startup:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205931</Id> + <Name>txt_createGridNodes</Name> + <X>40</X> + <Y>510</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Grid node functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205933</Id> + <Name>rect_dataInput</Name> + <X>-440</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-360334</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>169</Width> + <Height>40</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205935</Id> + <Name>text</Name> + <X>-400</X> + <Y>10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-360334</Color> + <Text>Data input</Text> + <Font> + <Name>SansSerif</Name> + <Size>16</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205937</Id> + <Name>t_inputFiles</Name> + <X>-380</X> + <Y>720</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Basic Input files:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205939</Id> + <Name>t_inputFileFunctions</Name> + <X>-400</X> + <Y>60</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Read input files to database:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205941</Id> + <Name>txt_dataCollectionFill</Name> + <X>-400</X> + <Y>160</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Fill the data collections:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205943</Id> + <Name>rect_ActorFunctions</Name> + <X>20</X> + <Y>420</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>60</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205945</Id> + <Name>txt_createActorFunctions</Name> + <X>40</X> + <Y>430</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Actor functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205947</Id> + <Name>rect_createEnergyGC</Name> + <X>400</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>400</Width> + <Height>230</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205949</Id> + <Name>txt_createEnergyGC</Name> + <X>410</X> + <Y>750</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Energy GC functions +</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1726584205951</Id> + <Name>gr_consumerGC_residential</Name> + <X>570</X> + <Y>610</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1726584205953</Id> + <Name>rect_createHouses</Name> + <X>-170</X> + <Y>-20</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>400</Width> + <Height>140</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205955</Id> + <Name>txt_createHouses</Name> + <X>-160</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Houses</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1726584205957</Id> + <Name>gr_consumerGC_businesspark</Name> + <X>570</X> + <Y>230</Y> + <Label> + <X>9.883</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1726584205959</Id> + <Name>rect_createCompanies</Name> + <X>-170</X> + <Y>-168.017</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>400</Width> + <Height>508.017</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205961</Id> + <Name>txt_createCompanies</Name> + <X>-158.134</X> + <Y>-158.134</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Companies</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1726584205963</Id> + <Name>gr_addEAFunctions</Name> + <X>1040</X> + <Y>200</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1726584205965</Id> + <Name>rect_addEA</Name> + <X>-180</X> + <Y>-140</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>450</Width> + <Height>780</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205967</Id> + <Name>txt_addEnergyAssetFunctions</Name> + <X>-160</X> + <Y>-130</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Add EA functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1726584205969</Id> + <Name>gr_createGISObjects</Name> + <X>1700</X> + <Y>610</Y> + <Label> + <X>9.938</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1726584205971</Id> + <Name>rect_createGISObjects</Name> + <X>-180</X> + <Y>-120</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>380</Width> + <Height>230</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205973</Id> + <Name>txt_createGISObjects</Name> + <X>-161.492</X> + <Y>-109.13</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create GIS objects</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1727792637339</Id> + <Name>txt_overwriteDatabaseValues</Name> + <X>-400</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Overwrite specific database values:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1730217549237</Id> + <Name>rect_supportFunctions</Name> + <X>1520</X> + <Y>830</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>380</Width> + <Height>140</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1730217578770</Id> + <Name>txt_supportFunctions</Name> + <X>1540</X> + <Y>840</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Support Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1742919550888</Id> + <Name>rect_connectToFunctions</Name> + <X>1520</X> + <Y>730</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>380</Width> + <Height>80</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1742919565761</Id> + <Name>txt_connectToFunctions</Name> + <X>1540</X> + <Y>750</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Connect To Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1744808981703</Id> + <Name>txt_DebuggingDataCollections</Name> + <X>-400</X> + <Y>870</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Data collections used for Debugging</Text> + <Font> + <Name>SansSerif</Name> + <Size>16</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1747830521606</Id> + <Name>rect_addSpecificSliderGC</Name> + <X>20</X> + <Y>300</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>100</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1747830569531</Id> + <Name>txt_addSpecificSliderGC</Name> + <X>30</X> + <Y>310</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Add specific slider GC</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1750856789809</Id> + <Name>rect_subScopeFunctions</Name> + <X>20</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>180</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1750857047506</Id> + <Name>txt_filterSubScopeFunctions</Name> + <X>40</X> + <Y>650</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>SubScope filter functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1753349205420</Id> + <Name>rect_defaultStartup1</Name> + <X>2010</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>420</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1753349205422</Id> + <Name>txt_loaderStartupDeserialisation</Name> + <X>2030</X> + <Y>9</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Loader after deserialisation (in Progress!)</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1753449467882</Id> + <Name>deserialize2</Name> + <X>2063.333</X> + <Y>172</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="162" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode> +pauseSimulation(); +// Collect GIS_Objects into hashmap, to link to new EnergyModel. +c_GISregions.clear(); +energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); + +try { + v_objectMapper = new ObjectMapper(); + f_addMixins(); + + /* + String userIdToken = "6b87f0f9-fdf6-4c05-9e0f-b75e46950113"; //user.userIdToken(); + + var repository = UserScenarioRepository.builder() + //.userId(UUID.fromString("6b87f0f9-fdf6-4c05-9e0f-b75e46950113")) + .userId(UUID.fromString(userIdToken)) + .modelName("ModelTestName") + .build(); + + var scenarioList = repository.listUserScenarios(); + for (var scenario : scenarioList) { + System.out.println(scenario.getName()); + } + + var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(0).getId()); + J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); + */ + + // Deserialize the JSON into a new EnergyModel instance: + J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); + EnergyModel deserializedEnergyModel = saveObject.energyModel; + + // Reconstruct all Agents + f_reconstructEnergyModel(deserializedEnergyModel); + f_reconstructGridConnections(deserializedEnergyModel); + f_reconstructActors(deserializedEnergyModel); + f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); + + f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); + + // Get profilePointer tableFunctions from 'original' energyModel + deserializedEnergyModel.c_profiles.forEach(x->{ + J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); + x.setTableFunction(origProfile.getTableFunction()); + }); + // get heatingTypeHashmap from 'old' energyModel. + deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; + + energyModel = deserializedEnergyModel; + zero_Interface.energyModel = deserializedEnergyModel; + zero_Interface.uI_Results.energyModel = deserializedEnergyModel; + //zero_Interface.f_clearSelectionAndSelectEnergyModel(); + //uI_Results.energyModel = deserializedEnergyModel; + + deserializedEnergyModel.f_startAfterDeserialisation(); + + f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); + + // Putting back the ordered collections in the interface + f_reconstructOrderedCollections(saveObject); + + + + + /* + // Reconstruct all Agents + f_reconstructEnergyModel(deserializedEnergyModel); + + + f_reconstructGridConnections(deserializedEnergyModel); + f_reconstructActors(deserializedEnergyModel); + f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); + + f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); + + // Get profilePointer tableFunctions from 'original' energyModel + deserializedEnergyModel.c_profiles.forEach(x->{ + J_ProfilePointer origProfile = energyModel.f_findProfile(x.name); + x.setTableFunction(origProfile.getTableFunction()); + }); + + energyModel.f_startAfterDeserialisation(); + + energyModel = deserializedEnergyModel; + zero_Interface.energyModel = deserializedEnergyModel; + zero_Interface.uI_Results.energyModel = deserializedEnergyModel; + + // Reinitialize energy model + //deserializedEnergyModel.b_isInitialized = false; + //deserializedEnergyModel.f_initializeEngine(); + */ + + //zero_Interface.f_clearSelectionAndSelectEnergyModel(); + zero_Interface.uI_Tabs.f_initializeUI_Tabs(energyModel.f_getGridConnectionsCollectionPointer(), energyModel.f_getPausedGridConnectionsCollectionPointer()); + zero_Interface.f_updateMainInterfaceSliders(); + + //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); + +} catch (IOException e) { + e.printStackTrace(); +} + +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>deserialize_energy_model</LabelText> + </ExtendedProperties> + </Control> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1753449467884</Id> + <Name>serialize1</Name> + <X>2066.333</X> + <Y>99</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="160" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>traceln("Starting model serialisation..."); +J_ModelSave saveObject = new J_ModelSave(); +saveObject.energyModel = energyModel; + +energyModel.pop_gridNodes.forEach(x->saveObject.c_gridNodes.add(x)); +energyModel.pop_GIS_Buildings.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +energyModel.pop_GIS_Objects.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +energyModel.pop_GIS_Parcels.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); + +/* +saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; +saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; +saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; +saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; +saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; +saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; +saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; +saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; +saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; +saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; +//saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; +*/ + +saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; +saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; +saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; +saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; +saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; +saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; +saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; +saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; +saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; +saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; +saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; +saveObject.c_scenarioMap_Current = zero_Interface.c_scenarioMap_Current; +saveObject.c_scenarioMap_Future = zero_Interface.c_scenarioMap_Future; + +List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps = new ArrayList<LinkedHashMap<String, List<J_EAVehicle>>>(); +saveObject.c_additionalVehicleHashMaps = c_additionalVehicleHashMaps; + + +v_objectMapper = new ObjectMapper(); +f_addMixins(); +v_objectMapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE); + +try { + traceln("Trying to save to file"); + //v_objectMapper.writeValue(new File("energyModel.json"), energyModel); + + v_objectMapper.writeValue(new File("ModelSave.json"), saveObject); + /* + String userIdToken = "6b87f0f9-fdf6-4c05-9e0f-b75e46950113"; //user.userIdToken(); + + var repository = UserScenarioRepository.builder() + //.userId(UUID.fromString("6b87f0f9-fdf6-4c05-9e0f-b75e46950113")) + .userId(UUID.fromString(userIdToken)) + .modelName("ModelTestName") + .build(); + + repository.saveUserScenario( + "Test Scenario", + v_objectMapper.writeValueAsBytes(saveObject) + ); + */ + +} catch (IOException e) { + e.printStackTrace(); +} +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>serialize_energy_model</LabelText> + </ExtendedProperties> + </Control> + </Presentation> + </Level> + <Level> + <Id>1726584205975</Id> + <Name>level1</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + </Level> + </Presentation> + <Areas> + <Area> + <Id>1726584206081</Id> + <Name>viewArea</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Title/> + <Width>1920</Width> + <Height>980</Height> + </Area> + </Areas> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1709049506453</Id> + <Name>Z_UnusedAgent</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <Generic>false</Generic> + <GenericParameter> + <Id>1709049506459</Id> + <Name>1709049506459</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089955</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1709107200000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1709049506456</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1709049506460</CurrentLevel> + <ConnectionsId>1709049506454</ConnectionsId> + <AgentLinks> + <AgentLink> + <Id>1709049506454</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <Presentation> + <Level> + <Id>1709049506460</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + </Level> + </Presentation> + </ActiveObjectClass> + </ActiveObjectClasses> + <DifferentialEquationsMethod>EULER</DifferentialEquationsMethod> + <MixedEquationsMethod>RK45_NEWTON</MixedEquationsMethod> + <AlgebraicEquationsMethod>MODIFIED_NEWTON</AlgebraicEquationsMethod> + <AbsoluteAccuracy>1.0</AbsoluteAccuracy> + <FixedTimeStep>1.0</FixedTimeStep> + <RelativeAccuracy>1.0</RelativeAccuracy> + <TimeAccuracy>0.1</TimeAccuracy> + <InspectionWindowColorTheme>DEFAULT</InspectionWindowColorTheme> + <Frame> + <Id>1658477089982</Id> + <Width>1920</Width> + <Height>980</Height> + </Frame> + <Database> + <Id>1658477089953</Id> + <Logging>false</Logging> + <AutoExport>false</AutoExport> + <ShutdownCompact>false</ShutdownCompact> + <ImportSettings/> + <ExportSettings/> + </Database> + <RunConfiguration ActiveObjectClassId="1658477103140"> + <Id>1658477103163</Id> + <Name>RunConfiguration</Name> + <MaximumMemory>4096</MaximumMemory> + <ModelTimeProperties> + <StopOption>Stop at specified date</StopOption> + <InitialDate>1672531200000</InitialDate> + <InitialTime>0.0</InitialTime> + <FinalDate>1704067200000</FinalDate> + <FinalTime>8760.0</FinalTime> + </ModelTimeProperties> + <AnimationProperties> + <StopNever>false</StopNever> + <ExecutionMode>realTimeScaled</ExecutionMode> + <RealTimeScale>5.0</RealTimeScale> + <EnableZoomAndPanning>false</EnableZoomAndPanning> + <EnableDeveloperPanel>false</EnableDeveloperPanel> + <ShowDeveloperPanelOnStart>false</ShowDeveloperPanelOnStart> + </AnimationProperties> + <Inputs/> + <Outputs/> + </RunConfiguration> + <JavaClasses> + <JavaClass> + <Id>1715862317301</Id> + <Name>J_scenario_Current</Name> + <Folder>1761915047244</Folder> + <Text>/** + * Scenario_future + */ + +import com.fasterxml.jackson.annotation.JsonIdentityInfo; +import com.fasterxml.jackson.annotation.ObjectIdGenerators; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; + + +@JsonAutoDetect( + fieldVisibility = Visibility.ANY, // ✅ only public fields are serialized + getterVisibility = Visibility.NONE, + isGetterVisibility = Visibility.NONE, + setterVisibility = Visibility.NONE, + creatorVisibility = Visibility.NONE +) + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type" // 👈 this will be the field name in your JSON + ) +@JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = "@id") + +public class J_scenario_Current implements Serializable { + + private Agent parentAgent; + private boolean isCurrentlyActive = true; + private Double currentContractDeliveryCapacity_kW = 0.0; + private Double currentContractFeedinCapacity_kW = 0.0; + private Double currentPhysicalConnectionCapacity_kW = 0.0; + private Integer currentPV_kW = 0; + //String currentPV_orient; + private Float currentWind_kW = 0f; + private Float currentBatteryPower_kW = 0f; + private Float currentBatteryCapacity_kWh = 0f; + private OL_GridConnectionHeatingType currentHeatingType = OL_GridConnectionHeatingType.NONE; + private Integer currentDieselCars = 0; + private Integer currentDieselVans = 0; + private Integer currentDieselTrucks = 0; + private Integer currentHydrogenCars = 0; + private Integer currentHydrogenVans = 0; + private Integer currentHydrogenTrucks = 0; + private Integer currentEVCars = 0; + private Integer currentEVVans = 0; + private Integer currentEVTrucks = 0; + private Double currentEVCarChargePower_kW = 0.0; + private Double currentEVVanChargePower_kW = 0.0; + private Double currentEVTruckChargePower_kW = 0.0; + + + /** + * Default constructor + */ + public J_scenario_Current() { + } + + /** + * Constructor initializing the fields + */ + /* + public J_scenario_Current() { + } + */ + + // Setters + public void setParentAgent(Agent parentAgent) { + this.parentAgent = parentAgent; + } + + public void setIsCurrentlyActive(boolean isCurrentlyActive) { + this.isCurrentlyActive = isCurrentlyActive; + } + + public void setCurrentContractDeliveryCapacity_kW(Double currentContractDeliveryCapacity_kW) { + this.currentContractDeliveryCapacity_kW = currentContractDeliveryCapacity_kW; + } + + public void setCurrentContractFeedinCapacity_kW(Double currentContractFeedinCapacity_kW) { + this.currentContractFeedinCapacity_kW = currentContractFeedinCapacity_kW; + } + + public void setCurrentPhysicalConnectionCapacity_kW(Double currentPhysicalConnectionCapacity_kW) { + this.currentPhysicalConnectionCapacity_kW = currentPhysicalConnectionCapacity_kW; + } + + public void setCurrentPV_kW(int currentPV_kW) { + this.currentPV_kW = currentPV_kW; + } + + /* + public void setCurrentPV_orient(String currentPV_orient) { + this.currentPV_orient = currentPV_orient; + } + */ + public void setCurrentWind_kW(Float currentWind_kW) { + this.currentWind_kW = currentWind_kW; + } + + public void setCurrentBatteryPower_kW(Float currentBatteryPower_kW) { + this.currentBatteryPower_kW = currentBatteryPower_kW; + } + + public void setCurrentBatteryCapacity_kWh(Float currentBatteryCapacity_kWh) { + this.currentBatteryCapacity_kWh = currentBatteryCapacity_kWh; + } + + public void setCurrentHeatingType(OL_GridConnectionHeatingType currentHeatingType) { + this.currentHeatingType = currentHeatingType; + } + + public void setCurrentDieselCars(Integer currentDieselCars) { + this.currentDieselCars = currentDieselCars; + } + + public void setCurrentDieselVans(Integer currentDieselVans) { + this.currentDieselVans = currentDieselVans; + } + + public void setCurrentDieselTrucks(Integer currentDieselTrucks) { + this.currentDieselTrucks = currentDieselTrucks; + } + + public void setCurrentHydrogenCars(Integer currentHydrogenCars) { + this.currentHydrogenCars = currentHydrogenCars; + } + + public void setCurrentHydrogenVans(Integer currentHydrogenVans) { + this.currentHydrogenVans = currentHydrogenVans; + } + + public void setCurrentHydrogenTrucks(Integer currentHydrogenTrucks) { + this.currentHydrogenTrucks = currentHydrogenTrucks; + } + + public void setCurrentEVCars(Integer currentEVCars) { + this.currentEVCars = currentEVCars; + } + + public void setCurrentEVVans(Integer currentEVVans) { + this.currentEVVans = currentEVVans; + } + + public void setCurrentEVTrucks(Integer currentEVTrucks) { + this.currentEVTrucks = currentEVTrucks; + } + + public void setCurrentEVCarChargePower_kW(Double currentEVCarChargePower_kW) { + this.currentEVCarChargePower_kW = currentEVCarChargePower_kW; + } + + public void setCurrentEVVanChargePower_kW(Double currentEVVanChargePower_kW) { + this.currentEVVanChargePower_kW = currentEVVanChargePower_kW; + } + + public void setCurrentEVTruckChargePower_kW(Double currentEVTruckChargePower_kW) { + this.currentEVTruckChargePower_kW = currentEVTruckChargePower_kW; + } + + + // Getters + public Agent getParentAgent() { + return parentAgent; + } + + public boolean getIsCurrentlyActive() { + return isCurrentlyActive; + } + + public Double getCurrentContractDeliveryCapacity_kW() { + return currentContractDeliveryCapacity_kW; + } + + public Double getCurrentContractFeedinCapacity_kW() { + return currentContractFeedinCapacity_kW; + } + + public Double getCurrentPhysicalConnectionCapacity_kW() { + return currentPhysicalConnectionCapacity_kW; + } + + public Integer getCurrentPV_kW() { + if (currentPV_kW == null) { + return 0; + } + return currentPV_kW; + } + + /* + public String getCurrentPV_orient() { + return currentPV_orient; + } + */ + + public Float getCurrentWind_kW() { + return currentWind_kW; + } + + public Float getCurrentBatteryPower_kW() { + return currentBatteryPower_kW; + } + + public Float getCurrentBatteryCapacity_kWh() { + return currentBatteryCapacity_kWh; + } + + public OL_GridConnectionHeatingType getCurrentHeatingType() { + return currentHeatingType; + } + + public Integer getCurrentDieselCars() { + return currentDieselCars; + } + + public Integer getCurrentDieselVans() { + return currentDieselVans; + } + + public Integer getCurrentDieselTrucks() { + return currentDieselTrucks; + } + + public Integer getCurrentHydrogenCars() { + return currentHydrogenCars; + } + + public Integer getCurrentHydrogenVans() { + return currentHydrogenVans; + } + + public Integer getCurrentHydrogenTrucks() { + return currentHydrogenTrucks; + } + + public Integer getCurrentEVCars() { + return currentEVCars; + } + + public Integer getCurrentEVVans() { + return currentEVVans; + } + + public Integer getCurrentEVTrucks() { + return currentEVTrucks; + } + + public Double getCurrentEVCarChargePower_kW() { + return currentEVCarChargePower_kW; + } + + public Double getCurrentEVVanChargePower_kW() { + return currentEVVanChargePower_kW; + } + + public Double getCurrentEVTruckChargePower_kW() { + return currentEVTruckChargePower_kW; + } + + + + @Override + public String toString() { + return super.toString(); + } + + /** + * This number is here for model snapshot storing purpose<br> + * It needs to be changed when this class gets changed + */ + private static final long serialVersionUID = 1L; + +}</Text> + </JavaClass> + <JavaClass> + <Id>1715862317307</Id> + <Name>J_scenario_Future</Name> + <Folder>1761915047244</Folder> + <Text>/** + * Scenario_future + */ + +import com.fasterxml.jackson.annotation.JsonIdentityInfo; +import com.fasterxml.jackson.annotation.ObjectIdGenerators; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; + + +@JsonAutoDetect( + fieldVisibility = Visibility.ANY, // ✅ only public fields are serialized + getterVisibility = Visibility.NONE, + isGetterVisibility = Visibility.NONE, + setterVisibility = Visibility.NONE, + creatorVisibility = Visibility.NONE +) + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type" // 👈 this will be the field name in your JSON + ) +@JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = "@id") + +public class J_scenario_Future implements Serializable { + + private Agent parentAgent; + private boolean isActiveInFuture = true; //Boolean used to see if gc is active in future scenario + private Double requestedContractDeliveryCapacity_kW = 0.0; + private Double requestedContractFeedinCapacity_kW = 0.0; + private Double requestedPhysicalConnectionCapacity_kW = 0.0; + private double plannedHeatSavings_pct = 0; + private OL_GridConnectionHeatingType plannedHeatingType = OL_GridConnectionHeatingType.NONE; + private double plannedElectricitySavings_pct = 0; + private boolean plannedCurtailment = false; + private Integer plannedPV_kW = 0; + private Integer plannedPV_year; + private Float plannedWind_kW = 0f; + private Float plannedBatteryPower_kW = 0f; + private Float plannedBatteryCapacity_kWh = 0f; + //Integer plannedWind_year; + private double plannedTransportSavings_pct = 0; + private Integer plannedEVCars = 0; + private Integer plannedEVVans = 0; + private Integer plannedEVTrucks = 0; + private Integer plannedHydrogenCars = 0; + private Integer plannedHydrogenVans = 0; + private Integer plannedHydrogenTrucks = 0; + + /** + * Default constructor + */ + public J_scenario_Future() { + } + + /** + * Constructor initializing the fields + */ + /* + public J_scenario_Future(Agent parentAgent, Integer plannedPV_kW, Integer plannedPV_year, Float plannedWind_kW, Integer plannedEVCars, Integer plannedEVVans, Integer plannedEVTrucks) { + + + } + */ + + // Setters + public void setParentAgent(Agent parentAgent) { + this.parentAgent = parentAgent; + } + + public void setIsActiveInFuture(boolean isActiveInFuture) { + this.isActiveInFuture = isActiveInFuture; + } + + public void setRequestedContractDeliveryCapacity_kW(Double requestedContractDeliveryCapacity_kW) { + this.requestedContractDeliveryCapacity_kW = requestedContractDeliveryCapacity_kW; + } + + public void setRequestedContractFeedinCapacity_kW(Double requestedContractFeedinCapacity_kW) { + this.requestedContractFeedinCapacity_kW = requestedContractFeedinCapacity_kW; + } + + public void setRequestedPhysicalConnectionCapacity_kW(Double requestedPhysicalConnectionCapacity_kW) { + this.requestedPhysicalConnectionCapacity_kW = requestedPhysicalConnectionCapacity_kW; + } + + public void setPlannedHeatSavings_pct(double plannedHeatSavings_pct) { + this.plannedHeatSavings_pct = plannedHeatSavings_pct; + } + + public void setPlannedHeatingType(OL_GridConnectionHeatingType plannedHeatingType) { + this.plannedHeatingType = plannedHeatingType; + } + + public void setPlannedElectricitySavings_pct(double plannedElectricitySavings_pct) { + this.plannedElectricitySavings_pct = plannedElectricitySavings_pct; + } + + public void setPlannedCurtailment(boolean plannedCurtailment) { + this.plannedCurtailment = plannedCurtailment; + } + + public void setPlannedPV_kW(Integer plannedPV_kW) { + this.plannedPV_kW = plannedPV_kW; + } + + public void setPlannedPV_year(Integer plannedPV_year) { + this.plannedPV_year = plannedPV_year; + } + + public void setPlannedWind_kW(Float plannedWind_kW) { + this.plannedWind_kW = plannedWind_kW; + } + + public void setPlannedBatteryPower_kW(Float plannedBatteryPower_kW) { + this.plannedBatteryPower_kW = plannedBatteryPower_kW; + } + + public void setPlannedBatteryCapacity_kWh(Float plannedBatteryCapacity_kWh) { + this.plannedBatteryCapacity_kWh = plannedBatteryCapacity_kWh; + } + + public void setPlannedTransportSavings_pct(double plannedTransportSavings_pct) { + this.plannedTransportSavings_pct = plannedTransportSavings_pct; + } + + public void setPlannedEVCars(Integer plannedEVCars) { + this.plannedEVCars = plannedEVCars; + } + + public void setPlannedEVVans(Integer plannedEVVans) { + this.plannedEVVans = plannedEVVans; + } + + public void setPlannedEVTrucks(Integer plannedEVTrucks) { + this.plannedEVTrucks = plannedEVTrucks; + } + + public void setPlannedHydrogenCars(Integer plannedHydrogenCars) { + this.plannedHydrogenCars = plannedHydrogenCars; + } + + public void setPlannedHydrogenVans(Integer plannedHydrogenVans) { + this.plannedHydrogenVans = plannedHydrogenVans; + } + + public void setPlannedHydrogenTrucks(Integer plannedHydrogenTrucks) { + this.plannedHydrogenTrucks = plannedHydrogenTrucks; + } + + // Getters + public Agent getParentAgent() { + return parentAgent; + } + + public boolean getIsActiveInFuture() { + return isActiveInFuture; + } + + public Double getReques \ No newline at end of file From 0b2462ab8b5625d6adb42ad8b3d642f0df296731 Mon Sep 17 00:00:00 2001 From: Naud Loomans <38351577+naudloomans@users.noreply.github.com> Date: Thu, 4 Dec 2025 18:07:28 +0100 Subject: [PATCH 5/8] Working version of savings through PBL schillabels --- Zero_Interface-Loader.alpx.tmp | 65945 ---------------- _alp/Agents/Zero_Loader/Code/Functions.java | 9 + ...ing_data.java => Class.Building_data.java} | 6 + 3 files changed, 15 insertions(+), 65945 deletions(-) delete mode 100644 Zero_Interface-Loader.alpx.tmp rename _alp/Classes/{Building_data.java => Class.Building_data.java} (85%) diff --git a/Zero_Interface-Loader.alpx.tmp b/Zero_Interface-Loader.alpx.tmp deleted file mode 100644 index ebe62b8..0000000 --- a/Zero_Interface-Loader.alpx.tmp +++ /dev/null @@ -1,65945 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<AnyLogicWorkspace splitVersion="1" - WorkspaceVersion="1.9" - AnyLogicVersion="8.9.6.202509050524" - AlpVersion="8.9.6"> - <Model xmlns:al="http://anylogic.com"> - <Id>1658477103134</Id> - <Name>Zero_Interface-Loader</Name> - <EngineVersion>6</EngineVersion> - <JavaPackageName>zerointerfaceloader</JavaPackageName> - <ModelTimeUnit>Hour</ModelTimeUnit> - <OptionLists> - <OptionList> - <Id>1658478100573</Id> - <Name>OL_FilterOptionsGC</Name> - <Option> - <Id>1734448498882</Id> - <Name>COMPANIES</Name> - </Option> - <Option> - <Id>1734442884762</Id> - <Name>HOUSES</Name> - </Option> - <Option> - <Id>1734442348652</Id> - <Name>DETAILED</Name> - </Option> - <Option> - <Id>1734442871159</Id> - <Name>NONDETAILED</Name> - </Option> - <Option> - <Id>1734442372415</Id> - <Name>HAS_PV</Name> - </Option> - <Option> - <Id>1734442386815</Id> - <Name>HAS_TRANSPORT</Name> - </Option> - <Option> - <Id>1760086039728</Id> - <Name>HAS_EV</Name> - </Option> - <Option> - <Id>1734444382736</Id> - <Name>GRIDTOPOLOGY_SELECTEDLOOP</Name> - </Option> - <Option> - <Id>1734442896763</Id> - <Name>ENERGYASSETS</Name> - </Option> - <Option> - <Id>1737653098541</Id> - <Name>SELECTED_NEIGHBORHOOD</Name> - </Option> - <Option> - <Id>1737656249784</Id> - <Name>SELECTED_MUNICIPALITY</Name> - </Option> - <Option> - <Id>1741874937291</Id> - <Name>FARMER</Name> - </Option> - <Option> - <Id>1742233248626</Id> - <Name>MANUAL_SELECTION</Name> - </Option> - </OptionList> - <OptionList> - <Id>1660743989698</Id> - <Name>OL_GISBuildingTypes</Name> - <Option> - <Id>1750173978462</Id> - <Name>DETAILED_COMPANY</Name> - </Option> - <Option> - <Id>1750173986048</Id> - <Name>DEFAULT_COMPANY</Name> - </Option> - <Option> - <Id>1750173990031</Id> - <Name>HOUSE</Name> - </Option> - <Option> - <Id>1750173992447</Id> - <Name>REMAINING</Name> - </Option> - </OptionList> - <OptionList> - <Id>1660743989798</Id> - <Name>OL_ProjectType</Name> - <Option> - <Id>1660743990769</Id> - <Name>BUSINESSPARK</Name> - </Option> - <Option> - <Id>1676307694256</Id> - <Name>RESIDENTIAL</Name> - </Option> - </OptionList> - <OptionList> - <Id>1667742453792</Id> - <Name>OL_UNUSED3</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - </OptionList> - <OptionList> - <Id>1675025163072</Id> - <Name>OL_UNUSED4</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - </OptionList> - <OptionList> - <Id>1709718356700</Id> - <Name>EnergyDemandTab</Name> - <Option> - <Id>1709718356702</Id> - <Name>MOBILITY</Name> - </Option> - <Option> - <Id>1709718356704</Id> - <Name>ELECTRICITY</Name> - </Option> - <Option> - <Id>1709718356706</Id> - <Name>HEAT</Name> - </Option> - <Option> - <Id>1714324722851</Id> - <Name>HUB</Name> - </Option> - <Option> - <Id>1721039647716</Id> - <Name>NFATO</Name> - </Option> - </OptionList> - <OptionList> - <Id>1726584216682</Id> - <Name>OL_SurveyType</Name> - <Option> - <Id>1726584216684</Id> - <Name>ZORM</Name> - </Option> - <Option> - <Id>1726584216686</Id> - <Name>EXCEL</Name> - </Option> - <Option> - <Id>1726584216688</Id> - <Name>NONE</Name> - </Option> - </OptionList> - <OptionList> - <Id>1753086929090</Id> - <Name>OL_MapOverlayTypes</Name> - <Option> - <Id>1753086938862</Id> - <Name>DEFAULT</Name> - </Option> - <Option> - <Id>1753086944014</Id> - <Name>ELECTRICITY_CONSUMPTION</Name> - </Option> - <Option> - <Id>1753086951601</Id> - <Name>PV_PRODUCTION</Name> - </Option> - <Option> - <Id>1753086958969</Id> - <Name>GRID_NEIGHBOURS</Name> - </Option> - <Option> - <Id>1753086978373</Id> - <Name>CONGESTION</Name> - </Option> - <Option> - <Id>1753108825070</Id> - <Name>ENERGY_LABEL</Name> - </Option> - <Option> - <Id>1754312700674</Id> - <Name>PARKING_TYPE</Name> - </Option> - </OptionList> - </OptionLists> - <Folders> - <Folder> - <Id>1754045642067</Id> - <Name>Tabs</Name> - </Folder> - <Folder> - <Id>1754045666929</Id> - <Name>Dashboards</Name> - </Folder> - <Folder> - <Id>1754045711603</Id> - <Name>DatabasePackages</Name> - </Folder> - <Folder> - <Id>1761915047244</Id> - <Name>DataClasses</Name> - </Folder> - </Folders> - <ActiveObjectClasses> - <ActiveObjectClass> - <Id>1726584205528</Id> - <Name>AVGC_data</Name> - <Generic>false</Generic> - <GenericParameter> - <Id>1726584205523</Id> - <Name>1726584205523</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089981</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1710835200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1726584205524</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1726584205534</CurrentLevel> - <ConnectionsId>1726584205728</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1726584205532</Id> - <Name>hourOfYearPerMonth</Name> - <Description>Hour of year per month (not leap year) --> Houdt dit rekening met zomer/winter tijd?</Description> - <X>1070</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int[]</Type> - <InitialValue Class="CodeValue"> - <Code>new int[] {0, 744, 1392, 2136, 2856, 3600, 4320, 5064, 5808, 6528, 7272, 7992}</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205579</Id> - <Name>p_avgHouseConnectionCapacity_kW</Name> - <Description>https://www.enexis.nl/aansluitingen/welke-aansluiting-heb-ik-nodig -3*25 A --> 3*25*230 = 17.25 kW</Description> - <X>50</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>17.25</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205577</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205582</Id> - <Name>p_avgHouseHeatingMethod</Name> - <X>50</X> - <Y>168.976</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>OL_GridConnectionHeatingType</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>OL_GridConnectionHeatingType.GAS_BURNER</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205580</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205585</Id> - <Name>p_avgUtilityConnectionCapacity_kW</Name> - <Description>https://www.enexis.nl/aansluitingen/welke-aansluiting-heb-ik-nodig --> 17.25 -> set to 17, to prevent slider errors (stepsize cant be double, otherwise to small for user experience) - ---> 17.25 is way to small -> 3x80 is taken : 55 kW</Description> - <X>50</X> - <Y>330</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>55</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205583</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205588</Id> - <Name>p_avgUtilityHeatingMethod</Name> - <X>50</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>OL_GridConnectionHeatingType</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>OL_GridConnectionHeatingType.GAS_BURNER</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205586</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205591</Id> - <Name>p_avgHouseElectricityConsumption_kWh_yr</Name> - <Description>- https://www.milieucentraal.nl/energie-besparen/inzicht-in-je-energierekening/gemiddeld-energieverbruik/ -- https://www.overstappen.nl/energie/gemiddeld-energieverbruik/ ---> 2479 kWh/yr is the average of NL ---> Overwrite if numbers are available in the project selection agent -</Description> - <X>50</X> - <Y>128.976</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>2479</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205589</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205594</Id> - <Name>p_avgHouseGasConsumption_m3_yr</Name> - <Description>- https://www.overstappen.nl/energie/gemiddeld-energieverbruik/ -- https://www.milieucentraal.nl/energie-besparen/inzicht-in-je-energierekening/gemiddeld-energieverbruik/ - --> 1169 m3 is the average of NL ---> Overwrite if numbers are available in the project selection agent -</Description> - <X>50</X> - <Y>108.976</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1169</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205592</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205597</Id> - <Name>p_shareOfElectricVehicleOwnership</Name> - <Description>share of EVs in the netherlands. --> 5% (feb 2024). - -https://www.rvo.nl/onderwerpen/elektrisch-vervoer/stand-van-zaken </Description> - <X>50</X> - <Y>188.976</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.05</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205595</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205600</Id> - <Name>p_ratioHouseInstalledPV</Name> - <Description>How many houses have installed PV in The Netherlands: 25% (end of 2022) -https://solarmagazine.nl/nieuws-zonne-energie/i34591/de-harde-cijfers-drenthe-verstevigt-koppositie-38-procent-woningen-heeft-zonnepanelen</Description> - <X>50</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.25</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205598</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205603</Id> - <Name>p_avgHousePVInstallationPower_kWp</Name> - <Description>volgens gegevens van het CBS (Centraal Bureau voor de Statistiek) en RVO (Rijksdienst voor Ondernemend Nederland), was het gemiddelde geïnstalleerde piekvermogen van residentiële zonnepanelen in Nederland in 2020 ongeveer 4 kilowatt piek (kWp) per huishouden. --> 4kWp</Description> - <X>50</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>4</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205601</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205606</Id> - <Name>p_avgEVStorageCar_kWh</Name> - <Description>-https://www.eonenergy.com/electric-vehicle-charging/running-costs-and-benefits/battery-capacity-and-lifespan.html - --https://www.edi.be/blog/laadstation-3/hoe-is-het-gesteld-met-de-autonomie-van-de-elektrische-auto-in-2023-12 - -40 kWh (kleine autos) - -50-80 kWh (middel grote autos) - -80-100 kWh (grote autos) - -Minimaal: 116 kWh minimum nodig, anders soms negatieve SOC.</Description> - <X>570</X> - <Y>220</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>116</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205604</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205609</Id> - <Name>p_avgEVMaxChargePowerCar_kW</Name> - <Description>Bron???</Description> - <X>570</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>11</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205607</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205612</Id> - <Name>p_avgEVStorageVan_kWh</Name> - <Description>????</Description> - <X>570</X> - <Y>240</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>200</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205610</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205615</Id> - <Name>p_avgEVStorageTruck_kWh</Name> - <Description>??</Description> - <X>570</X> - <Y>260</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>500</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205613</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205618</Id> - <Name>p_avgEVMaxChargePowerVan_kW</Name> - <Description>Bron???</Description> - <X>570</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>11</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205616</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205621</Id> - <Name>p_avgEVMaxChargePowerTruck_kW</Name> - <Description>Bron???</Description> - <X>570</X> - <Y>190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>200</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205619</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205624</Id> - <Name>p_avgEVEnergyConsumptionCar_kWhpkm</Name> - <Description>https://ev-database.org/nl/auto/1555/Tesla-Model-3: 0.142 kWh/km - -https://www.vattenfall.nl/elektrische-auto/verbruik/ - ---> Tesla model 3: 15.1 kWh per 100 km --> 0.151 kWh/km ---> Kia niro: 17.1 kWh per 100 km --> 0.171 kWh/km ---> taking 0.16 kWh/km as the average</Description> - <X>570</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.16</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205622</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205627</Id> - <Name>p_avgEVEnergyConsumptionVan_kWhpkm</Name> - <Description>praktijkverbruik van 26,9 kWh per 100 kilometer: -https://www.debedrijfswagenadviseurs.nl/praktijkverbruik-elektrische-bedrijfswagen/ </Description> - <X>570</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.269</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205625</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205630</Id> - <Name>p_avgEVEnergyConsumptionTruck_kWhpkm</Name> - <Description>https://www.elektrischevrachtwagen.nl/post/hoe-ver-kan-een-elektrische-vrachtwagen-rijden, https://topsectorlogistiek.nl/wp-content/uploads/2024/06/20240126_Stappenplan-ZE-vrachtwagens.pdf -0.9 - 1.7 kWh/km ---> pak gemiddelde: 1.3</Description> - <X>570</X> - <Y>330</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.3</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205628</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205633</Id> - <Name>p_gas_kWhpm3</Name> - <Description>- https://www.greenchoice.nl/stroom-en-gas/bosgecompenseerd-gas/hoeveel-is-1-kuub-gas/ -- https://econvice.nl/op-gas-of-elektra-verwarmen-wat-is-gunstig/ -- https://www.joostdevree.nl/shtmls/calorische_waarde.shtml</Description> - <X>1070</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>9.77</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205631</Id> - <Label>p_gas_kWh_per_m3</Label> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205636</Id> - <Name>p_hydrogenEnergyDensity_kWh_Nm3</Name> - <Description>https://www.enapter.com/kb_post/what-is-the-energy-content-of-hydrogen - -LHV = 3.00 kWh/Nm3 -HHV = 3.54 kWh/Nm3</Description> - <X>1590</X> - <Y>160</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>3.00</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205634</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205639</Id> - <Name>p_hydrogenDensity_kg_Nm3</Name> - <Description>https://keengas.com/gases/hydrogen/</Description> - <X>1590</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.08988</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205637</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205642</Id> - <Name>p_oxygenDensity_kg_Nm3</Name> - <Description>http://www.uigi.com/o2_conv.html</Description> - <X>1590</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.4291</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205640</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205645</Id> - <Name>p_oxygenProduction_kgO2pkgH2</Name> - <Description>H20 = 2H + O -MM H = 1.008 g/mol -MM O = 16 g/mol ---> 1.008*2/16 = 0.126. -0.126 g waterstof per g water conversie. -1-0.126 = 0.874 g zuurstof per gram water conversie. - ---> 1/0.126 =7.9365 gram zuurstof productie per gram waterstof productie.</Description> - <X>1590</X> - <Y>260</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>7.9365</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205643</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205648</Id> - <Name>p_hydrogenSpecificEnergy_kWh_kg</Name> - <Description>https://www.cenex.co.uk/app/uploads/2021/05/Intro-to-hydrogen-1.pdf --> 33.6</Description> - <X>1590</X> - <Y>180</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>33.6</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205646</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205651</Id> - <Name>p_diesel_kWhpl</Name> - <Description>https://www.joostdevree.nl/shtmls/calorische_waarde.shtml</Description> - <X>1070</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>10</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205649</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205654</Id> - <Name>p_avgDieselConsumptionCar_kmpl</Name> - <Description>https://www.unitedconsumers.com/blog/auto/zuinig-rijden.jsp</Description> - <X>570</X> - <Y>400</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>21</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205652</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205657</Id> - <Name>p_avgGasolineConsumptionCar_kmpl</Name> - <Description>https://www.unitedconsumers.com/blog/auto/zuinig-rijden.jsp</Description> - <X>570</X> - <Y>420</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>15</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205655</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205660</Id> - <Name>p_gasoline_kWhpl</Name> - <Description>https://www.joostdevree.nl/shtmls/calorische_waarde.shtml</Description> - <X>1070</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>8.8</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205658</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205663</Id> - <Name>p_avgDieselConsumptionCar_kWhpkm</Name> - <X>570</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>p_diesel_kWhpl/p_avgDieselConsumptionCar_kmpl</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205661</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205666</Id> - <Name>p_avgGasolineConsumptionCar_kWhpkm</Name> - <X>570</X> - <Y>470</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>p_gasoline_kWhpl/p_avgGasolineConsumptionCar_kmpl</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205664</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205669</Id> - <Name>p_avgDieselConsumptionVan_kmpl</Name> - <Description>https://www.webfleet.com/nl_nl/webfleet/blog/hoeveel-diesel-verbruikt-een-vrachtwagen-per-kilometer/ - -11 liter per 100 km = 9.1 km per liter. -</Description> - <X>570</X> - <Y>510</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>9.1</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205667</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205672</Id> - <Name>p_avgDieselConsumptionVan_kWhpkm</Name> - <X>570</X> - <Y>530</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>p_diesel_kWhpl/p_avgDieselConsumptionVan_kmpl</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205670</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205675</Id> - <Name>p_avgDieselConsumptionTruck_kmpl</Name> - <Description>https://www.webfleet.com/nl_nl/webfleet/blog/hoeveel-diesel-verbruikt-een-vrachtwagen-per-kilometer/ - ---> 25 - 30 - 40 liter per 100 km. = 4 - 3.33 - 2.5 km per l -Heavely dependend on load, city/highway, etc. -For now: Picking 3.33 km per l</Description> - <X>570</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>3.33</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205673</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205678</Id> - <Name>p_avgDieselConsumptionTruck_kWhpkm</Name> - <X>570</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>p_diesel_kWhpl/p_avgDieselConsumptionTruck_kmpl</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205676</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205681</Id> - <Name>p_avgCOPHeatpump</Name> - <Description>https://www.vaillant.be/consumenten/ons-advies/blog/het-rendement-van-een-warmtepomp/ - -Gemiddelde COP is 4.</Description> - <X>70</X> - <Y>520</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>4</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205679</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205684</Id> - <Name>p_avgUtilityPVPower_kWp</Name> - <Description>FIND SOURCE!!! ????????</Description> - <X>50</X> - <Y>350</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205682</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205687</Id> - <Name>p_ratioElectricTrucks</Name> - <Description>Ratio of how many trucks are electric vs diesel. -??? -https://nos.nl/artikel/2483604-elektrische-vrachtwagens-blijven-achter-door-complexe-serie-aan-uitdagingen --> 'volgens cbs nog geen half procent.'</Description> - <X>50</X> - <Y>370</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.005</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205685</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205690</Id> - <Name>p_avgCompanyHeatingMethod</Name> - <Description>Source?? --> Should definatly be still the case in 2024</Description> - <X>50</X> - <Y>390</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>OL_GridConnectionHeatingType</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>OL_GridConnectionHeatingType.GAS_BURNER</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205688</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205693</Id> - <Name>p_avgPVPower_kWpm2</Name> - <Description>https://hallostroom.nl/zonnepanelen/opbrengst/per-m2/ --> 177 W/m2 -https://www.zonneplan.nl/kenniscentrum/zonnepanelen/vermogen --> 212 W/m2 -https://www.zonnepanelennoord.nl/vermogen-zonnepanelen/ --> 215 W/m2</Description> - <X>50</X> - <Y>1020</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205691</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205696</Id> - <Name>p_avgRatioBatteryCapacity_v_Power</Name> - <Description>Average ratio of battery capacity over battery power. ---> If battery capacity (in kWh) is twice the battery power (in kW) --> ratio = 2.</Description> - <X>50</X> - <Y>1120</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205694</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205699</Id> - <Name>p_avgHydrogenConsumptionCar_kWhpkm</Name> - <Description>https://magnuscmd.com/hydrogen-fuel-cell-vehicles-a-threat-to-the-electric-car/ - ---> avg: 29 kWh per 100 km --> 0.29 kWh/km -</Description> - <X>570</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.29</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205697</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205702</Id> - <Name>p_avgHydrogenConsumptionVan_kWhpkm</Name> - <Description>https://www.huiskes-kokkeler.nl/bedrijfswagens/volkswagen-bedrijfswagens/modellen/crafter-hymotion-concept ---> 1.4 kg Waterstof per 100 km = 0.014 kg/km ---> 0.014 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 0.47 kWh/kg</Description> - <X>570</X> - <Y>660</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.47</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205700</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205705</Id> - <Name>p_avgHydrogenConsumptionTruck_kWhpkm</Name> - <Description>https://transportenmilieu.nl/nieuwsarchief/item/hyundai-op-waterstof-voor-havi-zwitserland ---> 6.6 kg Waterstof per 100 km = 0.066 kg/km ---> 0.066 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 2.22 kWh/kg</Description> - <X>570</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>2.22</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205703</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205708</Id> - <Name>p_avgRatioRoofPotentialPV</Name> - <Description>value for the ratio of the avg Usable Roof Area For PV fr</Description> - <X>50</X> - <Y>1040</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205706</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205711</Id> - <Name>p_avgEfficiencyHeatpump_fr</Name> - <Description>Efficiency (eta_r) used to calculate the COP in the energy asset based on temperature differences. - -'0.5' comes from old code, no source found for it yet.</Description> - <X>70</X> - <Y>540</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205709</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205714</Id> - <Name>p_avgOutputTemperatureElectricHeatpump_degC</Name> - <Description>https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/?utm_source=chatgpt.com - max 45-55 -https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 graden afgifte bij -10 graden. - --> Voor nu gemiddeld 40 genomen.</Description> - <X>70</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>40</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205712</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205717</Id> - <Name>p_avgEfficiencyGasBurner_fr</Name> - <Description>Average heating efficiency of a gas burner. -https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas energy density of 8.8 kWh/m3 (lower heating value), we use higher heating value: 9.77 -> 8.8*1.04/9.77 = 0.94</Description> - <X>70</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.94</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205715</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205720</Id> - <Name>p_avgOutputTemperatureGasBurner_degC</Name> - <Description>Average output temperature of a gas burner unit in degC. - ---> Source?</Description> - <X>70</X> - <Y>670</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>90</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205718</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205723</Id> - <Name>p_avgEfficiencyHydrogenBurner_fr</Name> - <Description>Average heating efficiency of a hydrogen burner. - -- https://h2sciencecoalition.com/blog/hydrogen-for-heating-a-comparison-with-heat-pumps-part-1/ - -- https://www.csrf.ac.uk/blog/hydrogen-for-heating/</Description> - <X>70</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.90</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205721</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205726</Id> - <Name>p_avgOutputTemperatureHydrogenBurner_degC</Name> - <Description>Average output temperature of a hydrogen burner unit in degC. - ---> Source?</Description> - <X>70</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>90</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205724</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726746753360</Id> - <Name>p_avgVehiclesPerChargePoint</Name> - <X>50</X> - <Y>1190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726746753358</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728032263201</Id> - <Name>p_avgAnnualTravelDistanceVan_km</Name> - <Description>https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-bestelautos -> 4 jaar oude bestlbussen gemiddeld 22.2 duizend km in een jaar.</Description> - <X>570</X> - <Y>790</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>22200</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728032263199</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728032304301</Id> - <Name>p_avgAnnualTravelDistanceCompanyCar_km</Name> - <Description>https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-personenautos</Description> - <X>570</X> - <Y>770</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>20500</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728032304299</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728032305440</Id> - <Name>p_avgAnnualTravelDistanceTruck_km</Name> - <Description>https://www.cbs.nl/nl-nl/cijfers/detail/84651NED</Description> - <X>570</X> - <Y>810</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>54505</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728032305438</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728034204646</Id> - <Name>p_avgFullLoadHoursPV_hr</Name> - <Description>Parameter used to estimate the total solar production in a year in a function like: -p_avgFullLoadHoursPV_hr * kWp_of_PV_panels = XXX kWh pv production in a year.</Description> - <X>50</X> - <Y>1060</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>920</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728034204644</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728390983761</Id> - <Name>p_avgCompanyElectricityConsumption_kWhpm2</Name> - <Description>https://www.odyssee-mure.eu/publications/efficiency-by-sector/services/offices-specific-energy-and-electricity-consumption.html - ---> 188 kWh/m2 for offices in NL</Description> - <X>50</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>188</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728390983759</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728391035656</Id> - <Name>p_avgCompanyGasConsumption_m3pm2</Name> - <Description>https://publications.tno.nl/publication/34629408/3xJn98/e16056.pdf -> page 28 - -9 m3 p m2 for label A -12 m3 p m2 for label B -to 18 m3 p m2 for label G - ---> take 7 for now.</Description> - <X>50</X> - <Y>430</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>7</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728391035654</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728394646404</Id> - <Name>p_avgCompanyHeatConsumption_kWhpm2</Name> - <Description>https://www.wearepossible.org/parks-toolkit/5-investigating-heat-demand - ---> estimated benchmark 100 kWh/m2</Description> - <X>50</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>100</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728394646402</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1733155392379</Id> - <Name>p_avgSolarFieldPower_kWppha</Name> - <Description>1000</Description> - <X>50</X> - <Y>1080</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1000</Code> - </DefaultValue> - <ParameterEditor> - <Id>1733155392377</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1745316053417</Id> - <Name>p_avgEfficiencyCHP_thermal_fr</Name> - <Description>50% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) -Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf</Description> - <X>70</X> - <Y>830</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745316053415</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1745316110677</Id> - <Name>p_avgEfficiencyCHP_electric_fr</Name> - <Description>42% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) -Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf</Description> - <X>70</X> - <Y>850</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.42</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745316110675</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1745326622582</Id> - <Name>p_avgOutputTemperatureCHP_degC</Name> - <Description>Average output temperature of a hydrogen burner unit in degC. - ---> Source?</Description> - <X>70</X> - <Y>870</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>90</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745326622580</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1747314895126</Id> - <Name>p_avgEfficiencyDistrictHeatingDeliverySet_fr</Name> - <Description>Average heating efficiency of a district heating delivery set -</Description> - <X>70</X> - <Y>920</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.99</Code> - </DefaultValue> - <ParameterEditor> - <Id>1747314895124</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1747314895129</Id> - <Name>p_avgOutputTemperatureDistrictHeatingDeliverySet_degC</Name> - <Description>Average output temperature of a districtheating delivery set in degC. - -70 -> https://www.nplw.nl/warmtenet/warmtetechnieken/middentemperatuur-warmtenet</Description> - <X>70</X> - <Y>940</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>70</Code> - </DefaultValue> - <ParameterEditor> - <Id>1747314895127</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1749653366667</Id> - <Name>p_v2gProbability</Name> - <Description>SOURCE!?!?!?!</Description> - <X>570</X> - <Y>125</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1749653366665</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1750246849611</Id> - <Name>p_v1gProbability</Name> - <Description>SOURCE!?!?!?!</Description> - <X>570</X> - <Y>105</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.8</Code> - </DefaultValue> - <ParameterEditor> - <Id>1750246849609</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1750341289733</Id> - <Name>p_avgEVsPerPublicCharger</Name> - <Description>TODO: Determine this value</Description> - <X>570</X> - <Y>860</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1750341289731</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751893521012</Id> - <Name>p_avgPTPower_kWpm2</Name> - <X>570</X> - <Y>930</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751893521010</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751893540583</Id> - <Name>p_avgHeatBufferWaterVolumePerHPPower_m3pkW</Name> - <Description>https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 25 liter per kW warmtepomp vermogen = 0.025 m3/kW</Description> - <X>570</X> - <Y>1080</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.025</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751893540581</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751893810778</Id> - <Name>p_avgHeatBufferWaterVolumePerPTSurface_m3pm2</Name> - <Description>https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 50 liter per m2 zonnecollector = 0.050 m3/m2</Description> - <X>570</X> - <Y>1060</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.05</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751893810776</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751896032002</Id> - <Name>p_waterHeatCapacity_JpkgK</Name> - <Description>https://www.engineeringtoolbox.com/water-thermal-properties-d_162.html -> 4185 J/kg K bij 20 *C - --> Verschilt eigenlijk met temperatuur, weer net iets lager bij 40 graden (4180), weer 4185 bij 60*C en net iets hoger bij 80 graden. (4197 bij 80 *C). - -Voor nu gekozen voor 4185. -</Description> - <X>1070</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>4185</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751896032000</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751905820546</Id> - <Name>p_waterDensity_kgpm3</Name> - <Description>https://www.sigmaaldrich.com/NL/en/substance/densitystandard998kgm318027732185 --> 998 kg/m3</Description> - <X>1070</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>998</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751905820544</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751906112800</Id> - <Name>p_avgMaxHeatBufferTemperature_degC</Name> - <Description>???</Description> - <X>570</X> - <Y>1010</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>85</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751906112798</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751906126857</Id> - <Name>p_avgMinHeatBufferTemperature_degC</Name> - <X>570</X> - <Y>1030</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>60</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751906126855</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1753950741783</Id> - <Name>p_avgPTPanelSize_m2</Name> - <Description>https://www.econo.nl/m24hpcpc-400-h2-heatpipe-zonnecollector-prisma-pro-24-cpc -> +- 4 m2</Description> - <X>570</X> - <Y>950</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>4</Code> - </DefaultValue> - <ParameterEditor> - <Id>1753950741781</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1754309475986</Id> - <Name>p_avgRatioHouseBatteryStorageCapacity_v_PVPower</Name> - <Description>https://www.essent.nl/thuisbatterij/capaciteit-thuisbatterij : Essent: "Over het algemeen kun je ervan uitgaan dat een thuisbatterij zo'n 1 à 1,5 kWh capaciteit nodig heeft per kWp zonnepanelen vermogen. " </Description> - <X>50</X> - <Y>1140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.25</Code> - </DefaultValue> - <ParameterEditor> - <Id>1754309475984</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1755767836354</Id> - <Name>p_avgNrOfCarsPerHouse</Name> - <Description>https://opendata.cbs.nl/#/CBS/nl/dataset/85039NED/table?searchKeywords=motorvoertuigen -> 1.1</Description> - <X>50</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.1</Code> - </DefaultValue> - <ParameterEditor> - <Id>1755767836352</Id> - <Label>p_avgHousePVInstallationPower_kWp1</Label> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1755873729807</Id> - <Name>p_avgAnnualTravelDistancePrivateCar_km</Name> - <Description>https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-personenautos</Description> - <X>570</X> - <Y>730</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>11200</Code> - </DefaultValue> - <ParameterEditor> - <Id>1755873729805</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1755874747343</Id> - <Name>p_avgAnnualTravelDistanceSecondVSFirstCar_fr</Name> - <Description>Scaling factor used to scale down the average annual travel distance of the additional cars for households that have multiple cars. SOURCE!???</Description> - <X>570</X> - <Y>750</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.6</Code> - </DefaultValue> - <ParameterEditor> - <Id>1755874747341</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1759233211509</Id> - <Name>map_yearlySummerWinterTimeStartHour</Name> - <Description>Map that contains data, with key per year, and value a pair where pair.getFirst() == summertimeStartHour and pair.getSecond() == winterTimeStartHour.</Description> - <X>1070</X> - <Y>400</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>Map<Integer, Pair<Double, Double>></Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>Map.of( -2023, new Pair<>(2018.0, 7247.0), -2024, new Pair<>(2162.0, 7203.0), -2025, new Pair<>(2114.0, 7131.0) -)</Code> - </DefaultValue> - <ParameterEditor> - <Id>1759233211507</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1760435457613</Id> - <Name>p_minHeatpumpElectricCapacity_kW</Name> - <Description>https://comfortklimaat.nl/collectie/warmtepompen -> Thermisch vermogen is minimaal 4. -https://www.bluesolid.nl/warmtepomp-monoblock-9-kw-1ph.html -> Thermisch vermogen van minimaal 5. -https://www.dewarmte.nl/all-electric-warmtepomp/ -> thermisch vermogen van 2-8 kW. - --> (4+5+2)/3 -> Gemiddeld ongeveer 3.6 thermisch-> 3.6/3 = 1.2 elektrisch</Description> - <X>70</X> - <Y>600</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1760435457611</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1760435475991</Id> - <Name>p_minGasBurnerOutputCapacity_kW</Name> - <Description>https://www.warmteservice.nl/Verwarming/CV-ketel/HR-Combiketel/c/163 -> Minimum ranged van 4 - 7.8 -> gekozen voor 6 </Description> - <X>70</X> - <Y>690</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>6</Code> - </DefaultValue> - <ParameterEditor> - <Id>1760435475989</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1760435486680</Id> - <Name>p_minHydrogenBurnerOutputCapacity_kW</Name> - <Description>Zelfde gekozen als gasbrander.</Description> - <X>70</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>6</Code> - </DefaultValue> - <ParameterEditor> - <Id>1760435486678</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1760435497667</Id> - <Name>p_minDistrictHeatingDeliverySetOutputCapacity_kW</Name> - <Description>25 kw is a default set: https://www.acm.nl/nl/energie/warmte-en-koude/warmtetarieven/tarieven-warmte-en-koude</Description> - <X>70</X> - <Y>960</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>25</Code> - </DefaultValue> - <ParameterEditor> - <Id>1760435497665</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1763396237774</Id> - <Name>p_avgOutputTemperatureHybridHeatpump_degC</Name> - <Description>https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/?utm_source=chatgpt.com - max 45-55 -https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 graden afgifte bij -10 graden. - --> Voor nu gemiddeld 40 genomen.</Description> - <X>70</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>40</Code> - </DefaultValue> - <ParameterEditor> - <Id>1763396237772</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205530</Id> - <Name>f_setAVGC_data</Name> - <X>30</X> - <Y>50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>J_AVGC_data dataAVGC = new J_AVGC_data(); -zero_Loader.energyModel.avgc_data = dataAVGC; - -dataAVGC.p_avgHouseGasConsumption_m3_yr = p_avgHouseGasConsumption_m3_yr; -dataAVGC.p_avgHouseElectricityConsumption_kWh_yr = p_avgHouseElectricityConsumption_kWh_yr; -dataAVGC.p_avgEVMaxChargePowerVan_kW = p_avgEVMaxChargePowerVan_kW; -dataAVGC.p_avgHouseConnectionCapacity_kW = p_avgHouseConnectionCapacity_kW; -dataAVGC.p_avgHouseHeatingMethod = p_avgHouseHeatingMethod; -dataAVGC.p_avgNrOfCarsPerHouse = p_avgNrOfCarsPerHouse; -dataAVGC.p_ratioEVHousePersonalCars = p_shareOfElectricVehicleOwnership; -dataAVGC.p_avgEVMaxChargePowerCar_kW = p_avgEVMaxChargePowerCar_kW; -dataAVGC.p_avgEVMaxChargePowerTruck_kW = p_avgEVMaxChargePowerTruck_kW; -dataAVGC.p_avgEVStorageCar_kWh = p_avgEVStorageCar_kWh; -dataAVGC.p_avgEVStorageVan_kWh = p_avgEVStorageVan_kWh; -dataAVGC.p_avgHousePVInstallationPower_kWp = p_avgHousePVInstallationPower_kWp; -dataAVGC.p_avgEVStorageTruck_kWh = p_avgEVStorageTruck_kWh; -dataAVGC.p_ratioHouseInstalledPV = p_ratioHouseInstalledPV; -dataAVGC.p_gas_kWhpm3 = p_gas_kWhpm3; -dataAVGC.p_diesel_kWhpl = p_diesel_kWhpl; -dataAVGC.p_gasoline_kWhpl = p_gasoline_kWhpl; -dataAVGC.p_waterHeatCapacity_JpkgK = p_waterHeatCapacity_JpkgK; -dataAVGC.p_waterDensity_kgpm3 = p_waterDensity_kgpm3; -dataAVGC.p_avgUtilityHeatingMethod = p_avgUtilityHeatingMethod; -dataAVGC.p_avgUtilityConnectionCapacity_kW = p_avgUtilityConnectionCapacity_kW; -dataAVGC.p_avgUtilityPVPower_kWp = p_avgUtilityPVPower_kWp; -dataAVGC.p_ratioElectricTrucks = p_ratioElectricTrucks; -dataAVGC.p_avgCompanyHeatingMethod = p_avgCompanyHeatingMethod; -dataAVGC.p_avgEVEnergyConsumptionCar_kWhpkm = p_avgEVEnergyConsumptionCar_kWhpkm; -dataAVGC.p_avgEVEnergyConsumptionVan_kWhpkm = p_avgEVEnergyConsumptionVan_kWhpkm; -dataAVGC.p_avgEVEnergyConsumptionTruck_kWhpkm = p_avgEVEnergyConsumptionTruck_kWhpkm; -dataAVGC.p_hydrogenEnergyDensity_kWh_Nm3 = p_hydrogenEnergyDensity_kWh_Nm3; -dataAVGC.p_avgDieselConsumptionCar_kmpl = p_avgDieselConsumptionCar_kmpl; -dataAVGC.p_avgGasolineConsumptionCar_kmpl = p_avgGasolineConsumptionCar_kmpl; -dataAVGC.p_hydrogenSpecificEnergy_kWh_kg = p_hydrogenSpecificEnergy_kWh_kg; -dataAVGC.p_hydrogenDensity_kg_Nm3 = p_hydrogenDensity_kg_Nm3; -dataAVGC.p_oxygenDensity_kg_Nm3 = p_oxygenDensity_kg_Nm3; -dataAVGC.p_avgCOPHeatpump = p_avgCOPHeatpump; -dataAVGC.p_avgEfficiencyHeatpump_fr = p_avgEfficiencyHeatpump_fr; -dataAVGC.p_avgDieselConsumptionCar_kWhpkm = p_avgDieselConsumptionCar_kWhpkm; -dataAVGC.p_oxygenProduction_kgO2pkgH2 = p_oxygenProduction_kgO2pkgH2; -dataAVGC.p_avgGasolineConsumptionCar_kWhpkm = p_avgGasolineConsumptionCar_kWhpkm; -dataAVGC.p_avgDieselConsumptionVan_kmpl = p_avgDieselConsumptionVan_kmpl; -dataAVGC.p_avgDieselConsumptionVan_kWhpkm = p_avgDieselConsumptionVan_kWhpkm; -dataAVGC.p_avgDieselConsumptionTruck_kmpl = p_avgDieselConsumptionTruck_kmpl; -dataAVGC.p_avgDieselConsumptionTruck_kWhpkm = p_avgDieselConsumptionTruck_kWhpkm; -dataAVGC.p_avgOutputTemperatureElectricHeatpump_degC = p_avgOutputTemperatureElectricHeatpump_degC; -dataAVGC.p_avgOutputTemperatureHybridHeatpump_degC = p_avgOutputTemperatureHybridHeatpump_degC; -dataAVGC.p_avgHydrogenConsumptionCar_kWhpkm = p_avgHydrogenConsumptionCar_kWhpkm; -dataAVGC.p_avgEfficiencyGasBurner_fr = p_avgEfficiencyGasBurner_fr; -dataAVGC.p_avgHydrogenConsumptionVan_kWhpkm = p_avgHydrogenConsumptionVan_kWhpkm; -dataAVGC.p_avgHydrogenConsumptionTruck_kWhpkm = p_avgHydrogenConsumptionTruck_kWhpkm; -dataAVGC.p_avgOutputTemperatureGasBurner_degC = p_avgOutputTemperatureGasBurner_degC; -dataAVGC.p_avgEfficiencyHydrogenBurner_fr = p_avgEfficiencyHydrogenBurner_fr; -dataAVGC.p_avgOutputTemperatureHydrogenBurner_degC = p_avgOutputTemperatureHydrogenBurner_degC; -dataAVGC.p_minHeatpumpElectricCapacity_kW = p_minHeatpumpElectricCapacity_kW; -dataAVGC.p_minGasBurnerOutputCapacity_kW = p_minGasBurnerOutputCapacity_kW; -dataAVGC.p_minHydrogenBurnerOutputCapacity_kW = p_minHydrogenBurnerOutputCapacity_kW; -dataAVGC.p_minDistrictHeatingDeliverySetOutputCapacity_kW = p_minDistrictHeatingDeliverySetOutputCapacity_kW; -dataAVGC.p_avgPVPower_kWpm2= p_avgPVPower_kWpm2; -dataAVGC.p_avgRatioRoofPotentialPV = p_avgRatioRoofPotentialPV; -dataAVGC.p_avgRatioBatteryCapacity_v_Power = p_avgRatioBatteryCapacity_v_Power; -dataAVGC.p_avgRatioHouseBatteryStorageCapacity_v_PVPower = p_avgRatioHouseBatteryStorageCapacity_v_PVPower; -dataAVGC.p_avgSolarFieldPower_kWppha = p_avgSolarFieldPower_kWppha; -dataAVGC.p_avgEfficiencyCHP_thermal_fr = p_avgEfficiencyCHP_thermal_fr; -dataAVGC.p_avgEfficiencyCHP_electric_fr = p_avgEfficiencyCHP_thermal_fr; -dataAVGC.p_avgOutputTemperatureCHP_degC = p_avgEfficiencyCHP_thermal_fr; -dataAVGC.p_avgEfficiencyDistrictHeatingDeliverySet_fr = p_avgEfficiencyDistrictHeatingDeliverySet_fr; -dataAVGC.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC = p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; -dataAVGC.p_v1gProbability = p_v1gProbability; -dataAVGC.p_v2gProbability = p_v2gProbability; -dataAVGC.p_avgEVsPerPublicCharger = p_avgEVsPerPublicCharger; -dataAVGC.p_avgPTPower_kWpm2 = p_avgPTPower_kWpm2; -dataAVGC.p_avgPTPanelSize_m2 = p_avgPTPanelSize_m2; -dataAVGC.p_avgMaxHeatBufferTemperature_degC = p_avgMaxHeatBufferTemperature_degC; -dataAVGC.p_avgMinHeatBufferTemperature_degC = p_avgMinHeatBufferTemperature_degC; -dataAVGC.p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 = p_avgHeatBufferWaterVolumePerPTSurface_m3pm2; -dataAVGC.p_avgHeatBufferWaterVolumePerHPPower_m3pkW = p_avgHeatBufferWaterVolumePerHPPower_m3pkW; -dataAVGC.p_avgAnnualTravelDistancePrivateCar_km = p_avgAnnualTravelDistancePrivateCar_km; -dataAVGC.p_avgAnnualTravelDistanceCompanyCar_km = p_avgAnnualTravelDistanceCompanyCar_km; -dataAVGC.p_avgAnnualTravelDistanceVan_km = p_avgAnnualTravelDistanceVan_km; -dataAVGC.p_avgAnnualTravelDistanceTruck_km = p_avgAnnualTravelDistanceTruck_km;</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1726584205728</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1726584830548</Id> - <Name>zero_Loader</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Loader</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1726584205534</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1726584205536</Id> - <Name>rect_constants</Name> - <X>1020</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>896.894</Width> - <Height>1400</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205538</Id> - <Name>rect_avg</Name> - <X>0.737</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>1019.263</Width> - <Height>1400</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205540</Id> - <Name>txt_houses</Name> - <X>40</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for houses</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205542</Id> - <Name>txt_avgCompanies</Name> - <X>40</X> - <Y>280</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for companies/utilities</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205544</Id> - <Name>txt_avgEV</Name> - <X>560</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for Electric Vehicles</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205546</Id> - <Name>text3</Name> - <X>1440</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>24</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1726584205548</Id> - <Name>text4</Name> - <X>1060</X> - <Y>200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Energy conversion constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205550</Id> - <Name>text5</Name> - <X>480</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Averages</Text> - <Font> - <Name>SansSerif</Name> - <Size>24</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1726584205552</Id> - <Name>rect_hydrogenC</Name> - <X>1560</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16711681</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>200</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205554</Id> - <Name>txt_hydrogenC</Name> - <X>1580</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hydrogen constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205556</Id> - <Name>txt_avgFossil</Name> - <X>560</X> - <Y>360</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for Fossil fueled vehicles</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205558</Id> - <Name>txt_Heatassets</Name> - <X>40</X> - <Y>470</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heat assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205560</Id> - <Name>txt_avgPV</Name> - <X>40</X> - <Y>990</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>PV panels</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205562</Id> - <Name>txt_avgBat</Name> - <X>40</X> - <Y>1095</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batteries</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205564</Id> - <Name>txt_avgFCV</Name> - <X>560</X> - <Y>610</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for Hydrogen vehicles</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205566</Id> - <Name>txt_heatpumps</Name> - <X>60</X> - <Y>490</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heatpumps</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205568</Id> - <Name>txt_gasburners</Name> - <X>60</X> - <Y>620</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Gasburners</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205570</Id> - <Name>txt_hydrogenburners</Name> - <X>60</X> - <Y>710</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hydrogenburners</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205572</Id> - <Name>rect_sendToEngine</Name> - <X>10</X> - <Y>10</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-65536</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>170</Width> - <Height>60</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205574</Id> - <Name>txt_valuesToEngine</Name> - <X>20</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Send values to Engine</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205576</Id> - <Name>txt_timeC</Name> - <X>1060</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Time constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726743791200</Id> - <Name>text</Name> - <X>40</X> - <Y>1160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Chargingcentres</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728032240347</Id> - <Name>txt_avgTravelDistances</Name> - <X>560</X> - <Y>700</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average travel distances per vehicle type</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1745316061345</Id> - <Name>txt_CHP</Name> - <X>60</X> - <Y>800</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>CHP</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1747314897311</Id> - <Name>txt_districtHeatingDeliverySet</Name> - <X>60</X> - <Y>890</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>District Heating delivery set</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1751906160194</Id> - <Name>txt_avgHeatBuffer</Name> - <X>560</X> - <Y>980</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heat Buffer</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1751906173848</Id> - <Name>txt_avgPT</Name> - <X>560</X> - <Y>900</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>PT panels</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1759233222368</Id> - <Name>txt_timeConstants</Name> - <X>1060</X> - <Y>370</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Time constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1709049506453</Id> - <Name>tabArea</Name> - <Folder>1754045642067</Folder> - <Generic>false</Generic> - <GenericParameter> - <Id>1709049506461</Id> - <Name>1709049506461</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089980</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709107200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1709049506456</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1709049506460</CurrentLevel> - <ConnectionsId>1709049506454</ConnectionsId> - <AgentLinks> - <AgentLink> - <Id>1709049506454</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <Presentation> - <Level> - <Id>1709049506460</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1722253463895</Id> - <Name>tabEHub</Name> - <AdditionalClassCode>public ShapeGroup getGroupHubSliders() { - return this.gr_hubSliders; -} - -public ShapeButton getButton_remove_nfato() { - return this.button_remove_nfato; -} - -public ShapeButton getButton_createEnergyHub() { - return this.button_createEnergyHub; -}</AdditionalClassCode> - <Folder>1754045642067</Folder> - <ExtendsReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>tabArea</ClassName> - </ExtendsReference> - <Generic>false</Generic> - <GenericParameter> - <Id>1722253463901</Id> - <Name>1722253463901</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089979</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1722326400000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1722253463898</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1722253463902</CurrentLevel> - <ConnectionsId>1722253463896</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1722256365490</Id> - <Name>b_NFATOListener</Name> - <X>740</X> - <Y>915</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>boolean</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1722256365499</Id> - <Name>v_nfatoFirstGC</Name> - <X>740</X> - <Y>855</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>GridConnection</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1722256365507</Id> - <Name>v_nfatoSecondGC</Name> - <X>740</X> - <Y>875</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>GridConnection</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1722256365515</Id> - <Name>b_nfatoWeekendDistinction</Name> - <X>740</X> - <Y>895</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>boolean</Type> - <InitialValue Class="CodeValue"> - <Code>false</Code> - </InitialValue> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1722256365452</Id> - <Name>f_setNFATO</Name> - <Description>Sets the relevant parameters in the engine for the NFATO. The first selected GC will receive capacity from the second GC.</Description> - <X>740</X> - <Y>790</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>weekCapacities</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>weekendCapacities</Name> - <Type>double[]</Type> - </Parameter> - <Body>GridConnection gc1 = v_nfatoFirstGC; -GridConnection gc2 = v_nfatoSecondGC; - -// Reset the GC Capacities if they already had a NF-ATO -gc1.f_nfatoSetConnectionCapacity(true); -gc2.f_nfatoSetConnectionCapacity(true); - -switch (rb_deliveryOrFeedin.getValue()) { - case 0: // Delivery - // Set the variables of the GCs - for (int i = 0; i < 24; i++) { - gc1.v_nfatoWeekDeliveryCapacity_kW[i] += weekCapacities[i]; - gc2.v_nfatoWeekDeliveryCapacity_kW[i] += -weekCapacities[i]; - gc1.v_nfatoWeekendDeliveryCapacity_kW[i] += weekendCapacities[i]; - gc2.v_nfatoWeekendDeliveryCapacity_kW[i] += -weekendCapacities[i]; - } - break; - - case 1: // Feed In - // Set the variables of the GCs - for (int i = 0; i < 24; i++) { - gc1.v_nfatoWeekFeedinCapacity_kW[i] += weekCapacities[i]; - gc2.v_nfatoWeekFeedinCapacity_kW[i] += -weekCapacities[i]; - gc1.v_nfatoWeekendFeedinCapacity_kW[i] += weekendCapacities[i]; - gc2.v_nfatoWeekendFeedinCapacity_kW[i] += -weekendCapacities[i]; - } - break; - - case 2: // Both - // Set the variables of the GCs - for (int i = 0; i < 24; i++) { - gc1.v_nfatoWeekDeliveryCapacity_kW[i] += weekCapacities[i]; - gc2.v_nfatoWeekDeliveryCapacity_kW[i] += -weekCapacities[i]; - gc1.v_nfatoWeekendDeliveryCapacity_kW[i] += weekendCapacities[i]; - gc2.v_nfatoWeekendDeliveryCapacity_kW[i] += -weekendCapacities[i]; - - gc1.v_nfatoWeekFeedinCapacity_kW[i] += weekCapacities[i]; - gc2.v_nfatoWeekFeedinCapacity_kW[i] += -weekCapacities[i]; - gc1.v_nfatoWeekendFeedinCapacity_kW[i] += weekendCapacities[i]; - gc2.v_nfatoWeekendFeedinCapacity_kW[i] += -weekendCapacities[i]; - } - break; - - default: - throw new IllegalStateException("Invalid Setting in rb_deliveryOrFeedin"); -} - -// Update the Connection Capacity if it is needed at the current time -gc1.f_nfatoSetConnectionCapacity(false); -gc2.f_nfatoSetConnectionCapacity(false); - -gc1.v_enableNFato = true; -gc2.v_enableNFato = true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256365459</Id> - <Name>f_checkGISRegion</Name> - <Description>When b_NFATOListener is true checks wether the selected coordinates are a valid GC for the NFATO. If so saves the GC and updates the text fields</Description> - <X>740</X> - <Y>700</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>clickx</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>clicky</Name> - <Type>double</Type> - </Parameter> - <Body>//Check if click was on Building -for ( GIS_Building b : zero_Interface.energyModel.pop_GIS_Buildings ){ - if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ - if (b.gisRegion.isVisible()) { - GridConnection GC = b.c_containedGridConnections.get(0); - if (GC != null && GC != v_nfatoFirstGC) { - // found a valid GC - // Check if it is the first GC - if (v_nfatoFirstGC == null) { - t_nfatoFirstBuilding.setText(GC.p_ownerID + " zal ontvangen"); - t_nfatoSecondBuilding.setText("Klik op een gebouw dat zijn capaciteit gaat afstaan"); - v_nfatoFirstGC = GC; - //for (GIS_Building b : GC.c_connectedBuildings) { - //b.gisRegion.setFillColor(v_selectionColorAddBuildings); - //} - } - else { - v_nfatoSecondGC = GC; - t_nfatoSecondBuilding.setText(GC.p_ownerID + " zal leveren"); - //for (GIS_Building b : GC.c_connectedBuildings) { - //b.gisRegion.setFillColor(v_selectionColorAddBuildings); - //} - // We found two buildings, return to the default clicking functionality - b_NFATOListener = false; - } - } - } - } -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1722256365466</Id> - <Name>f_checkNFATO</Name> - <Description>Checks if the current NFATO settings could generate a valid contract. Returns true if NFATO is possible.</Description> - <X>740</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>weekCapacities</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>weekendCapacities</Name> - <Type>double[]</Type> - </Parameter> - <Body>GridConnection gc1 = v_nfatoFirstGC; -GridConnection gc2 = v_nfatoSecondGC; - -if (gc1 == null || gc2 == null || gc1 == gc2) { - throw new IllegalStateException("Invalid Non-Firm ATO Settings, Please select two gridconnections"); -} - -double[] weekTestDelivery = new double[24]; -double[] weekendTestDelivery = new double[24]; -double[] weekTestFeedin = new double[24]; -double[] weekendTestFeedin = new double[24]; - -double maxDeliveryCapacity_kW; -double maxFeedinCapacity_kW; - -switch (rb_deliveryOrFeedin.getValue()) { - case 0: // Delivery - for (int i = 0; i < 24; i++) { - weekTestDelivery[i] = weekCapacities[i] - gc2.v_nfatoWeekDeliveryCapacity_kW[i]; - weekendTestDelivery[i] = weekendCapacities[i] - gc2.v_nfatoWeekendDeliveryCapacity_kW[i]; - } - maxDeliveryCapacity_kW = max(max(weekTestDelivery), max(weekendTestDelivery)); - // Reset the GC Capacity in case they already had a NF-ATO - gc2.f_nfatoSetConnectionCapacity(true); - // Check if gc2 has enough capacity with the original connection capacity - if ( maxDeliveryCapacity_kW > gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); - } - else { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - return true; - } - - case 1: // Feed In - for (int i = 0; i < 24; i++) { - weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; - weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; - } - maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); - // Reset the GC Capacity in case they already had a NF-ATO - gc2.f_nfatoSetConnectionCapacity(true); - // Check if gc2 has enough capacity with the original connection capacity - if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); - } - else { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - return true; - } - - case 2: // Both - for (int i = 0; i < 24; i++) { - weekTestDelivery[i] = weekCapacities[i] - gc2.v_nfatoWeekDeliveryCapacity_kW[i]; - weekendTestDelivery[i] = weekendCapacities[i] - gc2.v_nfatoWeekendDeliveryCapacity_kW[i]; - } - for (int i = 0; i < 24; i++) { - weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; - weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; - } - - maxDeliveryCapacity_kW = max(max(weekTestDelivery), max(weekendTestDelivery)); - maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); - // Reset the GC Capacity in case they already had a NF-ATO - gc2.f_nfatoSetConnectionCapacity(true); - // Check if gc2 has enough capacity with the original connection capacity - if ( maxDeliveryCapacity_kW > gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); - } - else if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); - } - else { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - return true; - } - - default: - throw new IllegalStateException("Invalid Setting in rb_deliveryOrFeedin"); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[][]</ReturnType> - <Id>1722256365474</Id> - <Name>f_constructNFATOArrays</Name> - <Description>Uses the NFATO slider values to construct two arrays of the change in capacity at every hour. One array for weekdays, one for weekends</Description> - <X>740</X> - <Y>730</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>// Construct arrays from slider values -// Week -int weekStart_h = (int) sl_nfatoWeekStartTime.getValue(); -int weekEnd_h = (int) sl_nfatoWeekEndTime.getValue(); -int weekCapacity_kW = (int) sl_nfatoWeekCapacity.getValue(); - -double[] weekCapacities = new double[24]; -double[] weekendCapacities = new double[24]; - -if (weekStart_h < weekEnd_h) { - for (int i = 0; i < weekStart_h; i++) { - weekCapacities[i] = 0; - } - for (int j = weekStart_h; j < weekEnd_h; j ++) { - weekCapacities[j] = weekCapacity_kW; - } - for (int k = weekEnd_h; k < 24; k ++) { - weekCapacities[k] = 0; - } -} -else { // If the start time is higher than the end time we share capacity at night - for (int i = 0; i < weekEnd_h; i++) { - weekCapacities[i] = weekCapacity_kW; - } - for (int j = weekEnd_h; j < weekStart_h ; j ++) { - weekCapacities[j] = 0; - } - for (int k = weekStart_h; k < 24; k ++) { - weekCapacities[k] = weekCapacity_kW; - } -} - -if (b_nfatoWeekendDistinction) { - // repeat above code for weekend - int weekendStart_h = (int) sl_nfatoWeekendStartTime.getValue(); - int weekendEnd_h = (int) sl_nfatoWeekendEndTime.getValue(); - int weekendCapacity_kW = (int) sl_nfatoWeekendCapacity.getValue(); - - - if (weekendStart_h < weekendEnd_h) { - for (int i = 0; i < weekendStart_h; i++) { - weekendCapacities[i] = 0; - } - for (int j = weekendStart_h; j < weekendEnd_h; j ++) { - weekendCapacities[j] = weekendCapacity_kW; - } - for (int k = weekendEnd_h; k < 24; k ++) { - weekendCapacities[k] = 0; - } - } - else { // If the start time is higher than the end time we share capacity at night - for (int i = 0; i < weekendEnd_h; i++) { - weekendCapacities[i] = weekendCapacity_kW; - } - for (int j = weekendEnd_h; j < weekendStart_h; j ++) { - weekendCapacities[j] = 0; - } - for (int k = weekendStart_h; k < 24; k ++) { - weekendCapacities[k] = weekendCapacity_kW; - } - } -} -else { - // no distinction means the settings are the same during the weekend - weekendCapacities = weekCapacities; -} - -double[][] arr = {weekCapacities, weekendCapacities}; -return arr;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256365483</Id> - <Name>f_resetNFATOSettings</Name> - <Description>Resets the group of NFATO Settings after a contract is added or canceled.</Description> - <X>740</X> - <Y>820</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>t_nfatoFirstBuilding.setText("Klik op een gebouw dat capaciteit gaat ontvangen"); -t_nfatoSecondBuilding.setText(""); -v_nfatoFirstGC = null; -v_nfatoSecondGC = null; -b_NFATOListener = false;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256998182</Id> - <Name>f_setTab</Name> - <Description>Function that ensures the correct tab is visible</Description> - <X>460</X> - <Y>710</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>selectedTabType</Name> - <Type>EnergyDemandTab</Type> - </Parameter> - <Body>if (selectedTabType == EnergyDemandTab.NFATO) { - gr_nfatoSettings.setVisible(true); - gr_hubSliders.setVisible(false); -} -else { - gr_nfatoSettings.setVisible(false); - gr_hubSliders.setVisible(true); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754923608234</Id> - <Name>f_updateSliders_EHub</Name> - <X>460</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Function that can be used to update sliders/buttons to the engine state -//--> empty for now</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1722253463896</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1722253479511</Id> - <Name>uI_Tabs</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_Tabs</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1722253479513</Id> - <Name>zero_Interface</Name> - <X>150</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1753694295449</Id> - <Name>uI_EnergyHub</Name> - <X>310</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_EnergyHub</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1722253463902</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1722344806530</Id> - <Name>rect_generalFunctions</Name> - <X>430</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>230</Width> - <Height>170</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1722344586686</Id> - <Name>rect_nfatoFunctions</Name> - <X>700</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16711936</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>300</Width> - <Height>300</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Group> - <Id>1722253487925</Id> - <Name>gr_hubSliders</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722253487927</Id> - <Name>rect_hubSliders</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-3736634</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253487949</Id> - <Name>button_add_nfato</Name> - <X>20</X> - <Y>45</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="160" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <VisibleCode>//!zero_Interface.settings.isPublicModel()</VisibleCode> - <Enabled>true</Enabled> - <EnableExpression>!zero_Interface.settings.isPublicModel()</EnableExpression> - <ActionCode>/* -if (v_NFATOListener) { - // This should not be reachable anymore - traceln("Quitting NF ATO settings"); - v_NFATOListener = false; - return; -} -*/ - -if (zero_Interface.v_clickedObjectType != null && zero_Interface.v_clickedObjectType == OL_GISObjectType.BUILDING && zero_Interface.c_selectedGridConnections.size() != 0) { - v_nfatoFirstGC = zero_Interface.c_selectedGridConnections.get(0); - t_nfatoFirstBuilding.setText(v_nfatoFirstGC.p_ownerID + " zal ontvangen"); - t_nfatoSecondBuilding.setText("Klik op een gebouw dat zijn capaciteit gaat afstaan"); -} - -// When this boolean is true clicking on the GIS Map will select another building for the NF ATO -b_NFATOListener = true; -f_setTab(NFATO); - - -if (b_nfatoWeekendDistinction) { - t_nfatoWeek.setVisible(true); - t_nfatoWeekend.setVisible(true); - sl_nfatoWeekendStartTime.setVisible(true); - sl_nfatoWeekendEndTime.setVisible(true); - sl_nfatoWeekendCapacity.setVisible(true); -} -else { - t_nfatoWeek.setVisible(false); - t_nfatoWeekend.setVisible(false); - sl_nfatoWeekendStartTime.setVisible(false); - sl_nfatoWeekendEndTime.setVisible(false); - sl_nfatoWeekendCapacity.setVisible(false); -} - - -// TODO: Color the companies on the GIS Map (e.g. according to grid topology)</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Voeg Non-Firm ATO toe</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253487951</Id> - <Name>button_remove_nfato</Name> - <X>190</X> - <Y>45</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="160" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <VisibleCode>!zero_Interface.settings.isPublicModel()</VisibleCode> - <Enabled>true</Enabled> - <ActionCode>for (GridConnection GC : zero_Interface.energyModel.f_getActiveGridConnections()) { - GC.f_nfatoSetConnectionCapacity(true); - GC.v_enableNFato = false; - GC.v_nfatoWeekDeliveryCapacity_kW = new double[24]; - GC.v_nfatoWeekendDeliveryCapacity_kW = new double[24]; - GC.v_nfatoWeekFeedinCapacity_kW = new double[24]; - GC.v_nfatoWeekendFeedinCapacity_kW = new double[24]; -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -button_remove_nfato.setEnabled(false); - -zero_Interface.f_resetSettings();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Verwijder alle NF ATOs</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1753434467432</Id> - <Name>button_createEnergyHub</Name> - <X>40</X> - <Y>130</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="290" Height="70"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>zero_Interface.f_startEnergyHubConfiguration();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Creeër je eigen Energie Hub</LabelText> - </ExtendedProperties> - </Control> - <Text> - <Id>1754990508102</Id> - <Name>txt_NonFirmAtoOptions</Name> - <X>185</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Non-Firm ATO opties</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1754990563477</Id> - <Name>txt_energyHubOptions</Name> - <X>185</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Energie Hub</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1762248467148</Id> - <Name>button_loadScenario</Name> - <X>40</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="290" Height="70"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>// First check if there are any save files, if there are none we display an error screen - -zero_Interface.uI_EnergyHub.f_initializeUserSavedScenarios(zero_Interface.uI_EnergyHub.combobox_selectScenario); -if (zero_Interface.uI_EnergyHub.combobox_selectScenario.getItems().length == 0) { - zero_Interface.f_setErrorScreen("Er zijn nog geen scenario's opgeslagen.", 0, 0); - return; -} - -zero_Interface.f_setLoadingScreen(true, 0, 0); - -new Thread( () -> { - // Opens the filter menu on the main interface - zero_Interface.f_startEnergyHubConfiguration(); - - // Add a manual select to the filter with all (active) gridconnections - // We should follow the usual procedure of creating an E-Hub so that the user could cancel and reconfigure - zero_Interface.f_setFilter("Handmatige selectie"); - zero_Interface.c_selectedGridConnections = zero_Interface.energyModel.f_getActiveGridConnections(); - zero_Interface.f_applyFilter(OL_FilterOptionsGC.MANUAL_SELECTION, ""); - - zero_Interface.f_setLoadingScreen(false, 0, 0); - - // Create a coop with the selection - zero_Interface.f_finalizeEnergyHubConfiguration(); - - // Select load scenario in the E-Hub configurator - zero_Interface.uI_EnergyHub.button_loadScenario.action(); - -}).start(); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Laad een opgeslagen scenario in</LabelText> - </ExtendedProperties> - </Control> - <Text> - <Id>1762248467153</Id> - <Name>txt_loadScenario</Name> - <X>180</X> - <Y>230</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Opgeslagen Scenario's</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1722253509588</Id> - <Name>gr_nfatoSettings</Name> - <X>0</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <YCode>0</YCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722253509590</Id> - <Name>rect_nfatoSettings</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-3736634</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722253509592</Id> - <Name>t_nfatoFirstBuilding</Name> - <X>25</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Klik op een gebouw dat capaciteit gaat ontvangen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509594</Id> - <Name>t_nfatoSecondBuilding</Name> - <X>25</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text/> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509596</Id> - <Name>sl_nfatoWeekStartTime</Name> - <X>125</X> - <Y>180</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>8</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>24</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509598</Id> - <Name>cb_nfatoWeekendDistinction</Name> - <X>25</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="190" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>if (b_nfatoWeekendDistinction) { - t_nfatoWeek.setVisible(true); - t_nfatoWeekend.setVisible(true); - sl_nfatoWeekendStartTime.setVisible(true); - sl_nfatoWeekendEndTime.setVisible(true); - sl_nfatoWeekendCapacity.setVisible(true); -} -else { - t_nfatoWeek.setVisible(false); - t_nfatoWeekend.setVisible(false); - sl_nfatoWeekendStartTime.setVisible(false); - sl_nfatoWeekendEndTime.setVisible(false); - sl_nfatoWeekendCapacity.setVisible(false); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="14" Style="0"/> - <LabelText>verschil week & weekend</LabelText> - <LinkTo>true</LinkTo> - <Link>b_nfatoWeekendDistinction</Link> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509600</Id> - <Name>sl_nfatoWeekEndTime</Name> - <X>125</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>20</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>24</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509602</Id> - <Name>sl_nfatoWeekCapacity</Name> - <X>125</X> - <Y>245</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>100</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>2000</MaxValue> - <Step>10</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509604</Id> - <Name>button_confirm_nfato</Name> - <X>45</X> - <Y>285</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="155" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>if (sl_nfatoWeekStartTime.getValue() == sl_nfatoWeekEndTime.getValue()) { - traceln("Week start time is the same as end time"); -} -else if (sl_nfatoWeekendStartTime.getValue() == sl_nfatoWeekendEndTime.getValue()) { - traceln("Weekend start time is the same as end time"); -} -else { - double[][] arr = f_constructNFATOArrays(); - //traceln("f_constructNFATOArraysFromSliders: " + Arrays.toString(arr[0])); - //traceln("f_constructNFATOArraysFromSliders: " + Arrays.toString(arr[1])); - - double[] weekCapacities = arr[0]; - double[] weekendCapacities = arr[1]; - - if (f_checkNFATO(weekCapacities, weekendCapacities)) { - f_setNFATO(weekCapacities, weekendCapacities); - f_setTab(HUB); - // reset the nfato settings - f_resetNFATOSettings(); - zero_Interface.f_resetSettings(); - - button_remove_nfato.setEnabled(true); - - //Update variable to change to custom scenario - if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); - } - } -} - -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Voeg Non-Firm ATO toe</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509606</Id> - <Name>button_cancel_nfato</Name> - <X>275</X> - <Y>285</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="75" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setTab(HUB); -f_resetNFATOSettings();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>cancel</LabelText> - </ExtendedProperties> - </Control> - <Text> - <Id>1722253509608</Id> - <Name>t_nfatoWeekStartTime</Name> - <X>20</X> - <Y>185</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Start tijd (uur)</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509610</Id> - <Name>t_nfatoWeekEndTime</Name> - <X>20</X> - <Y>215</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Eind tijd (uur)</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509612</Id> - <Name>t_nfatoWeekStartTime2</Name> - <X>10</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Capaciteit (kW)</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509614</Id> - <Name>t_nfatoWeek</Name> - <X>155</X> - <Y>155</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Week -</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509616</Id> - <Name>t_nfatoWeekend</Name> - <X>265</X> - <Y>155</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Weekend -</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509618</Id> - <Name>sl_nfatoWeekendStartTime</Name> - <X>247</X> - <Y>180</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>8</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>24</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509620</Id> - <Name>sl_nfatoWeekendEndTime</Name> - <X>247</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>20</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>24</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509622</Id> - <Name>sl_nfatoWeekendCapacity</Name> - <X>247</X> - <Y>245</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>100</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>2000</MaxValue> - <Step>10</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1725970287541</Id> - <Name>rb_deliveryOrFeedin</Name> - <X>25</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="70" Height="70"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <DefaultValueCode>2</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Delivery</Button> - <Button>Feed in</Button> - <Button>Both</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - </Presentation> - </Group> - <Text> - <Id>1722256365442</Id> - <Name>t_nfatoFunctionsDescription</Name> - <X>850</X> - <Y>655</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>NF ATO Functions</Text> - <Font> - <Name>Dialog</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722344870135</Id> - <Name>t_generalFunctionsDescription</Name> - <X>460</X> - <Y>660</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>General Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1722247653561</Id> - <Name>tabElectricity</Name> - <AdditionalClassCode>// Default Sliders -public ShapeGroup getGroupElectricityDemandSliders() { - return this.gr_electricitySliders_default; -} - -public ShapeGroup getGroupElectricityDemandSliders_Businesspark() { - return this.gr_electricitySliders_businesspark; -} - -public ShapeGroup getGroupElectricityDemandSliders_ResidentialArea() { - return this.gr_electricitySliders_residential; -} -public ShapeSlider getSliderElectricityDemandReduction_pct() { - return this.sl_electricityDemandReduction_pct; -} - -public ShapeSlider getSliderRooftopPVCompanies_pct(){ - return this.sl_rooftopPVCompanies_pct; -} - -public ShapeSlider getSliderLargeScalePV_ha(){ - return this.sl_largeScalePV_ha; -} - -public ShapeSlider getSliderLargeScalePV_ha_Businesspark(){ - return this.sl_largeScalePV_ha_Businesspark; -} - -public ShapeSlider getSliderRooftopPVHouses_pct(){ - return this.sl_rooftopPVHouses_pct; -} - -public ShapeSlider getWindSlider(){ - return this.sl_largeScaleWind_MW; -} -</AdditionalClassCode> - <Folder>1754045642067</Folder> - <Import>import zeroPackage.ZeroMath;</Import> - <ExtendsReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>tabArea</ClassName> - </ExtendsReference> - <Generic>false</Generic> - <GenericParameter> - <Id>1722247653567</Id> - <Name>1722247653567</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089978</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1722326400000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1722247653564</Id> - <Name>scale</Name> - <X>0</X> - <Y>-240</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1722247653568</CurrentLevel> - <ConnectionsId>1722247653562</ConnectionsId> - <Variables> - <Variable Class="Parameter"> - <Id>1745483322704</Id> - <Name>p_currentPVOnLand_ha</Name> - <X>50</X> - <Y>1270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745483322702</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1745483371462</Id> - <Name>p_currentWindTurbines_MW</Name> - <X>50</X> - <Y>1290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745483371460</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256117103</Id> - <Name>f_setPVOnLand</Name> - <Description>Function that changes the electric capacity of the energy asset of the "Solar field". Takes an area size in hectares as a parameter and assumes that 1 MWp of solarpannels fits on 1 ha. The variables for amount of installed PV are updated automatically in the zero_engine. The function also modifies the connection capacity of the energy production site to match the new installed PV Power.</Description> - <X>70</X> - <Y>840</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>hectare</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>gcListProduction</Name> - <Type>List<GCEnergyProduction></Type> - </Parameter> - <Body>// TODO: Change to work for multiple solar fields in one model. -// to do so it should probably first calculate the total installed pv in all solar fields -for ( GCEnergyProduction GCEP : gcListProduction) { - for(J_EAProduction j_ea : GCEP.c_productionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC && GCEP.p_isSliderGC) { - if (!GCEP.v_isActive) { - GCEP.f_setActive(true); - } - - double solarFieldPower = (double)roundToInt(hectare * zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha); - j_ea.setCapacityElectric_kW(solarFieldPower); - GCEP.v_liveConnectionMetaData.physicalCapacity_kW = solarFieldPower; - GCEP.v_liveConnectionMetaData.contractedFeedinCapacity_kW = solarFieldPower; - - if(hectare == 0){ - GCEP.f_setActive(false); - } - - break; - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256142375</Id> - <Name>f_setPVSystemHouses</Name> - <Description>Function that adds or removes photovoltaic production assets to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a PV asset. If a new asset is created it takes as its electric capacity a random value between 3 and 6 kW. The variables for amount of installed PV are updated automatically in the zero_engine. -</Description> - <X>70</X> - <Y>810</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>PV_pct</Name> - <Type>double</Type> - </Parameter> - <Body>ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedPVSystemsHouses.stream().filter(gcList::contains).toList()); -int nbHouses = houses.size(); -int nbHousesWithPV = count(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); -int nbHousesWithPVGoal = roundToInt(PV_pct / 100.0 * nbHouses); - -while ( nbHousesWithPVGoal < nbHousesWithPV ) { // remove excess PV systems - GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); - J_EA pvAsset = findFirst(house.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); - if (pvAsset != null) { - pvAsset.removeEnergyAsset(); - houses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.add(0, house); - nbHousesWithPV --; - - if(house.p_batteryAsset != null ){ - house.p_batteryAsset.removeEnergyAsset(); - house.f_setBatteryManagement(null); - } - } - else { - traceln(" cant find PV asset in house that should have PV asset in f_setPVHouses (Interface)"); - } -} - -while ( nbHousesWithPVGoal > nbHousesWithPV ) { - GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) == false); - if (house == null){ - traceln("No gridconnection without PV panels found! Current PVsystems count: %s", nbHousesWithPV); - break; - } - else { - String assetName = "Rooftop PV"; - double capacityHeat_kW = 0.0; - double yearlyProductionHydrogen_kWh = 0.0; - double yearlyProductionMethane_kWh = 0.0; - double installedPVCapacity_kW = house.v_liveAssetsMetaData.PVPotential_kW;//roundToDecimal(uniform(3,6),2); - - //Compensate for pt if it is present - if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)){ - installedPVCapacity_kW = max(0, installedPVCapacity_kW-zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); //For now just 1 panel - } - J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOVOLTAIC, assetName, OL_EnergyCarriers.ELECTRICITY, installedPVCapacity_kW, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); - houses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.add(0, house); - nbHousesWithPV ++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256248965</Id> - <Name>f_setWindTurbines</Name> - <Description>Function that changes the electric capacity of the energy asset of the "Wind Farm". Takes an amount of MW as a parameter. The variables for amount of installed Wind are updated automatically in the zero_engine. The function also modifies the connection capacity of the energy production site to match the new installed Wind Power.</Description> - <X>70</X> - <Y>870</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>AllocatedWindPower_MW</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>gcListProduction</Name> - <Type>List<GCEnergyProduction></Type> - </Parameter> - <Body>// TODO: Change to work for multiple wind farms in one model. -// to do so it should probably first calculate the total installed wind power in all wind farms - -for ( GCEnergyProduction GCEP : gcListProduction) { - for(J_EAProduction j_ea : GCEP.c_productionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL && GCEP.p_isSliderGC) { - if (!GCEP.v_isActive) { - GCEP.f_setActive(true); - } - j_ea.setCapacityElectric_kW(roundToInt(1000*AllocatedWindPower_MW)); - GCEP.v_liveConnectionMetaData.physicalCapacity_kW = (double)roundToInt(1000*AllocatedWindPower_MW); - GCEP.v_liveConnectionMetaData.contractedFeedinCapacity_kW = (double)roundToInt(1000*AllocatedWindPower_MW); - - if(AllocatedWindPower_MW == 0){ - GCEP.f_setActive(false); - } - break; - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722335253834</Id> - <Name>f_setDemandReduction</Name> - <Description>Function that reduces the electricity demand of all consumption assets. Takes as an argument a percentage to reduce by compared to the default value of the consumption assets.</Description> - <X>60</X> - <Y>590</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>demandReduction_pct</Name> - <Type>double</Type> - </Parameter> - <Body>double scalingFactor = 1 - demandReduction_pct/100; - -for (GridConnection gc : gcList) { - // Set Consumption Assets - for (J_EAConsumption j_ea : gc.c_consumptionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.ELECTRICITY_DEMAND) { - j_ea.setConsumptionScaling_fr( scalingFactor ); - } - } - // Set Profile Assets - for (J_EAProfile j_ea : gc.c_profileAssets) { - if (j_ea.energyCarrier == OL_EnergyCarriers.ELECTRICITY) { - j_ea.setProfileScaling_fr( scalingFactor ); - } - } -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1745483988251</Id> - <Name>f_getCurrentPVOnLandAndWindturbineValues</Name> - <X>30</X> - <Y>1250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>for(GCEnergyProduction GCProd : uI_Tabs.f_getAllSliderGridConnections_production()){ - if(!GCProd.p_isSliderGC && GCProd.v_isActive){ - for(J_EAProduction ea : GCProd.c_productionAssets){ - if(ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC){ - p_currentPVOnLand_ha += ea.getCapacityElectric_kW()/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha; - } - else if(ea.energyAssetType == OL_EnergyAssetType.WINDMILL){ - p_currentWindTurbines_MW += ea.getCapacityElectric_kW()/1000; - } - } - } -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Pair<Double, Double></ReturnType> - <Id>1747294812333</Id> - <Name>f_getPVSystemPercentage</Name> - <Description>Calculates the amount of installed PV compared to the total potential based on roof surface area. Assumes that 50% of the roof surface is available for PV. If a GridConnection already has more than this installed it takes the installed capacity instead.</Description> - <X>90</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>double installedPV_kWp = 0.0; -double PVPotential_kWp = 0.0; -double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; - -for (GridConnection gc : gcList ) { - double gcInstalledPV_kWp = 0.0; - if ( gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ) { - for ( J_EAProduction j_ea : gc.c_productionAssets ) { - if ( j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC ) { - gcInstalledPV_kWp += j_ea.getCapacityElectric_kW(); - } - } - } - installedPV_kWp += gcInstalledPV_kWp; - PVPotential_kWp += max( gcInstalledPV_kWp, max(0.1, gc.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2) ); -} - -return new Pair(installedPV_kWp, PVPotential_kWp);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747297871195</Id> - <Name>f_setPVSystemCompanies</Name> - <Description>Adds or removes photovoltaic production assets to GridConnections. Takes as arguments a list of Gridconnections and a target percentage. It runs untill that list of GCs has that percentage of PV installed, compared to the total potential PV. If a new asset is created it determines its electric capacity by the total roof area of all the buildings connected to the GC. The function also updates the PV slider in the company UI if the GC is a company. The variables in the engine that keep track of the amount of installed PV are updated automatically.</Description> - <X>70</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCUtility></Type> - </Parameter> - <Parameter> - <Name>target_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>slider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>List<GCUtility> activeGCs = new ArrayList<GCUtility>(zero_Interface.c_orderedPVSystemsCompanies.stream().filter(x -> x.v_isActive).filter(gcList::contains).toList()); -Pair<Double, Double> pair = f_getPVSystemPercentage( new ArrayList<GridConnection>(activeGCs) ); -double remaining_kWp = target_pct / 100 * pair.getSecond() - pair.getFirst(); -double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; -if ( remaining_kWp > 0 ) { - // add more PV - for ( GCUtility company : new ArrayList<GCUtility>(activeGCs) ) { - double remainingPotential_kWp = min( remaining_kWp, company.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2 - company.v_liveAssetsMetaData.totalInstalledPVPower_kW ); - - if ( remainingPotential_kWp > 0 ) { - remaining_kWp -= remainingPotential_kWp; - f_addPVSystem( company, remainingPotential_kWp ); - } - - if ( remaining_kWp <= 0 ) { - // Update variable to change to custom scenario - if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); - } - zero_Interface.f_resetSettings(); - return; - } - } -} -else { - // remove pv - for ( GCUtility company : new ArrayList<GCUtility>(activeGCs) ) { - if ( company.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ) { - // find companyUI to check if the company already has PV on model startup - remaining_kWp += company.v_liveAssetsMetaData.totalInstalledPVPower_kW; - f_removePVSystem( company ); - double PVAtStartup_kWp = zero_Interface.c_scenarioMap_Current.get(company.p_uid).getCurrentPV_kW(); - if (PVAtStartup_kWp != 0) { - f_addPVSystem( company, PVAtStartup_kWp ); - remaining_kWp -= PVAtStartup_kWp; - } - } - if ( remaining_kWp >= 0 ) { - // removed slightly too much pv - f_addPVSystem( company, remaining_kWp ); - - // Update variable to change to custom scenario - if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); - } - - zero_Interface.f_resetSettings(); - return; - } - } - // All companies are at the starting PV amount. Set slider to corresponding value. - pair = f_getPVSystemPercentage( new ArrayList<GridConnection>( activeGCs ) ); - int installed_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); - slider.setValue(installed_pct, false); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747306690517</Id> - <Name>f_addPVSystem</Name> - <Description>Takes as an argument a GridConnection and a capacity. If the GC already has a solar panel, it adds the capacity to the existing one. Otherwise it creates a new energy asset. If the GridConnection is a GCUtility it also updates the companyUI if it exists.</Description> - <X>90</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gc</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>capacity_kWp</Name> - <Type>double</Type> - </Parameter> - <Body>J_EAProduction pvAsset = findFirst(gc.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); -if (pvAsset != null) { - capacity_kWp += pvAsset.getCapacityElectric_kW(); - pvAsset.setCapacityElectric_kW( capacity_kWp ); -} -else { - // Create a new asset - OL_EnergyAssetType assetType = OL_EnergyAssetType.PHOTOVOLTAIC; - String assetName = "Rooftop PV"; - double capacityHeat_kW = 0.0; - double yearlyProductionMethane_kWh = 0.0; - double yearlyProductionHydrogen_kWh = 0.0; - double outputTemperature_degC = 0.0; - - J_EAProduction productionAsset = new J_EAProduction ( gc, assetType, assetName, OL_EnergyCarriers.ELECTRICITY, capacity_kWp, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); -} - -// Update the ordered collection -if ( gc instanceof GCHouse ) { - zero_Interface.c_orderedPVSystemsHouses.remove(gc); - zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); -} -else if ( gc instanceof GCUtility ) { - zero_Interface.c_orderedPVSystemsCompanies.remove(gc); - zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); -} -else { - throw new RuntimeException("Unknown GridConnection type passed to f_addPVSystem."); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747306699629</Id> - <Name>f_removePVSystem</Name> - <X>90</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gc</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>J_EAProduction pvAsset = findFirst(gc.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); -if ( pvAsset != null ) { - pvAsset.removeEnergyAsset(); - - if ( gc instanceof GCHouse ) { - zero_Interface.c_orderedPVSystemsHouses.remove(gc); - zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); - } - else if ( gc instanceof GCUtility ) { - zero_Interface.c_orderedPVSystemsCompanies.remove(gc); - zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); - } -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1750063382310</Id> - <Name>f_setResidentialBatteries</Name> - <X>90</X> - <Y>1020</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>homeBatteries_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>// Setting houseBatteries -double nbHouseBatteries = count(gcListHouses, h -> h.p_batteryAsset != null); //f_getEnergyAssets(), p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC && p.getParentAgent() instanceof GCHouse); -double nbHousesWithPV = count(gcListHouses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); //count(energyModel.f_getGridConnections(), p->p instanceof GCHouse); -double nbHousesWithBatteryGoal = roundToInt(nbHousesWithPV * homeBatteries_pct / 100); - -if( nbHousesWithPV > 0 ){ - while ( nbHouseBatteries > nbHousesWithBatteryGoal ) { - GCHouse house = findFirst(gcListHouses, p -> p.p_batteryAsset != null ); - house.p_batteryAsset.removeEnergyAsset(); - house.f_setBatteryManagement(null); - nbHouseBatteries--; - } - while ( nbHouseBatteries < nbHousesWithBatteryGoal) { - GCHouse house = findFirst(gcListHouses, p -> p.p_batteryAsset == null && p.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); - - double batteryStorageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgRatioHouseBatteryStorageCapacity_v_PVPower*house.v_liveAssetsMetaData.totalInstalledPVPower_kW; - double batteryCapacity_kW = batteryStorageCapacity_kWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - double batteryStateOfCharge = 0.5; - - new J_EAStorageElectric(house, batteryCapacity_kW, batteryStorageCapacity_kWh, batteryStateOfCharge, zero_Interface.energyModel.p_timeStep_h ); - house.f_setBatteryManagement(new J_BatteryManagementSelfConsumption( house )); - nbHouseBatteries++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1750063382312</Id> - <Name>f_setGridBatteries_residential</Name> - <X>90</X> - <Y>1000</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>storageCapacity_kWh</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>gcListGridBatteries</Name> - <Type>List<GCGridBattery></Type> - </Parameter> - <Body>for ( GCGridBattery battery : gcListGridBatteries) { - if(battery.p_isSliderGC){ - for(J_EAStorage j_ea : battery.c_storageAssets) { - J_EAStorageElectric batteryAsset = ((J_EAStorageElectric)j_ea); - if (!battery.v_isActive) { - battery.f_setActive(true); - } - double capacity_kW = storageCapacity_kWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - batteryAsset.setCapacityElectric_kW( capacity_kW ); - batteryAsset.setStorageCapacity_kWh( storageCapacity_kWh ); - battery.v_liveConnectionMetaData.physicalCapacity_kW = capacity_kW; - battery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = capacity_kW; - battery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = capacity_kW; - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1750063382324</Id> - <Name>f_setElectricCooking</Name> - <X>60</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>electricCookingGoal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>int nbHousesWithElectricCooking = findAll(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC).size(); -int nbHousesWithElectricCookingGoal = roundToInt(electricCookingGoal_pct / 100 * gcListHouses.size()); - - -while ( nbHousesWithElectricCooking > nbHousesWithElectricCookingGoal ) { // remove excess cooking systems - GCHouse house = randomWhere(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); - J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_HOB ); - if (cookingAsset != null) { - double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; - cookingAsset.removeEnergyAsset(); - - new J_EAConsumption(house, OL_EnergyAssetType.GAS_PIT, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.METHANE, zero_Interface.energyModel.p_timeStep_h, null); - house.p_cookingMethod = OL_HouseholdCookingMethod.GAS; - nbHousesWithElectricCooking --; - } - else { - throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); - } -} - -while ( nbHousesWithElectricCooking < nbHousesWithElectricCookingGoal) { - GCHouse house = randomWhere(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.GAS); - if (house == null){ - throw new RuntimeException("No gridconnection without GAS cooking asset found! Current electric cooking count: " + nbHousesWithElectricCooking); - } - else { - J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.GAS_PIT ); - if (cookingAsset != null) { - double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; - cookingAsset.removeEnergyAsset(); - - new J_EAConsumption(house, OL_EnergyAssetType.ELECTRIC_HOB, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.ELECTRICITY, zero_Interface.energyModel.p_timeStep_h, null); - house.p_cookingMethod = OL_HouseholdCookingMethod.ELECTRIC; - nbHousesWithElectricCooking ++; - } - else { - throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1750326729005</Id> - <Name>f_setDemandIncrease</Name> - <X>60</X> - <Y>610</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>demandReduction_pct</Name> - <Type>double</Type> - </Parameter> - <Body>f_setDemandReduction(gcList, -demandReduction_pct);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103683</Id> - <Name>f_updateSliders_Electricity</Name> - <X>-350</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>if(gr_electricitySliders_default.isVisible()){ - f_updateElectricitySliders_default(); -} -else if(gr_electricitySliders_businesspark.isVisible()){ - f_updateElectricitySliders_businesspark(); -} -else if(gr_electricitySliders_residential.isVisible()){ - f_updateElectricitySliders_residential(); -} -else{ - f_updateElectricitySliders_custom(); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103685</Id> - <Name>f_updateElectricitySliders_default</Name> - <X>-330</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GridConnection> allConsumerGridConnections = uI_Tabs.f_getActiveSliderGridConnections_consumption(); - - -//Savings -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GridConnection GC : allConsumerGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - } -} - -double electricitySavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; -sl_electricityDemandReduction_pct.setValue(roundToInt(electricitySavings_pct), false); - - -//Companies rooftop PV -List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); - -List<GridConnection> utilityGridConnections_GC = new ArrayList<>(utilityGridConnections); -Pair<Double, Double> pair = f_getPVSystemPercentage( utilityGridConnections_GC ); -int PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); -sl_rooftopPVCompanies_pct.setValue(PV_pct, false); - -//Houses rooftop PV -List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); - -List<GridConnection> houseGridConnections_GC = new ArrayList<>(utilityGridConnections); -pair = f_getPVSystemPercentage( houseGridConnections_GC ); -PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); -sl_rooftopPVHouses_pct.setValue(PV_pct, false); - -//Large scale EA production systems (PV on land And Wind) -double totalPVOnLand_kW = 0; -double totalWind_kW = 0; - -for(GCEnergyProduction productionGC : uI_Tabs.f_getAllSliderGridConnections_production()){ - if(productionGC.v_isActive && productionGC.p_isSliderGC){ - if(productionGC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - for(J_EAProduction productionEA : productionGC.c_productionAssets){ - if(productionEA.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC){ - totalPVOnLand_kW += productionEA.getCapacityElectric_kW(); - } - } - } - else if(productionGC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ - for(J_EAProduction productionEA : productionGC.c_productionAssets){ - if(productionEA.getEAType() == OL_EnergyAssetType.WINDMILL){ - totalWind_kW += productionEA.getCapacityElectric_kW(); - } - } - } - } -} - -sl_largeScalePV_ha.setValue((totalPVOnLand_kW/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha) + p_currentPVOnLand_ha, false); -sl_largeScaleWind_MW.setValue((totalWind_kW/1000) + p_currentWindTurbines_MW, false); - -//Curtailment -boolean curtailment = true; -for(GridConnection GC : allConsumerGridConnections){ - if(!GC.v_enableCurtailment){ - curtailment = false; - break; - } -} -cb_curtailment_default.setSelected(curtailment, false); - - -//Large scale battery systems -double totalBatteryStorage_kWh = 0; -for(GCGridBattery batteryGC : uI_Tabs.f_getAllSliderGridConnections_gridBatteries()){ - if(batteryGC.v_isActive && batteryGC.p_isSliderGC){ - totalBatteryStorage_kWh += batteryGC.p_batteryAsset.getStorageCapacity_kWh(); - } -} - -sl_collectiveBattery_MWh_default.setValue(totalBatteryStorage_kWh/1000, false); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103687</Id> - <Name>f_updateElectricitySliders_residential</Name> - <X>-330</X> - <Y>130</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GCHouse> houseGridConnections = new ArrayList<>(); -List<GCGridBattery> gridBatteryGridConnections = new ArrayList<>(); - -for (GridConnection GC : uI_Tabs.f_getActiveSliderGridConnections_all()) { - if(GC instanceof GCHouse){ - houseGridConnections.add((GCHouse)GC); - } - else if(GC instanceof GCGridBattery){ - gridBatteryGridConnections.add((GCGridBattery)GC); - } -} - -int nbHouses = houseGridConnections.size(); -int nbHousesWithPV = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); -double pv_pct = 100.0 * nbHousesWithPV / nbHouses; -sl_householdPVResidentialArea_pct.setValue(roundToInt(pv_pct), false); - -if ( nbHousesWithPV != 0 ) { - int nbHousesWithHomeBattery = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) && x.p_batteryAsset != null); - double battery_pct = 100.0 * nbHousesWithHomeBattery / nbHousesWithPV; - sl_householdBatteriesResidentialArea_pct.setValue(roundToInt(battery_pct), false); -} - -//Electric cooking -int nbHousesWithElectricCooking = count(houseGridConnections, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); -double cooking_pct = 100.0 * nbHousesWithElectricCooking / nbHouses; -sl_householdElectricCookingResidentialArea_pct.setValue(roundToInt(cooking_pct), false); - -//Consumption growth -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GCHouse GC : houseGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - } -} - -double electricityDemandIncrease_pct = totalBaseConsumption_kWh > 0 ? ( (- totalSavedConsumption_kWh)/totalBaseConsumption_kWh * 100) : 0; -sl_electricityDemandIncreaseResidentialArea_pct.setValue(roundToInt(electricityDemandIncrease_pct), false); - - -//Gridbatteries -double averageNeighbourhoodBatterySize_kWh = 0; -for (GCGridBattery gc : gridBatteryGridConnections) { - averageNeighbourhoodBatterySize_kWh += gc.p_batteryAsset.getStorageCapacity_kWh()/gridBatteryGridConnections.size(); -} -sl_gridBatteriesResidentialArea_kWh.setValue(averageNeighbourhoodBatterySize_kWh, false); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103689</Id> - <Name>f_updateElectricitySliders_businesspark</Name> - <X>-330</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Get the utility connections -List<GridConnection> utilityGridConnections = new ArrayList<>(uI_Tabs.f_getActiveSliderGridConnections_utilities()); - - -//Savings -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GridConnection GC : utilityGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - } -} - -double electricitySavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; -sl_electricityDemandReduction_pct_Businesspark.setValue(roundToInt(electricitySavings_pct), false); - -// Rooftop PV SYSTEMS: -Pair<Double, Double> pair = f_getPVSystemPercentage( utilityGridConnections ); -int PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); -sl_rooftopPVCompanies_pct_Businesspark.setValue(PV_pct, false); - -//Large scale EA production systems (PV on land And Wind) -double totalPVOnLand_kW = 0; -double totalWind_kW = 0; - -for(GCEnergyProduction productionGC : uI_Tabs.f_getAllSliderGridConnections_production()){ - if(productionGC.v_isActive && productionGC.p_isSliderGC){ - if(productionGC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - for(J_EAProduction productionEA : productionGC.c_productionAssets){ - if(productionEA.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC){ - totalPVOnLand_kW += productionEA.getCapacityElectric_kW(); - } - } - } - else if(productionGC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ - for(J_EAProduction productionEA : productionGC.c_productionAssets){ - if(productionEA.getEAType() == OL_EnergyAssetType.WINDMILL){ - totalWind_kW += productionEA.getCapacityElectric_kW(); - } - } - } - } -} - -sl_largeScalePV_ha_Businesspark.setValue((totalPVOnLand_kW/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha) + p_currentPVOnLand_ha, false); -sl_largeScaleWind_MW_Businesspark.setValue((totalWind_kW/1000) + p_currentWindTurbines_MW, false); - -//Curtailment -boolean curtailment = true; -for(GridConnection GC : utilityGridConnections){ - if(!GC.v_enableCurtailment){ - curtailment = false; - break; - } -} -cb_curtailment_businesspark.setSelected(curtailment, false); - - -//Large scale battery systems -double totalBatteryStorage_kWh = 0; -for(GCGridBattery batteryGC : uI_Tabs.f_getAllSliderGridConnections_gridBatteries()){ - if(batteryGC.v_isActive && batteryGC.p_isSliderGC){ - totalBatteryStorage_kWh += batteryGC.p_batteryAsset.getStorageCapacity_kWh(); - } -} - -sl_collectiveBattery_MWh_businesspark.setValue(totalBatteryStorage_kWh/1000, false); - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103691</Id> - <Name>f_updateElectricitySliders_custom</Name> - <X>-330</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//If you have a custom tab, -//override this function to make it update automatically -traceln("Forgot to override the update custom electricity sliders functionality");</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754985710087</Id> - <Name>f_setGridBatteries</Name> - <Description>Function that takes a capacity in MWh as a parameter and sets the first GCGridBattery to this capacity, with the default ratio of storage to electric capacity from the AVGC data.</Description> - <X>89</X> - <Y>981</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>capacity_MWh</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>gcListGridBatteries</Name> - <Type>List<GCGridBattery></Type> - </Parameter> - <Body>// TODO: make this work nicer with the new pause function (when setting capacity to 0 pause again?) - -if ( gcListGridBatteries.size() > 0 ){ - GCGridBattery GC = findFirst(gcListGridBatteries, GB -> GB.p_isSliderGC); - if(GC == null){ - traceln("WARNING: no specified slider grid battery in the model: random grid battery selected"); - GC = zero_Interface.energyModel.GridBatteries.get(0); - } - - if (!GC.v_isActive) { - GC.f_setActive(true); - } - GC.p_batteryAsset.setStorageCapacity_kWh(1000*capacity_MWh); - double capacityElectric_kW = 1000*capacity_MWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - GC.p_batteryAsset.setCapacityElectric_kW(capacityElectric_kW); - GC.v_liveConnectionMetaData.physicalCapacity_kW = capacityElectric_kW; - GC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = capacityElectric_kW; - GC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = capacityElectric_kW; -} -else { - throw new IllegalStateException("Model does not contain any GCGridBattery agent"); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754986167346</Id> - <Name>f_setCurtailment</Name> - <X>70</X> - <Y>900</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>activateCurtailment</Name> - <Type>boolean</Type> - </Parameter> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>for (GridConnection GC : gcList) { - GC.v_enableCurtailment = activateCurtailment; -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1756302457919</Id> - <Name>f_initializeTab_Electricity</Name> - <X>-350</X> - <Y>30</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>f_getCurrentPVOnLandAndWindturbineValues();</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1722247653562</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1744962391299</Id> - <Name>uI_Tabs</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_Tabs</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1744962391306</Id> - <Name>zero_Interface</Name> - <X>150</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1753694295451</Id> - <Name>uI_EnergyHub</Name> - <X>300</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_EnergyHub</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1722247653568</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1722349953637</Id> - <Name>rect_genericFunctions</Name> - <X>10</X> - <Y>480</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-4144960</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>730</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Group> - <Id>1722328776701</Id> - <Name>gr_electricitySliders_default</Name> - <X>-10</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722328776703</Id> - <Name>rect_electricityDemandSliders</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-32</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722328776711</Id> - <Name>t_electricityDemandReduction_pct</Name> - <X>230</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricityDemandReduction_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722328776713</Id> - <Name>sl_electricityDemandReduction_pct</Name> - <X>260</X> - <Y>15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricityDemandReduction_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722328776715</Id> - <Name>t_electricityDemandReductionDescription</Name> - <X>10</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing verbruik</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776717</Id> - <Name>txt_productionDescription</Name> - <X>15</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Opwek</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776719</Id> - <Name>t_rooftopPVCompanies_pct</Name> - <X>230</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_rooftopPVCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722328776721</Id> - <Name>sl_rooftopPVCompanies_pct</Name> - <X>260</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVSystemCompanies( uI_Tabs.f_getActiveSliderGridConnections_utilities(), sl_rooftopPVCompanies_pct.getValue(), sl_rooftopPVCompanies_pct ); - -if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722328776723</Id> - <Name>t_rooftopPVCompaniesDescription</Name> - <X>15</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op dak bedrijven</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776725</Id> - <Name>t_largeScalePV_ha</Name> - <X>230</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_largeScalePV_ha.getValue() + " ha"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722328776727</Id> - <Name>sl_largeScalePV_ha</Name> - <X>260</X> - <Y>140</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVOnLand(sl_largeScalePV_ha.getValue() - p_currentPVOnLand_ha, uI_Tabs.f_getAllSliderGridConnections_production());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentPVOnLand_ha</MinValue> - <MaxValue>p_currentPVOnLand_ha + 50</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722328776729</Id> - <Name>t_largeScalePVDescription</Name> - <X>15</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op land</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776731</Id> - <Name>txt_batteryDescription_default</Name> - <X>15</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batterijen</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722328776737</Id> - <Name>sl_largeScaleWind_MW</Name> - <X>260</X> - <Y>170</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setWindTurbines( sl_largeScaleWind_MW.getValue() - p_currentWindTurbines_MW, uI_Tabs.f_getAllSliderGridConnections_production());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentWindTurbines_MW</MinValue> - <MaxValue>p_currentWindTurbines_MW + 10</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722328776739</Id> - <Name>t_largeScaleWindDescription</Name> - <X>15</X> - <Y>175</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Wind op land</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776741</Id> - <Name>t_largeScaleWind_MW</Name> - <X>230</X> - <Y>175</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_largeScaleWind_MW.getValue() + " MW"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Text> - <Id>1722329161559</Id> - <Name>t_rooftopPVHouses_pct</Name> - <X>230</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_rooftopPVHouses_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_rooftopPVHouses_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722329161561</Id> - <Name>sl_rooftopPVHouses_pct</Name> - <X>260</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_rooftopPVHouses_pct.getValue() ); - -if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722329161563</Id> - <Name>t_rooftopPVHousesDescription</Name> - <X>15</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_rooftopPVHouses_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op dak huizen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1746091167061</Id> - <Name>i_householdPV</Name> - <X>160</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_rooftopPVHouses_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPV, zero_Interface.v_infoText.householdRooftopPV, i_householdPV.getX() + uI_Tabs.v_presentationXOffset, i_householdPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091167075</Id> - <Name>i_landPV</Name> - <X>160</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_landPV, zero_Interface.v_infoText.landPV, i_landPV.getX() + uI_Tabs.v_presentationXOffset, i_landPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091167087</Id> - <Name>i_companyPV</Name> - <X>160</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyPV, zero_Interface.v_infoText.companyRooftopPV, i_companyPV.getX() + uI_Tabs.v_presentationXOffset, i_companyPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091167099</Id> - <Name>i_electricityReduction</Name> - <X>160</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricityReduction, zero_Interface.v_infoText.electricityDemandReduction, i_electricityReduction.getX() + uI_Tabs.v_presentationXOffset, i_electricityReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091167111</Id> - <Name>i_landWind</Name> - <X>160</X> - <Y>175</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_landWind, zero_Interface.v_infoText.landWind, i_landWind.getX() + uI_Tabs.v_presentationXOffset, i_landWind.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1754984198964</Id> - <Name>t_collectiveBatteries_default</Name> - <X>230</X> - <Y>275</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_collectiveBattery_MWh_default.getIntValue() + " MWh"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754984198968</Id> - <Name>sl_collectiveBattery_MWh_default</Name> - <X>255</X> - <Y>270</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setGridBatteries(sl_collectiveBattery_MWh_default.getValue(), uI_Tabs.f_getAllSliderGridConnections_gridBatteries()); - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1754984198970</Id> - <Name>txt_curtailmentDescription_default</Name> - <X>15</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Curtailment opwek</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1754984198972</Id> - <Name>txt_collectiveBatteryDescription_default</Name> - <X>15</X> - <Y>275</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Collectieve batterijen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754984198974</Id> - <Name>cb_curtailment_default</Name> - <X>300</X> - <Y>202</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="40" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setCurtailment(cb_curtailment_default.isSelected(), uI_Tabs.f_getActiveSliderGridConnections_consumption());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1754984362078</Id> - <Name>i_curtailment_default</Name> - <X>160</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_curtailment_default, zero_Interface.v_infoText.curtailment, i_curtailment_default.getX() + uI_Tabs.v_presentationXOffset, i_curtailment_default.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1754984365522</Id> - <Name>i_collectiveBatteries_default</Name> - <X>160</X> - <Y>275</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_collectiveBatteries_default, zero_Interface.v_infoText.gridBattery_default, i_collectiveBatteries_default.getX() + uI_Tabs.v_presentationXOffset, i_collectiveBatteries_default.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Rectangle> - <Id>1722334503404</Id> - <Name>rect_PVFunctions</Name> - <X>40</X> - <Y>670</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-10496</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>310</Width> - <Height>250</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722334611918</Id> - <Name>txt_ProductionFunctionsDescription</Name> - <X>190</X> - <Y>680</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Production Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1722335253828</Id> - <Name>rect_demandFunctions</Name> - <X>40</X> - <Y>540</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-8355840</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>310</Width> - <Height>120</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722335253832</Id> - <Name>t_demandFunctionsDescription</Name> - <X>190</X> - <Y>550</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Demand Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722349990233</Id> - <Name>t_genericFunctions</Name> - <X>100</X> - <Y>500</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Generic Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>22</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1728384392418</Id> - <Name>gr_electricitySliders_businesspark</Name> - <X>400</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1728384392420</Id> - <Name>rect_electricityDemandSliders_Businesspark</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-32</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1728384392422</Id> - <Name>t_electricityDemandReduction_pct_Businesspark</Name> - <X>230</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricityDemandReduction_pct_Businesspark.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1728384392424</Id> - <Name>sl_electricityDemandReduction_pct_Businesspark</Name> - <X>260</X> - <Y>15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricityDemandReduction_pct_Businesspark.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1728384392426</Id> - <Name>txt_electricityDemandReductionDescription_Businesspark</Name> - <X>10</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing verbruik</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392428</Id> - <Name>txt_productionDescription_Businesspark</Name> - <X>15</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Opwek</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392430</Id> - <Name>t_rooftopPVCompanies_pct_Businesspark</Name> - <X>230</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_rooftopPVCompanies_pct_Businesspark.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1728384392432</Id> - <Name>sl_rooftopPVCompanies_pct_Businesspark</Name> - <X>260</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVSystemCompanies( uI_Tabs.f_getActiveSliderGridConnections_utilities(), sl_rooftopPVCompanies_pct_Businesspark.getValue(), sl_rooftopPVCompanies_pct_Businesspark ); - -//If on pv map overlay, adjust colouring -if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1728384392434</Id> - <Name>txt_rooftopPVCompaniesDescription_Businesspark</Name> - <X>15</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op dak bedrijven</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392436</Id> - <Name>t_largeScalePV_ha_Businesspark</Name> - <X>230</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_largeScalePV_ha_Businesspark.getIntValue() + " ha"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1728384392438</Id> - <Name>sl_largeScalePV_ha_Businesspark</Name> - <X>260</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVOnLand(sl_largeScalePV_ha_Businesspark.getValue()- p_currentPVOnLand_ha, uI_Tabs.f_getAllSliderGridConnections_production());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentPVOnLand_ha</MinValue> - <MaxValue>p_currentPVOnLand_ha + 50</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1728384392440</Id> - <Name>txt_largeScalePVDescription_Businesspark</Name> - <X>15</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op land</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392442</Id> - <Name>txt_batteryDescription_businesspark</Name> - <X>15</X> - <Y>230</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batterijen</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1728384392444</Id> - <Name>sl_largeScaleWind_MW_Businesspark</Name> - <X>260</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setWindTurbines( sl_largeScaleWind_MW_Businesspark.getValue() - p_currentWindTurbines_MW, uI_Tabs.f_getAllSliderGridConnections_production());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentWindTurbines_MW</MinValue> - <MaxValue>p_currentWindTurbines_MW + 10</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1728384392446</Id> - <Name>txt_largeScaleWindDescription_Businesspark</Name> - <X>15</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Wind op land</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392448</Id> - <Name>t_largeScaleWind_MW_Businesspark</Name> - <X>230</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_largeScaleWind_MW_Businesspark.getIntValue() + " MW"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Image> - <Id>1746091438812</Id> - <Name>i_landPV_Businesspark</Name> - <X>160</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_landPV_Businesspark, zero_Interface.v_infoText.landPV, i_landPV_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_landPV_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091438857</Id> - <Name>i_companyPV_Businesspark</Name> - <X>160</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyPV_Businesspark, zero_Interface.v_infoText.companyRooftopPV, i_companyPV_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_companyPV_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091438909</Id> - <Name>i_electricityReduction_Businesspark</Name> - <X>160</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricityReduction_Businesspark, zero_Interface.v_infoText.electricityDemandReduction, i_electricityReduction_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_electricityReduction_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091438954</Id> - <Name>i_landWind_Businesspark</Name> - <X>160</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_landWind_Businesspark, zero_Interface.v_infoText.landWind, i_landWind_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_landWind_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1754985531354</Id> - <Name>txt_curtailmentDescription_businesspark</Name> - <X>15</X> - <Y>185</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Curtailment opwek</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754985531358</Id> - <Name>cb_curtailment_businesspark</Name> - <X>300</X> - <Y>177</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="40" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setCurtailment(cb_curtailment_businesspark.isSelected(), new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()));</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1754985531361</Id> - <Name>i_curtailment_businesspark</Name> - <X>160</X> - <Y>185</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_curtailment_businesspark, zero_Interface.v_infoText.curtailment, i_curtailment_businesspark.getX() + uI_Tabs.v_presentationXOffset, i_curtailment_businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1754985653985</Id> - <Name>i_collectiveBatteries_businesspark</Name> - <X>160</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_collectiveBatteries_businesspark, zero_Interface.v_infoText.gridBattery_default, i_collectiveBatteries_businesspark.getX() + uI_Tabs.v_presentationXOffset, i_collectiveBatteries_businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1754985653994</Id> - <Name>txt_collectiveBatteryDescription_businesspark</Name> - <X>15</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Collectieve batterijen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1754985653996</Id> - <Name>t_collectiveBatteries_businesspark</Name> - <X>230</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_collectiveBattery_MWh_businesspark.getIntValue() + " MWh"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754985653998</Id> - <Name>sl_collectiveBattery_MWh_businesspark</Name> - <X>255</X> - <Y>255</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setGridBatteries(sl_collectiveBattery_MWh_businesspark.getValue(), uI_Tabs.f_getAllSliderGridConnections_gridBatteries()); - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - </Presentation> - </Group> - <Group> - <Id>1750063382217</Id> - <Name>gr_electricitySliders_residential</Name> - <X>800</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1750063382219</Id> - <Name>rect_electricityDemandSlidersResidentialArea</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>5</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-32</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1750063382221</Id> - <Name>t_electricityDemandIncreaseResidentialArea_pct</Name> - <X>235</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_electricityDemandIncreaseResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_electricityDemandIncreaseResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1750063382223</Id> - <Name>t_householdPVResidentialArea_pct</Name> - <X>235</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdPVResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>10%</Text> - <TextCode>sl_householdPVResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382225</Id> - <Name>sl_householdPVResidentialArea_pct</Name> - <X>265</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdPVResidentialArea_pct.getValue() ); - -//If on pv map overlay, adjust colouring -if(zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -} - -// Also updates the home batteries -f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), uI_Tabs.f_getActiveSliderGridConnections_houses() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>5</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382227</Id> - <Name>t_householdPVResidentialAreaDescription</Name> - <X>20</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdPVResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Share of houses with PV</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1750063382229</Id> - <Name>t_electricitDemandSlidersResidentialAreaDescription</Name> - <X>20</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Households</Text> - <Font> - <Name>Calibri</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1750063382237</Id> - <Name>t_householdBatteriesResidentialAreaDescription</Name> - <X>30</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdBatteriesResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Of which with batteries</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382239</Id> - <Name>sl_householdBatteriesResidentialArea_pct</Name> - <X>265</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), uI_Tabs.f_getActiveSliderGridConnections_houses() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>5</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382241</Id> - <Name>t_householdBatteriesResidentialArea_pct</Name> - <X>235</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdBatteriesResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_householdBatteriesResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382243</Id> - <Name>sl_gridBatteriesResidentialArea_kWh</Name> - <X>266</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setGridBatteries_residential( sl_gridBatteriesResidentialArea_kWh.getValue(), uI_Tabs.f_getAllSliderGridConnections_gridBatteries() ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>1000</MaxValue> - <Step>10</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382245</Id> - <Name>t_gridBatteriesResidentialAreaDescription</Name> - <X>20</X> - <Y>226</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_gridBatteriesResidentialArea_kWh.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Shared battery capacity</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1750063382247</Id> - <Name>t_gridBatteriesResidentialArea_kW</Name> - <X>236</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_gridBatteriesResidentialArea_kWh.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_gridBatteriesResidentialArea_kWh.getIntValue() + " kWh"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1750063382251</Id> - <Name>t_electricityDemandIncreaseResidentialAreaDescription</Name> - <X>20</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_electricityDemandIncreaseResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electricity consumption growth</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382253</Id> - <Name>sl_electricityDemandIncreaseResidentialArea_pct</Name> - <X>265</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandIncrease( new ArrayList<GridConnection>(findAll(zero_Interface.energyModel.Houses, x -> true)), sl_electricityDemandIncreaseResidentialArea_pct.getValue() ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382255</Id> - <Name>t_householdElectricCookingResidentialAreaDescription</Name> - <X>20</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdElectricCookingResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Perc. electric cooking</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382257</Id> - <Name>sl_householdElectricCookingResidentialArea_pct</Name> - <X>265</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setElectricCooking(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdElectricCookingResidentialArea_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>2</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382259</Id> - <Name>t_householdElectricCookingResidentialArea_pct</Name> - <X>235</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdElectricCookingResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_householdElectricCookingResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382261</Id> - <Name>button_trafoReinforcement</Name> - <X>238</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="130" Height="25"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <VisibleCode>false; // DOESNT WORK PROPERLY</VisibleCode> - <Enabled>true</Enabled> - <EnableExpression>zero_Interface.v_clickedGridNode != null</EnableExpression> - <ActionCode>//gr_electricityDemandSlidersResidentialAreaScale.setVisible(false); -gr_trafoReinforcement.setVisible(true); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Trafo reinforcement</LabelText> - </ExtendedProperties> - </Control> - <Image> - <Id>1752232850349</Id> - <Name>i_householdRooftopPV</Name> - <X>190</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdPVResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdRooftopPV, zero_Interface.v_infoText.householdRooftopPV, i_householdRooftopPV.getX() + uI_Tabs.v_presentationXOffset, i_householdRooftopPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752232850368</Id> - <Name>i_householdBatteries</Name> - <X>190</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdBatteriesResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdBatteries, zero_Interface.v_infoText.householdBatteries, i_householdBatteries.getX() + uI_Tabs.v_presentationXOffset, i_householdBatteries.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752232850385</Id> - <Name>i_householdElectricCooking</Name> - <X>190</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdElectricCookingResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdElectricCooking, zero_Interface.v_infoText.householdElectricCooking, i_householdElectricCooking.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricCooking.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752232850402</Id> - <Name>i_householdElectricityGrowth</Name> - <X>190</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_electricityDemandIncreaseResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdElectricityGrowth, zero_Interface.v_infoText.householdElectricityConsumptionGrowth, i_householdElectricityGrowth.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricityGrowth.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752232850473</Id> - <Name>i_householdNeighbourhoodBatteries</Name> - <X>190</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_gridBatteriesResidentialArea_kWh.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdNeighbourhoodBatteries, zero_Interface.v_infoText.gridBattery_residential, i_householdNeighbourhoodBatteries.getX() + uI_Tabs.v_presentationXOffset, i_householdNeighbourhoodBatteries.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Group> - <Id>1750063382277</Id> - <Name>gr_trafoReinforcement</Name> - <X>1200</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1750063382279</Id> - <Name>rect_trafoReinforcement</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-32</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1750063382281</Id> - <Name>t_addTrafoDescription</Name> - <X>10</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Trafostation uitbreiden/bijplaatsen</Text> - <Font> - <Name>SansSerif</Name> - <Size>11</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382283</Id> - <Name>sl_trafoReinforcement</Name> - <X>20</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="150" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>1000</MaxValue> - <Step>50</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382285</Id> - <Name>t_minTrafoReinforcement</Name> - <X>20</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>min</Text> - <TextCode>sl_trafoReinforcement.getMin()</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>10</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1750063382287</Id> - <Name>t_maxTrafoReinforcement</Name> - <X>170</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>max</Text> - <TextCode>sl_trafoReinforcement.getMax()</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>10</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Text> - <Id>1750063382289</Id> - <Name>t_trafoReinforcementValue</Name> - <X>95</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>value</Text> - <TextCode>sl_trafoReinforcement.getIntValue() + " kVA"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>10</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382291</Id> - <Name>t_confirmTrafoReinforcement</Name> - <X>210</X> - <Y>94</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="142" Height="32"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>zero_Interface.v_clickedGridNode.p_capacity_kW += sl_trafoReinforcement.getValue(); - -zero_Interface.f_setTrafoText();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Voer netuitbreiding uit</LabelText> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382293</Id> - <Name>t_currentTrafoReinforcement</Name> - <X>200</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huidige LS-capaciteit: 300 kVA</Text> - <TextCode>"Huidige LS-capaciteit: " + roundToInt(zero_Interface.v_clickedGridNode.p_capacity_kW) + " kVA"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>11</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382295</Id> - <Name>t_resetTrafoReinforcement</Name> - <X>215</X> - <Y>300</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="140" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>for (GridNode GN : zero_Interface.energyModel.f_getGridNodesNotTopLevel() ){ - GN.p_capacity_kW = GN.p_originalCapacity_kW; -} -for (GridNode GN : zero_Interface.energyModel.f_getGridNodesTopLevel() ){ - GN.p_capacity_kW = GN.p_originalCapacity_kW; -} -zero_Interface.f_setTrafoText(); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Reset trafostations</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382297</Id> - <Name>t_closeTrafoReinforcement</Name> - <X>350</X> - <Y>2</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="18" Height="18"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>gr_trafoReinforcement.setVisible(false);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="8" Style="0"/> - <LabelText/> - </ExtendedProperties> - </Control> - <Line> - <Id>1750063382299</Id> - <Name>line_closeTrafoReinforcement1</Name> - <X>353</X> - <Y>17</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor>-2894893</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <BeginArrowSize>1</BeginArrowSize> - <BeginArrowStyle>0</BeginArrowStyle> - <EndArrowSize>1</EndArrowSize> - <EndArrowStyle>0</EndArrowStyle> - <Dx>12</Dx> - <Dy>-12</Dy> - <Dz>0</Dz> - </Line> - <Line> - <Id>1750063382301</Id> - <Name>line_closeTrafoReinforcement2</Name> - <X>365</X> - <Y>17</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor>-2894893</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <BeginArrowSize>1</BeginArrowSize> - <BeginArrowStyle>0</BeginArrowStyle> - <EndArrowSize>1</EndArrowSize> - <EndArrowStyle>0</EndArrowStyle> - <Dx>-12</Dx> - <Dy>-12</Dy> - <Dz>0</Dz> - </Line> - <Text> - <Id>1750063382303</Id> - <Name>t_titleTrafoReinforcement</Name> - <X>20</X> - <Y>21</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Trafostation reinforcement</Text> - <Font> - <Name>Calibri</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Rectangle> - <Id>1754985710083</Id> - <Name>rect_batteryFunctions</Name> - <X>39</X> - <Y>931</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16744320</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>311</Width> - <Height>109</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1754985710085</Id> - <Name>t_batteryFunctionsDescription</Name> - <X>189</X> - <Y>936</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Battery Functions</Text> - <Font> - <Name>Dialog</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1722253108625</Id> - <Name>tabHeating</Name> - <AdditionalClassCode>// Default Sliders -public ShapeGroup getGroupHeatDemandSliders() { - return this.gr_heatingSliders_default; -} - -public ShapeSlider getSliderHeatDemandReductionCompanies_pct() { - return this.sl_heatDemandReductionCompanies_pct; -} - -public ShapeSlider getSliderGasBurnerCompanies_pct() { - return this.sl_gasBurnerCompanies_pct; -} - -public ShapeSlider getSliderElectricHeatPumpCompanies_pct() { - return this.sl_electricHeatPumpCompanies_pct; -} - -public ShapeSlider getSliderHeatDemandReductionHouseholds_pct() { - return this.sl_heatDemandReductionHouseholds_pct; -} - -public ShapeSlider getSliderGasBurnerHouseholds_pct() { - return this.sl_gasBurnerHouseholds_pct; -} - -public ShapeSlider getSliderElectricHeatPumpHouseholds_pct() { - return this.sl_electricHeatPumpHouseholds_pct; -} - -// Residential Tab Sliders -public ShapeGroup getGroupHeatDemandSlidersResidentialArea() { - return this.gr_heatingSliders_residential; -} - -public ShapeSlider getSliderHeatDemandSlidersResidentialAreaHouseholdsGasBurner_pct() { - return this.sl_householdGasBurnerResidentialArea_pct; -} -public ShapeSlider getSl_householdHybridHeatpumpResidentialArea() { - return this.sl_householdHybridHeatpumpResidentialArea; -} - -public ShapeSlider getSliderHeatDemandSlidersResidentialAreaHouseholdsElectricHeatPump_pct() { - return this.sl_householdElectricHeatPumpResidentialArea_pct; -} - -// Company Tab Sliders -public ShapeGroup getGroupHeatDemandSlidersCompanies() { - return this.gr_heatingSliders_businesspark; -} - -public ShapeSlider getSliderHeatDemandSlidersCompaniesHeatDemandReductionCompanies_pct() { - return this.sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct; -} - -public ShapeSlider getSliderHeatDemandSlidersCompaniesGasBurnerCompanies_pct() { - return this.sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct; -} - -public ShapeSlider getSliderHeatDemandSlidersCompaniesElectricHeatPumpCompanies_pct() { - return this.sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct; -} - -public ShapeSlider getSl_heatingTypeSlidersCompaniesCustom_pct(){ - return this.sl_heatingTypeSlidersCompaniesCustom_pct; -} - -public ShapeSlider getSl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct(){ - return this.sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct; -} - -public ShapeSlider getSl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct(){ - return this.sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct; -}</AdditionalClassCode> - <Folder>1754045642067</Folder> - <Import>import zeroPackage.ZeroMath;</Import> - <ExtendsReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>tabArea</ClassName> - </ExtendsReference> - <Generic>false</Generic> - <GenericParameter> - <Id>1722253108631</Id> - <Name>1722253108631</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089977</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1722326400000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1722253108628</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1722253108632</CurrentLevel> - <ConnectionsId>1722253108626</ConnectionsId> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>int</ReturnType> - <Id>1722256102007</Id> - <Name>f_setHeatingSystemsCompanies</Name> - <Description>Function that adds or removes heatpumps to utility connections. Takes a percentage as a parameter and runs untill that percentage of all the utility connections has a heatpump. If a new heatpump is created it determines its heat demand on a heat_demand consumption asset if it exists, else it looks for a heat profile asset. The function also updates the radio button in the company UI.</Description> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>100</X> - <Y>1190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCUtility></Type> - </Parameter> - <Parameter> - <Name>sliderGasburner</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHeatpump</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHybridHeatPump</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderDistrictHeating</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderCustomHeating</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double targetHeatPump_pct = sliderHeatpump.getValue(); - -//Set the sliders if companyUI is present using the companyUI functions, if not: do it the normal way -if(zero_Interface.c_companyUIs.size()>0){ - f_setHeatingSystemsWithCompanyUI(gcList, targetHeatPump_pct, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); -} -else{ - ArrayList<GCUtility> companies = new ArrayList<GCUtility>(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).toList()); - double nbHeatPumps = count(gcList, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); - - while ( targetHeatPumpAmount < nbHeatPumps) { // remove excess heatpumps, replace with gasburners. - GCUtility company = findFirst(companies, x->x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - if (company != null) { - company.c_heatingAssets.get(0).removeEnergyAsset(); - nbHeatPumps--; - companies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); - double heatOutputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minGasBurnerOutputCapacity_kW, peakHeatDemand_kW); - new J_EAConversionGasBurner(company, heatOutputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); - company.f_addHeatManagementToGC(company, OL_GridConnectionHeatingType.GAS_BURNER, false); - } - else { - throw new RuntimeException("Can't find Heatpump in company that should have heatpump in f_setHeatingSystemsCompanies."); - } - } - - while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. - GCUtility company = findFirst(companies, x -> x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); - if (company != null) { - company.c_heatingAssets.get(0).removeEnergyAsset(); - nbHeatPumps++; - companies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); - double electricInputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minHeatpumpElectricCapacity_kW, peakHeatDemand_kW); - new J_EAConversionHeatPump(company, electricInputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC, zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), 0, 1, OL_AmbientTempType.AMBIENT_AIR); - company.f_addHeatManagementToGC(company, OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false); - } - else { - throw new RuntimeException("Can't find Gasburner in company that should have gasburner in f_setHeatingSystemsCompanies."); - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256221655</Id> - <Name>f_setHeatingSystemsHouseholds</Name> - <Description>Function that adds or removes heatpumps to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a heatpump. If a new heatpump is created it determines its heat demand on a heat_demand consumption asset if it exists, else it looks for a heat profile asset.</Description> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>100</X> - <Y>1230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>targetHeatPump_pct</Name> - <Type>double</Type> - </Parameter> - <Body>ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedHeatingSystemsHouses.stream().filter(gcList::contains).toList()); -double nbHeatPumps = count(gcList, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); -int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); - -while ( nbHeatPumps > targetHeatPumpAmount) { // remove excess heatpumps, replace with gasburners. - GCHouse house = findFirst(houses, x->x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - if (house != null) { - house.c_heatingAssets.get(0).removeEnergyAsset(); - nbHeatPumps--; - houses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house) * 2;//Just make it always twice as high, to be able to support savings/additional consumption slider settings. - double heatOutputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minGasBurnerOutputCapacity_kW, peakHeatDemand_kW); - new J_EAConversionGasBurner(house, heatOutputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); - house.f_addHeatManagementToGC(house, OL_GridConnectionHeatingType.GAS_BURNER, false); - } - else { - throw new RuntimeException("Can't find Heatpump in house that should have heatpump in f_setHeatingSystemsHouseholds."); - } -} - -while ( nbHeatPumps < targetHeatPumpAmount) { // remove gasburners, add heatpumps. - GCHouse house = findFirst(houses, x -> x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); - if (house != null) { - house.c_heatingAssets.get(0).removeEnergyAsset(); - nbHeatPumps++; - houses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house) * 2;//Just make it always twice as high, to be able to support savings/additional consumption slider settings. - double electricInputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minHeatpumpElectricCapacity_kW, peakHeatDemand_kW); - new J_EAConversionHeatPump(house, electricInputPower_kW, 0.5, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC, zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), 0, 1, OL_AmbientTempType.AMBIENT_AIR); - house.f_addHeatManagementToGC(house, OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false); - } - else { - throw new RuntimeException("Can't find Gasburner in house that should have gasburner in f_setHeatingSystemsHouseholds."); - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722335783993</Id> - <Name>f_setDemandReductionHeating</Name> - <Description>Function that reduces the heat demand of all profile and consumption assets. Takes as arguments a list of GridConnections to effect and a percentage to reduce by compared to the default value of the assets. Does not effect heating demand from gridconnection that have a thermal building model. </Description> - <X>70</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>demandReduction_pct</Name> - <Type>double</Type> - </Parameter> - <Body>double scalingFactor = 1 - demandReduction_pct/100; - -for (GridConnection gc : gcList) { - // Set Consumption Assets - for (J_EAConsumption j_ea : gc.c_consumptionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.HEAT_DEMAND) { - j_ea.setConsumptionScaling_fr( scalingFactor ); - } - } - // Set Profile Assets - for (J_EAProfile j_ea : gc.c_profileAssets) { - if (j_ea.energyCarrier == OL_EnergyCarriers.HEAT) { - j_ea.setProfileScaling_fr( scalingFactor ); - } - } - - if(gc.p_BuildingThermalAsset != null){ - gc.p_BuildingThermalAsset.setLossScalingFactor_fr(scalingFactor); - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>int</ReturnType> - <Id>1729259449060</Id> - <Name>f_setHeatingSystemsWithCompanyUI</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>120</X> - <Y>1210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCUtility></Type> - </Parameter> - <Parameter> - <Name>targetHeatPump_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>sliderGasburner</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHeatpump</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHybridHeatPump</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderDistrictHeating</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderCustomHeating</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>ArrayList<GCUtility> companies = new ArrayList<GCUtility>(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).filter(x -> x.v_isActive).toList()); -int nbActiveCompanies = companies.size() + v_totalNumberOfCustomHeatingSystems; -int nbHeatPumps = count(companies, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); -int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * nbActiveCompanies); - - -while ( targetHeatPumpAmount < nbHeatPumps){ // remove excess heatpumps of companies that didnt start with a heatpump, replace with gasburners. - GCUtility company = findFirst(companies, gc -> gc.p_heatingManagement != null && !(gc.p_heatingManagement instanceof J_HeatingManagementGhost) && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - if (company != null) { - UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); - - companyUI.b_runningMainInterfaceSlider = true; - if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ - int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); - companyUI.GCnr_selection.setValue(i, true); - } - // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! - boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); - companyUI.rb_heatingTypePrivateUI.setEnabled(true); - companyUI.rb_heatingTypePrivateUI.setValue(0, true); // First option is gasburner - companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - companyUI.b_runningMainInterfaceSlider = false; - - //Reorder c_orderedHeatingSystems - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - companies.remove(company); - nbHeatPumps--; - } - else { //No more heating assets to adjust: this is the minimum: set slider to minimum and do nothing else - int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); - sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); - f_setHeatingSliders(1, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); - return; - } -} - -while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. - - GCUtility company = findFirst(companies, gc -> gc.p_heatingManagement != null && !(gc.p_heatingManagement instanceof J_HeatingManagementGhost) && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); - if (company != null) { - UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); - companyUI.b_runningMainInterfaceSlider = true; - if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ - int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); - companyUI.GCnr_selection.setValue(i, true); - } - - // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! - boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); - companyUI.rb_heatingTypePrivateUI.setEnabled(true); - companyUI.rb_heatingTypePrivateUI.setValue(2, true); // Third option (index 2) is electric heatpump - companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - companyUI.b_runningMainInterfaceSlider = false; - - //Reorder c_orderedHeatingSystems - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - companies.remove(company); - nbHeatPumps++; - } - else { //No more gas burner assets to adjust: this is the minimum: set slider to minimum and do nothing else - int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); - sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); - f_setHeatingSliders(1, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); - return; - } -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749116448649</Id> - <Name>f_calculatePeakHeatDemand_kW</Name> - <X>60</X> - <Y>1070</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gc</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>double peakHeatDemand_kW = 0.0; -for (J_EAConsumption j_ea : gc.c_consumptionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.HEAT_DEMAND || j_ea.getEAType() == OL_EnergyAssetType.HOT_WATER_CONSUMPTION) { - double[] profile = j_ea.getProfilePointer().getAllValues(); - double maxFactor = Arrays.stream(profile).max().getAsDouble(); - peakHeatDemand_kW += maxFactor * j_ea.yearlyDemand_kWh * j_ea.getConsumptionScaling_fr(); - } -} -for (J_EAProfile j_ea : gc.c_profileAssets) { - if (j_ea.energyCarrier == OL_EnergyCarriers.HEAT) { - double maxValue = j_ea.getProfileScaling_fr() * Arrays.stream(j_ea.a_energyProfile_kWh).max().getAsDouble(); - peakHeatDemand_kW += maxValue / zero_Interface.energyModel.p_timeStep_h * j_ea.getProfileScaling_fr(); - } -} -if (gc.p_BuildingThermalAsset != null) { - double maximalTemperatureDifference_K = 30.0; // Approximation - peakHeatDemand_kW += gc.p_BuildingThermalAsset.getLossFactor_WpK() * maximalTemperatureDifference_K / 1000; -} -return peakHeatDemand_kW;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532180</Id> - <Name>f_addDistrictHeatingToAllHouses</Name> - <X>70</X> - <Y>900</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>for (GCHouse house: housesGCList ) { - // Remove the existing heating assets - house.f_removeAllHeatingAssets(); - - // Add a heat node - house.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - // Create a heat node if it does not exist yet - if(house.p_parentNodeHeat == null){ - GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); - zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); - GN_heat.p_gridNodeID = "Heatgrid"; - - // Check wether transformer capacity is known or estimated - GN_heat.p_capacity_kW = 1000000; - GN_heat.p_realCapacityAvailable = false; - - // Basic GN information - GN_heat.p_description = "Warmtenet"; - - //Define node type - GN_heat.p_nodeType = OL_GridNodeType.HT; - GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - - //Define GN location - GN_heat.p_latitude = 0; - GN_heat.p_longitude = 0; - GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - - //Connect - house.p_parentNodeHeat = GN_heat; - - //Show warning that heat grid is not a simple solution - zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); - } - house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; - - double outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - double efficiency = 1.0; - - new J_EAConversionHeatDeliverySet(house, peakHeatDemand_kW, efficiency, zero_Interface.energyModel.p_timeStep_h, outputTemperature_degC); - - house.f_addHeatManagement(OL_GridConnectionHeatingType.DISTRICTHEAT, false); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532202</Id> - <Name>f_removeDistrictHeatingFromAllHouses</Name> - <X>70</X> - <Y>920</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>for (GCHouse house: housesGCList ) { - house.f_removeAllHeatingAssets(); - house.p_parentNodeHeat = null; - house.p_parentNodeHeatID = null; - - //add gasburner - J_EAConsumption heatDemandAsset = findFirst(house.c_consumptionAssets, j_ea -> j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); - J_EAConversionGasBurner gasBurner; - //if house has follows the general heat deamnd profile - if (heatDemandAsset != null) { - gasBurner = new J_EAConversionGasBurner(house, heatDemandAsset.yearlyDemand_kWh/8760*10, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); - } - //if house has a thermalBuildingAsset - else if (house.p_BuildingThermalAsset != null){ - double gasBurnerCapacity_kW = 10; - gasBurner = new J_EAConversionGasBurner(house, gasBurnerCapacity_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); - } - // Else house has a customprofiel - else { - J_EAProfile heatDemandProfile = (J_EAProfile)findFirst(house.c_profileAssets, x->x instanceof J_EAProfile && x.energyCarrier == OL_EnergyCarriers.HEAT); - double peakHeatDemand_kW = heatDemandProfile.getProfileScaling_fr() * Arrays.stream(heatDemandProfile.a_energyProfile_kWh).max().orElseThrow(() -> new RuntimeException("Unable to find the maximum of the heat demand profile")); - gasBurner = new J_EAConversionGasBurner(house, peakHeatDemand_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); - } - house.f_addHeatManagement(OL_GridConnectionHeatingType.GAS_BURNER, false); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532217</Id> - <Name>f_setAircos</Name> - <X>70</X> - <Y>610</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>desiredShare</Name> - <Type>double</Type> - </Parameter> - <Body>double nbHousesWithAirco = count(gcListHouses, x -> x.p_airco != null); -double nbHouses = gcListHouses.size(); - -while ( roundToInt(nbHouses * desiredShare) > nbHousesWithAirco ) { - GCHouse house = randomWhere(gcListHouses, x -> x.p_airco == null); - double aircoPower_kW = roundToDecimal(uniform(3,6),1); - new J_EAAirco(house, aircoPower_kW, zero_Interface.energyModel.p_timeStep_h); - nbHousesWithAirco ++; -} -while ( roundToInt(nbHouses * desiredShare) < nbHousesWithAirco ) { - GCHouse house = randomWhere(gcListHouses, x -> x.p_airco != null); - house.p_airco.removeEnergyAsset(); - nbHousesWithAirco --; -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings(); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532231</Id> - <Name>f_addLTDH</Name> - <X>70</X> - <Y>850</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>for (GCHouse house: housesGCList ) { - house.f_removeAllHeatingAssets(); - - // Add a heat node - house.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - // Create a heat node if it does not exist yet - if(house.p_parentNodeHeat == null){ - GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); - zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); - GN_heat.p_gridNodeID = "Heatgrid"; - - // Check wether transformer capacity is known or estimated - GN_heat.p_capacity_kW = 1000000; - GN_heat.p_realCapacityAvailable = false; - - // Basic GN information - GN_heat.p_description = "Warmtenet"; - - //Define node type - GN_heat.p_nodeType = OL_GridNodeType.HT; - GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - - //Define GN location - GN_heat.p_latitude = 0; - GN_heat.p_longitude = 0; - GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - - //Connect - house.p_parentNodeHeat = GN_heat; - - //Show warning that heat grid is not a simple solution - zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); - } - house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - double heatpumpElectricCapacity_kW = min(peakHeatDemand_kW / 3, 1.0); - double efficiency_fr = 0.5; - double inputTemperature_degC = 15.0; // TODO: Look at these temperatures! - double outputTemperature_degC = 50.0; - double sourceAssetHeatPower_kW = 0.0; - double belowZeroHeatpumpEtaReductionFactor = 1.0; - J_EAConversionHeatPump heatpump = new J_EAConversionHeatPump(house, - heatpumpElectricCapacity_kW, - efficiency_fr, - zero_Interface.energyModel.p_timeStep_h, - outputTemperature_degC, - zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), - sourceAssetHeatPower_kW, - belowZeroHeatpumpEtaReductionFactor, - OL_AmbientTempType.HEAT_GRID - ); - heatpump.updateParameters(inputTemperature_degC, outputTemperature_degC); - house.f_addHeatManagement(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, false); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532244</Id> - <Name>f_removeLTDH</Name> - <X>70</X> - <Y>870</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>for (GCHouse house: housesGCList ) { - // Disconnect from GridNode Heat - house.p_parentNodeHeat = null; - house.p_parentNodeHeatID = null; - - // Remove Heatpump and replace with gasburner - house.f_removeAllHeatingAssets(); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - new J_EAConversionGasBurner(house, peakHeatDemand_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); - house.f_addHeatManagement(OL_GridConnectionHeatingType.GAS_BURNER, false); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1752227724432</Id> - <Name>f_householdInsulation</Name> - <X>70</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>houses_pct</Name> - <Type>double</Type> - </Parameter> - <Body>int nbHouses = count(housesGCList, x -> x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -int nbHousesWithImprovedInsulation = count(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -int targetNbHousesWithImprovedInsulation = roundToInt(houses_pct / 100.0 * nbHouses); - -while (nbHousesWithImprovedInsulation < targetNbHousesWithImprovedInsulation) { - GCHouse house = findFirst(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() >= 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); - if (house != null) { - house.p_BuildingThermalAsset.setLossScalingFactor_fr( 0.7 ); - nbHousesWithImprovedInsulation++; - } - else { - throw new RuntimeException("Unable to find house that does not yet have additional insulation"); - } -} -while (nbHousesWithImprovedInsulation > targetNbHousesWithImprovedInsulation) { - GCHouse house = findFirst(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); - if (house != null) { - house.p_BuildingThermalAsset.setLossScalingFactor_fr( 1 ); - nbHousesWithImprovedInsulation--; - } - else { - throw new RuntimeException("Unable to find house that has additional insulation"); - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753950993262</Id> - <Name>f_setPTSystemHouses</Name> - <Description>Function that adds or removes photovoltaic production assets to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a PV asset. If a new asset is created it takes as its electric capacity a random value between 3 and 6 kW. The variables for amount of installed PV are updated automatically in the zero_engine. -</Description> - <X>70</X> - <Y>1010</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>PT_pct</Name> - <Type>double</Type> - </Parameter> - <Body>ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedPTSystemsHouses.stream().filter(gcList::contains).toList()); -int nbHouses = houses.size(); -int nbHousesWithPT = count(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); -int nbHousesWithPTGoal = roundToInt(PT_pct / 100.0 * nbHouses); - -while ( nbHousesWithPTGoal < nbHousesWithPT ) { // remove excess PV systems - GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); - J_EA ptAsset = findFirst(house.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOTHERMAL ); - - if (ptAsset != null) { - ptAsset.removeEnergyAsset(); - houses.remove(house); - zero_Interface.c_orderedPTSystemsHouses.remove(house); - zero_Interface.c_orderedPTSystemsHouses.add(0, house); - - if(house.p_heatBuffer != null){ - house.p_heatBuffer.removeEnergyAsset(); - } - if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - J_EAProduction pvAsset = findFirst(house.c_productionAssets, ea -> ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); - if(pvAsset != null){ - double newInstalledPVCapacity = min(house.v_liveAssetsMetaData.PVPotential_kW, pvAsset.getCapacityElectric_kW() + zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); - pvAsset.setCapacityElectric_kW(newInstalledPVCapacity); - } - } - nbHousesWithPT --; - } - else { - traceln(" cant find PV asset in house that should have PV asset in f_setPVHouses (Interface)"); - } -} - -while ( nbHousesWithPTGoal > nbHousesWithPT ) { - GCHouse house = findFirst(houses, x -> !x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); - if (house == null){ - traceln("No gridconnection without PT panels found! Current PVsystems count: %s", nbHousesWithPT); - break; - } - else { - String assetName = "Rooftop PT"; - double installedPTCapacity_kW = zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPTPower_kWpm2;//roundToDecimal(uniform(3,6),2); - - //Compensate for pt if it is present - if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - J_EAProduction pvAsset = findFirst(house.c_productionAssets, ea -> ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); - if(pvAsset != null){ - double newInstalledPVCapacity = max(0, pvAsset.getCapacityElectric_kW() - zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); - pvAsset.setCapacityElectric_kW(newInstalledPVCapacity); - } - } - J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOTHERMAL, assetName, OL_EnergyCarriers.HEAT, installedPTCapacity_kW, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); - - //Get parameters for the heatbuffer - double lossFactor_WpK = 0;// For now no loss factor - double minTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgMinHeatBufferTemperature_degC; - double maxTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgMaxHeatBufferTemperature_degC; - double initialTemperature_degC = (minTemperature_degC + maxTemperature_degC)/2; - double setTemperature_degC = initialTemperature_degC; - double heatBufferStorageCapacity_m3 = zero_Interface.energyModel.avgc_data.p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 * installedPTCapacity_kW/zero_Interface.energyModel.avgc_data.p_avgPTPower_kWpm2; - double heatCapacity_JpK = zero_Interface.energyModel.avgc_data.p_waterHeatCapacity_JpkgK*(heatBufferStorageCapacity_m3*zero_Interface.energyModel.avgc_data.p_waterDensity_kgpm3); - - //Add heatbuffer - J_EAStorageHeat heatbufferAsset = new J_EAStorageHeat ( house, OL_EnergyAssetType.STORAGE_HEAT, installedPTCapacity_kW, lossFactor_WpK, zero_Interface.energyModel.p_timeStep_h, initialTemperature_degC, minTemperature_degC, maxTemperature_degC, setTemperature_degC, heatCapacity_JpK, OL_AmbientTempType.FIXED); - - houses.remove(house); - zero_Interface.c_orderedPTSystemsHouses.remove(house); - zero_Interface.c_orderedPTSystemsHouses.add(0, house); - nbHousesWithPT ++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754391096443</Id> - <Name>f_setHeatingSliders</Name> - <Description>Function that calculates all the values of the other sliders and sets them without calling an action. Takes as parameters the index of the slider which should not be touched as well as all the sliders. HybridHeatPump and DistrictHeating sliders are optional and an argument of null can be passed. </Description> - <X>70</X> - <Y>690</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>orderedHeatingSystemGCList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>changedSliderHeatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>gasBurnerSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>hybridHeatPumpSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>heatPumpSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>HTdistrictHeatingSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>LTdistrictHeatingSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>customHeatingSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>////Determine the changed slider index used in the distribution for loop -int changedSliderIndex = 0; -switch(changedSliderHeatingType){ - case GAS_BURNER: - changedSliderIndex = 0; - break; - case HYBRID_HEATPUMP: - changedSliderIndex = 1; - break; - case ELECTRIC_HEATPUMP: - changedSliderIndex = 2; - break; - case DISTRICTHEAT: - changedSliderIndex = 3; - break; - case LT_DISTRICTHEAT: - case CUSTOM: - throw new RuntimeException("Changed a heating type slider with a currently unsupported type!"); -} - -//// Get current pct values (after slider change, but before correction; In other words total_pct != 100) -double pct_naturalGasBurner = gasBurnerSlider.getValue(); -double pct_hybridHeatPump = hybridHeatPumpSlider != null ? hybridHeatPumpSlider.getValue() : 0; -double pct_electricHeatPump = heatPumpSlider != null ? heatPumpSlider.getValue() : 0; -double pct_HTdistrictHeating = HTdistrictHeatingSlider != null ? HTdistrictHeatingSlider.getValue() : 0; -double pct_LTdistrictHeating = LTdistrictHeatingSlider != null ? LTdistrictHeatingSlider.getValue() : 0; -double pct_customHeatingSlider = customHeatingSlider != null ? customHeatingSlider.getValue() : 0; - -//Set array with pct values -double pctArray[] = { - pct_naturalGasBurner, - pct_hybridHeatPump, - pct_electricHeatPump, - pct_HTdistrictHeating, - pct_LTdistrictHeating, - pct_customHeatingSlider -}; - -//// Create a ghost asset array, and fill it. This is used to find minimums of certain sliders. Also get the total amount of GC with heating systems. -int ghostAssetTotalArray[] = new int[pctArray.length]; -int totalGCWithHeating = 0; -for(GridConnection GC : gcList){ - if(GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE && GC.v_isActive){ - totalGCWithHeating++; - - if(GC.f_getHeatingTypeIsGhost()){ - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - ghostAssetTotalArray[0]++; - break; - case HYBRID_HEATPUMP: - ghostAssetTotalArray[1]++; - break; - case ELECTRIC_HEATPUMP: - ghostAssetTotalArray[2]++; - break; - case DISTRICTHEAT: - ghostAssetTotalArray[3]++; - break; - case LT_DISTRICTHEAT: - ghostAssetTotalArray[4]++; - break; - case CUSTOM: - ghostAssetTotalArray[5]++; - break; - } - } - } -} - -//// Correct the slider change trough to the other sliders. But don't move the custom slider or set sliders lower than their unchangable ghost assets. -int customSliderIndex = 5; -double pctExcess = Arrays.stream(pctArray).sum() - 100; - -for (int i = 0; i < pctArray.length && pctExcess != 0 ; i++) { - if (i != changedSliderIndex && i != customSliderIndex) { - double ghostMin_pct = ((double) 100.0 * ghostAssetTotalArray[i]) / totalGCWithHeating; - double maxDown_pct = pctArray[i] - ghostMin_pct; - double maxUp_pct = 100 - pctArray[i]; - - // Determine the slider delta, positive delta -> slider increases, negative -> slider decreases - double deltaSlider_pct = 0; - if(pctExcess > 0){ - deltaSlider_pct = -min(maxDown_pct, pctExcess); - } - else{ - deltaSlider_pct = min(maxUp_pct, -pctExcess); - } - - pctArray[i] += deltaSlider_pct; - pctExcess = Arrays.stream(pctArray).sum() - 100; - } -} - -//If still not 0, then adjust the changedSlider back to solve it. -if (pctExcess != 0){ - pctArray[changedSliderIndex] = max(0, pctArray[changedSliderIndex] - pctExcess); -} - -//// Set refound values to the sliders again -gasBurnerSlider.setValue(roundToInt(pctArray[0]), false); -if(hybridHeatPumpSlider != null){ - hybridHeatPumpSlider.setValue(roundToInt(pctArray[1]), false); -} -if(heatPumpSlider != null){ - heatPumpSlider.setValue(roundToInt(pctArray[2]), false); -} -if(HTdistrictHeatingSlider != null){ - HTdistrictHeatingSlider.setValue(roundToInt(pctArray[3]), false); -} -if(LTdistrictHeatingSlider != null){ - LTdistrictHeatingSlider.setValue(roundToInt(pctArray[4]), false); -} -if(customHeatingSlider != null){ - customHeatingSlider.setValue(roundToInt(pctArray[5]), false); -} - - -//Set the heating systems in the engine to the correct setting -f_setHeatingSystems(gcList, orderedHeatingSystemGCList, changedSliderHeatingType, pctArray[changedSliderIndex]);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754923748794</Id> - <Name>f_updateSliders_Heating</Name> - <X>-380</X> - <Y>30</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>if(gr_heatingSliders_default.isVisible()){ - f_updateHeatingSliders_default(); -} -else if(gr_heatingSliders_businesspark.isVisible()){ - f_updateHeatingSliders_businesspark(); -} -else if(gr_heatingSliders_residential.isVisible()){ - f_updateHeatingSliders_residential(); -} -else{ - f_updateHeatingSliders_custom(); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754924509667</Id> - <Name>f_updateHeatingSliders_default</Name> - <X>-360</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>////Companies -List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); - -//Savings (IN PROGRESS, WHAT ABOUT THERMAL BUILDINGS?????) -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GridConnection GC : utilityGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.getActiveEnergyCarriers().contains(OL_EnergyCarriers.HEAT)); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - - if(GC.p_BuildingThermalAsset != null){ - traceln("WARNING: SLIDER SAVINGS UPDATE FUNCTION IS NOT FUNCTIONAL YET FOR COMPANIES WITH THERMAL BUILDING ASSETS"); - } - } -} - -double heatSavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; -sl_heatDemandReductionCompanies_pct.setValue(roundToInt(heatSavings_pct), false); - - -//Heating assets -//Heating type -int totalCompaniesWithHeating = 0; -int nbOfCompaniesWithGasBurners = 0; -int nbOfCompaniesWithHybridHeatpumps = 0; -int nbOfCompaniesWithElectricHeatpumps = 0; -int nbOfCompaniesOnHTHeatGrid = 0; -int nbOfCompaniesOnLTHeatGrid = 0; - -for(GCUtility GC : utilityGridConnections){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalCompaniesWithHeating++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbOfCompaniesWithGasBurners++; - break; - case HYBRID_HEATPUMP: - nbOfCompaniesWithHybridHeatpumps++; - break; - case ELECTRIC_HEATPUMP: - nbOfCompaniesWithElectricHeatpumps++; - break; - case DISTRICTHEAT: - nbOfCompaniesOnHTHeatGrid++; - break; - case LT_DISTRICTHEAT: - nbOfCompaniesOnLTHeatGrid++; - break; - } - } -} - -int companiesWithGasBurners_pct = roundToInt(100.0 * nbOfCompaniesWithGasBurners / totalCompaniesWithHeating); -int companiesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithHybridHeatpumps / totalCompaniesWithHeating); -int companiesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithElectricHeatpumps / totalCompaniesWithHeating); -int companiesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnHTHeatGrid / totalCompaniesWithHeating); - -sl_gasBurnerCompanies_pct.setValue(companiesWithGasBurners_pct, false); -sl_hybridHeatPumpCompanies_pct.setValue(companiesWithHybridHeatpump_pct, false); -sl_electricHeatPumpCompanies_pct.setValue(companiesWithElectricHeatpump_pct, false); -sl_districtHeatingCompanies_pct.setValue(companiesWithHTDistrictHeat_pct, false); - - -////Houses -List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); - -//Savings -double averageScalingFactor = 0; -double totalScalingFactors = 0; -for(GCHouse GC : houseGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.getActiveEnergyCarriers().contains(OL_EnergyCarriers.HEAT)); - for(J_EAProfile profileEA : profileEAs){ - double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; - double newTotalScalingFactorValue = totalScalingFactorValue + profileEA.getProfileScaling_fr(); - totalScalingFactors++; - averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; - double newTotalScalingFactorValue = totalScalingFactorValue + consumptionEA.getConsumptionScaling_fr(); - totalScalingFactors++; - averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; - } - - if(GC.p_BuildingThermalAsset != null){ - double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; - double newTotalScalingFactorValue = totalScalingFactorValue + GC.p_BuildingThermalAsset.getLossScalingFactor_fr(); - totalScalingFactors++; - averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; - } - } -} -double averageSavingsFactor_pct = (1-averageScalingFactor)*100.0; -sl_heatDemandReductionHouseholds_pct.setValue(roundToInt(averageSavingsFactor_pct), false); - - -//Heating type -int totalHousesWithHeating = 0; -int nbOfHousesWithGasBurners = 0; -int nbOfHousesWithHybridHeatpumps = 0; -int nbOfHousesWithElectricHeatpumps = 0; -int nbOfHousesOnHTHeatGrid = 0; -int nbOfHousesOnLTHeatGrid = 0; - -for(GCHouse GC : houseGridConnections){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalHousesWithHeating++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbOfHousesWithGasBurners++; - break; - case HYBRID_HEATPUMP: - nbOfHousesWithHybridHeatpumps++; - break; - case ELECTRIC_HEATPUMP: - nbOfHousesWithElectricHeatpumps++; - break; - case DISTRICTHEAT: - nbOfHousesOnHTHeatGrid++; - break; - case LT_DISTRICTHEAT: - nbOfHousesOnLTHeatGrid++; - break; - } - } -} - -int housesWithGasBurners_pct = roundToInt(100.0 * nbOfHousesWithGasBurners / totalHousesWithHeating); -int housesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfHousesWithHybridHeatpumps / totalHousesWithHeating); -int housesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfHousesWithElectricHeatpumps / totalHousesWithHeating); -int housesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfHousesOnHTHeatGrid / totalHousesWithHeating); - -sl_gasBurnerHouseholds_pct.setValue(housesWithGasBurners_pct, false); -sl_hybridHeatPumpHouseholds_pct.setValue(housesWithHybridHeatpump_pct, false); -sl_electricHeatPumpHouseholds_pct.setValue(housesWithElectricHeatpump_pct, false); -sl_districtHeatingHouseholds_pct.setValue(housesWithHTDistrictHeat_pct, false); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754924542535</Id> - <Name>f_updateHeatingSliders_residential</Name> - <X>-360</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); - - -//Heating type -int totalHousesWithHeating = 0; -int nbOfHousesWithGasBurners = 0; -int nbOfHousesWithHybridHeatpumps = 0; -int nbOfHousesWithElectricHeatpumps = 0; -int nbOfHousesOnHTHeatGrid = 0; -int nbOfHousesOnLTHeatGrid = 0; - -for(GCHouse GC : houseGridConnections){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalHousesWithHeating++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbOfHousesWithGasBurners++; - break; - case HYBRID_HEATPUMP: - nbOfHousesWithHybridHeatpumps++; - break; - case ELECTRIC_HEATPUMP: - nbOfHousesWithElectricHeatpumps++; - break; - case DISTRICTHEAT: - nbOfHousesOnHTHeatGrid++; - break; - case LT_DISTRICTHEAT: - nbOfHousesOnLTHeatGrid++; - break; - } - } -} - -int housesWithGasBurners_pct = roundToInt(100.0 * nbOfHousesWithGasBurners / totalHousesWithHeating); -int housesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfHousesWithHybridHeatpumps / totalHousesWithHeating); -int housesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfHousesWithElectricHeatpumps / totalHousesWithHeating); - -sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, false); -sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, false); -sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, false); -cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); -cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - -if(nbOfHousesOnHTHeatGrid == totalHousesWithHeating){ - cb_householdHTDistrictHeatingResidentialArea.setSelected(true, false); -} -if(nbOfHousesOnLTHeatGrid == totalHousesWithHeating){ - cb_householdLTDistrictHeatingResidentialArea.setSelected(true, false); -} - -//Houses with Airco -double nbHouses = houseGridConnections.size(); -double nbHousesWithAirco = count(houseGridConnections, x -> x.p_airco != null); -double pctOfHousesWithAirco = (nbHousesWithAirco*100.0)/nbHouses; -sl_householdAircoResidentialArea_pct.setValue(pctOfHousesWithAirco, false); - - -//Houses with better isolation -int nbHousesThatCanGetImprovedIsolation = count(houseGridConnections, x -> x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -int nbHousesWithImprovedInsulation = count(houseGridConnections, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -double pctOfHousesWithImprovedInsulation = 100.0 * ((double)nbHousesWithImprovedInsulation)/nbHousesThatCanGetImprovedIsolation; -sl_householdHeatDemandReductionResidentialArea_pct.setValue(roundToInt(pctOfHousesWithImprovedInsulation), false); - - -//PT -int nbHousesWithPT = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); - -sl_rooftopPTHouses_pct.setValue(roundToInt((nbHousesWithPT*100.0)/nbHouses), false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754924544023</Id> - <Name>f_updateHeatingSliders_businesspark</Name> - <X>-360</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); - -//Savings (IN PROGRESS, WHAT ABOUT THERMAL BUILDINGS?????) -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GridConnection GC : utilityGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); // FIX FOR HOT WATER/PT IN LONG RUN - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - - if(GC.p_BuildingThermalAsset != null){ - traceln("WARNING: SLIDER SAVINGS UPDATE FUNCTION IS NOT FUNCTIONAL YET FOR COMPANIES WITH THERMAL BUILDING ASSETS"); - } - } -} - -double heatSavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; -sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.setValue(roundToInt(heatSavings_pct), false); - - -//Heating type -int totalCompaniesWithHeating = 0; -int nbOfCompaniesWithGasBurners = 0; -int nbOfCompaniesWithHybridHeatpumps = 0; -int nbOfCompaniesWithElectricHeatpumps = 0; -int nbOfCompaniesOnHTHeatGrid = 0; -int nbOfCompaniesOnLTHeatGrid = 0; -int nbOfCompaniesWithCustomHeating = 0; - -for(GCUtility GC : utilityGridConnections){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalCompaniesWithHeating++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbOfCompaniesWithGasBurners++; - break; - case HYBRID_HEATPUMP: - nbOfCompaniesWithHybridHeatpumps++; - break; - case ELECTRIC_HEATPUMP: - nbOfCompaniesWithElectricHeatpumps++; - break; - case DISTRICTHEAT: - nbOfCompaniesOnHTHeatGrid++; - break; - case LT_DISTRICTHEAT: - nbOfCompaniesOnLTHeatGrid++; - break; - case CUSTOM: - nbOfCompaniesWithCustomHeating++; - break; - } - } -} - -int companiesWithGasBurners_pct = roundToInt(100.0 * nbOfCompaniesWithGasBurners / totalCompaniesWithHeating); -int companiesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithHybridHeatpumps / totalCompaniesWithHeating); -int companiesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithElectricHeatpumps / totalCompaniesWithHeating); -int companiesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnHTHeatGrid / totalCompaniesWithHeating); -int companiesWithLTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnLTHeatGrid / totalCompaniesWithHeating); -int companiesWithCustomHeating_pct = roundToInt(100.0 * nbOfCompaniesWithCustomHeating / totalCompaniesWithHeating); - - -sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct.setValue(companiesWithGasBurners_pct, false); -sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.setValue(companiesWithHybridHeatpump_pct, false); -sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct.setValue(companiesWithElectricHeatpump_pct, false); -sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.setValue(companiesWithHTDistrictHeat_pct, false); -//sl_heatDemandSlidersCompaniesLTDistrictHeatingCompanies_pct.setValue(companiesWithLTDistrictHeat_pct, false); Doesnt exist (yet) for companies -sl_heatingTypeSlidersCompaniesCustom_pct.setValue(companiesWithCustomHeating_pct, false); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754924574713</Id> - <Name>f_updateHeatingSliders_custom</Name> - <X>-360</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//If you have a custom tab, -//override this function to make it update automatically -traceln("Forgot to override the update custom heating sliders functionality");</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1760350664957</Id> - <Name>f_setHeatingSystems</Name> - <X>90</X> - <Y>711</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>orderedHeatingSystemGCList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>changedSliderHeatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>sliderGoal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>int totalNrOfHeatingSystems = 0; -int nbGasBurners = 0; -int nbHybridHeatpumps = 0; -int nbElectricHeatpumps = 0; -int nbHTHeatGrid = 0; -int nbLTHeatGrid = 0; -int nbCustomHeating = 0; -List<GridConnection> gasBurnerGCs = new ArrayList<>(); -List<GridConnection> hybridHeatpumpGCs = new ArrayList<>(); -List<GridConnection> electricHeatpumpGCs = new ArrayList<>(); -List<GridConnection> HTHeatGridGCs = new ArrayList<>(); -List<GridConnection> LTHeatGridGCs = new ArrayList<>(); - -for(GridConnection GC : gcList){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalNrOfHeatingSystems++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbGasBurners++; - if(!GC.f_getHeatingTypeIsGhost()){ - gasBurnerGCs.add(GC); - } - break; - case HYBRID_HEATPUMP: - nbHybridHeatpumps++; - if(!GC.f_getHeatingTypeIsGhost()){ - hybridHeatpumpGCs.add(GC); - } - break; - case ELECTRIC_HEATPUMP: - nbElectricHeatpumps++; - if(!GC.f_getHeatingTypeIsGhost()){ - electricHeatpumpGCs.add(GC); - } - break; - case DISTRICTHEAT: - nbHTHeatGrid++; - if(!GC.f_getHeatingTypeIsGhost()){ - HTHeatGridGCs.add(GC); - } - break; - case LT_DISTRICTHEAT: - nbLTHeatGrid++; - if(!GC.f_getHeatingTypeIsGhost()){ - LTHeatGridGCs.add(GC); - } - break; - case CUSTOM: - nbCustomHeating++; - if(!GC.f_getHeatingTypeIsGhost()){ - //No collection, as ghost cant be changed anyway - } - break; - } - } -} - -int nbChangedHeatingTypeGoal = roundToInt(totalNrOfHeatingSystems*sliderGoal_pct/100.0); - -int currentNumberOfChangedHeatingType = 0; - -switch(changedSliderHeatingType){ - case GAS_BURNER: - currentNumberOfChangedHeatingType = nbGasBurners; - break; - case HYBRID_HEATPUMP: - currentNumberOfChangedHeatingType = nbHybridHeatpumps; - break; - case ELECTRIC_HEATPUMP: - currentNumberOfChangedHeatingType = nbElectricHeatpumps; - break; - case DISTRICTHEAT: - currentNumberOfChangedHeatingType = nbHTHeatGrid; - break; - case LT_DISTRICTHEAT: - currentNumberOfChangedHeatingType = nbLTHeatGrid; - break; -} - - - -if (currentNumberOfChangedHeatingType < nbChangedHeatingTypeGoal) { - while ( currentNumberOfChangedHeatingType < nbChangedHeatingTypeGoal ) { - - GridConnection changingGC = null; - if(changedSliderHeatingType != OL_GridConnectionHeatingType.GAS_BURNER && gasBurnerGCs.size() > 0){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> gasBurnerGCs.contains(gc)); - gasBurnerGCs.remove(changingGC); - } - else if(changedSliderHeatingType != OL_GridConnectionHeatingType.HYBRID_HEATPUMP && hybridHeatpumpGCs.size() > 0){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> hybridHeatpumpGCs.contains(gc)); - hybridHeatpumpGCs.remove(changingGC); - } - else if (changedSliderHeatingType != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP && electricHeatpumpGCs.size() > 0 ) { - changingGC = findFirst(orderedHeatingSystemGCList, gc -> electricHeatpumpGCs.contains(gc)); - electricHeatpumpGCs.remove(changingGC); - } - else if (changedSliderHeatingType != OL_GridConnectionHeatingType.DISTRICTHEAT && HTHeatGridGCs.size() > 0 ) { - changingGC = findFirst(orderedHeatingSystemGCList, gc -> HTHeatGridGCs.contains(gc)); - HTHeatGridGCs.remove(changingGC); - } - else if (changedSliderHeatingType != OL_GridConnectionHeatingType.LT_DISTRICTHEAT && LTHeatGridGCs.size() > 0 ) { - changingGC = findFirst(orderedHeatingSystemGCList, gc -> LTHeatGridGCs.contains(gc)); - LTHeatGridGCs.remove(changingGC); - } - else{ - throw new RuntimeException("No more GC left to change into raised slider type!" ); - } - - if(changingGC == null){ - throw new RuntimeException("orderedHeatingSystemGClist does not contain a GC found by this function! This should not be possible!" ); - } - - //Change the current heating type to the new one - changingGC.f_removeAllHeatingAssets(); - f_addHeatAsset(changingGC, changedSliderHeatingType, f_calculatePeakHeatDemand_kW(changingGC)); - changingGC.f_addHeatManagement(changedSliderHeatingType, false); - currentNumberOfChangedHeatingType ++; - } -} -else { - // Remove Gas burners Trucks - while ( currentNumberOfChangedHeatingType > nbChangedHeatingTypeGoal ) { - // replace a gasburner with a hybrid heatpump - GridConnection changingGC = null; - OL_GridConnectionHeatingType newHeatingType = OL_GridConnectionHeatingType.GAS_BURNER; // Always change into gasburner system. - if(changedSliderHeatingType == OL_GridConnectionHeatingType.GAS_BURNER){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> gasBurnerGCs.contains(gc)); - gasBurnerGCs.remove(changingGC); - newHeatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; // If removing gasburner, change into hybrid system. - } - else if(changedSliderHeatingType == OL_GridConnectionHeatingType.HYBRID_HEATPUMP){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> hybridHeatpumpGCs.contains(gc)); - hybridHeatpumpGCs.remove(changingGC); - } - else if(changedSliderHeatingType == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> electricHeatpumpGCs.contains(gc)); - electricHeatpumpGCs.remove(changingGC); - } - else if(changedSliderHeatingType == OL_GridConnectionHeatingType.DISTRICTHEAT){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> HTHeatGridGCs.contains(gc)); - HTHeatGridGCs.remove(changingGC); - } - else if(changedSliderHeatingType == OL_GridConnectionHeatingType.LT_DISTRICTHEAT){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> LTHeatGridGCs.contains(gc)); - LTHeatGridGCs.remove(changingGC); - } - changingGC.f_removeAllHeatingAssets(); - f_addHeatAsset(changingGC, newHeatingType, f_calculatePeakHeatDemand_kW(changingGC)); - changingGC.f_addHeatManagement(newHeatingType, false); - currentNumberOfChangedHeatingType--; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1760368810352</Id> - <Name>f_addHeatAsset</Name> - <X>110</X> - <Y>731</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatAssetType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>maxHeatOutputPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>//Initialize parameters -double heatOutputCapacityGasBurner_kW; -double inputCapacityElectric_kW; -double efficiency; -double baseTemperature_degC; -double outputTemperature_degC; -OL_AmbientTempType ambientTempType; -double sourceAssetHeatPower_kW; -double belowZeroHeatpumpEtaReductionFactor; -maxHeatOutputPower_kW = maxHeatOutputPower_kW*2; // Make the asset capacity twice as high, to make sure it can handle the load in other scenarios with more heat consumption. -J_AVGC_data avgc_data = zero_Interface.energyModel.avgc_data; -double timeStep_h = zero_Interface.energyModel.p_timeStep_h; - -switch (heatAssetType){ // There is always only one heatingType, If there are many assets the type is CUSTOM - - case GAS_BURNER: - heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); - J_EAConversionGasBurner gasBurner = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW , avgc_data.p_avgEfficiencyGasBurner_fr, timeStep_h, 90); - break; - - case HYBRID_HEATPUMP: - - //Add primary heating asset (heatpump) (if its not part of the basic profile already - inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW / 3); //-- /3, kan nog kleiner want is hybride zodat gasbrander ook bij springt, dus kleiner MOETEN aanname voor hoe klein onderzoeken - - efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; - baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType); - - zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); - - //Add secondary heating asset (gasburner) - heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); - efficiency = avgc_data.p_avgEfficiencyGasBurner_fr; - outputTemperature_degC = avgc_data.p_avgOutputTemperatureGasBurner_degC; - - J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW, efficiency, timeStep_h, outputTemperature_degC); - break; - - case ELECTRIC_HEATPUMP: - //Add primary heating asset (heatpump) - inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW); // Could be smaller due to high cop - efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; - baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - break; - - case GAS_CHP: - - double outputCapacityElectric_kW = (maxHeatOutputPower_kW/avgc_data.p_avgEfficiencyCHP_thermal_fr) * avgc_data.p_avgEfficiencyCHP_electric_fr; - outputTemperature_degC = avgc_data.p_avgOutputTemperatureCHP_degC; - efficiency = avgc_data.p_avgEfficiencyCHP_thermal_fr + avgc_data.p_avgEfficiencyCHP_electric_fr; - - new J_EAConversionGasCHP(parentGC, outputCapacityElectric_kW, maxHeatOutputPower_kW, efficiency, timeStep_h, outputTemperature_degC ); - break; - - case DISTRICTHEAT: - double heatOutputCapacityDeliverySet_kW = max(avgc_data.p_minDistrictHeatingDeliverySetOutputCapacity_kW, maxHeatOutputPower_kW); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - efficiency = avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - - new J_EAConversionHeatDeliverySet(parentGC, heatOutputCapacityDeliverySet_kW, efficiency, timeStep_h, outputTemperature_degC); - - //Add GC to heat grid - GridNode heatgrid = findFirst(zero_Interface.energyModel.pop_gridNodes, node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - if(heatgrid == null){ - heatgrid = f_createNewHeatGrid(); - } - //Connect - parentGC.p_parentNodeHeatID = heatgrid.p_gridNodeID; - parentGC.p_parentNodeHeat = heatgrid; - break; -} -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GridNode</ReturnType> - <Id>1760370085949</Id> - <Name>f_createNewHeatGrid</Name> - <X>130</X> - <Y>751</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); -zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); -GN_heat.p_gridNodeID = "Heatgrid"; - -// Check wether transformer capacity is known or estimated -GN_heat.p_capacity_kW = 1000000; -GN_heat.p_realCapacityAvailable = false; - -// Basic GN information -GN_heat.p_description = "Custom toegevoegde Warmtenet"; - -//Define node type -GN_heat.p_nodeType = OL_GridNodeType.HT; -GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - -//Define GN location -GN_heat.p_latitude = 0; -GN_heat.p_longitude = 0; -GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - -//Show warning that heat grid is not a simple solution -zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); - -return GN_heat;</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1722253108626</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1722253115477</Id> - <Name>uI_Tabs</Name> - <X>40</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_Tabs</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1722253115479</Id> - <Name>zero_Interface</Name> - <X>160</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1753694295453</Id> - <Name>uI_EnergyHub</Name> - <X>310</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_EnergyHub</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1722253108632</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1722350093699</Id> - <Name>rect_genericFunctions</Name> - <X>10</X> - <Y>460</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-4144960</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>450</Width> - <Height>580</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722350093702</Id> - <Name>t_genericFunctions</Name> - <X>140</X> - <Y>480</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Generic Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>22</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1722253128676</Id> - <Name>gr_heatingSliders_default</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722253128678</Id> - <Name>rect_heatDemandSliders</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-6943</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722253128680</Id> - <Name>t_gasBurnerHouseholdsDescription</Name> - <X>30</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>HR ketel aardgas</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128682</Id> - <Name>t_hybridHeatPumpHouseholdsDescription</Name> - <X>30</X> - <Y>265</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hybride warmtepomp</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128684</Id> - <Name>t_electricHeatPumpHouseholdsDescription</Name> - <X>30</X> - <Y>290</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elek. warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128686</Id> - <Name>t_districtHeatingHouseholdsDescription</Name> - <X>30</X> - <Y>315</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Warmtenet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128688</Id> - <Name>t_electricHeatPumpHouseholds_pct</Name> - <X>235</X> - <Y>290</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricHeatPumpHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128690</Id> - <Name>t_gasBurnerHouseholds_pct</Name> - <X>235</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_gasBurnerHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128692</Id> - <Name>t_districtHeatingHouseholds_pct</Name> - <X>235</X> - <Y>315</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_districtHeatingHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128694</Id> - <Name>t_hybridHeatPumpHouseholds_pct</Name> - <X>235</X> - <Y>265</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_hybridHeatPumpHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128696</Id> - <Name>sl_districtHeatingHouseholds_pct</Name> - <X>265</X> - <Y>310</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>false</VisibleCode> - <Enabled>false</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128698</Id> - <Name>sl_gasBurnerHouseholds_pct</Name> - <X>265</X> - <Y>235</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.GAS_BURNER, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128700</Id> - <Name>sl_hybridHeatPumpHouseholds_pct</Name> - <X>265</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>false</VisibleCode> - <Enabled>false</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128702</Id> - <Name>sl_electricHeatPumpHouseholds_pct</Name> - <X>265</X> - <Y>285</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128704</Id> - <Name>sl_heatDemandReductionHouseholds_pct</Name> - <X>265</X> - <Y>200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), sl_heatDemandReductionHouseholds_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722253128706</Id> - <Name>t_heatDemandReductionHouseholds_pct</Name> - <X>235</X> - <Y>205</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandReductionHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128708</Id> - <Name>t_heatDemandReductionHouseholdsDescription</Name> - <X>30</X> - <Y>205</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing warmte</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128710</Id> - <Name>t_householdsDescription</Name> - <X>20</X> - <Y>180</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huishoudens</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128712</Id> - <Name>sl_heatDemandReductionCompanies_pct</Name> - <X>265</X> - <Y>35</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), sl_heatDemandReductionCompanies_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722253128714</Id> - <Name>t_heatDemandReductionCompaniesDescription</Name> - <X>25</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing warmte</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128716</Id> - <Name>t_heatDemandReductionCompanies_pct</Name> - <X>235</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandReductionCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128718</Id> - <Name>t_gasBurnerCompaniesDescription</Name> - <X>25</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>HR ketel aardgas</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128720</Id> - <Name>t_hybridHeatPumpCompaniesDescription</Name> - <X>25</X> - <Y>100</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hybride warmtepomp</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128722</Id> - <Name>t_electricHeatPumpCompaniesDescription</Name> - <X>25</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elek. warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128724</Id> - <Name>t_districtHeatingCompaniesDescription</Name> - <X>25</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Warmtenet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128726</Id> - <Name>t_electricHeatPumpCompanies_pct</Name> - <X>235</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128728</Id> - <Name>t_gasBurnerCompanies_pct</Name> - <X>235</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_gasBurnerCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128730</Id> - <Name>t_districtHeatingCompanies_pct</Name> - <X>235</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_districtHeatingCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128732</Id> - <Name>t_hybridHeatPumpCompanies_pct</Name> - <X>235</X> - <Y>100</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_hybridHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128734</Id> - <Name>sl_districtHeatingCompanies_pct</Name> - <X>265</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>false</VisibleCode> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128736</Id> - <Name>sl_gasBurnerCompanies_pct</Name> - <X>265</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.GAS_BURNER, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128738</Id> - <Name>sl_hybridHeatPumpCompanies_pct</Name> - <X>265</X> - <Y>95</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>false</VisibleCode> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128740</Id> - <Name>sl_electricHeatPumpCompanies_pct</Name> - <X>265</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722254471242</Id> - <Name>t_companiesDescription</Name> - <X>20</X> - <Y>15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Bedrijven</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1746091940464</Id> - <Name>i_companyReduction</Name> - <X>170</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyReduction, zero_Interface.v_infoText.companyHeatDemandReduction, i_companyReduction.getX() + uI_Tabs.v_presentationXOffset, i_companyReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829752</Id> - <Name>i_companyGasBoiler</Name> - <X>170</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyGasBoiler, zero_Interface.v_infoText.companyGasBoiler, i_companyGasBoiler.getX() + uI_Tabs.v_presentationXOffset, i_companyGasBoiler.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829788</Id> - <Name>i_companyElectricHeatpump</Name> - <X>170</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyElectricHeatpump, zero_Interface.v_infoText.companyElectricHeatpump, i_companyElectricHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_companyElectricHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829826</Id> - <Name>i_companyHybridHeatpump</Name> - <X>170</X> - <Y>100</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyHybridHeatpump, zero_Interface.v_infoText.companyHybridHeatpump, i_companyHybridHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_companyHybridHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829863</Id> - <Name>i_companyHeatGrid</Name> - <X>170</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyHeatGrid, zero_Interface.v_infoText.companyHeatGrid, i_companyHeatGrid.getX() + uI_Tabs.v_presentationXOffset, i_companyHeatGrid.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829905</Id> - <Name>i_householdElectricHeatpump</Name> - <X>170</X> - <Y>290</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdElectricHeatpump, zero_Interface.v_infoText.householdElectricHeatpump, i_householdElectricHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829948</Id> - <Name>i_householdReduction</Name> - <X>170</X> - <Y>205</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdReduction, zero_Interface.v_infoText.householdHeatDemandReduction, i_householdReduction.getX() + uI_Tabs.v_presentationXOffset, i_householdReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829986</Id> - <Name>i_householdGasBoiler</Name> - <X>170</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdGasBoiler, zero_Interface.v_infoText.householdGasBoiler, i_householdGasBoiler.getX() + uI_Tabs.v_presentationXOffset, i_householdGasBoiler.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092830024</Id> - <Name>i_householdHeatGrid</Name> - <X>170</X> - <Y>315</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHeatGrid, zero_Interface.v_infoText.householdHeatGrid, i_householdHeatGrid.getX() + uI_Tabs.v_presentationXOffset, i_householdHeatGrid.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092830063</Id> - <Name>i_householdHybridHeatpump</Name> - <X>170</X> - <Y>265</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHybridHeatpump, zero_Interface.v_infoText.householdHybridHeatpump, i_householdHybridHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_householdHybridHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Group> - <Id>1722326800106</Id> - <Name>gr_heatingSliders_businesspark</Name> - <X>800</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722326800108</Id> - <Name>rect_heatDemandSliders1</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-6943</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800142</Id> - <Name>sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct</Name> - <X>255</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.getValue());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722326800144</Id> - <Name>t_heatDemandReductionCompaniesDescription1</Name> - <X>15</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing warmte</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800146</Id> - <Name>t_heatDemandReductionCompanies_pct1</Name> - <X>225</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722326800148</Id> - <Name>t_gasBurnerCompaniesDescription1</Name> - <X>15</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>HR ketel aardgas</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800150</Id> - <Name>t_hybridHeatPumpCompaniesDescription1</Name> - <X>15</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hybride warmtepomp</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800152</Id> - <Name>t_electricHeatPumpCompaniesDescription1</Name> - <X>15</X> - <Y>140</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elek. warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800154</Id> - <Name>t_districtHeatingCompaniesDescription1</Name> - <X>15</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Warmtenet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800156</Id> - <Name>t_electricHeatPumpCompanies_pct1</Name> - <X>225</X> - <Y>140</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722326800158</Id> - <Name>t_gasBurnerCompanies_pct1</Name> - <X>225</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722326800160</Id> - <Name>t_districtHeatingCompanies_pct1</Name> - <X>225</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722326800162</Id> - <Name>t_hybridHeatPumpCompanies_pct1</Name> - <X>225</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800164</Id> - <Name>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct</Name> - <X>255</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800166</Id> - <Name>sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct</Name> - <X>255</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.GAS_BURNER, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800168</Id> - <Name>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct</Name> - <X>255</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800170</Id> - <Name>sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct</Name> - <X>255</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722326800172</Id> - <Name>t_companiesDescription1</Name> - <X>10</X> - <Y>30</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Bedrijven</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1734371025574</Id> - <Name>t_eBoilerCompanies_pct</Name> - <X>225</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesEBoiler_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1734371025600</Id> - <Name>sl_heatDemandSlidersCompaniesEBoiler_pct</Name> - <X>255</X> - <Y>185</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isEnabled()</VisibleCode> - <Enabled>false</Enabled> - <ActionCode>traceln("Slider doet nog niets!!");//f_setHeatingSlidersCompanies(3); -//f_resetNeighborhoodHeatingSystems(4);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1734371025534</Id> - <Name>t_eBoilerCompaniesDescription</Name> - <X>15</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>E-boiler</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1746093187570</Id> - <Name>i_companyReduction_Company</Name> - <X>160</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyReduction_Company, zero_Interface.v_infoText.companyHeatDemandReduction, i_companyReduction_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyReduction_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187613</Id> - <Name>i_companyGasBoiler_Company</Name> - <X>160</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyGasBoiler_Company, zero_Interface.v_infoText.companyGasBoiler, i_companyGasBoiler_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyGasBoiler_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187656</Id> - <Name>i_companyElectricHeatpump_Company</Name> - <X>160</X> - <Y>140</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyElectricHeatpump_Company, zero_Interface.v_infoText.companyElectricHeatpump, i_companyElectricHeatpump_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyElectricHeatpump_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187698</Id> - <Name>i_companyHybridHeatpump_Company</Name> - <X>160</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyHybridHeatpump_Company, zero_Interface.v_infoText.companyHybridHeatpump, i_companyHybridHeatpump_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyHybridHeatpump_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187741</Id> - <Name>i_companyHeatGrid_Company</Name> - <X>160</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyHeatGrid_Company, zero_Interface.v_infoText.companyHeatGrid, i_companyHeatGrid_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyHeatGrid_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187784</Id> - <Name>i_companyEBoiler_Company</Name> - <X>160</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyEBoiler_Company, zero_Interface.v_infoText.companyElectricBoiler, i_companyEBoiler_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyEBoiler_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1754382990780</Id> - <Name>t_customHeatingTypeCompanies_pct</Name> - <X>225</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatingTypeSlidersCompaniesCustom_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatingTypeSlidersCompaniesCustom_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754382990782</Id> - <Name>sl_heatingTypeSlidersCompaniesCustom_pct</Name> - <X>255</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>false</Enabled> - <ActionCode>new RuntimeException("This slider action should not be called, this slider is purely for visualisation of the amount of custom heating types for companies");</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1754382990784</Id> - <Name>txt_customHeatingDemandCompaniesDescription</Name> - <X>15</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatingTypeSlidersCompaniesCustom_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Custom systeem</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1754382990787</Id> - <Name>i_companyCustomHeatingType_Company</Name> - <X>160</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_heatingTypeSlidersCompaniesCustom_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyCustomHeatingType_Company, zero_Interface.v_infoText.companyCustomHeating, i_companyCustomHeatingType_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyCustomHeatingType_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Rectangle> - <Id>1722335783989</Id> - <Name>rect_demandFunctions</Name> - <X>40</X> - <Y>510</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-8355840</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>390</Width> - <Height>120</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722335783991</Id> - <Name>txt_demandFunctionsDescription</Name> - <X>240</X> - <Y>520</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Demand Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1722338183031</Id> - <Name>rect_heatingFunctions</Name> - <X>40</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-5952982</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>390</Width> - <Height>150</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722338183033</Id> - <Name>txt_heatingFunctionsDescription</Name> - <X>130</X> - <Y>650</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heating Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Group> - <Id>1749738869813</Id> - <Name>gr_heatingSliders_residential</Name> - <X>400</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1749738869815</Id> - <Name>rect_heatDeandSlidersResidentialArea</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-6943</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1749738869817</Id> - <Name>t_householdGasBurnerDescriptionResidentialArea</Name> - <X>20</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdGasBurnerResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Gas brander</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1749738869821</Id> - <Name>t_householdElectricHeatPumpDescriptionResidentialArea</Name> - <X>20</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdElectricHeatPumpResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elec. warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1749738869823</Id> - <Name>t_householdElectricHeatPumpResidentialArea_pct</Name> - <X>230</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdElectricHeatPumpResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdElectricHeatPumpResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1749738869825</Id> - <Name>t_householdGasBurnerResidentialArea_pct</Name> - <X>230</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdGasBurnerResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdGasBurnerResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869829</Id> - <Name>sl_householdGasBurnerResidentialArea_pct</Name> - <X>260</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} - -f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.GAS_BURNER, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>100</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869833</Id> - <Name>sl_householdElectricHeatPumpResidentialArea_pct</Name> - <X>260</X> - <Y>100</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} - -f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869835</Id> - <Name>sl_householdHeatDemandReductionResidentialArea_pct</Name> - <X>260</X> - <Y>245</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_householdInsulation( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdHeatDemandReductionResidentialArea_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1749738869837</Id> - <Name>t_householdHeatDemandReductionResidentialArea_pct</Name> - <X>230</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdHeatDemandReductionResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdHeatDemandReductionResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1749738869839</Id> - <Name>t_householdHeatDemandReductionDescriptionResidentialArea</Name> - <X>20</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdHeatDemandReductionResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huizen met betere isolatie</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1749738869841</Id> - <Name>t_householdHeatingTypeDescriptionResidentialArea</Name> - <X>20</X> - <Y>30</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heating & Cooling</Text> - <Font> - <Name>Calibri</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869843</Id> - <Name>sl_householdAircoResidentialArea_pct</Name> - <X>260</X> - <Y>216</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setAircos(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdAircoResidentialArea_pct.getValue() / 100.0);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>5</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1749738869845</Id> - <Name>t_householdAircoDescriptionResidentialArea</Name> - <X>20</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdAircoResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huizen met Airco</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1749738869847</Id> - <Name>t_householdAircoResidentialArea_pct</Name> - <X>230</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdAircoResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdAircoResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869849</Id> - <Name>cb_householdHTDistrictHeatingResidentialArea</Name> - <X>20</X> - <Y>130</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="135" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>if ( cb_householdHTDistrictHeatingResidentialArea.isSelected() ){ - sl_householdGasBurnerResidentialArea_pct.setValue(0, false); - sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_addDistrictHeatingToAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -else{ - sl_householdGasBurnerResidentialArea_pct.setValue(100, false); - sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="12" Style="0"/> - <LabelText>HT-Warmtenet</LabelText> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869851</Id> - <Name>cb_householdLTDistrictHeatingResidentialArea</Name> - <X>20</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="185" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>if ( cb_householdLTDistrictHeatingResidentialArea.isSelected() ){ - sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); - sl_householdGasBurnerResidentialArea_pct.setValue(0, false); - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_addLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -else{ - sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); - sl_householdGasBurnerResidentialArea_pct.setValue(100, false); - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="12" Style="0"/> - <LabelText>LT-Warmtenet</LabelText> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1752231559962</Id> - <Name>i_householdGasBurner</Name> - <X>180</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdGasBurnerResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdGasBurner, zero_Interface.v_infoText.householdGasBoiler, i_householdGasBurner.getX() + uI_Tabs.v_presentationXOffset, i_householdGasBurner.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231559982</Id> - <Name>i_householdHeatPump</Name> - <X>180</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdElectricHeatPumpResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHeatPump, zero_Interface.v_infoText.householdElectricHeatpump, i_householdHeatPump.getX() + uI_Tabs.v_presentationXOffset, i_householdHeatPump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231560000</Id> - <Name>i_householdHTDistrictHeating</Name> - <X>220</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_householdHTDistrictHeatingResidentialArea.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHTDistrictHeating, zero_Interface.v_infoText.householdHTDistrictHeating, i_householdHTDistrictHeating.getX() + uI_Tabs.v_presentationXOffset, i_householdHTDistrictHeating.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231560019</Id> - <Name>i_householdLTDistrictHeating</Name> - <X>220</X> - <Y>170</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_householdLTDistrictHeatingResidentialArea.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdLTDistrictHeating, zero_Interface.v_infoText.householdElectricHeatpump, i_householdLTDistrictHeating.getX() + uI_Tabs.v_presentationXOffset, i_householdLTDistrictHeating.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231560038</Id> - <Name>i_householdAirconditioning</Name> - <X>180</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdAircoResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdAirconditioning, zero_Interface.v_infoText.householdAirconditioning, i_householdAirconditioning.getX() + uI_Tabs.v_presentationXOffset, i_householdAirconditioning.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231560056</Id> - <Name>i_householdAdditionalInsulation</Name> - <X>180</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdHeatDemandReductionResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdAdditionalInsulation, zero_Interface.v_infoText.householdAdditionalInsulation, i_householdAdditionalInsulation.getX() + uI_Tabs.v_presentationXOffset, i_householdAdditionalInsulation.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Group> - <Id>1753951517102</Id> - <Name>gr_ptSlidersHouses</Name> - <X>200</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - </Group> - <Text> - <Id>1753949405477</Id> - <Name>t_rooftopPTHouses_pct</Name> - <X>230</X> - <Y>299</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_rooftopPTHouses_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_rooftopPTHouses_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1753949405484</Id> - <Name>sl_rooftopPTHouses_pct</Name> - <X>260</X> - <Y>294</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPTSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_rooftopPTHouses_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1753949405489</Id> - <Name>txt_rooftopPTHousesDescription</Name> - <X>20</X> - <Y>300</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_rooftopPTHouses_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huizen met PT</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1753949405492</Id> - <Name>i_householdPT</Name> - <X>180</X> - <Y>298</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_rooftopPTHouses_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPT, zero_Interface.v_infoText.householdRooftopPT, i_householdPT.getX() + uI_Tabs.v_presentationXOffset, i_householdPT.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1760349016791</Id> - <Name>txt_householdHybridHeatpumpDescriptionResidentialArea</Name> - <X>20</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdHybridHeatpumpResidentialArea.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hybride warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1760349016817</Id> - <Name>sl_householdHybridHeatpumpResidentialArea</Name> - <X>260</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} - -f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1760349016828</Id> - <Name>i_householdHybridHeatPump</Name> - <X>180</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdHybridHeatpumpResidentialArea.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHybridHeatPump, zero_Interface.v_infoText.householdHybridHeatpump, i_householdHybridHeatPump.getX() + uI_Tabs.v_presentationXOffset, i_householdHybridHeatPump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1760349443892</Id> - <Name>t_householdElectricHeatPumpResidentialArea_pct1</Name> - <X>230</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdHybridHeatpumpResidentialArea.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdHybridHeatpumpResidentialArea.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Group> - <Rectangle> - <Id>1755004749570</Id> - <Name>rect_districtHeatingFunctions</Name> - <X>40</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-65536</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>390</Width> - <Height>150</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1755004766095</Id> - <Name>txt_districtheatingFunctionsDescription</Name> - <X>160</X> - <Y>810</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>District Heating Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1755004809972</Id> - <Name>rect_heatingProductionFunctions</Name> - <X>40</X> - <Y>960</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16711936</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>390</Width> - <Height>70</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1755004834735</Id> - <Name>txt_heatingProductionFunctionsDescription</Name> - <X>160</X> - <Y>970</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>District Heating Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1722245324895</Id> - <Name>tabMobility</Name> - <AdditionalClassCode>// Default Sliders -public ShapeGroup getGr_mobilitySliders_default() { - return this.gr_mobilitySliders_default; -} - -//Residential sliders -public ShapeGroup getGr_mobilitySliders_residential() { - return this.gr_mobilitySliders_residential; -} - -public ShapeSlider getSliderMobilityDemandReduction_pct () { - return this.sl_mobilityDemandReduction_pct; -} - -public ShapeSlider getSliderElectricTrucks_pct() { - return this.sl_electricTrucks_pct; -} - -public ShapeSlider getSliderHydrogenTrucks_pct() { - return this.sl_hydrogenTrucks_pct; -} - -public ShapeSlider getSliderFossilFuelTrucks_pct() { - return this.sl_fossilFuelTrucks_pct; -} - -public ShapeSlider getSliderElectricVans_pct() { - return this.sl_electricVans_pct; -} - -public ShapeSlider getSliderFossilFuelVans_pct() { - return this.sl_fossilFuelVans_pct; -} - -public ShapeSlider getSliderElectricCars_pct() { - return this.sl_electricCars_pct; -} - -public ShapeSlider getSliderFossilFuelCars_pct() { - return this.sl_fossilFuelCars_pct; -} - -public ShapeSlider getSl_privateEVsResidentialArea_pct(){ - return this.sl_privateEVsResidentialArea_pct; -} - -public ShapeSlider getSl_publicChargersResidentialArea_pct(){ - return this.sl_publicChargersResidentialArea_pct; -} -</AdditionalClassCode> - <Folder>1754045642067</Folder> - <Import>import org.apache.commons.lang3.tuple.Triple; -import java.util.stream.Collectors;</Import> - <ExtendsReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>tabArea</ClassName> - </ExtendsReference> - <Generic>false</Generic> - <GenericParameter> - <Id>1722245324901</Id> - <Name>1722245324901</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089976</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1722326400000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1722245324898</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1722245324902</CurrentLevel> - <ConnectionsId>1722245324896</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1729167973194</Id> - <Name>v_totalNumberOfGhostVehicle_Trucks</Name> - <X>40</X> - <Y>1140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1729168015819</Id> - <Name>v_totalNumberOfGhostVehicle_Vans</Name> - <X>40</X> - <Y>1120</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1729168016768</Id> - <Name>v_totalNumberOfGhostVehicle_Cars</Name> - <X>40</X> - <Y>1100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256088443</Id> - <Name>f_setVehicleSliders</Name> - <Description>Function that calculates the values of the other sliders and sets them without calling an action. Takes as parameters the index of the slider which should not be touched as well as all the slider objects. HydrogenVehicle slider is optional and an argument of null can be passed. </Description> - <X>70</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>sliderIndex</Name> - <Type>int</Type> - </Parameter> - <Parameter> - <Name>electricSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>hydrogenSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>fossilFuelSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pct_electric = electricSlider.getValue(); -double pct_hydrogen = 0; -double pct_fossilFuel = fossilFuelSlider.getValue(); -if (hydrogenSlider != null) { - pct_hydrogen = hydrogenSlider.getValue(); -} - - -//Set array with pct values -double pctArray[]={pct_electric, pct_hydrogen, pct_fossilFuel}; -double pctExcess = Arrays.stream(pctArray).sum() - 100; -for (int i = 0; i<pctArray.length; i++){ - if (!(i==(int)sliderIndex)) { - pctArray[i] = max(0,pctArray[i] - pctExcess); - pctExcess = Arrays.stream(pctArray).sum() - 100; - } -} -if (pctExcess != 0) { - traceln("Sliders don't add up to 100%!"); -} - -//Set Sliders -electricSlider.setValue(pctArray[0], false); -if (hydrogenSlider != null) { - hydrogenSlider.setValue(pctArray[1], false); -} -fossilFuelSlider.setValue(pctArray[2], false); - -/* -double pct_fossilFuel = fossilFuelSlider.getValue(); -double pct_electric = electricSlider.getValue(); -double pct_hydrogen = 0; -if (hydrogenSlider != null) { - pct_hydrogen = hydrogenSlider.getValue(); -} - - -//Set array with pct values -double pctArray[]={pct_fossilFuel, pct_electric, pct_hydrogen}; -double pctExcess = Arrays.stream(pctArray).sum() - 100; -for (int i = 0; i<pctArray.length; i++){ - if (!(i==(int)sliderIndex)) { - pctArray[i] = max(0,pctArray[i] - pctExcess); - pctExcess = Arrays.stream(pctArray).sum() - 100; - } -} -if (pctExcess != 0) { - traceln("Sliders don't add up to 100%!"); -} - -//Set Sliders -fossilFuelSlider.setValue(pctArray[0], false); -electricSlider.setValue(pctArray[1], false); -if (hydrogenSlider != null) { - hydrogenSlider.setValue(pctArray[2], false); -} -*/</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722342449665</Id> - <Name>f_setDemandReduction</Name> - <Description>Function that reduces the distance of all triptrackers of vehicles. Takes as arguments a list of GridConnections to effect and a percentage to reduce by compared to the default distance value of the triptrackers.</Description> - <X>70</X> - <Y>600</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>demandReduction_pct</Name> - <Type>double</Type> - </Parameter> - <Body>// TODO: when new triptrackers are created, for example in the company ui sliders, -// make sure they have this distance scaling fraction! - -double scalingFactor = 1 - demandReduction_pct/100; - -for (GridConnection gc : gcList) { - for (J_EAVehicle j_ea : gc.c_vehicleAssets) { - j_ea.getTripTracker().distanceScaling_fr = scalingFactor; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Triple<Integer, Integer, Integer></ReturnType> - <Id>1729168033110</Id> - <Name>f_calculateNumberOfGhostVehicles</Name> - <X>20</X> - <Y>1080</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>Integer numberOfGhostVehicle_Cars = 0; -Integer numberOfGhostVehicle_Vans = 0; -Integer numberOfGhostVehicle_Trucks = 0; - -for (GridConnection gc : gcList ) { - if(gc.v_hasQuarterHourlyValues && gc.v_isActive){ - numberOfGhostVehicle_Cars += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVCars(); - numberOfGhostVehicle_Vans += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVVans(); - numberOfGhostVehicle_Trucks += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVTrucks(); - } -} - - -return Triple.of(numberOfGhostVehicle_Cars, numberOfGhostVehicle_Vans, numberOfGhostVehicle_Trucks);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1746008458894</Id> - <Name>f_setDieselTrucks</Name> - <X>70</X> - <Y>770</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctDieselTrucksGoal = sliderFossilFuelTrucks.getValue(); - -int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); - -int nbEtruckCurrent = triple.getLeft(); -int nbHydrogentrucksCurrent = triple.getMiddle(); -int nbDieseltrucksCurrent = triple.getRight(); -int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; - -int nbDieselTrucksGoal = roundToInt(total_vehicles*pctDieselTrucksGoal/100.0); -boolean finishedLookingThroughElectricTrucks = false; - -if (nbDieseltrucksCurrent < nbDieselTrucksGoal) { - // Add Diesel Trucks - while ( nbDieseltrucksCurrent < nbDieselTrucksGoal ) { - if ( nbEtruckCurrent > numberOfGhostVehicle_Trucks && !finishedLookingThroughElectricTrucks ) { - // replace electric truck with a diesel truck - if (!f_electricToDieselTruck(gcList)) { - finishedLookingThroughElectricTrucks = true; - } - else { - nbDieseltrucksCurrent++; - nbEtruckCurrent--; - } - } - else{// ( nbHydrogentrucksCurrent > 0 ) { - // replace hydrogen truck with diesel truck - if (!f_hydrogenToDieselTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbDieseltrucksCurrent++; - nbHydrogentrucksCurrent--; - } - /* - else { - throw new RuntimeException("Can not add another diesel vehicle as there are no other vehicles to replace."); - } - */ - } -} -else { - // Remove Diesel Trucks - while ( nbDieseltrucksCurrent > nbDieselTrucksGoal ) { - // replace a diesel truck with an electric truck - if (!f_dieselToElectricTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbDieseltrucksCurrent--; - nbEtruckCurrent++; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1746008458907</Id> - <Name>f_setHydrogenTrucks</Name> - <X>70</X> - <Y>790</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctHydrogenTrucksGoal = sliderHydrogenTrucks.getValue(); - -int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); - -int nbEtruckCurrent = triple.getLeft(); -int nbHydrogentrucksCurrent = triple.getMiddle(); -int nbDieseltrucksCurrent = triple.getRight(); -int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; - -int nbHydrogenTrucksGoal = roundToInt(total_vehicles*pctHydrogenTrucksGoal/100.0); -boolean finishedLookingThroughDieselTrucks = false; - -if (nbHydrogentrucksCurrent < nbHydrogenTrucksGoal) { - // Add Hydrogen Trucks - while ( nbHydrogentrucksCurrent < nbHydrogenTrucksGoal && !finishedLookingThroughDieselTrucks ) { - if ( nbDieseltrucksCurrent > 0 ) { - // replace a diesel truck with a hydrogen truck - if (!f_dieselToHydrogenTruck(gcList)) { - finishedLookingThroughDieselTrucks = true; - } - else { - nbHydrogentrucksCurrent++; - nbDieseltrucksCurrent--; - } - } - else{// ( nbEtruckCurrent > v_totalNumberOfGhostVehicle_Trucks ) { - // replace an electric truck with a hydrogen truck - if (!f_electricToHydrogenTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbHydrogentrucksCurrent++; - nbEtruckCurrent--; - } - /*else { - throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); - }*/ - } -} -else { - // Remove Hydrogen Trucks - while ( nbHydrogentrucksCurrent > nbHydrogenTrucksGoal ) { - // replace a hydrogen truck with a diesel truck - if (!f_hydrogenToDieselTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbHydrogentrucksCurrent--; - nbDieseltrucksCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1746008458917</Id> - <Name>f_setElectricTrucks</Name> - <X>70</X> - <Y>810</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctElectricTrucksGoal = sliderElectricTrucks.getValue(); - -int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); - -int nbEtruckCurrent = triple.getLeft(); -int nbHydrogentrucksCurrent = triple.getMiddle(); -int nbDieseltrucksCurrent = triple.getRight(); -int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; - -int nbElectricTrucksGoal = roundToInt(total_vehicles*pctElectricTrucksGoal/100.0); -boolean finishedLookingThroughDieselTrucks = false; - -if (nbEtruckCurrent < nbElectricTrucksGoal) { - // Add Electric Trucks - while ( nbEtruckCurrent < nbElectricTrucksGoal && !finishedLookingThroughDieselTrucks ) { - if ( nbDieseltrucksCurrent > 0 ) { - // replace a diesel truck with an electric truck - if (!f_dieselToElectricTruck(gcList)) { - finishedLookingThroughDieselTrucks = true; - } - else { - nbEtruckCurrent++; - nbDieseltrucksCurrent--; - } - } - else{// if ( nbHydrogentrucksCurrent > 0 ) { - // replace a hydrogen truck with an electric truck - if (!f_hydrogenToElectricTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbEtruckCurrent++; - nbHydrogentrucksCurrent--; - } - /*else { - throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); - } - */ - } -} -else { - // Remove Electric Trucks - while ( nbEtruckCurrent > nbElectricTrucksGoal ) { - // replace an electric truck with a diesel truck - if (!f_electricToDieselTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbEtruckCurrent--; - nbDieseltrucksCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458938</Id> - <Name>f_dieselToElectricTruck</Name> - <X>360</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EADieselVehicle dieselTruck = null; -boolean foundAdditionalVehicle = false; - -// find the diesel truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); - if ( dieselTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselTruck!=null) { - GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; - boolean available = dieselTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselTruck); - dieselTruck.removeEnergyAsset(); - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); - electricTruck.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricTruck); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricTruck); - } -} - -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458950</Id> - <Name>f_hydrogenToElectricTruck</Name> - <X>360</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAHydrogenVehicle hydrogenTruck = null; -boolean foundAdditionalVehicle = false; - -// find the hydrogen truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); - if ( hydrogenTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (hydrogenTruck!=null) { - GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; - boolean available = true; - available = hydrogenTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenTruck); - hydrogenTruck.removeEnergyAsset(); - - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); - electricTruck.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricTruck); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricTruck); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458960</Id> - <Name>f_electricToHydrogenTruck</Name> - <X>360</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAEV electricTruck = null; -boolean foundAdditionalVehicle = false; - -// find the electric truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - electricTruck = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); - if ( electricTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicle -if (!foundAdditionalVehicle) { - electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (electricTruck!=null) { - GridConnection gc = (GridConnection)electricTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; - boolean available = true; - available = electricTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricTruck); - electricTruck.removeEnergyAsset(); - - // Re-add hydrogen vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); - hydrogenVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(hydrogenVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458968</Id> - <Name>f_dieselToHydrogenTruck</Name> - <X>360</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EADieselVehicle dieselTruck = null; -boolean foundAdditionalVehicle = false; - -// find the diesel truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); - if ( dieselTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselTruck!=null) { - GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; - boolean available = true; - available = dieselTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselTruck); - dieselTruck.removeEnergyAsset(); - - // Re-add hydrogen vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); - hydrogenVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(hydrogenVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458977</Id> - <Name>f_electricToDieselTruck</Name> - <X>360</X> - <Y>840</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAEV electricTruck = null; -boolean foundAdditionalVehicle = false; - -// find the electric truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - electricTruck = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); - if ( electricTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( electricTruck != null ) { - GridConnection gc = (GridConnection)electricTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; - boolean available = true; - available = electricTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricTruck); - electricTruck.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458987</Id> - <Name>f_hydrogenToDieselTruck</Name> - <X>360</X> - <Y>860</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAHydrogenVehicle hydrogenTruck = null; -boolean foundAdditionalVehicle = false; - -// find the hydrogen truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); - if ( hydrogenTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( hydrogenTruck != null ) { - GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; - boolean available = true; - available = hydrogenTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenTruck); - hydrogenTruck.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1746018501114</Id> - <Name>f_setTruckSlidersToCurrentEngineState</Name> - <X>360</X> - <Y>1040</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); -for (GridConnection gc : gcList) { - if (gc.v_isActive) { - vehicles.addAll(gc.c_vehicleAssets); - } -} - -int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); - -int nbElectricTrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Trucks; -int nbDieseltrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); -int nbHydrogentrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); - -int totalVehicles = nbElectricTrucksCurrent + nbDieseltrucksCurrent + nbHydrogentrucksCurrent; - - - -int pct_electricTruckSlider = roundToInt(100.0*nbElectricTrucksCurrent/totalVehicles); -int pct_hydrogenTruckSlider = roundToInt(100.0*nbHydrogentrucksCurrent/totalVehicles); -int pct_dieselTruckSlider = roundToInt(100.0*nbDieseltrucksCurrent/totalVehicles); - -sliderElectricTrucks.setValue(pct_electricTruckSlider, false); -if ( sliderHydrogenTrucks != null ) { - sliderHydrogenTrucks.setValue(pct_hydrogenTruckSlider, false); -} -else if ( sliderHydrogenTrucks == null && pct_hydrogenTruckSlider != 0 ) { - throw new RuntimeException("Hydrogen trucks found but no hydrogen slider passed to f_setTruckSlidersToCurrentEngineState"); -}sliderFossilFuelTrucks.setValue(pct_dieselTruckSlider, false); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Triple<Integer, Integer, Integer></ReturnType> - <Id>1749134655530</Id> - <Name>f_calculateCurrentNumberOfTrucks</Name> - <X>20</X> - <Y>1040</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>numberOfGhostVehicle_Trucks</Name> - <Type>Integer</Type> - </Parameter> - <Body>if (numberOfGhostVehicle_Trucks == null) { - numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); -} - -int nbEtruckCurrent = numberOfGhostVehicle_Trucks; -int nbHydrogenTrucksCurrent = 0; -int nbDieselTrucksCurrent = 0; -for ( GridConnection gc : gcList ) { - nbEtruckCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(gc instanceof GCPublicCharger) && gc.v_isActive); - nbHydrogenTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && gc.v_isActive); - nbDieselTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && gc.v_isActive); -} - -return Triple.of(nbEtruckCurrent, nbHydrogenTrucksCurrent, nbDieselTrucksCurrent);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1749645625091</Id> - <Name>f_dieselToElectricVan</Name> - <X>590</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EADieselVehicle dieselVan = null; -boolean foundAdditionalVehicle = false; - -// find the diesel van to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - dieselVan = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); - if ( dieselVan != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselVan = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselVan!=null) { - GridConnection gc = (GridConnection)dieselVan.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = dieselVan.tripTracker; - boolean available = dieselVan.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVan); - dieselVan.removeEnergyAsset(); - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerVan_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageVan_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricVan = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VAN, tripTracker); - electricVan.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricVan); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricVan); - } -} - -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel van left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1749645629101</Id> - <Name>f_electricToDieselVan</Name> - <X>590</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAEV electricVan = null; -boolean foundAdditionalVehicle = false; - -// find the electric van to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - electricVan = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN); - if ( electricVan != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - electricVan = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( electricVan != null ) { - GridConnection gc = (GridConnection)electricVan.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = electricVan.tripTracker; - boolean available = true; - available = electricVan.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricVan); - electricVan.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VAN, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric van left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1749646233660</Id> - <Name>f_dieselToElectricCar</Name> - <X>590</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EADieselVehicle dieselCar = null; -boolean foundAdditionalVehicle = false; - -// find the diesel car to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - dieselCar = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); - if ( dieselCar != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselCar = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselCar!=null) { - GridConnection gc = (GridConnection)dieselCar.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = dieselCar.tripTracker; - boolean available = dieselCar.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselCar); - dieselCar.removeEnergyAsset(); - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerCar_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageCar_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricCar = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VEHICLE, tripTracker); - electricCar.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricCar); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricCar); - } -} - -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel car left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1749646235580</Id> - <Name>f_electricToDieselCar</Name> - <X>590</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAEV electricCar = null; -boolean foundAdditionalVehicle = false; - -// find the electric car to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - electricCar = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); - if ( electricCar != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - electricCar = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( electricCar != null ) { - GridConnection gc = (GridConnection)electricCar.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = electricCar.tripTracker; - boolean available = true; - available = electricCar.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricCar); - electricCar.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VEHICLE, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric car left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Triple<Integer, Integer, Integer></ReturnType> - <Id>1749655535164</Id> - <Name>f_calculateCurrentNumberOfVans</Name> - <X>20</X> - <Y>1020</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>numberOfGhostVehicle_Vans</Name> - <Type>Integer</Type> - </Parameter> - <Body>if (numberOfGhostVehicle_Vans == null) { - numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -} - -int nbEVansCurrent = numberOfGhostVehicle_Vans; -int nbHydrogenVansCurrent = 0; -int nbDieselVansCurrent = 0; -for ( GridConnection gc : gcList ) { - nbEVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(gc instanceof GCPublicCharger) && gc.v_isActive); - nbHydrogenVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN && gc.v_isActive); - nbDieselVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && gc.v_isActive); -} - -return Triple.of(nbEVansCurrent, nbHydrogenVansCurrent, nbDieselVansCurrent);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Triple<Integer, Integer, Integer></ReturnType> - <Id>1749655667960</Id> - <Name>f_calculateCurrentNumberOfCars</Name> - <X>20</X> - <Y>1000</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>numberOfGhostVehicle_Cars</Name> - <Type>Integer</Type> - </Parameter> - <Body>if (numberOfGhostVehicle_Cars == null) { - numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -} - -int nbEVsCurrent = numberOfGhostVehicle_Cars; -int nbHydrogenCarsCurrent = 0; -int nbDieselCarsCurrent = 0; -for ( GridConnection gc : gcList ) { - nbEVsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(gc instanceof GCPublicCharger) && gc.v_isActive); - nbHydrogenCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE && gc.v_isActive); - nbDieselCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && gc.v_isActive); -} - -return Triple.of(nbEVsCurrent, nbHydrogenCarsCurrent, nbDieselCarsCurrent);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749655752858</Id> - <Name>f_setDieselVans</Name> - <X>70</X> - <Y>840</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctDieselVansGoal = sliderFossilFuelVans.getValue(); - -int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); - -int nbEvanCurrent = triple.getLeft(); -int nbDieselvansCurrent = triple.getRight(); - -int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; - -int nbDieselVansGoal = roundToInt(total_vehicles*pctDieselVansGoal/100.0); - -if (nbDieselvansCurrent < nbDieselVansGoal) { - // Add Diesel Vans - while ( nbDieselvansCurrent < nbDieselVansGoal ) { - if ( nbEvanCurrent > numberOfGhostVehicle_Vans ) { - // replace electric van with a diesel van - if (!f_electricToDieselVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - else { - nbDieselvansCurrent++; - nbEvanCurrent--; - } - } - } -} -else { - // Remove Diesel Vans - while ( nbDieselvansCurrent > nbDieselVansGoal ) { - // replace a diesel van with an electric van - if (!f_dieselToElectricVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - nbDieselvansCurrent--; - nbEvanCurrent++; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749656346356</Id> - <Name>f_setElectricVans</Name> - <X>70</X> - <Y>860</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctElectricVansGoal = sliderElectricVans.getValue(); - -int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); - -int nbEvanCurrent = triple.getLeft(); -int nbDieselvansCurrent = triple.getRight(); - -int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; - -int nbElectricVansGoal = roundToInt(total_vehicles*pctElectricVansGoal/100.0); - -if (nbEvanCurrent < nbElectricVansGoal) { - // Add Electric Vans - while ( nbEvanCurrent < nbElectricVansGoal ) { - if ( nbDieselvansCurrent > 0 ) { - // replace a diesel van with an electric van - if (!f_dieselToElectricVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - else { - nbEvanCurrent++; - nbDieselvansCurrent--; - } - } - } -} -else { - // Remove Electric Vans - while ( nbEvanCurrent > nbElectricVansGoal ) { - // replace an electric van with a diesel van - if (!f_electricToDieselVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - nbEvanCurrent--; - nbDieselvansCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749717776391</Id> - <Name>f_setDieselCars</Name> - <X>70</X> - <Y>890</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctDieselCarsGoal = sliderFossilFuelCars.getValue(); - -int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); - -int nbEcarCurrent = triple.getLeft(); -int nbDieselcarsCurrent = triple.getRight(); - -int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; - -int nbDieselCarsGoal = roundToInt(total_vehicles*pctDieselCarsGoal/100.0); - -if (nbDieselcarsCurrent < nbDieselCarsGoal) { - // Add Diesel Cars - while ( nbDieselcarsCurrent < nbDieselCarsGoal ) { - if ( nbEcarCurrent > numberOfGhostVehicle_Cars ) { - // replace electric car with a diesel car - if (!f_electricToDieselCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - else { - nbDieselcarsCurrent++; - nbEcarCurrent--; - } - } - } -} -else { - // Remove Diesel Cars - while ( nbDieselcarsCurrent > nbDieselCarsGoal ) { - // replace a diesel car with an electric car - if (!f_dieselToElectricCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - nbDieselcarsCurrent--; - nbEcarCurrent++; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749717779317</Id> - <Name>f_setElectricCars</Name> - <X>70</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctElectricCarsGoal = sliderElectricCars.getValue(); - -int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); - -int nbEcarCurrent = triple.getLeft(); -int nbDieselcarsCurrent = triple.getRight(); - -int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; - -int nbElectricCarsGoal = roundToInt(total_vehicles*pctElectricCarsGoal/100.0); - -if (nbEcarCurrent < nbElectricCarsGoal) { - // Add Electric Cars - while ( nbEcarCurrent < nbElectricCarsGoal ) { - if ( nbDieselcarsCurrent > 0 ) { - // replace a diesel car with an electric car - if (!f_dieselToElectricCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - else { - nbEcarCurrent++; - nbDieselcarsCurrent--; - } - } - } -} -else { - // Remove Electric Cars - while ( nbEcarCurrent > nbElectricCarsGoal ) { - // replace an electric car with a diesel car - if (!f_electricToDieselCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - nbEcarCurrent--; - nbDieselcarsCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749717909708</Id> - <Name>f_setVanSlidersToCurrentEngineState</Name> - <X>360</X> - <Y>1020</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); -for (GridConnection gc : gcList) { - if (gc.v_isActive) { - vehicles.addAll(gc.c_vehicleAssets); - } -} - -int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getRight(); - -int nbElectricVansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Vans; -int nbDieselvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); -int nbHydrogenvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); - -int totalVehicles = nbElectricVansCurrent + nbDieselvansCurrent + nbHydrogenvansCurrent; - - - -int pct_electricVanSlider = roundToInt(100.0*nbElectricVansCurrent/totalVehicles); -int pct_hydrogenVanSlider = roundToInt(100.0*nbHydrogenvansCurrent/totalVehicles); -int pct_dieselVanSlider = roundToInt(100.0*nbDieselvansCurrent/totalVehicles); - -sliderElectricVans.setValue(pct_electricVanSlider, false); -if ( sliderHydrogenVans != null ) { - sliderHydrogenVans.setValue(pct_hydrogenVanSlider, false); -} -else if ( sliderHydrogenVans == null && pct_hydrogenVanSlider != 0 ) { - throw new RuntimeException("Hydrogen vans found but no hydrogen slider passed to f_setVanSlidersToCurrentEngineState"); -} -sliderFossilFuelVans.setValue(pct_dieselVanSlider, false); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749717987139</Id> - <Name>f_setCarSlidersToCurrentEngineState</Name> - <X>360</X> - <Y>1000</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); -for (GridConnection gc : gcList) { - if (gc.v_isActive) { - vehicles.addAll(gc.c_vehicleAssets); - } -} - -int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getRight(); - -int nbElectricCarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Cars; -int nbDieselcarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); -int nbHydrogencarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); - -int totalVehicles = nbElectricCarsCurrent + nbDieselcarsCurrent + nbHydrogencarsCurrent; - - - -int pct_electricCarSlider = roundToInt(100.0*nbElectricCarsCurrent/totalVehicles); -int pct_hydrogenCarSlider = roundToInt(100.0*nbHydrogencarsCurrent/totalVehicles); -int pct_dieselCarSlider = roundToInt(100.0*nbDieselcarsCurrent/totalVehicles); - -sliderElectricCars.setValue(pct_electricCarSlider, false); -if ( sliderHydrogenCars != null ) { - sliderHydrogenCars.setValue(pct_hydrogenCarSlider, false); -} -else if ( sliderHydrogenCars == null && pct_hydrogenCarSlider != 0 ) { - throw new RuntimeException("Hydrogen cars found but no hydrogen slider passed to f_setCarSlidersToCurrentEngineState"); -} -sliderFossilFuelCars.setValue(pct_dieselCarSlider, false); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754928402690</Id> - <Name>f_updateSliders_Mobility</Name> - <X>-350</X> - <Y>40</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>Triple<Integer, Integer, Integer> triple = f_calculateNumberOfGhostVehicles( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()) ); -v_totalNumberOfGhostVehicle_Cars = triple.getLeft(); -v_totalNumberOfGhostVehicle_Vans = triple.getMiddle(); -v_totalNumberOfGhostVehicle_Trucks = triple.getRight(); - - -if(gr_mobilitySliders_default.isVisible()){ - f_updateMobilitySliders_default(); -} -else if(gr_mobilitySliders_residential.isVisible()){ - f_updateMobilitySliders_residential(); -} -else{ - f_updateMobilitySliders_custom(); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754928402694</Id> - <Name>f_updateMobilitySliders_default</Name> - <X>-330</X> - <Y>60</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GridConnection> allConsumerGridConnections = uI_Tabs.f_getActiveSliderGridConnections_consumption(); - -////Savings -double totalBaseTravelDistance_km = 0; -double totalSavedTravelDistance_km = 0; -for(GridConnection GC : allConsumerGridConnections){ - if(GC.v_isActive){ - for(J_ActivityTrackerTrips tripTracker : GC.c_tripTrackers){ - totalBaseTravelDistance_km += tripTracker.getAnnualDistance_km(); - totalSavedTravelDistance_km += (1-tripTracker.getDistanceScaling_fr())*tripTracker.getAnnualDistance_km(); - } - } -} - -double mobilitySavings_pct = totalBaseTravelDistance_km > 0 ? (totalSavedTravelDistance_km/totalBaseTravelDistance_km * 100) : 0; -sl_mobilityDemandReduction_pct.setValue(roundToInt(mobilitySavings_pct), false); - - -//Smart charging -boolean smartCharging = false; -for(GridConnection GC : allConsumerGridConnections){ - if(GC.c_electricVehicles.size() > 0 && GC.f_getCurrentChargingType() != OL_ChargingAttitude.SIMPLE){ - smartCharging = true; - break; - } -} -cb_spreadChargingEVs.setSelected(smartCharging, false); - - -////Vehicles -// Initialize the vehicle counters -int DieselCars = 0; -int ElectricCars = v_totalNumberOfGhostVehicle_Cars; -int HydrogenCars = 0; - -int DieselVans = 0; -int ElectricVans = v_totalNumberOfGhostVehicle_Vans; -int HydrogenVans = 0; - -int DieselTrucks = 0; -int ElectricTrucks = v_totalNumberOfGhostVehicle_Trucks; -int HydrogenTrucks = 0; - -//Count the amount of vehicles for each type -for (GridConnection gc : allConsumerGridConnections) { - if(gc.v_isActive){ - for (J_EAVehicle vehicle : gc.c_vehicleAssets) { - if (vehicle instanceof J_EADieselVehicle){ - switch(vehicle.getEAType()){ - case DIESEL_VEHICLE: - DieselCars += 1; - break; - case DIESEL_VAN: - DieselVans += 1; - break; - case DIESEL_TRUCK: - DieselTrucks += 1; - break; - } - } - else if (vehicle instanceof J_EAEV){ - switch(vehicle.getEAType()){ - case ELECTRIC_VEHICLE: - ElectricCars += 1; - break; - case ELECTRIC_VAN: - ElectricVans += 1; - break; - case ELECTRIC_TRUCK: - ElectricTrucks += 1; - break; - } - } - else if (vehicle instanceof J_EAHydrogenVehicle){ - switch(vehicle.getEAType()){ - case HYDROGEN_VEHICLE: - HydrogenCars += 1; - break; - case HYDROGEN_VAN: - HydrogenVans += 1; - break; - case HYDROGEN_TRUCK: - HydrogenTrucks += 1; - break; - } - } - } - } -} - - -//Set CAR sliders -int totalCars = DieselCars + ElectricCars + HydrogenCars; -int DieselCars_pct = 0; -int ElectricCars_pct = 0; -int HydrogenCars_pct = 0; -if (totalCars != 0) { - DieselCars_pct = roundToInt((100.0 * DieselCars) / totalCars); - ElectricCars_pct = roundToInt((100.0 * ElectricCars) / totalCars); - HydrogenCars_pct = roundToInt((100.0 * HydrogenCars) / totalCars); -} -else{ - sl_fossilFuelCars_pct.setEnabled(false); - sl_electricCars_pct.setEnabled(false); -} -sl_fossilFuelCars_pct.setValue(DieselCars_pct, false); -sl_electricCars_pct.setValue(ElectricCars_pct, false); - - -//Set VAN sliders -int totalVans = DieselVans + ElectricVans + HydrogenVans; -int DieselVans_pct = 0; -int ElectricVans_pct = 0; -int HydrogenVans_pct = 0; -if (totalVans != 0) { - DieselVans_pct = roundToInt(100.0 * DieselVans / totalVans); - ElectricVans_pct = roundToInt(100.0 * ElectricVans / totalVans); - HydrogenVans_pct = roundToInt(100.0 * HydrogenVans / totalVans); -} -else{ - sl_fossilFuelVans_pct.setEnabled(false); - sl_electricVans_pct.setEnabled(false); -} -sl_fossilFuelVans_pct.setValue(DieselVans_pct, false); -sl_electricVans_pct.setValue(ElectricVans_pct, false); - - -//Set TRUCK sliders -int totalTrucks = DieselTrucks + ElectricTrucks + HydrogenTrucks; -int DieselTrucks_pct = 0; -int ElectricTrucks_pct = 0; -int HydrogenTrucks_pct = 0; -if (totalTrucks != 0) { - DieselTrucks_pct = roundToInt(100.0 * DieselTrucks / totalTrucks); - ElectricTrucks_pct = roundToInt(100.0 * ElectricTrucks / totalTrucks); - HydrogenTrucks_pct = roundToInt(100.0 * HydrogenTrucks / totalTrucks); -} -else{ - sl_fossilFuelTrucks_pct.setEnabled(false); - sl_electricTrucks_pct.setEnabled(false); - sl_hydrogenTrucks_pct.setEnabled(false); -} -sl_fossilFuelTrucks_pct.setValue(DieselTrucks_pct, false); -sl_electricTrucks_pct.setValue(ElectricTrucks_pct, false); -sl_hydrogenTrucks_pct.setValue(HydrogenTrucks_pct, false);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754928402700</Id> - <Name>f_updateMobilitySliders_custom</Name> - <X>-330</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//If you have a custom tab, -//override this function to make it update automatically -traceln("Forgot to override the update custom electricity sliders functionality");</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754990674760</Id> - <Name>f_setChargingAttitude</Name> - <X>65</X> - <Y>655</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>selectedChargingAttitude</Name> - <Type>OL_ChargingAttitude</Type> - </Parameter> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>gcList.forEach(x -> x.f_addChargingManagement(selectedChargingAttitude)); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183013077</Id> - <Name>f_updateMobilitySliders_residential</Name> - <X>-330</X> - <Y>80</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>////Private EV -gr_activateV2GPrivateParkedCars.setVisible(false); -cb_activateV2GPrivateParkedCars.setSelected(false, false); -gr_settingsV2G_privateParkedCars.setVisible(false); - -List<GCHouse> houseGridConnectionsWithPrivateParking = findAll(uI_Tabs.f_getActiveSliderGridConnections_houses(), house -> house.p_eigenOprit); -List<J_EAVehicle> privateParkedCars = new ArrayList<J_EAVehicle>(); -houseGridConnectionsWithPrivateParking.forEach(gc -> privateParkedCars.addAll(gc.c_vehicleAssets)); - -if (privateParkedCars.size() > 0) { - int nbPrivateEVs = count(privateParkedCars, x -> x instanceof J_EAEV); - int nbPrivateEVsThatSupportV2G = count(privateParkedCars, x -> x instanceof J_EAEV && ((J_EAEV)x).getV2GCapable()); - double privateEVs_pct = 100.0 * nbPrivateEVs / privateParkedCars.size(); - double privateEVsThatSupportV2G_pct = 100.0 * nbPrivateEVsThatSupportV2G / nbPrivateEVs; - sl_privateEVsResidentialArea_pct.setValue(roundToInt(privateEVs_pct), false); - sl_EVsThatSupportV2G_pct.setValue(roundToInt(privateEVsThatSupportV2G_pct), false); - - //Selected charging mode - GCHouse GCWithPrivateParkedEV = findFirst(houseGridConnectionsWithPrivateParking, gc -> gc.c_electricVehicles.size() > 0); - OL_ChargingAttitude currentChargingAttitude = (GCWithPrivateParkedEV != null) ? GCWithPrivateParkedEV.f_getCurrentChargingType() : OL_ChargingAttitude.SIMPLE; - boolean V2GActive = (GCWithPrivateParkedEV != null) ? GCWithPrivateParkedEV.f_getV2GActive() : false; - for(GridConnection GC : houseGridConnectionsWithPrivateParking){ - if(GC.c_electricVehicles.size() > 0 ){ - if(currentChargingAttitude != OL_ChargingAttitude.CUSTOM && GC.f_getCurrentChargingType() != currentChargingAttitude){ - currentChargingAttitude = OL_ChargingAttitude.CUSTOM; // Here used as varied: in other words: custom setting - } - if(V2GActive && !GC.f_getV2GActive()){ - V2GActive = false; - } - } - - if(currentChargingAttitude == OL_ChargingAttitude.CUSTOM && !V2GActive){ - break; - } - - } - - String selectedChargingAttitudeString = ""; - switch(currentChargingAttitude){ - case SIMPLE: - selectedChargingAttitudeString = "Niet slim laden"; - break; - case PRICE: - selectedChargingAttitudeString = "Slim laden: Prijs gestuurd"; - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - case BALANCE_LOCAL: - selectedChargingAttitudeString = "Slim laden: Netbewust"; - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - case CUSTOM: - selectedChargingAttitudeString = "Gevarieerd"; - break; - } - - cb_chargingAttitudePrivateParkedCars.setValue(selectedChargingAttitudeString, false); - cb_activateV2GPrivateParkedCars.setSelected(V2GActive, false); - - if(gr_activateV2GPrivateParkedCars.isVisible() && V2GActive){ - gr_settingsV2G_privateParkedCars.setVisible(true); - } -} -else{ - sl_privateEVsResidentialArea_pct.setEnabled(false); -} - -////Chargers -OL_ChargingAttitude selectedChargingAttitude = null; -gr_activateV2GPublicChargers.setVisible(false); -cb_activateV2GPublicChargers.setSelected(false, false); -gr_settingsV1G_publicChargers.setVisible(false); -gr_settingsV2G_publicChargers.setVisible(false); - -List<GCPublicCharger> activeChargerGridConnections = uI_Tabs.f_getSliderGridConnections_chargers(); -List<GCPublicCharger> pausedChargerGridConnections = uI_Tabs.f_getPausedSliderGridConnections_chargers(); -List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); -activeChargerGridConnections.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); - - -int nbPublicChargerGC = activeChargerGridConnections.size() + pausedChargerGridConnections.size(); - -if(nbPublicChargerGC > 0 ){ - int nbActivePublicChargersGC = activeChargerGridConnections.size(); - double activePublicChargers_pct = 100.0 * nbActivePublicChargersGC / nbPublicChargerGC; - sl_publicChargersResidentialArea_pct.setValue(roundToInt(activePublicChargers_pct), false); - - int nbV1GChargers = count(activeChargersEA, x -> x.getV1GCapable()); - int nbV2GChargers =count(activeChargersEA, x -> x.getV2GCapable()); - int nbPublicChargers = activeChargersEA.size(); - - double V1G_pct = 100.0 * nbV1GChargers / nbPublicChargers; - double V2G_pct = 100.0 * nbV2GChargers / nbPublicChargers; - sl_chargersThatSupportV1G_pct.setValue(roundToInt(V1G_pct), false); - sl_chargersThatSupportV2G_pct.setValue(roundToInt(V2G_pct), false); - - //Selected charging mode - OL_ChargingAttitude currentChargingAttitude = activeChargersEA.size() > 0 ? activeChargersEA.get(0).getChargingAttitude(): OL_ChargingAttitude.SIMPLE; - boolean V2GActive = activeChargersEA.size() > 0 ? activeChargersEA.get(0).getV2GActive(): false; - for(J_EAChargePoint charger : activeChargersEA){ - if(currentChargingAttitude != OL_ChargingAttitude.CUSTOM && charger.getChargingAttitude() != currentChargingAttitude){ - currentChargingAttitude = OL_ChargingAttitude.CUSTOM; // Here used as varied: in other words: custom setting - } - if(V2GActive && !charger.getV2GActive()){ - V2GActive = false; - } - - if(currentChargingAttitude == OL_ChargingAttitude.CUSTOM && !V2GActive){ - break; - } - } - - String selectedChargingAttitudeString = ""; - switch(currentChargingAttitude){ - case SIMPLE: - selectedChargingAttitudeString = "Niet slim laden"; - break; - case PRICE: - selectedChargingAttitudeString = "Slim laden: Prijs gestuurd"; - gr_settingsV1G_publicChargers.setVisible(true); - gr_activateV2GPublicChargers.setVisible(true); - break; - case BALANCE_GRID: - selectedChargingAttitudeString = "Slim laden: Netbewust"; - gr_settingsV1G_publicChargers.setVisible(true); - gr_activateV2GPublicChargers.setVisible(true); - break; - case CUSTOM: - selectedChargingAttitudeString = "Gevarieerd"; - break; - } - - cb_chargingAttitudePrivatePublicChargers.setValue(selectedChargingAttitudeString, false); - cb_activateV2GPublicChargers.setSelected(V2GActive, false); - - if(gr_activateV2GPublicChargers.isVisible() && V2GActive){ - gr_settingsV2G_publicChargers.setVisible(true); - } -} -else{ - sl_publicChargersResidentialArea_pct.setEnabled(false); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183975214</Id> - <Name>f_setPublicChargingStations</Name> - <X>480</X> - <Y>605</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListChargers</Name> - <Type>List<GCPublicCharger></Type> - </Parameter> - <Parameter> - <Name>publicChargers_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>V1GCapableChargerSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>V2GCapableChargerSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>int totalNbChargers = gcListChargers.size(); -int currentNbChargers = count(gcListChargers, x -> x.v_isActive); -int nbChargersGoal = roundToInt(publicChargers_pct / 100 * totalNbChargers) ; - -while ( currentNbChargers > nbChargersGoal ) { - GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> x.v_isActive); - if (gc != null) { - gc.f_setActive(false); - zero_Interface.c_orderedPublicChargers.remove(gc); - zero_Interface.c_orderedPublicChargers.add(0, gc); - currentNbChargers--; - - for (J_EADieselVehicle car : zero_Interface.c_mappingOfVehiclesPerCharger.get(gc.p_uid)) { - car.reRegisterEnergyAsset(); - } - } - else { - throw new RuntimeException("Charger slider error: there are not sufficient chargers to remove"); - } -} -while ( currentNbChargers < nbChargersGoal){ - GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> !x.v_isActive); - if (gc != null) { - gc.f_setActive(true); - zero_Interface.c_orderedPublicChargers.remove(gc); - zero_Interface.c_orderedPublicChargers.add(0, gc); - currentNbChargers++; - - for (J_EADieselVehicle car : zero_Interface.c_mappingOfVehiclesPerCharger.get(gc.p_uid)) { - J_ActivityTrackerTrips tripTracker = car.getTripTracker(); //Needed, as triptracker is removed when removeEnergyAsset is called. - car.removeEnergyAsset(); - car.setTripTracker(tripTracker);//Re-set the triptracker again, for storing. - } - } - else { - throw new RuntimeException("Charger slider error: there are no more chargers to add"); - } -} - -//Update the V1G and V2G capable vehicle slider accordingly to the change in vehicle dynamics -int totalActiveChargers = 0; -int totalCapableV1GChargers = 0; -int totalCapableV2GChargers = 0; - -for(GCPublicCharger GC : gcListChargers){ - if(GC.v_isActive){ - for(J_EAChargePoint charger : GC.c_chargers){ - totalActiveChargers++; - if(charger.getV1GCapable()){ - totalCapableV1GChargers++; - } - if(charger.getV2GCapable()){ - totalCapableV2GChargers++; - } - } - - } -} -V1GCapableChargerSlider.setValue(roundToInt(100.0 * totalCapableV1GChargers/totalActiveChargers)); -V2GCapableChargerSlider.setValue(roundToInt(100.0 * totalCapableV2GChargers/totalActiveChargers)); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings(); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183975221</Id> - <Name>f_setV1GChargerCapabilities</Name> - <X>480</X> - <Y>545</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListChargers</Name> - <Type>List<GCPublicCharger></Type> - </Parameter> - <Parameter> - <Name>goal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); -gcListChargers.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); - -int totalNbChargers = activeChargersEA.size(); -int currentNbChargers = count(activeChargersEA, x -> x.getV1GCapable()); -int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); - -while (currentNbChargers < nbChargersGoal) { - J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> activeChargersEA.contains(x) && !x.getV1GCapable()); - j_ea.setV1GCapability(true); - currentNbChargers++; - zero_Interface.c_orderedV1GChargers.remove(j_ea); - zero_Interface.c_orderedV1GChargers.add(0, j_ea); - -} -while (currentNbChargers > nbChargersGoal) { - J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> activeChargersEA.contains(x) && x.getV1GCapable()); - j_ea.setV1GCapability(false); - currentNbChargers--; - zero_Interface.c_orderedV1GChargers.remove(j_ea); - zero_Interface.c_orderedV1GChargers.add(0, j_ea); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183975227</Id> - <Name>f_setV2GChargerCapabilities</Name> - <X>480</X> - <Y>565</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListChargers</Name> - <Type>List<GCPublicCharger></Type> - </Parameter> - <Parameter> - <Name>goal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); -gcListChargers.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); - -int totalNbChargers = activeChargersEA.size(); -int currentNbChargers = count(activeChargersEA, x -> x.getV2GCapable()); -int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); - -while (currentNbChargers < nbChargersGoal) { - J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> activeChargersEA.contains(x) && !x.getV2GCapable()); - j_ea.setV2GCapability(true); - currentNbChargers++; - zero_Interface.c_orderedV2GChargers.remove(j_ea); - zero_Interface.c_orderedV2GChargers.add(0, j_ea); - -} -while (currentNbChargers > nbChargersGoal) { - J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> activeChargersEA.contains(x) && x.getV2GCapable()); - j_ea.setV2GCapability(false); - currentNbChargers--; - zero_Interface.c_orderedV2GChargers.remove(j_ea); - zero_Interface.c_orderedV2GChargers.add(0, j_ea); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183975234</Id> - <Name>f_setVehiclesPrivateParking</Name> - <X>480</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>privateParkingEV_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>V2GCapableVehicleSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>//Voor nu zo opgelost, echter gaat dit niet goed werken met de volgorde. BEDENK EEN BETER MANIER!? -List<J_EAVehicle> gcListOrderedVehiclesPrivateParking = findAll( zero_Interface.c_orderedVehiclesPrivateParking, h -> gcListHouses.contains(h.getParentAgent())); - -int nbOfPrivateParkedEV = (int)sum(findAll(gcListHouses, gc -> gc.p_eigenOprit), x -> x.c_electricVehicles.size()); -int desiredNbOfPrivateParkedEV = roundToInt(privateParkingEV_pct / 100 * gcListOrderedVehiclesPrivateParking.size()); - - -// we scale the consumption instead of getting the diesel/EV parameter from avgc data to represent the 'size' of the car -double ratioEVToDieselConsumption = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm / zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionCar_kWhpkm; - -while ( nbOfPrivateParkedEV > desiredNbOfPrivateParkedEV){ - J_EAVehicle j_ea = findFirst( gcListOrderedVehiclesPrivateParking, h -> h instanceof J_EAEV); - if (j_ea.vehicleScaling != 1) { - throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); - } - J_ActivityTrackerTrips triptracker = j_ea.tripTracker; - double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() / ratioEVToDieselConsumption; - j_ea.removeEnergyAsset(); - gcListOrderedVehiclesPrivateParking.remove(j_ea); - zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); - J_EADieselVehicle dieselCar = new J_EADieselVehicle(j_ea.getParentAgent(), energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, 1, OL_EnergyAssetType.DIESEL_VEHICLE, triptracker); - gcListOrderedVehiclesPrivateParking.add(dieselCar); - zero_Interface.c_orderedVehiclesPrivateParking.add(dieselCar); - nbOfPrivateParkedEV --; -} -while ( nbOfPrivateParkedEV < desiredNbOfPrivateParkedEV){ - J_EAVehicle j_ea = findFirst( gcListOrderedVehiclesPrivateParking, h -> h instanceof J_EADieselVehicle); - if (j_ea.vehicleScaling != 1) { - throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); - } - J_ActivityTrackerTrips triptracker = j_ea.tripTracker; - double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() * ratioEVToDieselConsumption; - j_ea.removeEnergyAsset(); - gcListOrderedVehiclesPrivateParking.remove(j_ea); - zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); - double capacityElectricity_kW = randomTrue(0.6) ? randomTrue(0.4) ? 3.2 : 5.6 : 11.0; - double storageCapacity_kWh = uniform_discr(65,90); - J_EAEV ev = new J_EAEV(j_ea.getParentAgent(), capacityElectricity_kW, storageCapacity_kWh, 1, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, 1, OL_EnergyAssetType.ELECTRIC_VEHICLE, triptracker); - gcListOrderedVehiclesPrivateParking.add(ev); - zero_Interface.c_orderedVehiclesPrivateParking.add(ev); - nbOfPrivateParkedEV++; -} - - -//Update the V2G capable vehicle slider accordingly to the change in vehicle dynamics -int totalCapableV2GEVs = count(gcListOrderedVehiclesPrivateParking, vehicle -> vehicle instanceof J_EAEV && ((J_EAEV)vehicle).getV2GCapable()); -V2GCapableVehicleSlider.setValue(roundToInt(100.0*totalCapableV2GEVs/nbOfPrivateParkedEV)); - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758275653317</Id> - <Name>f_setV2GEVCapabilities</Name> - <X>480</X> - <Y>585</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>goal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>//Voor nu zo werkend gemaakt met gclist als input, echter gaat dit niet goed werken mochten er minder gcs tussen zitten dan in de zero_interface ordered collectie staat en gaat de volgorde veranderen. -// -> BEDENK EEN BETER MANIER!? --> Bestaat er uberhaupt een manier voor? - -List<J_EAVehicle> gcListOrderedVehiclesPrivateParking_all = findAll( zero_Interface.c_orderedVehiclesPrivateParking, vehicle -> gcListHouses.contains(vehicle.getParentAgent()) && vehicle.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); - -List<J_EAEV> gcListOrderedVehiclesPrivateParking = gcListOrderedVehiclesPrivateParking_all.stream().map(v -> (J_EAEV) v).collect(Collectors.toList()); - -int totalNbEVs = gcListOrderedVehiclesPrivateParking.size(); -int currentNbEVsV2GCapable = count(gcListOrderedVehiclesPrivateParking, x -> x.getV2GCapable()); -int nbEVsV2GCapableGoal = roundToInt(goal_pct / 100.0 * totalNbEVs); - -while (currentNbEVsV2GCapable < nbEVsV2GCapableGoal) { - J_EAEV j_ea = findFirst(gcListOrderedVehiclesPrivateParking, x -> x.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !x.getV2GCapable()); - j_ea.setV2GCapable(true); - currentNbEVsV2GCapable++; - gcListOrderedVehiclesPrivateParking.remove(j_ea); - gcListOrderedVehiclesPrivateParking.add(0, j_ea); - -} -while (currentNbEVsV2GCapable > nbEVsV2GCapableGoal) { - J_EAEV j_ea = findFirst(gcListOrderedVehiclesPrivateParking, x -> x.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && x.getV2GCapable()); - j_ea.setV2GCapable(false); - currentNbEVsV2GCapable--; - gcListOrderedVehiclesPrivateParking.remove(j_ea); - gcListOrderedVehiclesPrivateParking.add(0, j_ea); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758276936913</Id> - <Name>f_activateV2G</Name> - <X>65</X> - <Y>675</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>activateV2G</Name> - <Type>boolean</Type> - </Parameter> - <Body>for(GridConnection GC : gcList){ - GC.f_activateV2GChargingMode(activateV2G); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1764004906148</Id> - <Name>f_initializeTab_Mobility</Name> - <X>-350</X> - <Y>-50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Use this function to initialize mobility tab settings at start of simulation</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1722245324896</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1722245483166</Id> - <Name>uI_Tabs</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_Tabs</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1722252542608</Id> - <Name>zero_Interface</Name> - <X>150</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1753694295455</Id> - <Name>uI_EnergyHub</Name> - <X>300</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_EnergyHub</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1722245324902</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1722350199532</Id> - <Name>rect_genericFunctions</Name> - <X>10</X> - <Y>470</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-4144960</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>800</Width> - <Height>470</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722350199535</Id> - <Name>t_genericFunctions</Name> - <X>100</X> - <Y>490</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Generic Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>22</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1722247567090</Id> - <Name>gr_mobilitySliders_default</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722247567092</Id> - <Name>rect_mobilityDemandSliders_default</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>DOTTED</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-2625550</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567094</Id> - <Name>sl_fossilFuelCars_pct</Name> - <X>260</X> - <Y>315</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>sl_electricCars_pct.setValue(100 - sl_fossilFuelCars_pct.getIntValue(), false); -f_setDieselCars( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricCars_pct, sl_fossilFuelCars_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567096</Id> - <Name>sl_electricTrucks_pct</Name> - <X>260</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setVehicleSliders( 0, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); -f_setElectricTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567098</Id> - <Name>t_fossilFuelCars_pct</Name> - <X>230</X> - <Y>320</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_fossilFuelCars_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567100</Id> - <Name>t_fossilFuelCarsDescription</Name> - <X>20</X> - <Y>320</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fossiele brandstof</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567102</Id> - <Name>t_electricTrucksDescription</Name> - <X>15</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elektrisch</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567104</Id> - <Name>t_electricTrucks_pct</Name> - <X>230</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricTrucks_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567106</Id> - <Name>t_mobilityDemandReductionDescription</Name> - <X>15</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing transport</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567108</Id> - <Name>sl_mobilityDemandReduction_pct</Name> - <X>260</X> - <Y>15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_mobilityDemandReduction_pct.getValue() ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567110</Id> - <Name>t_mobilityDemandReduction_pct</Name> - <X>230</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_mobilityDemandReduction_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567112</Id> - <Name>sl_hydrogenTrucks_pct</Name> - <X>260</X> - <Y>130</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setVehicleSliders( 1, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); -f_setHydrogenTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567114</Id> - <Name>t_hydrogenTrucksDescription</Name> - <X>15</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Waterstof</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567116</Id> - <Name>t_hydrogenTrucks_pct</Name> - <X>230</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_hydrogenTrucks_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567118</Id> - <Name>sl_fossilFuelTrucks_pct</Name> - <X>260</X> - <Y>155</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setVehicleSliders( 2, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); -f_setDieselTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567120</Id> - <Name>t_fossilFuelTrucksDescription</Name> - <X>15</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fossiele brandstof</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567122</Id> - <Name>t_fossilFuelTrucks_pct</Name> - <X>230</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_fossilFuelTrucks_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567124</Id> - <Name>t_trucksDescription</Name> - <X>15</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Vrachtwagens</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567126</Id> - <Name>sl_electricCars_pct</Name> - <X>260</X> - <Y>290</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>sl_fossilFuelCars_pct.setValue(100 - sl_electricCars_pct.getIntValue(), false); -f_setElectricCars( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricCars_pct, sl_fossilFuelCars_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567128</Id> - <Name>t_electricCarsDescription</Name> - <X>20</X> - <Y>295</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elektrisch</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567130</Id> - <Name>t_electricCars_pct</Name> - <X>230</X> - <Y>295</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricCars_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567132</Id> - <Name>t_carsDescription</Name> - <X>15</X> - <Y>270</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Auto's</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567134</Id> - <Name>sl_fossilFuelVans_pct</Name> - <X>260</X> - <Y>235</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>sl_electricVans_pct.setValue(100 - sl_fossilFuelVans_pct.getIntValue(), false); -f_setDieselVans( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricVans_pct, sl_fossilFuelVans_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567136</Id> - <Name>t_fossilFuelVans_pct</Name> - <X>230</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_fossilFuelVans_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567138</Id> - <Name>t_fossilFuelVansDescription</Name> - <X>15</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fossiele brandstof</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567140</Id> - <Name>sl_electricVans_pct</Name> - <X>260</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>sl_fossilFuelVans_pct.setValue(100 - sl_electricVans_pct.getIntValue(), false); -f_setElectricVans( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricVans_pct, sl_fossilFuelVans_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567142</Id> - <Name>t_electricVansDescription</Name> - <X>15</X> - <Y>215</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elektrisch</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567144</Id> - <Name>t_electricVans_pct</Name> - <X>230</X> - <Y>215</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricVans_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567146</Id> - <Name>t_vansDescription</Name> - <X>15</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Busjes</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1746096199769</Id> - <Name>i_mobilityReduction</Name> - <X>160</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_mobilityReduction, zero_Interface.v_infoText.mobilityDemandReduction, i_mobilityReduction.getX() + uI_Tabs.v_presentationXOffset, i_mobilityReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716217</Id> - <Name>i_electricTruck</Name> - <X>160</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricTruck, zero_Interface.v_infoText.electricTrucks, i_electricTruck.getX() + uI_Tabs.v_presentationXOffset, i_electricTruck.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716230</Id> - <Name>i_hydrogenTruck</Name> - <X>160</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_hydrogenTruck, zero_Interface.v_infoText.hydrogenTrucks, i_hydrogenTruck.getX() + uI_Tabs.v_presentationXOffset, i_hydrogenTruck.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716242</Id> - <Name>i_fossilFuelTruck</Name> - <X>160</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_fossilFuelTruck, zero_Interface.v_infoText.fossilTrucks, i_fossilFuelTruck.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelTruck.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716255</Id> - <Name>i_electricVans</Name> - <X>160</X> - <Y>215</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricVans, zero_Interface.v_infoText.electricVans, i_electricVans.getX() + uI_Tabs.v_presentationXOffset, i_electricVans.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716267</Id> - <Name>i_fossilFuelVans</Name> - <X>160</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_fossilFuelVans, zero_Interface.v_infoText.fossilVans, i_fossilFuelVans.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelVans.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716280</Id> - <Name>i_electricCars</Name> - <X>160</X> - <Y>295</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricCars, zero_Interface.v_infoText.electricCars, i_electricCars.getX() + uI_Tabs.v_presentationXOffset, i_electricCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716293</Id> - <Name>i_fossilFuelCars</Name> - <X>160</X> - <Y>320</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_fossilFuelCars, zero_Interface.v_infoText.fossilCars, i_fossilFuelCars.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754990132964</Id> - <Name>cb_spreadChargingEVs</Name> - <X>260</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="40" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>OL_ChargingAttitude selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; -if(cb_spreadChargingEVs.isSelected()){ - selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; -} - -f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getAllSliderGridConnections_all());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1754990186800</Id> - <Name>t_spreadChargingEVsDescription1</Name> - <X>15</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Slim laden</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Rectangle> - <Id>1722342418259</Id> - <Name>rect_demandFunctions</Name> - <X>50</X> - <Y>550</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-8355840</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>300</Width> - <Height>70</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722342418261</Id> - <Name>t_demandFunctionsDescription</Name> - <X>200</X> - <Y>560</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Demand Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1722342719680</Id> - <Name>rect_mobilityFunctions</Name> - <X>50</X> - <Y>690</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-5952982</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>720</Width> - <Height>230</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722342719682</Id> - <Name>t_mobilityFunctionsDescription</Name> - <X>170</X> - <Y>700</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Mobility Functions (default)</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="ComboBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754990738497</Id> - <Name>cb_setChargingAttitude</Name> - <X>265</X> - <Y>640</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="20"> - <EmbeddedIcon>false</EmbeddedIcon> - <FillColor>-1</FillColor> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>OL_ChargingAttitude selectedChargingAttitude = null; - -switch(cb_setChargingAttitude.getValue()){ - case "Standaard": - selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; - break; - case "Gelimiteerd vermogen": - selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; - break; - /*case "Slimme spreiding": - selectedChargingAttitude = OL_ChargingAttitude.MAX_SPREAD; - break;*/ - case "Prijsgestuurd": - selectedChargingAttitude = OL_ChargingAttitude.PRICE; - break; - case "Custom": - selectedChargingAttitude = null; - break; -} - -if(selectedChargingAttitude != null){ - f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getAllSliderGridConnections_all()); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <Editable>false</Editable> - <Button>Standaard</Button> - <Button>Gelimiteerd vermogen</Button> - <Button>Prijsgestuurd</Button> - <Button>Custom</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1754991641604</Id> - <Name>i_mobilityChargingAttitude</Name> - <X>160</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_mobilityChargingAttitude, zero_Interface.v_infoText.mobilitySmartCharging, i_mobilityChargingAttitude.getX() + uI_Tabs.v_presentationXOffset, i_mobilityChargingAttitude.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Group> - <Id>1758182984074</Id> - <Name>gr_mobilitySliders_residential</Name> - <X>400</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <YCode>0</YCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1758182947156</Id> - <Name>rect_mobilityDemandSliders_residential</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>DOTTED</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-2625550</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1758183089010</Id> - <Name>txt_privateParkedCars</Name> - <X>15</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Privé geparkeerde autos</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758183152912</Id> - <Name>txt_publicChargePoints</Name> - <X>15</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Publieke laadpalen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758183196756</Id> - <Name>sl_publicChargersResidentialArea_pct</Name> - <X>260</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPublicChargingStations(uI_Tabs.f_getAllSliderGridConnections_chargers(), sl_publicChargersResidentialArea_pct.getIntValue(), sl_chargersThatSupportV1G_pct, sl_chargersThatSupportV2G_pct);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758183196774</Id> - <Name>t_publicEVsResidentialAreaDescription</Name> - <X>15</X> - <Y>195</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_publicChargersResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Actieve laadpalen in gebied</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758183196782</Id> - <Name>t_publicEVsResidentialArea_pct</Name> - <X>245</X> - <Y>195</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_publicChargersResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_publicChargersResidentialArea_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Text> - <Id>1758183196796</Id> - <Name>t_privateEVsResidentialAreaDescription</Name> - <X>15</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_privateEVsResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Aandeel Elektrisch</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758183196803</Id> - <Name>sl_privateEVsResidentialArea_pct</Name> - <X>260</X> - <Y>34</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setVehiclesPrivateParking(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_privateEVsResidentialArea_pct.getValue(), sl_EVsThatSupportV2G_pct);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758183196811</Id> - <Name>t_privateEVsResidentialArea_pct</Name> - <X>244</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_privateEVsResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_privateEVsResidentialArea_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Group> - <Id>1758183196871</Id> - <Name>gr_settingsV2G_publicChargers</Name> - <X>9</X> - <Y>311</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758183196873</Id> - <Name>sl_chargersThatSupportV2G_pct</Name> - <X>251</X> - <Y>4</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setV2GChargerCapabilities( uI_Tabs.f_getSliderGridConnections_chargers(), sl_chargersThatSupportV2G_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758183196875</Id> - <Name>t_chargersThatSupportV2GDescription</Name> - <X>5</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_chargersThatSupportV2G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Laadpalen met V2G</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758183196877</Id> - <Name>t_chargersThatSupportV2G_pct</Name> - <X>226</X> - <Y>11</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_chargersThatSupportV2G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_chargersThatSupportV2G_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Image> - <Id>1758183196879</Id> - <Name>i_householdPublicChargersV2G</Name> - <X>181</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_chargersThatSupportV2G_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPublicChargersV2G, zero_Interface.v_infoText.householdPublicParkingV2G, i_householdPublicChargersV2G.getX() + gr_settingsV2G_publicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargersV2G.getY() + gr_settingsV2G_publicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Image> - <Id>1758183196924</Id> - <Name>i_householdPrivateEV</Name> - <X>190</X> - <Y>39</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_privateEVsResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPrivateEV, zero_Interface.v_infoText.householdPrivateParking, i_householdPrivateEV.getX() + uI_Tabs.v_presentationXOffset, i_householdPrivateEV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1758183196939</Id> - <Name>i_householdPublicChargers</Name> - <X>190</X> - <Y>193</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_publicChargersResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPublicChargers, zero_Interface.v_infoText.householdPublicParking, i_householdPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Group> - <Id>1758183196817</Id> - <Name>gr_settingsV1G_publicChargers</Name> - <X>5</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758183196819</Id> - <Name>sl_chargersThatSupportV1G_pct</Name> - <X>255</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setV1GChargerCapabilities( uI_Tabs.f_getSliderGridConnections_chargers(), sl_chargersThatSupportV1G_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758183196821</Id> - <Name>txt_chargersThatSupportV1GDescription</Name> - <X>10</X> - <Y>5</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_chargersThatSupportV1G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Laadpalen met V1G</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758183196823</Id> - <Name>t_chargersThatSupportV1G_pct</Name> - <X>240</X> - <Y>7</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_chargersThatSupportV1G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_chargersThatSupportV1G_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Image> - <Id>1758183196825</Id> - <Name>i_householdPublicChargersV1G</Name> - <X>185</X> - <Y>5</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_chargersThatSupportV1G_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPublicChargersV1G, zero_Interface.v_infoText.householdPublicParkingV1G, i_householdPublicChargersV1G.getX() + gr_settingsV1G_publicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargersV1G.getY() + gr_settingsV1G_publicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Group> - <Id>1758191125495</Id> - <Name>gr_activateV2GPrivateParkedCars</Name> - <X>170</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758190979055</Id> - <Name>cb_activateV2GPrivateParkedCars</Name> - <X>135</X> - <Y>-16</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="20" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_activateV2G(new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), cb_activateV2GPrivateParkedCars.isSelected()); -gr_settingsV2G_privateParkedCars.setVisible(cb_activateV2GPrivateParkedCars.isSelected());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1758191012105</Id> - <Name>i_activateV2GPrivateParkedCars</Name> - <X>20</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_activateV2GPrivateParkedCars.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_activateV2GPrivateParkedCars, zero_Interface.v_infoText.activateV2GPrivateParkedCars, i_activateV2GPrivateParkedCars.getX() + gr_activateV2GPrivateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_activateV2GPrivateParkedCars.getY() + gr_activateV2GPrivateParkedCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1758191030984</Id> - <Name>txt_activateV2GPrivateParkedCars</Name> - <X>-155</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>cb_activateV2GPrivateParkedCars.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Activeer V2G</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1758189201608</Id> - <Name>txt_chargingStrategyPrivateParkedCars</Name> - <X>15</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>cb_chargingAttitudePrivateParkedCars.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Laad strategie</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="ComboBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758189233415</Id> - <Name>cb_chargingAttitudePrivateParkedCars</Name> - <X>221</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="140" Height="20"> - <EmbeddedIcon>false</EmbeddedIcon> - <FillColor>-1</FillColor> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <EnableExpression>sl_privateEVsResidentialArea_pct.isEnabled()</EnableExpression> - <ActionCode>OL_ChargingAttitude selectedChargingAttitude = null; -gr_activateV2GPrivateParkedCars.setVisible(false); -cb_activateV2GPrivateParkedCars.setSelected(false, false); -gr_settingsV2G_privateParkedCars.setVisible(false); - -switch(cb_chargingAttitudePrivateParkedCars.getValue()){ - case "Niet slim laden": - selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; - break; - case "Slim laden: Prijs gestuurd": - selectedChargingAttitude = OL_ChargingAttitude.PRICE; - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - case "Slim laden: Netbewust": - selectedChargingAttitude = OL_ChargingAttitude.BALANCE_LOCAL; // For now Balance_Local - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - /* - case "Slim laden: Locale balans": - selectedChargingAttitude = OL_ChargingAttitude.BALANCE_LOCAL; - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - */ - case "Gevarieerd": - zero_Interface.f_setErrorScreen("De geselecteerde laad strategie is er alleen ter visualisatie in het geval niet elk huis dezelfde laad strategie heeft. Dit is dus niet een strategie die je handmatig aan kunt zetten. Voor nu is 'Niet slim laden' weer geselecteerd.", 0, 0); - selectedChargingAttitude = null; - break; -} - -if(selectedChargingAttitude != null){ - f_setChargingAttitude(selectedChargingAttitude, new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses())); -} -else{ - cb_chargingAttitudePrivateParkedCars.setValue("Niet slim laden", true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <Editable>false</Editable> - <Button>Niet slim laden</Button> - <Button>Slim laden: Prijs gestuurd</Button> - <Button>Slim laden: Netbewust</Button> - <Button>Gevarieerd</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1758189262812</Id> - <Name>i_chargingAttitudePrivateParkedCars</Name> - <X>190</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_chargingAttitudePrivateParkedCars.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_chargingAttitudePrivateParkedCars, zero_Interface.v_infoText.chargingAttitudePrivateParkedCars, i_chargingAttitudePrivateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_chargingAttitudePrivateParkedCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1758192054421</Id> - <Name>txt_chargingStrategyPublicChargers</Name> - <X>15</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>cb_chargingAttitudePrivatePublicChargers.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Laad strategie</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="ComboBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758192054440</Id> - <Name>cb_chargingAttitudePrivatePublicChargers</Name> - <X>221</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="140" Height="20"> - <EmbeddedIcon>false</EmbeddedIcon> - <FillColor>-1</FillColor> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <EnableExpression>sl_publicChargersResidentialArea_pct.isEnabled()</EnableExpression> - <ActionCode>OL_ChargingAttitude selectedChargingAttitude = null; -gr_activateV2GPublicChargers.setVisible(false); -cb_activateV2GPublicChargers.setSelected(false, true); // True call for now needed for chargepoints only -gr_settingsV1G_publicChargers.setVisible(false); -gr_settingsV2G_publicChargers.setVisible(false); - -switch(cb_chargingAttitudePrivatePublicChargers.getValue()){ - case "Niet slim laden": - selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; - break; - case "Slim laden: Prijs gestuurd": - selectedChargingAttitude = OL_ChargingAttitude.PRICE; - gr_activateV2GPublicChargers.setVisible(true); - gr_settingsV1G_publicChargers.setVisible(true); - break; - case "Slim laden: Netbewust": - selectedChargingAttitude = OL_ChargingAttitude.BALANCE_GRID; - gr_activateV2GPublicChargers.setVisible(true); - gr_settingsV1G_publicChargers.setVisible(true); - break; - case "Gevarieerd": - zero_Interface.f_setErrorScreen("De geselecteerde laad strategie is er alleen ter visualisatie in het geval niet elk huis dezelfde laad strategie heeft. Dit is dus niet een strategie die je handmatig aan kunt zetten. Voor nu is 'Niet slim laden' weer geselecteerd.", 0, 0); - selectedChargingAttitude = null; - break; -} - -if(selectedChargingAttitude != null){ - List<GridConnection> allChargersInModel = new ArrayList<GridConnection>(uI_Tabs.f_getSliderGridConnections_chargers()); - allChargersInModel.addAll(uI_Tabs.f_getPausedSliderGridConnections_chargers()); - f_setChargingAttitude(selectedChargingAttitude, allChargersInModel); -} -else{ - cb_chargingAttitudePrivatePublicChargers.setValue("Niet slim laden", true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <Editable>false</Editable> - <Button>Niet slim laden</Button> - <Button>Slim laden: Prijs gestuurd</Button> - <Button>Slim laden: Netbewust</Button> - <Button>Gevarieerd</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1758192054460</Id> - <Name>i_chargingStrategyPublicChargers</Name> - <X>190</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_chargingAttitudePrivatePublicChargers.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_chargingStrategyPublicChargers, zero_Interface.v_infoText.chargingStrategyPublicChargers, i_chargingStrategyPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_chargingStrategyPublicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Group> - <Id>1758192011387</Id> - <Name>gr_activateV2GPublicChargers</Name> - <X>170</X> - <Y>300</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758192011389</Id> - <Name>cb_activateV2GPublicChargers</Name> - <X>135</X> - <Y>-16</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="20" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_activateV2G(new ArrayList<GridConnection>(uI_Tabs.f_getAllSliderGridConnections_chargers()), cb_activateV2GPublicChargers.isSelected()); -gr_settingsV2G_publicChargers.setVisible(cb_activateV2GPublicChargers.isSelected());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1758192011391</Id> - <Name>i_activateV2GPrivatePublicChargers</Name> - <X>20</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_activateV2GPublicChargers.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_activateV2GPrivatePublicChargers, zero_Interface.v_infoText.activateV2GPrivatePublicChargers, i_activateV2GPrivatePublicChargers.getX() + gr_activateV2GPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_activateV2GPrivatePublicChargers.getY() + gr_activateV2GPublicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1758192011393</Id> - <Name>txt_activateV2GPrivatePublicChargers</Name> - <X>-155</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>cb_activateV2GPublicChargers.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Activeer V2G</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1758274187930</Id> - <Name>gr_settingsV2G_privateParkedCars</Name> - <X>9</X> - <Y>121</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758274187932</Id> - <Name>sl_EVsThatSupportV2G_pct</Name> - <X>251</X> - <Y>4</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setV2GEVCapabilities( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_EVsThatSupportV2G_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758274187934</Id> - <Name>txt_EVsThatSupportV2GDescription</Name> - <X>5</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_EVsThatSupportV2G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>EVs die V2G ondersteunen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758274187936</Id> - <Name>txt_EVsThatSupportV2G_pct</Name> - <X>226</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_EVsThatSupportV2G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_EVsThatSupportV2G_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Image> - <Id>1758274187938</Id> - <Name>i_EVsThatSupportV2G</Name> - <X>181</X> - <Y>8</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_EVsThatSupportV2G_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_EVsThatSupportV2G, zero_Interface.v_infoText.EVsThatSupportV2G, i_EVsThatSupportV2G.getX() + gr_settingsV2G_privateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_EVsThatSupportV2G.getY() + gr_settingsV2G_privateParkedCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - </Presentation> - </Group> - <Text> - <Id>1758183975194</Id> - <Name>txt_mobilityFunctionsDescription</Name> - <X>590</X> - <Y>510</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Mobility Functions</Text> - <Font> - <Name>Dialog</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1758183975205</Id> - <Name>rect_mobilityFunctions1</Name> - <X>440</X> - <Y>500</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16711936</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>310</Width> - <Height>170</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1758184003102</Id> - <Name>t_mobilityFunctionsDescription1</Name> - <X>590</X> - <Y>510</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Mobility Functions (residential)</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1709049456135</Id> - <Name>UI_Battery</Name> - <Folder>1754045666929</Folder> - <Generic>false</Generic> - <GenericParameter> - <Id>1709049456141</Id> - <Name>1709049456141</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089975</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709107200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1709049456138</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1709049456142</CurrentLevel> - <ConnectionsId>1709049456136</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1715597286082</Id> - <Name>v_colorBattery_lines</Name> - <X>-740</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>new Color(158, 201, 158)</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715597307038</Id> - <Name>v_colorBattery_background</Name> - <X>-740</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>new Color(198, 251, 198)</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715597314638</Id> - <Name>v_colorBatter_3</Name> - <X>-740</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>white</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715602425848</Id> - <Name>v_sliderStartValue_priceLimit</Name> - <X>-730</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715607530949</Id> - <Name>v_sliderMinValue_balanceLimit</Name> - <X>-730</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715607536716</Id> - <Name>v_sliderMaxValue_balanceLimit</Name> - <X>-730</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715607544383</Id> - <Name>v_sliderStartValue_balanceLimit</Name> - <X>-730</X> - <Y>330</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715630743924</Id> - <Name>v_sliderStartValue_BatteryP_MW</Name> - <X>-730</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724947743379</Id> - <Name>v_currentSelectedBattery</Name> - <X>-310</X> - <Y>570</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1724947743386</Id> - <Name>p_amountOfGISObjects</Name> - <X>-310</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1724947743384</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1724947743389</Id> - <Name>p_amountOfGC</Name> - <X>-310</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1724947743387</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743355</Id> - <Name>c_GISObjects_Battery</Name> - <X>-310</X> - <Y>140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GIS_Object</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743357</Id> - <Name>c_gridConnections_Battery</Name> - <X>-310</X> - <Y>160</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GridConnection</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743359</Id> - <Name>c_connectedGridNodes</Name> - <X>-310</X> - <Y>180</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Object</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743361</Id> - <Name>c_connectionOwners_Battery</Name> - <X>-310</X> - <Y>120</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>ConnectionOwner</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743365</Id> - <Name>c_gridBatteries</Name> - <X>-310</X> - <Y>300</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>J_EAStorageElectric</ElementClass> - <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1709553910991</Id> - <Name>f_styleBatteryUI</Name> - <X>-760</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1715591908888</Id> - <Name>f_initializeUIBattery</Name> - <X>-760</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>COC</Name> - <Type>ConnectionOwner</Type> - </Parameter> - <Body>//Instantiate new sliders -f_instantiateSlidersBattery(COC);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1715591980366</Id> - <Name>f_instantiateSlidersBattery</Name> - <X>-740</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>COC</Name> - <Type>ConnectionOwner</Type> - </Parameter> - <Body>// Electrolyser Power start value -v_sliderStartValue_BatteryP_MW = ((J_EAConversionElectrolyser)COC.f_getOwnedGridConnections().get(0).c_conversionAssets.get(0)).getInputCapacity_kW()/1000; -sl_batteryPower.setValue(v_sliderStartValue_BatteryP_MW, false); -t_powerBattery.setText(v_sliderStartValue_BatteryP_MW + " MW"); - - -// Price limit start value -v_sliderStartValue_priceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_electricityPriceMaxForProfit_eurpkWh; -sl_batteryElectricityPriceLimit.setValue(v_sliderStartValue_priceLimit, false); -t_electricityPriceLimit.setText("€" + v_sliderStartValue_priceLimit); - - -//Balance limit start value -v_sliderStartValue_balanceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_gridNodeCongestionLimit_kW; -sl_batteryElectricityBalanceLimit.setValue(v_sliderStartValue_balanceLimit, false); -t_electricityBalanceLimit.setText(v_sliderStartValue_balanceLimit + " MW"); - - -//Radio button balance or price mode -int rb_value = 0; -switch (((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).p_electrolyserOperationMode){ - - case PRICE: - - rb_value = 0; - //Set visibility of price slider true and balance slider false - gr_electricityPriceSliderBattery.setVisible(true); - gr_electricityBalanceSliderBattery.setVisible(false); - break; - - case BALANCE: - rb_value = 1; - - //Set visibility of balance slider true and price slider false - gr_electricityBalanceSliderBattery.setVisible(true); - gr_electricityPriceSliderBattery.setVisible(false); - break; -} -rb_batteryMode.setValue(rb_value, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724947743369</Id> - <Name>f_setScenarioFuture</Name> - <X>-290</X> - <Y>490</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>//Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -//Scenario code here - - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(1, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724947743373</Id> - <Name>f_setScenario</Name> - <X>-310</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>scenario_nr</Name> - <Type>int</Type> - </Parameter> - <Body>switch (scenario_nr){ - - case 0: // Current - - break; - - case 1: // Future - - break; - - case 2: // Hydrogen - traceln("Selected scenario: Hydrogen : DOES NOTHING YET"); - break; - - case 3: // Custom - - if(rb_scenariosPrivateUI.getValue() == 2){ - return; - } - rb_scenariosPrivateUI.setValue(2, false); - traceln("Selected scenario: Custom"); - break; - - default: - -} - -//Set 'results up to date' to false -zero_Interface.b_resultsUpToDate = false;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724947743375</Id> - <Name>f_setScenarioCurrent</Name> - <X>-290</X> - <Y>470</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>//Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -//Scenario code here - - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(0, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724947743377</Id> - <Name>f_setSelectedGC</Name> - <Description>Function that sets the sliders to match the currently present settings of the energy assets owned by the selected GC. Used when a connection owner has multiple grid connections, and wants to set the sliders of a different GC. </Description> - <X>-310</X> - <Y>400</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Initialize slider presets to selected GC (min, max, etc.) -//f_setSliderPresets(); - -</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1709049456136</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1709049456197</Id> - <Name>zero_Interface</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1709049456142</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1725002991039</Id> - <Name>rect_canvas</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>1920</Width> - <Height>980</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1725002921481</Id> - <Name>rect_scenarios</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorBattery_background</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>170</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorBattery_lines</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <TimePlot> - <Id>1709582023151</Id> - <Name>plot</Name> - <X>400</X> - <Y>280</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <AutoUpdate>true</AutoUpdate> - <RecurrenceProperties> - <Id>1751013532165</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709625600000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </RecurrenceProperties> - <EmbeddedIcon>false</EmbeddedIcon> - <Width>540</Width> - <Height>400</Height> - <BackgroundColor/> - <BorderColor/> - <ChartArea> - <XOffset>50</XOffset> - <YOffset>30</YOffset> - <Width>460</Width> - <Height>310</Height> - <BackgroundColor>-1</BackgroundColor> - <BorderColor>-16777216</BorderColor> - <GridColor>-12566464</GridColor> - </ChartArea> - <Legend> - <Place>SOUTH</Place> - <TextColor>-16777216</TextColor> - <Size>30</Size> - </Legend> - <Labels> - <HorLabelsPosition>DEFAULT</HorLabelsPosition> - <VerLabelsPosition>DEFAULT</VerLabelsPosition> - <TextColor>-12566464</TextColor> - </Labels> - <ShowLegend>true</ShowLegend> - <TimeWindowsMovementType>MOVEMENT_WITH_TIME</TimeWindowsMovementType> - <TimeWindowUnits>MODEL_TIME_UNIT</TimeWindowUnits> - <VerScaleFromExpression>0</VerScaleFromExpression> - <VerScaleToExpression>1</VerScaleToExpression> - <VerScaleType>AUTO</VerScaleType> - <DrawLine>true</DrawLine> - <Interpolation>LINEAR</Interpolation> - <SamplesToKeep>100</SamplesToKeep> - <TimeWindowExpression>100</TimeWindowExpression> - <FillAreaUnderLine>false</FillAreaUnderLine> - <LabelFormat>MODEL_TIME_UNITS</LabelFormat> - </TimePlot> - <Rectangle> - <Id>1715589407937</Id> - <Name>slider_blocker</Name> - <X>0</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorBattery_lines</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>810</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorBatter_3</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1715596728186</Id> - <Name>t_batterySliders</Name> - <X>70</X> - <Y>200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Battery</Text> - <Font> - <Name>Calibri</Name> - <Size>22</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1715597165299</Id> - <Name>gr_buttonBattery</Name> - <X>41</X> - <Y>211</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Oval> - <Id>1715596934178</Id> - <Name>ovalBatteryButton</Name> - <X>-1</X> - <Y>-1</Y> - <Label> - <X>0</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <RadiusX>20</RadiusX> - <RadiusY>40</RadiusY> - <Rotation>0.0</Rotation> - <FillColor>-6632142</FillColor> - <FillColorCode>zero_Interface.v_batteryColor</FillColorCode> - <FillMaterial>null</FillMaterial> - </Oval> - <Text> - <Id>1715596882276</Id> - <Name>t_battery</Name> - <X>-10</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-1</Color> - <Text>Bat</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1715606650390</Id> - <Name>gr_electricityPriceSliderBattery</Name> - <X>190</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1715597606225</Id> - <Name>txt_electricityPriceLimit</Name> - <X>-170</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electriciteits prijs limiet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1715597606227</Id> - <Name>sl_batteryElectricityPriceLimit</Name> - <X>62</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the maximum price of electricity used to produce hydrogen -((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_electricityPriceMaxForProfit_eurpkWh = sl_batteryElectricityPriceLimit.getValue(); - -//Set text accordingly -t_electricityPriceLimit.setText( "€" + sl_batteryElectricityPriceLimit.getValue()); - -//Set scenario to custom -f_setScenario(2);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>v_sliderStartValue_priceLimit</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>0.5</MaxValue> - <Step>0.01</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1715597606229</Id> - <Name>t_electricityPriceLimit</Name> - <X>40</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text> €0.00</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1715606688952</Id> - <Name>gr_batteryPowerSlider</Name> - <X>190</X> - <Y>280</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1715597606231</Id> - <Name>txt_powerBattery</Name> - <X>-170</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Vermogen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1715597606233</Id> - <Name>sl_batteryPower</Name> - <X>62</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the electric capacity -c_gridBatteries.get(v_currentSelectedBattery).setCapacityElectric_kW(sl_batteryPower.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW - -//Adjust grid connection capacity as well (if needed) -if(sl_batteryPower.getValue()*1000 > 2000){ - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryPower.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryPower.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryPower.getValue()*1000; -} - -//Set the text accordingly -t_powerBattery.setText(sl_batteryPower.getValue() + " MW"); - - -//Set scenario to custom -f_setScenario(2);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>10</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1715597606235</Id> - <Name>t_powerBattery</Name> - <X>35</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>1.0 MW</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1715606719124</Id> - <Name>gr_batteryMode</Name> - <X>100</X> - <Y>380</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1715598832030</Id> - <Name>rb_batteryMode</Name> - <X>-80</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="150" Height="50"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>/* -switch (rb_batteryMode.getValue()){ - - case 0: - c_ownedGridConnections.get(0).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.PRICE; - - //Set visibility of price slider true and balance slider false - gr_electricityPriceSlider.setVisible(true); - gr_electricityBalanceSlider.setVisible(false); - break; - - case 1: - c_ownedGridConnections.get(0).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.BALANCE; - - //Set visibility of balance slider true and price slider false - gr_electricityBalanceSlider.setVisible(true); - gr_electricityPriceSlider.setVisible(false); - break; -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Prijs</Button> - <Button>Balans</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1715598901188</Id> - <Name>txt_electrolyserMode</Name> - <X>-80</X> - <Y>-40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batterij modus</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1715606808711</Id> - <Name>gr_electricityBalanceSliderBattery</Name> - <X>190</X> - <Y>490</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1715606808713</Id> - <Name>txt_electricityBalanceLimit</Name> - <X>-170</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electriciteits balans limiet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1715606808715</Id> - <Name>sl_batteryElectricityBalanceLimit</Name> - <X>62</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the gridnode congestion while charging -((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_gridNodeCongestionLimit_kW = sl_batteryElectricityBalanceLimit.getValue()*1000; - -//Set text accordingly -t_electricityBalanceLimit.setText( sl_batteryElectricityBalanceLimit.getValue() + " MW" ); - -//Set scenario to custom -f_setScenario(2);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>v_sliderStartValue_balanceLimit</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>v_sliderMinValue_balanceLimit</MinValue> - <MaxValue>v_sliderMaxValue_balanceLimit</MaxValue> - <Step>0.01</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1715606808717</Id> - <Name>t_electricityBalanceLimit</Name> - <X>50</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0.0 MW</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1724859658263</Id> - <Name>gr_scenarioRB</Name> - <X>120</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1724859658265</Id> - <Name>rb_scenariosPrivateUI</Name> - <X>-100</X> - <Y>-60</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="180" Height="120"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setScenario(rb_scenariosPrivateUI.getValue());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="14" Style="0"/> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Huidig - 2023</Button> - <Button>Toekomstplannen</Button> - <Button>Custom</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1724859658267</Id> - <Name>text187</Name> - <X>-100</X> - <Y>-80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Selecteer een scenario</Text> - <Font> - <Name>Calibri</Name> - <Size>20</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724947743345</Id> - <Name>text</Name> - <X>-320</X> - <Y>540</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Current selected assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724947743347</Id> - <Name>txt_batteryAssets</Name> - <X>-320</X> - <Y>270</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Battery assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724947743349</Id> - <Name>txt_setSlidersToSelectedGC</Name> - <X>-320</X> - <Y>370</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Set Sliders to selected GC</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724947743351</Id> - <Name>text7</Name> - <X>-320</X> - <Y>420</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Set Sliders to Scenario</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724947743353</Id> - <Name>text5</Name> - <X>-320</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Connections</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1724948168075</Id> - <Name>gr_batteryCapacitySlider</Name> - <X>190</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1724948168077</Id> - <Name>txt_powerBattery1</Name> - <X>-170</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Opslagcapaciteit</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1724948168079</Id> - <Name>sl_batteryCapacity</Name> - <X>62</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the electric capacity -c_gridBatteries.get(v_currentSelectedBattery).setStorageCapacity_kWh(sl_batteryCapacity.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW - -//Adjust grid connection capacity as well (if needed) -if(sl_batteryCapacity.getValue()*1000 > 2000){ - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryCapacity.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryCapacity.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryCapacity.getValue()*1000; -} - -//Set the text accordingly -t_capacityBattery.setText(sl_batteryCapacity.getValue() + " MWh"); - - -//Set scenario to custom -f_setScenario(2);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1724948168081</Id> - <Name>t_capacityBattery</Name> - <X>35</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>1.0 MWh</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1725003063740</Id> - <Name>txt_batteryControlRoom</Name> - <X>760</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batterij Controlroom</Text> - <Font> - <Name>Calibri</Name> - <Size>72</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - <Areas> - <Area> - <Id>1725002896440</Id> - <Name>va_batteryUI</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Title>Batter UI - 1920 - 980 - - - - - 1708522361862 - UI_company - -//Getters for shapes -public ShapeRadioButtonGroup getRb_scenariosPrivateUI() { - return this.rb_scenariosPrivateUI; -} - -public ShapeRadioButtonGroup getRb_heatingTypePrivateUI() { - return this.rb_heatingTypePrivateUI; -} - -public ShapeSlider getSl_batteryCompany(){ - return this.sl_batteryCompany; -} - -public ShapeSlider getSl_heatDemandCompanyReduction(){ - return this.sl_heatDemandCompanyReduction; -} - -public ShapeSlider getSl_electricityDemandCompanyReduction(){ - return this.sl_electricityDemandCompanyReduction; -} - -public ShapeSlider getSl_mobilityDemandCompanyReduction(){ - return this.sl_mobilityDemandCompanyReduction; -} - 1754045666929 - //import kotlinx.serialization.internal.ArrayListClassDesc; -import org.eclipse.jdt.internal.compiler.ast.ForeachStatement; - - //Initialize graph locations and visibility -f_setResultsUIPresets(); - -zero_Interface.c_UIResultsInstances.add(uI_Results); - false - - 1708522361868 - 1708522361868 - - T extends Agent - - Generic parameter: - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - 10 - MPS - - - 1 - METER - - - 1 - METER - - - 1 - METER - - - - false - - 1.0 - SECOND - - CONTINUOUS - 500 - 500 - 0 - 100 - 100 - MOORE - USER_DEF - USER_DEF - 2 - 50 - 0.95 - 10 - - - true - 1658477089974 - true - 1708588800000 - - 0 - HOUR - - - 1 - HOUR - - - - 1708522361865 - scale - 10 - -210 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1708522361869 - 1708522361863 - - - 1708611471928 - v_companyUIBackgroundColor - -430 - 50 - - false - true - true - - Color - - new Color( 204, 72, 118); - - - - - 1709554407054 - v_companyUILineColor - -430 - 90 - - false - true - true - - Color - - black - - - - - 1713957213075 - v_minPVSlider - -1060 - 430 - - false - true - true - - double - - 0 - - - - - 1713957229701 - v_maxPVSlider - -1060 - 450 - - false - true - true - - double - - 100 - - - - - 1713957233827 - v_defaultPVSlider - -1060 - 470 - - false - true - true - - double - - 0 - - - - - 1713971707023 - v_minBatSlider - -1060 - 510 - - false - true - true - - double - - 0 - - - - - 1713971707027 - v_maxBatSlider - -1060 - 530 - - false - true - true - - double - - 1000 - - - - - 1713971707029 - v_defaultBatSlider - -1060 - 550 - - false - true - true - - double - - 0 - - - - - 1714139274247 - v_nbEVCars - -1050 - 730 - - false - true - true - - int - - 0 - - - - - 1714139294087 - v_nbHydrogenCars - -1050 - 770 - - false - true - true - - int - - 0 - - - - - 1714139299844 - v_nbDieselCars - -1050 - 750 - - false - true - true - - int - - 0 - - - - - 1714139304156 - v_nbEVVans - -1050 - 930 - - false - true - true - - int - - 0 - - - - - 1714139320416 - v_nbEVTrucks - -1050 - 1130 - - false - true - true - - int - - 0 - - - - - 1714139381294 - v_nbDieselVans - -1050 - 950 - - false - true - true - - int - - 0 - - - - - 1714139385293 - v_nbDieselTrucks - -1050 - 1150 - - false - true - true - - int - - 0 - - - - - 1714139405729 - v_nbHydrogenVans - -1050 - 970 - - false - true - true - - int - - 0 - - - - - 1714139413565 - v_nbHydrogenTrucks - -1050 - 1170 - - false - true - true - - int - - 0 - - - - - 1714139966993 - v_minEVCarSlider - -1050 - 610 - - false - true - true - - int - - 0 - - - - - 1714139997786 - v_minHydrogenCarSlider - -1050 - 650 - - false - true - true - - int - - 0 - - - - - 1714140003906 - v_maxEVCarSlider - -1050 - 670 - - false - true - true - - int - - 20 - - - - - 1714140007855 - v_minDieselCarSlider - -1050 - 630 - - false - true - true - - int - - 0 - - - - - 1714140012482 - v_maxHydrogenCarSlider - -1050 - 710 - - false - true - true - - int - - 20 - - - - - 1714140056511 - v_maxDieselCarSlider - -1050 - 690 - - false - true - true - - int - - 20 - - - - - 1714141906262 - v_minEVVanSlider - -1050 - 810 - - false - true - true - - int - - 0 - - - - - 1714141906264 - v_minHydrogenVanSlider - -1050 - 850 - - false - true - true - - int - - 0 - - - - - 1714141906266 - v_maxEVVanSlider - -1050 - 870 - - false - true - true - - int - - 20 - - - - - 1714141906268 - v_minDieselVanSlider - -1050 - 830 - - false - true - true - - int - - 0 - - - - - 1714141906270 - v_maxHydrogenVanSlider - -1050 - 910 - - false - true - true - - int - - 20 - - - - - 1714141906272 - v_maxDieselVanSlider - -1050 - 890 - - false - true - true - - int - - 20 - - - - - 1714142030261 - v_minEVTruckSlider - -1050 - 1010 - - false - true - true - - int - - 0 - - - - - 1714142030263 - v_minHydrogenTruckSlider - -1050 - 1050 - - false - true - true - - int - - 0 - - - - - 1714142030265 - v_maxEVTruckSlider - -1050 - 1070 - - false - true - true - - int - - 20 - - - - - 1714142030267 - v_minDieselTruckSlider - -1050 - 1030 - - false - true - true - - int - - 0 - - - - - 1714142030269 - v_maxDieselTruckSlider - -1050 - 1090 - - false - true - true - - int - - 20 - - - - - 1714142035660 - v_maxHydrogenTruckSlider - -1050 - 1110 - - false - true - true - - int - - 20 - - - - - 1725364840518 - v_adressGC - -740 - 90 - - false - true - true - - String - - - - 1725373825534 - v_chartBackgroundColor - -430 - 130 - - false - true - true - - Color - - white - - - - - 1725381531538 - v_companyUILineWidth - -430 - 110 - - false - true - true - - double - - 2 - - - - - 1725381554846 - v_chartLineWidth - -430 - 150 - - false - true - true - - double - - 2 - - - - - 1725382988283 - v_companyUIBackgroundColorSliders - -430 - 70 - - false - true - true - - Color - - white - - - - - 1725609978738 - v_loadScreenColor - -430 - 180 - - false - true - true - - Color - - v_companyUIBackgroundColor - - - - - 1725614630564 - v_minGCCapacitySlider - -1060 - 270 - - false - true - true - - double - - 0 - - - - - 1725614630566 - v_maxGCCapacitySlider - -1060 - 290 - - false - true - true - - double - - 100 - - - - - 1725614630568 - v_defaultGCCapacitySlider - -1060 - 310 - - false - true - true - - double - - 0 - - - - - 1725625091022 - b_runningMainInterfaceScenarioSettings - -410 - 850 - - false - true - true - - boolean - - false - - - - - 1727798399505 - v_minGCCapacitySlider_Feedin - -1060 - 350 - - false - true - true - - double - - 0 - - - - - 1727798399507 - v_maxGCCapacitySlider_Feedin - -1060 - 370 - - false - true - true - - double - - 100 - - - - - 1727798399509 - v_defaultGCCapacitySlider_Feedin - -1060 - 390 - - false - true - true - - double - - 0 - - - - - 1727872520826 - v_physicalConnectionCapacity_kW - -1060 - 250 - - false - true - true - - double - - - - 1727883544535 - v_NFATO_kW_delivery - -430 - 745 - - false - true - true - - double - - - - 1727883574908 - v_NFATO_kW_feedin - -430 - 765 - - false - true - true - - double - - - - 1727941212434 - v_NFATO_active - -430 - 725 - - false - true - true - - boolean - - - - 1729686904963 - b_runningMainInterfaceSlider - -410 - 870 - - false - true - true - - boolean - - false - - - - - 1756376301806 - v_minSavingsSliders - -1050 - 1260 - - false - true - true - - double - - -50 - - - - - 1756376314706 - v_maxSavingsSliders - -1050 - 1280 - - false - true - true - - double - - 50 - - - - - 1708522385741 - p_companyName - -740 - 70 - - false - true - true - - String - NONE - false - - 1708522385739 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1715181661645 - p_maxAddedVehicles - Amount of vehicles that can additionally be added on the already existing ones - -1060 - 1190 - - false - true - true - - int - NONE - false - - 20 - - - 1715181661643 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760715449229 - p_scenarioSettings_Current - -740 - 140 - - false - true - true - - J_scenario_Current - NONE - false - - 1760715449227 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760715453384 - p_scenarioSettings_Future - -740 - 160 - - false - true - true - - J_scenario_Future - NONE - false - - 1760715453382 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760715588549 - p_gridConnection - -740 - 50 - - false - true - true - - GridConnection - NONE - false - - 1760715588547 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - - - VOID - double - 1713445281785 - f_setScenarioFuture - -410 - 410 - - false - true - true - //Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -////Heating - -//Heating savings -sl_heatDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedHeatSavings_pct(), true); - -//Heating type (aangenomen dat het hetzelfde blijft, want hebben geen vraag die dat stelt in het formulier) -int nr_currentHeatingType = 0; -switch (p_scenarioSettings_Future.getPlannedHeatingType()){ - case GAS_BURNER: - nr_currentHeatingType = 0; - break; - - case HYBRID_HEATPUMP: - nr_currentHeatingType = 1; - break; - - case ELECTRIC_HEATPUMP: - nr_currentHeatingType = 2; - break; - - //case HYDROGENBURNER: - case DISTRICTHEAT: - nr_currentHeatingType = 3; - break; - - case GAS_CHP: - nr_currentHeatingType = 4; - break; - - default: -} -rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, true); - - -////Electricity - -//Electricity savings -sl_electricityDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedElectricitySavings_pct(), true); - -//Connection capacity (Delivery) -sl_GCCapacityCompany.setValue(p_scenarioSettings_Future.getRequestedContractDeliveryCapacity_kW(), true); - -//Connection capacity (Feedin) -sl_GCCapacityCompany_Feedin.setValue(p_scenarioSettings_Future.getRequestedContractFeedinCapacity_kW(), true); - -//Connection capacity (Physical) -v_physicalConnectionCapacity_kW = p_scenarioSettings_Future.getRequestedPhysicalConnectionCapacity_kW(); -p_gridConnection.v_liveConnectionMetaData.physicalCapacity_kW = v_physicalConnectionCapacity_kW; - -//Solar panel power -sl_rooftopPVCompany.setValue(p_scenarioSettings_Future.getPlannedPV_kW(), true); - -//Battery capacity -sl_batteryCompany.setValue(p_scenarioSettings_Future.getPlannedBatteryCapacity_kWh(), true); - -//Curtailment setting -cb_curtailmentCompany.setSelected(p_scenarioSettings_Future.getPlannedCurtailment(), true); - -////Mobility - -//Mobility savings -sl_mobilityDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedTransportSavings_pct(), true); - -//Cars (VOLGORDE BELANGRIJK) -sl_hydrogenCarsCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenCars(), true); -sl_electricCarsCompany.setValue(p_scenarioSettings_Future.getPlannedEVCars(), true); -//sl_dieselCarsCompany.setValue(c_scenarioSettings_Future.getPlannedDieselCars(), true); - -//Vans (VOLGORDE BELANGRIJK) -sl_hydrogenVansCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenVans(), true); -sl_electricVansCompany.setValue(p_scenarioSettings_Future.getPlannedEVVans(), true); -//sl_dieselVansCompany.setValue(c_scenarioSettings_Future.getPlannedDieselVans(), true); - -//Trucks (VOLGORDE BELANGRIJK) -sl_hydrogenTrucksCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenTrucks(), true); -sl_electricTrucksCompany.setValue(p_scenarioSettings_Future.getPlannedEVTrucks(), true); -//sl_dieselTrucksCompany.setValue(c_scenarioSettings_Future.getPlannedDieselTrucks(), true); - -//set active if active in future -p_gridConnection.f_setActive(p_scenarioSettings_Future.getIsActiveInFuture()); - - -//Reset button to future, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(1, false); - - - VOID - double - 1713447383903 - f_setScenario - -430 - 370 - - false - true - true - - scenario_nr - int - - switch (scenario_nr){ - - case 0: // Current - f_setScenarioCurrent(); - - if(!b_runningMainInterfaceScenarioSettings){ - traceln("Selected scenario: Current"); - } - - break; - - case 1: // Future - f_setScenarioFuture(); - - if(!b_runningMainInterfaceScenarioSettings){ - traceln("Selected scenario: Future"); - } - break; - - case 2: // Custom - if(rb_scenariosPrivateUI.getValue() == 2){ - return; - } - rb_scenariosPrivateUI.setValue(2, false); - - if(!b_runningMainInterfaceSlider){ - traceln("Selected scenario: Custom"); - } - break; - - default: -} - -//Set 'results up to date' to false -zero_Interface.b_resultsUpToDate = false; - - - VOID - double - 1713447428490 - f_setScenarioCurrent - -410 - 390 - - false - true - true - //Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -////Heating - -//Heating savings -sl_heatDemandCompanyReduction.setValue(0, true); - -//Heating type -int nr_currentHeatingType = 0; -switch (p_scenarioSettings_Current.getCurrentHeatingType()){ - case GAS_BURNER: - nr_currentHeatingType = 0; - break; - - case HYBRID_HEATPUMP: - nr_currentHeatingType = 1; - break; - - case ELECTRIC_HEATPUMP: - nr_currentHeatingType = 2; - break; - - //case HYDROGENBURNER: - case DISTRICTHEAT: - nr_currentHeatingType = 3; - break; - - case GAS_CHP: - nr_currentHeatingType = 4; - break; - - default: -} -rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, true); - - -////Electricity - -//Electricity savings -sl_electricityDemandCompanyReduction.setValue(0, true); - -//Connection capacity (Delivery) -sl_GCCapacityCompany.setValue(p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW(), true); - -//Connection capacity (Feedin) -sl_GCCapacityCompany_Feedin.setValue(p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW(), true); - -//Connection capacity (Physical) -v_physicalConnectionCapacity_kW = p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW(); -p_gridConnection.v_liveConnectionMetaData.physicalCapacity_kW = v_physicalConnectionCapacity_kW; - -//Solar panel power -sl_rooftopPVCompany.setValue(v_minPVSlider, true); - -//Battery capacity -sl_batteryCompany.setValue(v_minBatSlider, true); - -//Curtailment setting -cb_curtailmentCompany.setSelected(false, false); - -////Mobility - -//Mobility savings -sl_mobilityDemandCompanyReduction.setValue(0, true); - -//Cars (VOLGORDE BELANGRIJK) -sl_hydrogenCarsCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenCars(), true); -sl_electricCarsCompany.setValue(p_scenarioSettings_Current.getCurrentEVCars(), true); -//sl_dieselCarsCompany.setValue(c_scenarioSettings_Current.getCurrentDieselCars(), true); - -//Vans (VOLGORDE BELANGRIJK) -sl_hydrogenVansCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenVans(), true); -sl_electricVansCompany.setValue(p_scenarioSettings_Current.getCurrentEVVans(), true); -//sl_dieselVansCompany.setValue(c_scenarioSettings_Current.getCurrentDieselVans(), true); - -//Trucks (VOLGORDE BELANGRIJK) -sl_hydrogenTrucksCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenTrucks(), true); -sl_electricTrucksCompany.setValue(p_scenarioSettings_Current.getCurrentEVTrucks(), true); -//sl_dieselTrucksCompany.setValue(c_scenarioSettings_Current.getCurrentDieselTrucks(), true); - -//set active if active in present -p_gridConnection.f_setActive(p_scenarioSettings_Current.getIsCurrentlyActive()); - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(0, false); - - - VOID - double - 1713537591106 - f_setHeatingType - -430 - 490 - - false - true - true - - GC - GridConnection - - - selectedHeatingType - OL_GridConnectionHeatingType - - //Check if selected is not the same as previous, if not: continue with the setting of new heating type -if (GC.f_getCurrentHeatingType() == selectedHeatingType){ - //traceln("Selected heating type is the same as previous heating type"); - return; -} - -//Remove from heat grid if it was connected to one. -GC.p_parentNodeHeat = null; -GC.p_parentNodeHeatID = null; - -//Remove primary heating asset -GC.f_removeAllHeatingAssets(); - -//Get needed cacacity -double capacityThermal_kW; - -//Select heat demand consumption asset -J_EAConsumption heatDemandAsset = findFirst(GC.c_consumptionAssets, j_ea->j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); - -//Check heating demand asset is null (shouldnt be possible) -if (heatDemandAsset != null){ - capacityThermal_kW = heatDemandAsset.yearlyDemand_kWh/8760*10; // --> average hourly consumption * 10 --> to always have enough capacity -} -else{ - //Select profile heat demand asset - J_EAProfile heatDemandAsset_Profile = findFirst(GC.c_profileAssets, j_ea->j_ea.energyCarrier == OL_EnergyCarriers.HEAT); - - if(heatDemandAsset_Profile != null){ - capacityThermal_kW = heatDemandAsset_Profile.getProfileScaling_fr() * max(heatDemandAsset_Profile.a_energyProfile_kWh)*4; - } - else{ - traceln("No heating demand asset found for GC:" + GC.p_gridConnectionID); - traceln("--> No heating asset created"); - return; - } - -} - -capacityThermal_kW = capacityThermal_kW * 2;//For now just make it always twice as high, to be able to support savings/additional consumption slider settings. - -//Algemeen -double timestep_h = zero_Interface.energyModel.p_timeStep_h; -double efficiency; -double outputTemperature_degC; - -//Heatpump specifieke parameters -double baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); -double capacityElectric_kW; -OL_AmbientTempType ambientTempType; -double sourceAssetHeatPower_kW; -double belowZeroHeatpumpEtaReductionFactor; - - - -//Create selected heating type -switch (selectedHeatingType){ - case GAS_BURNER: - - //Add primary heating asset (gasburner) - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; - - new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - - break; - - case HYBRID_HEATPUMP: - - //Add primary heating asset (heatpump) - capacityElectric_kW = capacityThermal_kW / 3; //-- /3, want is hybride, dus kleiner - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); - - //Add secondary heating asset (gasburner) - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; - - J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - //GC.p_secondaryHeatingAsset = gasBurnerHybrid; - - break; - - case ELECTRIC_HEATPUMP: - - //Add primary heating asset (heatpump) - capacityElectric_kW = capacityThermal_kW; - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - - //Add secondary heating asset (if needed??) //E-boiler!!?? - break; - - case HYDROGENBURNER: - - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHydrogenBurner_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHydrogenBurner_degC; - - //Add primary heating asset (hydrogenburner) - new J_EAConversionHydrogenBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - - break; - - case DISTRICTHEAT: - - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - - new J_EAConversionHeatDeliverySet(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - - //Add GC to heat grid if it exists, else create new one - GC.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - if(GC.p_parentNodeHeat == null){ - GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); - zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); - GN_heat.p_gridNodeID = "Heatgrid"; - - // Check wether transformer capacity is known or estimated - GN_heat.p_capacity_kW = 1000000; - GN_heat.p_realCapacityAvailable = false; - - // Basic GN information - GN_heat.p_description = "Warmtenet"; - - //Define node type - GN_heat.p_nodeType = OL_GridNodeType.HT; - GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - - //Define GN location - GN_heat.p_latitude = 0; - GN_heat.p_longitude = 0; - GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - - //Connect - GC.p_parentNodeHeat = GN_heat; - - //Show warning that heat grid is not a simple solution - f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import."); - } - GC.p_parentNodeHeatID = GC.p_parentNodeHeat.p_gridNodeID; - break; - - case GAS_CHP: - - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr + zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureCHP_degC; - double outputCapacityElectric_kW = (capacityThermal_kW/zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr) * zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; - - new J_EAConversionGasCHP(GC, outputCapacityElectric_kW, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC ); - - break; -} - -// Add a management for the chosen heating type -GC.f_addHeatManagement(selectedHeatingType, false); - - - VOID - double - 1713537591117 - f_setGCCapacity - -430 - 510 - - false - true - true - - GC - GridConnection - - - setGridConnectionCapacity_kW - double - - - type - String - - GC.f_nfatoSetConnectionCapacity(true); - -switch(type){ - case "DELIVERY": - GC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = setGridConnectionCapacity_kW; - break; - case "FEEDIN": - GC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = setGridConnectionCapacity_kW; - break; - case "PHYSICAL": - GC.v_liveConnectionMetaData.physicalCapacity_kW = setGridConnectionCapacity_kW; - break; -} - -GC.f_nfatoSetConnectionCapacity(false); - - - VOID - double - 1713537591121 - f_setBattery - -430 - 570 - - false - true - true - - GC - GridConnection - - - setBatteryCapacity_kWh - double - - J_EAStorage batteryAsset = findFirst(GC.c_storageAssets, p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); - -if (setBatteryCapacity_kWh == 0) { - if (batteryAsset != null) { - batteryAsset.removeEnergyAsset(); - } -} -else { - double c_rate = 1.0 / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - if (batteryAsset == null) { - batteryAsset = new J_EAStorageElectric(GC, setBatteryCapacity_kWh * c_rate, setBatteryCapacity_kWh, 0.5, zero_Interface.energyModel.p_timeStep_h); - } - else { - if (batteryAsset.getStorageCapacity_kWh() != 0) { - c_rate = ((J_EAStorageElectric)batteryAsset).getCapacityElectric_kW()/((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh(); - } - ((J_EAStorageElectric)batteryAsset).setStorageCapacity_kWh(setBatteryCapacity_kWh); - ((J_EAStorageElectric)batteryAsset).setCapacityElectric_kW(c_rate * setBatteryCapacity_kWh); - } -} - -//Add battery algorithm if it is not present -if(GC.f_getBatteryManagement() == null){ - GC.f_setBatteryManagement(new J_BatteryManagementSelfConsumption(GC)); -} - - - - VOID - double - 1713954180112 - f_setPVSystem - -430 - 530 - - false - true - true - - GC - GridConnection - - - v_rooftopPV_kWp - double - - if (GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - J_EAProduction pvAsset = findFirst(GC.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); - if (v_rooftopPV_kWp == 0) { - pvAsset.removeEnergyAsset(); - } - else { - pvAsset.setCapacityElectric_kW(v_rooftopPV_kWp); - } -} -else{ - if (v_rooftopPV_kWp != 0) { - f_addPVAsset(GC, OL_EnergyAssetType.PHOTOVOLTAIC, v_rooftopPV_kWp); - } -} - - - VOID - double - 1713956765904 - f_setSliderPresets - Set Slider presets (limits, start value, text) for private company sliders - -1090 - 190 - - false - true - true - //Heating radio button -f_setHeatingRB(); - -//Set grid capacity slider (delivery) -f_setGCCapacitySliderPresets(); - -//Set connection capacity slider (feedin) -f_setGCCapacitySliderPresets_Feedin(); - -//PV slider -f_setPVSliderPresets(); - -//Battery slider -f_setBatSliderPresets(); - -//Vehicles sliders -f_setVehicleSliderPresets(); - -//Demand Reduction sliders -f_setDemandReductionSliderPresets(); - - - VOID - double - 1713961813474 - f_setComboBoxOwnedGC - -1070 - 100 - - false - true - true - String currentSelectedGCString = ""; -int i = 1; -List<String> ownedGCs = new ArrayList<String>(); -for(GridConnection GC : p_gridConnection.p_owner.f_getOwnedGridConnections()){ - if(GC instanceof GCUtility){ - String GCDisplayName = "Aansluiting " + i + ": " + GC.p_address.getAddress(); - ownedGCs.add(GCDisplayName); - i++; - - if(GC == p_gridConnection){ - currentSelectedGCString = GCDisplayName; - } - } -} -String[] ownedGCsArray = new String[ownedGCs.size()]; -for(int j = 0; j < ownedGCsArray.length; j++){ - ownedGCsArray[j] = ownedGCs.get(j); -} - -cb_selectGC.setItems(ownedGCsArray, false); - -//Set cb to correct gc -cb_selectGC.setValue(currentSelectedGCString, false); - - - VOID - double - 1714139629738 - f_setPVSliderPresets - -1070 - 410 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_rooftopPVCompany.setRange(0, 2000000); - -//Set range specific for each company -v_minPVSlider = roundToInt(p_scenarioSettings_Current.getCurrentPV_kW()); -v_maxPVSlider = roundToInt(zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV* p_gridConnection.p_roofSurfaceArea_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); -if(v_maxPVSlider <= v_minPVSlider){ - v_maxPVSlider = v_minPVSlider + 1000; -} -v_defaultPVSlider = v_minPVSlider; - - - VOID - double - 1714139648227 - f_setBatSliderPresets - -1070 - 490 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_batteryCompany.setRange(0, 10000); - -double upperLimit = 1000 + 1000 * Math.ceil(p_scenarioSettings_Current.getCurrentPV_kW()/1000.0); -v_minBatSlider = roundToInt(p_scenarioSettings_Current.getCurrentBatteryCapacity_kWh()); -v_maxBatSlider = Math.max(v_minBatSlider*2, upperLimit); -v_defaultBatSlider = v_minBatSlider; - - - VOID - double - 1714139684603 - f_setVehicleSliderPresets - -1070 - 570 - - false - true - true - //Cars -f_setCarSliderPresets(); - -//Vans -f_setVanSliderPresets(); - -//Trucks -f_setTruckSliderPresets(); - - - VOID - double - 1714140108358 - f_setCarSliderPresets - -1060 - 590 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_electricCarsCompany.setRange(0, 500); -sl_dieselCarsCompany.setRange(0, 500); -sl_hydrogenCarsCompany.setRange(0, 500); - - -//Get default values -int default_nbEVCars = p_scenarioSettings_Current.getCurrentEVCars(); -int default_nbDieselCars = p_scenarioSettings_Current.getCurrentDieselCars(); -int default_nbHydrogenCars = p_scenarioSettings_Current.getCurrentHydrogenCars(); - -//Set minimum value -v_minEVCarSlider = default_nbEVCars; -v_minDieselCarSlider = 0; -v_minHydrogenCarSlider = 0; - -//Determine realistic max additional vehicles -int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVCars + default_nbDieselCars + default_nbHydrogenCars)*1, 20); - -//Set maximum -v_maxEVCarSlider = default_nbEVCars + default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. -v_maxDieselCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; -v_maxHydrogenCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; - -//Set default values -v_nbEVCars = default_nbEVCars; -v_nbDieselCars = default_nbDieselCars; -v_nbHydrogenCars = default_nbHydrogenCars; - -//Set slider knobs -sl_electricCarsCompany.setValue(v_nbEVCars, false); -sl_dieselCarsCompany.setValue(v_nbDieselCars, false); -sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); - - - - VOID - double - 1714140134819 - f_setVanSliderPresets - -1060 - 790 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_electricVansCompany.setRange(0, 500); -sl_dieselVansCompany.setRange(0, 500); -sl_hydrogenVansCompany.setRange(0, 500); - -//Get default values -int default_nbEVVans = p_scenarioSettings_Current.getCurrentEVVans(); -int default_nbDieselVans = p_scenarioSettings_Current.getCurrentDieselVans(); -int default_nbHydrogenVans = p_scenarioSettings_Current.getCurrentHydrogenVans(); - -//Set minimum value -v_minEVVanSlider = default_nbEVVans; -v_minDieselVanSlider = 0; -v_minHydrogenVanSlider = 0; - -//Determine realistic max additional vehicles -int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVVans + default_nbDieselVans + default_nbHydrogenVans)*2, 20); - -//Set maximum -v_maxEVVanSlider = default_nbEVVans + default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. -v_maxDieselVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; -v_maxHydrogenVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; - -//Set default values -v_nbEVVans = default_nbEVVans; -v_nbDieselVans = default_nbDieselVans; -v_nbHydrogenVans = default_nbHydrogenVans; - -//Set slider knob -sl_electricVansCompany.setValue(v_nbEVVans, false); -sl_dieselVansCompany.setValue(v_nbDieselVans, false); -sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); - - - - VOID - double - 1714140156233 - f_setTruckSliderPresets - -1060 - 990 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_electricTrucksCompany.setRange(0, 500); -sl_dieselTrucksCompany.setRange(0, 500); -sl_hydrogenTrucksCompany.setRange(0, 500); - -//Get default values -int default_nbEVTrucks = p_scenarioSettings_Current.getCurrentEVTrucks(); -int default_nbDieselTrucks = p_scenarioSettings_Current.getCurrentDieselTrucks(); -int default_nbHydrogenTrucks = p_scenarioSettings_Current.getCurrentHydrogenTrucks(); - -//Set minimum value -v_minEVTruckSlider = default_nbEVTrucks; -v_minDieselTruckSlider = 0; -v_minHydrogenTruckSlider = 0; - -//Determine realistic max additional vehicles -int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVTrucks + default_nbDieselTrucks + default_nbHydrogenTrucks)*2, 20); - -//Set maximum -v_maxEVTruckSlider = default_nbEVTrucks + default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. -v_maxDieselTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; -v_maxHydrogenTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; - -//Set default values -v_nbEVTrucks = default_nbEVTrucks; -v_nbDieselTrucks = default_nbDieselTrucks; -v_nbHydrogenTrucks = default_nbHydrogenTrucks; - -//Set slider knob -sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); -sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); -sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); - - - - VOID - double - 1714410040303 - f_createVehicle - -410 - 650 - - false - true - true - - parentGC - GridConnection - - - vehicleType - OL_EnergyAssetType - - - tripTracker - J_ActivityTrackerTrips - - - available - boolean - - - isAdditionalVehicle - boolean - - double energyConsumption_kWhpkm = 0; -double vehicleScaling = 1.0; -double timestep_h = zero_Interface.energyModel.p_timeStep_h; - -if (vehicleType == OL_EnergyAssetType.ELECTRIC_VEHICLE || vehicleType == OL_EnergyAssetType.ELECTRIC_VAN || vehicleType == OL_EnergyAssetType.ELECTRIC_TRUCK ){ // Create EVS - double storageCapacity_kWh = 0; - double capacityElectricity_kW = 0; - double stateOfCharge_fr = 1; // Initial state of charge - - switch(vehicleType){ - case ELECTRIC_VEHICLE: - capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVCarChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVCarChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerCar_kW; - storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageCar_kWh; - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; - break; - case ELECTRIC_VAN: - capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVVanChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVVanChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerVan_kW; - storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageVan_kWh; - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; - break; - case ELECTRIC_TRUCK: - capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVTruckChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVTruckChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; - storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - break; - - } - - //Create EV and connect to GC and selected trip tracker - J_EAEV electricVehicle = new J_EAEV(parentGC, capacityElectricity_kW, storageCapacity_kWh, stateOfCharge_fr, timestep_h, energyConsumption_kWhpkm, vehicleScaling, vehicleType, tripTracker); - electricVehicle.available = available; - - - - if (isAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(electricVehicle); - } - else{ - zero_Interface.c_orderedVehicles.add(0, electricVehicle); - } -} - -else if (vehicleType == OL_EnergyAssetType.DIESEL_VEHICLE || vehicleType == OL_EnergyAssetType.DIESEL_VAN || vehicleType == OL_EnergyAssetType.DIESEL_TRUCK ){ // Create diesel vehicles - switch (vehicleType){ - - case DIESEL_VEHICLE: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionCar_kWhpkm; - break; - - case DIESEL_VAN: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionVan_kWhpkm; - break; - - case DIESEL_TRUCK: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - break; - } - - //Create Diesel vehicle and connect to GC and selected trip tracker - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(parentGC, energyConsumption_kWhpkm, timestep_h, vehicleScaling, vehicleType, tripTracker); - dieselVehicle.available = available; - - - - if (isAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(dieselVehicle); - } - else{ - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - } -} - -else{ // (Hydrogen vehicles) - switch (vehicleType){ - case HYDROGEN_VEHICLE: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionCar_kWhpkm; - break; - case HYDROGEN_VAN: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionVan_kWhpkm; - break; - case HYDROGEN_TRUCK: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - break; - - } - - //Create Hydrogen vehicle and connect to GC and selected trip tracker - J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(parentGC, energyConsumption_kWhpkm, timestep_h, vehicleScaling, vehicleType, tripTracker); - hydrogenVehicle.available = available; - - - - if (isAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(hydrogenVehicle); - } - else{ - zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); - } -} - - - - - VOID - int - 1714411599586 - f_setElectricVehicleSliders - -430 - 590 - - false - true - true - - GC - GridConnection - - - vehicleType - OL_EnergyAssetType - - - setAmountOfVehicles - int - - int local_EV_nb; -int local_DieselV_nb; -int local_HydrogenV_nb; -int max_amount_diesel_vehicles; - -OL_EnergyAssetType vehicleType_diesel; -OL_EnergyAssetType vehicleType_hydrogen; - -switch (vehicleType){ - - case ELECTRIC_VEHICLE: - - vehicleType_diesel = OL_EnergyAssetType.DIESEL_VEHICLE; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VEHICLE; - - local_EV_nb = v_nbEVCars; - local_DieselV_nb = v_nbDieselCars; - local_HydrogenV_nb = v_nbHydrogenCars; - - max_amount_diesel_vehicles = v_maxDieselCarSlider; - - break; - - case ELECTRIC_VAN: - - vehicleType_diesel = OL_EnergyAssetType.DIESEL_VAN; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VAN; - - local_EV_nb = v_nbEVVans; - local_DieselV_nb = v_nbDieselVans; - local_HydrogenV_nb = v_nbHydrogenVans; - - max_amount_diesel_vehicles = v_maxDieselVanSlider; - - break; - - case ELECTRIC_TRUCK: - - vehicleType_diesel = OL_EnergyAssetType.DIESEL_TRUCK; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_TRUCK; - - local_EV_nb = v_nbEVTrucks; - local_DieselV_nb = v_nbDieselTrucks; - local_HydrogenV_nb = v_nbHydrogenTrucks; - - max_amount_diesel_vehicles = v_maxDieselTruckSlider; - - break; - - default: - traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); - return; -} - - -if (setAmountOfVehicles > local_EV_nb){ // Slider has increased the amount of selected vehicles - - //First convert all other existing additional vehicles - int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_hydrogen).size(); - while(setAmountOfVehicles > local_EV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ - - // Find an additional Diesel vehicle - J_EAVehicle dieselVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel); - - if(dieselVehicle != null){ - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove Diesel vehicle - boolean available = dieselVehicle.getAvailability(); - dieselVehicle.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - - //Create new additional EV - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_EV_nb++; - local_DieselV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - else{ - // Find an additional Hydrogen vehicle - J_EAVehicle hydrogenVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove Hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - hydrogenVehicle.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - - //Create new additional EV - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_EV_nb++; - local_HydrogenV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - } - - while ( setAmountOfVehicles > local_EV_nb && local_DieselV_nb > 0) { - - // Find a Diesel vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove Diesel vehicle - boolean available = dieselVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - - //Create new EV - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_EV_nb++; - local_DieselV_nb--; - } - while (setAmountOfVehicles > local_EV_nb && local_HydrogenV_nb > 0){ - - // Find a Hydrogen vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove Hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - - //Create new EV - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_EV_nb++; - local_HydrogenV_nb--; - } - while (setAmountOfVehicles > local_EV_nb){ //If still not enough EV: - - // Create additional vehicles - f_createVehicle(GC, vehicleType, null, true, true); - - //Update variables - local_EV_nb++; - } - -} -else if(setAmountOfVehicles < local_EV_nb){ // Slider has decreased the amount of selected vehicles - - ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); - while(setAmountOfVehicles < local_EV_nb && additionalVehicles.size() > 0){ //If there are additional EV, remove them first - - //Find additional created vehicle - J_EAEV ev = (J_EAEV)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added - - // Remove electric vehicle - additionalVehicles.remove(ev); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - //Update variable - local_EV_nb--; - } - while ( setAmountOfVehicles < local_EV_nb && local_DieselV_nb < max_amount_diesel_vehicles) { - - //Find a to be removed EV - J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - //Remove EV - boolean available = ev.getAvailability(); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - // Create diesel vehicle - f_createVehicle(GC, vehicleType_diesel, tripTracker, available, false); - - local_EV_nb--; - local_DieselV_nb++; - } -} - - - -//Update variables -switch (vehicleType){ - - case ELECTRIC_VEHICLE: - - v_nbEVCars = local_EV_nb; - v_nbDieselCars = local_DieselV_nb; - v_nbHydrogenCars = local_HydrogenV_nb; - - break; - - case ELECTRIC_VAN: - - v_nbEVVans = local_EV_nb; - v_nbDieselVans = local_DieselV_nb; - v_nbHydrogenVans = local_HydrogenV_nb; - - break; - - case ELECTRIC_TRUCK: - - v_nbEVTrucks = local_EV_nb; - v_nbDieselTrucks = local_DieselV_nb; - v_nbHydrogenTrucks = local_HydrogenV_nb; - - break; -} - - - VOID - int - 1714471183392 - f_setDieselVehicleSliders - -430 - 630 - - false - true - true - - GC - GridConnection - - - vehicleType - OL_EnergyAssetType - - - setAmountOfVehicles - int - - int local_EV_nb; -int local_DieselV_nb; -int local_HydrogenV_nb; - -int min_amount_EV; -int max_amount_EV; - -OL_EnergyAssetType vehicleType_electric; -OL_EnergyAssetType vehicleType_hydrogen; - -switch (vehicleType){ - - case DIESEL_VEHICLE: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VEHICLE; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VEHICLE; - - local_EV_nb = v_nbEVCars; - local_DieselV_nb = v_nbDieselCars; - local_HydrogenV_nb = v_nbHydrogenCars; - - min_amount_EV = v_minEVCarSlider; - max_amount_EV = v_maxEVCarSlider; - - break; - - case DIESEL_VAN: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VAN; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VAN; - - local_EV_nb = v_nbEVVans; - local_DieselV_nb = v_nbDieselVans; - local_HydrogenV_nb = v_nbHydrogenVans; - - min_amount_EV = v_minEVVanSlider; - max_amount_EV = v_maxEVVanSlider; - - break; - - case DIESEL_TRUCK: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_TRUCK; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_TRUCK; - - local_EV_nb = v_nbEVTrucks; - local_DieselV_nb = v_nbDieselTrucks; - local_HydrogenV_nb = v_nbHydrogenTrucks; - - min_amount_EV = v_minEVTruckSlider; - max_amount_EV = v_maxEVTruckSlider; - - break; - - default: - traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); - return; -} - - -if (setAmountOfVehicles > local_DieselV_nb){ // Slider has increased the amount of selected vehicles - //First convert all other existing additional vehicles - int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen || p.energyAssetType == vehicleType_electric).size(); - while(setAmountOfVehicles > local_DieselV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ - - // Find an additional EV vehicle - J_EAVehicle ev = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_electric); - - if(ev != null){ - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - // Remove EV - boolean available = ev.getAvailability(); - ev.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); - zero_Interface.c_orderedVehicles.remove(ev); - - //Create new additional Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_DieselV_nb++; - local_EV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - else{ - // Find an additional Hydrogen vehicle - J_EAVehicle hydrogenVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove Hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - hydrogenVehicle.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - - //Create new additional Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_DieselV_nb++; - local_HydrogenV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - } - while ( setAmountOfVehicles > local_DieselV_nb && local_EV_nb > min_amount_EV) { - - // Find an EV - J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - //Remove one EV - boolean available = ev.getAvailability(); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - //Create new Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_DieselV_nb++; - local_EV_nb--; - } - while (setAmountOfVehicles > local_DieselV_nb && local_HydrogenV_nb > 0){ - - // Find a Hydrogen vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - - //Create new Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_DieselV_nb++; - local_HydrogenV_nb--; - } - while (setAmountOfVehicles > local_DieselV_nb){ // Create additional vehicles - - f_createVehicle(GC, vehicleType, null, true, true); - - local_DieselV_nb++; - } -} -else if(setAmountOfVehicles < local_DieselV_nb){ // Slider has decreased the amount of selected vehicles - - ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); - while(setAmountOfVehicles < local_DieselV_nb && additionalVehicles.size() > 0){ //Remove additional Diesel vehicles first - - //Find additional created vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added - - // Remove diesel vehicle - additionalVehicles.remove(dieselVehicle); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - - //Update variable - local_DieselV_nb--; - } - while ( setAmountOfVehicles < local_DieselV_nb && local_EV_nb < max_amount_EV) { - - // Find a to be removed Diesel vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove diesel vehicle - boolean available = dieselVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - - //Create new EV - f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); - - //Update variables - local_DieselV_nb--; - local_EV_nb++; - } -} - - - -//Update variables -switch (vehicleType){ - - case DIESEL_VEHICLE: - v_nbEVCars = local_EV_nb; - v_nbDieselCars = local_DieselV_nb; - v_nbHydrogenCars = local_HydrogenV_nb; - break; - - case DIESEL_VAN: - v_nbEVVans = local_EV_nb; - v_nbDieselVans = local_DieselV_nb; - v_nbHydrogenVans = local_HydrogenV_nb; - break; - - case DIESEL_TRUCK: - v_nbEVTrucks = local_EV_nb; - v_nbDieselTrucks = local_DieselV_nb; - v_nbHydrogenTrucks = local_HydrogenV_nb; - break; -} - - - VOID - int - 1714474430338 - f_setHydrogenVehicleSliders - -430 - 610 - - false - true - true - - GC - GridConnection - - - vehicleType - OL_EnergyAssetType - - - setAmountOfVehicles - int - - int local_EV_nb; -int local_DieselV_nb; -int local_HydrogenV_nb; - -int min_amount_EV; -int max_amount_EV; - -OL_EnergyAssetType vehicleType_electric; -OL_EnergyAssetType vehicleType_diesel; - -switch (vehicleType){ - - case HYDROGEN_VEHICLE: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VEHICLE; - vehicleType_diesel = OL_EnergyAssetType.DIESEL_VEHICLE; - - local_EV_nb = v_nbEVCars; - local_DieselV_nb = v_nbDieselCars; - local_HydrogenV_nb = v_nbHydrogenCars; - - min_amount_EV = v_minEVCarSlider; - max_amount_EV = v_maxEVCarSlider; - - break; - - case HYDROGEN_VAN: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VAN; - vehicleType_diesel = OL_EnergyAssetType.DIESEL_VAN; - - local_EV_nb = v_nbEVVans; - local_DieselV_nb = v_nbDieselVans; - local_HydrogenV_nb = v_nbHydrogenVans; - - min_amount_EV = v_minEVVanSlider; - max_amount_EV = v_maxEVVanSlider; - - break; - - case HYDROGEN_TRUCK: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_TRUCK; - vehicleType_diesel = OL_EnergyAssetType.DIESEL_TRUCK; - - local_EV_nb = v_nbEVTrucks; - local_DieselV_nb = v_nbDieselTrucks; - local_HydrogenV_nb = v_nbHydrogenTrucks; - - min_amount_EV = v_minEVTruckSlider; - max_amount_EV = v_maxEVTruckSlider; - - break; - - default: - traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); - return; -} - -if (setAmountOfVehicles > local_HydrogenV_nb){ // Slider has increased the amount of selected vehicles - - //First convert all other existing additional vehicles - int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_electric).size(); - while(setAmountOfVehicles > local_HydrogenV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ - - // Find an additional Diesel vehicle - J_EAVehicle dieselVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel); - - if(dieselVehicle != null){ - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove Diesel vehicle - boolean available = dieselVehicle.getAvailability(); - dieselVehicle.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - - //Create new additional Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_HydrogenV_nb++; - local_DieselV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - else{ - // Find an additional EV vehicle - J_EAVehicle ev = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_electric); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - // Remove EV - boolean available = ev.getAvailability(); - ev.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); - zero_Interface.c_orderedVehicles.remove(ev); - - //Create new additional Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_HydrogenV_nb++; - local_EV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - } - while ( setAmountOfVehicles > local_HydrogenV_nb && local_DieselV_nb > 0) { - - // Find a to be removed Diesel vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - //Remove diesel vehicle - boolean available = dieselVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - - //Create new Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_HydrogenV_nb++; - local_DieselV_nb--; - - } - while (setAmountOfVehicles > local_HydrogenV_nb && local_EV_nb > min_amount_EV){ - - // Find a to be removed EV - J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - // Remove EV - boolean available = ev.getAvailability(); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - //Create new Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_HydrogenV_nb++; - local_EV_nb--; - } - while (setAmountOfVehicles > local_HydrogenV_nb){ // Create additional vehicles - - f_createVehicle(GC, vehicleType, null, true, true); - local_HydrogenV_nb++; - } - - -} -else if(setAmountOfVehicles < local_HydrogenV_nb){ // Slider has decreased the amount of selected vehicles - - ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); - while(setAmountOfVehicles < local_HydrogenV_nb && additionalVehicles.size() > 0){//Remove additional Hydrogen vehicles first - - //Find additional created vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added - - // Remove hydrogen vehicle - additionalVehicles.remove(hydrogenVehicle); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - - //Update variable - local_HydrogenV_nb--; - } - while ( setAmountOfVehicles < local_HydrogenV_nb && local_EV_nb < max_amount_EV) { - - // Find a to be removed Hydrogen vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - - //Create new EV vehicle - f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); - - //Update variables - local_HydrogenV_nb--; - local_EV_nb++; - } -} - -//Update variables -switch (vehicleType){ - - case HYDROGEN_VEHICLE: - - v_nbEVCars = local_EV_nb; - v_nbDieselCars = local_DieselV_nb; - v_nbHydrogenCars = local_HydrogenV_nb; - - break; - - case HYDROGEN_VAN: - - v_nbEVVans = local_EV_nb; - v_nbDieselVans = local_DieselV_nb; - v_nbHydrogenVans = local_HydrogenV_nb; - - break; - - case HYDROGEN_TRUCK: - - v_nbEVTrucks = local_EV_nb; - v_nbDieselTrucks = local_DieselV_nb; - v_nbHydrogenTrucks = local_HydrogenV_nb; - - break; -} - - - VOID - double - 1714654645264 - f_setResultsUIPresets - -1050 - 1350 - - false - true - true - //Set the order of the resultsUI to front but behind simulation screen group and load icon -presentation.remove(uI_Results_presentation); -presentation.insert(presentation.size()-1, uI_Results_presentation); -presentation.remove(gr_loadIcon); -presentation.insert(presentation.size()-1, gr_loadIcon); -presentation.remove(gr_simulateYearScreen); -presentation.insert(presentation.size()-1, gr_simulateYearScreen); -presentation.remove(gr_GCisPausedScreen); -presentation.insert(presentation.size()-1, gr_GCisPausedScreen); - - - -//Set the locations and visibilities of the ResultsUI agents -uI_Results.f_setChartProfiles_Presentation(0, 0, true); -uI_Results.f_setChartBalance_Presentation(530, 0, true); -uI_Results.f_setChartGridLoad_Presentation(1060, 0, false); -uI_Results.f_setChartSankey_Presentation(1060, 0, true); -uI_Results.f_setResultsUIHeader(null, null, false); - -//Disable KPIsummary button if KPIsummary is not selected -if(zero_Interface.settings.showKPISummary() == null || !zero_Interface.settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setVisible(false); -} -else{ - //uI_Results.f_setCB_KPISummary_Presentation(10, -30, true); -} - -//Set selected object display flase -uI_Results.b_isCompanyUIResultsUI = true; - -//Set the color of the charts -uI_Results.f_styleAllCharts(v_chartBackgroundColor, v_companyUILineColor, v_chartLineWidth, LINE_STYLE_SOLID); - - - VOID - double - 1714655282643 - f_setCompanyUI - -1090 - 40 - - false - true - true - - GC - GridConnection - - //Initialize parameters -p_gridConnection = GC; -p_companyName = GC.p_ownerID; -v_adressGC = GC.p_address.getAddress(); -p_scenarioSettings_Current = zero_Interface.c_scenarioMap_Current.get(GC.p_uid); -p_scenarioSettings_Future = zero_Interface.c_scenarioMap_Future.get(GC.p_uid); - -//Scale companyName to the box size -f_setNameTextSize(); - -//Set the sliders to the correct settings -f_setSelectedGCSliders(); - -//Set the new graphs/building selection -if(!b_runningMainInterfaceScenarioSettings && !b_runningMainInterfaceSlider && p_gridConnection.v_isActive){ - f_updateUIResultsCompanyUI(); - if(p_gridConnection.v_rapidRunData != null){ - uI_Results.f_setAllCharts(); - } -} - -//Set connected GC combobox -f_setComboBoxOwnedGC(); - -//Enable/disable all sliders (based on paused) -f_enableAllSliders(p_gridConnection.v_isActive); - - - - VOID - double - 1714656835269 - f_updateUIResultsCompanyUI - -1050 - 1370 - - false - true - true - uI_Results.f_updateResultsUI(p_gridConnection); -uI_Results.f_setChartProfiles_Presentation(null, null, true); -uI_Results.f_setChartBalance_Presentation(null, null, true); - -if(cb_showGridloadPlot.isSelected()) - uI_Results.f_setChartGridLoad_Presentation(null, null, true); -else{ - uI_Results.f_setChartSankey_Presentation(null, null, true); -} - - - VOID - double - 1715713362876 - f_setHeatingRB - -1070 - 210 - - false - true - true - int nr_currentHeatingType = 0; -String rbHeating_acces = "enabled"; - -switch (p_scenarioSettings_Current.getCurrentHeatingType()){ - case GAS_BURNER: - nr_currentHeatingType = 0; - break; - case HYBRID_HEATPUMP: - nr_currentHeatingType = 1; - rbHeating_acces = "disabled"; - break; - case ELECTRIC_HEATPUMP: - nr_currentHeatingType = 2; - rbHeating_acces = "disabled"; - break; - case DISTRICTHEAT: - nr_currentHeatingType = 3; - break; - case LT_DISTRICTHEAT: - nr_currentHeatingType = 3; - rbHeating_acces = "disabled"; - break; - case CUSTOM: - nr_currentHeatingType = 4; - rbHeating_acces = "disabled"; - break; - default: - rbHeating_acces = "invisible"; -} - -if (rbHeating_acces.equals("disabled") || rbHeating_acces.equals("invisible")){ - rb_heatingTypePrivateUI.setEnabled(false); - - if(p_gridConnection.v_hasQuarterHourlyValues){ - sl_heatDemandCompanyReduction.setEnabled(false); - } - - if (rbHeating_acces.equals("invisible")){ - rb_heatingTypePrivateUI.setVisible(false); - gr_heatDemandReductionSlider.setVisible(false); - } - else { - gr_heatDemandReductionSlider.setVisible(true); - } -} -else{ // if(rbHeating_acces.equals("enabled"){ - rb_heatingTypePrivateUI.setEnabled(true); - rb_heatingTypePrivateUI.setVisible(true); - sl_heatDemandCompanyReduction.setEnabled(true); - gr_heatDemandReductionSlider.setVisible(true); -} - - - - VOID - double - 1715952034311 - f_addPVAsset - -410 - 550 - - false - true - true - - parentGC - GridConnection - - - asset_type - OL_EnergyAssetType - - - installedPower_kW - double - - String asset_name = "Solar Panels"; -double capacityElectric_kW = installedPower_kW; -double capacityHeat_kW = 0; -double yearlyProductionMethane_kWh = 0; -double yearlyProductionHydrogen_kWh = 0; -double timestep_h = zero_Interface.energyModel.p_timeStep_h; -double outputTemperature_degC = 0; - -J_EAProduction production_asset = new J_EAProduction(parentGC, asset_type, asset_name, OL_EnergyCarriers.ELECTRICITY, capacityElectric_kW, timestep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr); -parentGC.v_liveAssetsMetaData.updateActiveAssetData(new ArrayList<GridConnection>(List.of(parentGC))); - - - - VOID - double - 1725439625846 - f_setSelectedGCSliders - -1070 - 80 - - false - true - true - //Reset GC capacities to without NFATO values -p_gridConnection.f_nfatoSetConnectionCapacity(true); - -//Initialize slider presets to selected GC (min, max, etc.) -f_setSliderPresets(); - -//If GC not active in current situation, disable scenario rb -rb_scenariosPrivateUI.setEnabled(p_scenarioSettings_Current.getIsCurrentlyActive()); - -//Find the current heating type -int nr_currentHeatingType = 0; -switch (p_gridConnection.f_getCurrentHeatingType()){ - case GAS_BURNER: - nr_currentHeatingType = 0; - break; - - case HYBRID_HEATPUMP: - nr_currentHeatingType = 1; - break; - - case ELECTRIC_HEATPUMP: - nr_currentHeatingType = 2; - break; - - case DISTRICTHEAT: - case LT_DISTRICTHEAT: - nr_currentHeatingType = 3; - break; - case CUSTOM: - nr_currentHeatingType = 4; - break; - default: - nr_currentHeatingType = 4; -} - -//Find the current heat saving percentage -int currentHeatSavings = 0; - -J_EAConsumption consumptionEAHEAT = findFirst(p_gridConnection.c_consumptionAssets, consumptionAsset -> consumptionAsset.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); -if (consumptionEAHEAT != null){ - currentHeatSavings = roundToInt((consumptionEAHEAT.getConsumptionScaling_fr() - 1)*-100); -} -else{ - J_EAProfile profileEAHEAT = findFirst(p_gridConnection.c_profileAssets, profileAsset -> profileAsset.energyCarrier == OL_EnergyCarriers.HEAT); - if (profileEAHEAT != null){ - currentHeatSavings = roundToInt((profileEAHEAT.getProfileScaling_fr() - 1)*-100); - } -} - -//Find the current electricity savings percentage -int currentElectricitySavings = 0; - -J_EAConsumption consumptionEAELECTRIC = findFirst(p_gridConnection.c_consumptionAssets, consumptionAsset -> consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND); -if (consumptionEAELECTRIC != null){ - currentElectricitySavings = roundToInt((consumptionEAELECTRIC.getConsumptionScaling_fr() - 1)*-100); -} -else{ - J_EAProfile profileEAELECTRIC = findFirst(p_gridConnection.c_profileAssets, profileAsset -> profileAsset.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - if (profileEAELECTRIC != null){ - currentElectricitySavings = roundToInt((profileEAELECTRIC.getProfileScaling_fr() - 1)*-100); - } -} - -//Find the current Connection capacity (delivery) -int GCContractCapacityCurrent_Delivery = roundToInt(p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - -//Find the current Connection capacity (feedin) -int GCContractCapacityCurrent_Feedin = roundToInt(p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - -//Set the nfato values -f_getNFATOValues(); - -//Find the current battery capacity -int BatteryCapacityCurrent = 0; -J_EAStorage batteryAsset = findFirst(p_gridConnection.c_storageAssets, p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); -if (batteryAsset != null){ - BatteryCapacityCurrent = roundToInt(((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh()); -} - -//Find the current PV capacity -int PVCapacityCurrent = 0; -if (p_gridConnection.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - J_EAProduction pvAsset = findFirst(p_gridConnection.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); - PVCapacityCurrent = roundToInt(pvAsset.getCapacityElectric_kW()); -} - -//Find the current curtailment setting -boolean currentCurtailmentSetting = p_gridConnection.v_enableCurtailment; - -//Find the current transport savings -int currentTransportSavings = 0; -if (p_gridConnection.c_tripTrackers.size() > 0){ - currentTransportSavings = - roundToInt(p_gridConnection.c_tripTrackers.get(0).getDistanceScaling_fr()*100) + 100; -} - - -//Find the current number of vehicles for each type -int nbEcarsCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); -int nbHydrogencarsCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); -int nbDieselcarsCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); - -int nbEvansCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN); -int nbHydrogenvansCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); -int nbDieselvansCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); - -int nbEtrucksCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); -int nbHydrogentrucksCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); -int nbDieseltrucksCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); - -//Check on electric cars, cause for companies that have quarterlyhour electricity data, the initial ea for EV (and other electric appliances) are not made. -if (p_gridConnection.v_hasQuarterHourlyValues){ - - nbEcarsCurrent += v_minEVCarSlider; - nbEvansCurrent += v_minEVVanSlider; - nbEtrucksCurrent += v_minEVTruckSlider; -} - - -////Set slider knobs at the currently (!) correct points - -//heating -rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, false); - -//Heat savings -sl_heatDemandCompanyReduction.setValue(currentHeatSavings, false); - -//Electricity savings -sl_electricityDemandCompanyReduction.setValue(currentElectricitySavings, false); - -//Contract connection capacity (delivery) -sl_GCCapacityCompany.setValue(GCContractCapacityCurrent_Delivery, false); -v_defaultGCCapacitySlider = GCContractCapacityCurrent_Delivery; - -//Contract connection capacity (feedin) -sl_GCCapacityCompany_Feedin.setValue(GCContractCapacityCurrent_Feedin, false); -v_defaultGCCapacitySlider_Feedin = GCContractCapacityCurrent_Feedin; - -//Battery capacity -sl_batteryCompany.setValue(BatteryCapacityCurrent, false); -v_defaultBatSlider = BatteryCapacityCurrent; - -//Solar panel power -sl_rooftopPVCompany.setValue(PVCapacityCurrent, false); -v_defaultPVSlider = PVCapacityCurrent; - -//Curtailment setting -cb_curtailmentCompany.setSelected(currentCurtailmentSetting, false); - - -//Mobility savings -sl_mobilityDemandCompanyReduction.setValue(currentTransportSavings, false); - -//Cars -sl_electricCarsCompany.setValue(nbEcarsCurrent, false); -sl_hydrogenCarsCompany.setValue(nbHydrogencarsCurrent, false); -sl_dieselCarsCompany.setValue(nbDieselcarsCurrent, false); - -v_nbEVCars = nbEcarsCurrent; -v_nbHydrogenCars = nbHydrogencarsCurrent; -v_nbDieselCars = nbDieselcarsCurrent; - - -//Vans -sl_electricVansCompany.setValue(nbEvansCurrent, false); -sl_hydrogenVansCompany.setValue(nbHydrogenvansCurrent, false); -sl_dieselVansCompany.setValue(nbDieselvansCurrent, false); - -v_nbEVVans = nbEvansCurrent; -v_nbHydrogenVans = nbHydrogenvansCurrent; -v_nbDieselVans = nbDieselvansCurrent; - - -//Trucks -sl_electricTrucksCompany.setValue(nbEtrucksCurrent, false); -sl_hydrogenTrucksCompany.setValue(nbHydrogentrucksCurrent, false); -sl_dieselTrucksCompany.setValue(nbDieseltrucksCurrent, false); - -v_nbEVTrucks = nbEtrucksCurrent; -v_nbHydrogenTrucks = nbHydrogentrucksCurrent; -v_nbDieselTrucks = nbDieseltrucksCurrent; - -//Add nfato again -p_gridConnection.f_nfatoSetConnectionCapacity(false); - - - VOID - double - 1725439635605 - f_selectGCOnMainInterface - -410 - 300 - - false - true - true - //Select the newly selected GC also on the main interface (if not paused) -zero_Interface.f_clearSelectionAndSelectEnergyModel(); - -if(p_gridConnection.v_isActive){ - zero_Interface.f_selectBuilding(p_gridConnection.c_connectedGISObjects.get(0), p_gridConnection.c_connectedGISObjects); -} - - - VOID - double - 1725607045331 - f_setSimulateYearScreen - -430 - 830 - - false - true - true - if(!b_runningMainInterfaceScenarioSettings && !b_runningMainInterfaceSlider){ - //Update main interface sliders according to the companyUI changes - zero_Interface.f_updateMainInterfaceSliders(); - - //Set it for main interface as well - zero_Interface.f_resetSettings(); - - //Update variable to change to custom scenario - zero_Interface.f_setScenarioToCustom(); -} - - - VOID - double - 1725614403909 - f_setGCCapacitySliderPresets - -1070 - 230 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_GCCapacityCompany.setRange(0, 100000); - -//Get current grid capacity -double defaultGCCapacitySlider = p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW(); - -//Get future grid capacity -double futureGCCapacity_delivery_kW = p_scenarioSettings_Future.getRequestedContractDeliveryCapacity_kW(); - -//Get current physical capacity -v_physicalConnectionCapacity_kW = p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW(); - -//Set range specific for specific intervals of capacity -v_minGCCapacitySlider = 0; - -if(futureGCCapacity_delivery_kW < 100 && defaultGCCapacitySlider < 100){ - v_maxGCCapacitySlider = 150; -} -else if(futureGCCapacity_delivery_kW < 1000 && defaultGCCapacitySlider < 1000){ - v_maxGCCapacitySlider = 2000; -} -else if(futureGCCapacity_delivery_kW < 8000 && defaultGCCapacitySlider < 8000){ - v_maxGCCapacitySlider = 10000; -} -else if(futureGCCapacity_delivery_kW < 15000 && defaultGCCapacitySlider < 15000){ - v_maxGCCapacitySlider = 20000; -} -else{ - v_maxGCCapacitySlider = max(futureGCCapacity_delivery_kW, defaultGCCapacitySlider); -} - -v_defaultGCCapacitySlider = roundToInt(defaultGCCapacitySlider); - -//Set slider knob -sl_GCCapacityCompany.setValue(v_defaultGCCapacitySlider, false); - - - VOID - double - 1727712593952 - f_setNameTextSize - -1070 - 60 - - false - true - true - if (p_companyName == null) { - return; -} - -int nameLength = p_companyName.length(); - -int i = 0; -if(nameLength > 24){ - while(24+i != nameLength){ - - t_companyName.setScale(0.9); - i++; - } -} -//Works for now: Possible to make it more accurate using getFontMetrics package and comparing width of text with the name text box width. -//--> Not done for now, as it feels unnecessary. - - - VOID - double - 1727798399503 - f_setGCCapacitySliderPresets_Feedin - -1070 - 330 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_GCCapacityCompany_Feedin.setRange(0, 100000); - -//Get current grid capacity -double defaultGCCapacitySlider_Feedin = p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW(); - -//Set range specific for specific intervals of capacity -v_minGCCapacitySlider_Feedin = 0; - -if(defaultGCCapacitySlider_Feedin < 100){ - v_maxGCCapacitySlider_Feedin = 150; -} -else if(defaultGCCapacitySlider_Feedin < 1000){ - v_maxGCCapacitySlider_Feedin = 2000; -} -else if(defaultGCCapacitySlider_Feedin < 8000){ - v_maxGCCapacitySlider_Feedin = 10000; -} -else if(defaultGCCapacitySlider_Feedin < 15000){ - v_maxGCCapacitySlider_Feedin = 20000; -} -else{ - v_maxGCCapacitySlider_Feedin = defaultGCCapacitySlider_Feedin; -} - -v_defaultGCCapacitySlider_Feedin = roundToInt(defaultGCCapacitySlider_Feedin); - -//Set slider knob -sl_GCCapacityCompany_Feedin.setValue(v_defaultGCCapacitySlider_Feedin, false); - - - VOID - double - 1727884380899 - f_getNFATOValues - -430 - 705 - - false - true - true - v_NFATO_active = p_gridConnection.v_enableNFato; -v_NFATO_kW_delivery = p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacity_kW - v_defaultGCCapacitySlider; -v_NFATO_kW_feedin = p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacity_kW- v_defaultGCCapacitySlider_Feedin; - -if(v_NFATO_kW_delivery > 0){ - t_GCCapacityCompany_delivery_nfato.setColor(green); -} -else if(v_NFATO_kW_delivery < 0){ - t_GCCapacityCompany_delivery_nfato.setColor(red); -} -else{ - t_GCCapacityCompany_delivery_nfato.setColor(black); -} - -if(v_NFATO_kW_feedin > 0){ - t_GCCapacityCompany_Feedin_nfato.setColor(green); -} -else if(v_NFATO_kW_feedin < 0){ - t_GCCapacityCompany_Feedin_nfato.setColor(red); -} -else{ - t_GCCapacityCompany_Feedin_nfato.setColor(black); -} - - - - VOID - double - 1729515671654 - f_enableAllSliders - -1070 - 120 - - false - true - true - - enable - boolean - - sl_heatDemandCompanyReduction.setEnabled(enable); -rb_heatingTypePrivateUI.setEnabled(enable); - -sl_electricityDemandCompanyReduction.setEnabled(enable); -sl_GCCapacityCompany.setEnabled(enable); -sl_GCCapacityCompany_Feedin.setEnabled(enable); -sl_batteryCompany.setEnabled(enable); -sl_rooftopPVCompany.setEnabled(enable); -cb_curtailmentCompany.setEnabled(enable); - -sl_mobilityDemandCompanyReduction.setEnabled(enable); - -sl_electricCarsCompany.setEnabled(enable); -sl_hydrogenCarsCompany.setEnabled(enable); -sl_dieselCarsCompany.setEnabled(enable); - -sl_electricVansCompany.setEnabled(enable); -sl_hydrogenVansCompany.setEnabled(enable); -sl_dieselVansCompany.setEnabled(enable); - -sl_electricTrucksCompany.setEnabled(enable); -sl_hydrogenTrucksCompany.setEnabled(enable); -sl_dieselTrucksCompany.setEnabled(enable); - -// Disabled / Invisible heating based on current scenario settings -if (enable) { - f_setHeatingRB(); -} - - - VOID - double - 1747316158336 - f_setErrorScreen - 5540 - 1110 - - false - true - true - - errorMessage - String - - //Reset location and height -button_errorOK.setY(50); -rect_errorMessage.setY(-120); -rect_errorMessage.setHeight(200); -t_errorMessage.setY(-70); - -//Set position above all other things -presentation.remove(gr_errorScreen); -presentation.insert(presentation.size(), gr_errorScreen); - -int width_numberOfCharacters = 44; - -// Set Text -Pair<String, Integer> p = zero_Interface.v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); -errorMessage = p.getFirst(); -int numberOfLines = p.getSecond(); -int additionalLines = max(0, numberOfLines - 3); - -// Set Size -rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); -rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); -//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); -t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); - -t_errorMessage.setText(errorMessage); -gr_errorScreen.setVisible(true); - - - VOID - double - 1756898097088 - f_setDemandReductionSliderPresets - -1060 - 1240 - - false - true - true - v_minSavingsSliders = -50; -v_maxSavingsSliders = 50; -sl_heatDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); -sl_electricityDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); -sl_mobilityDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); - - - VOID - double - 1760976810989 - f_selectDifferentOwnedGC - -430 - 280 - - false - true - true - - selectedOwnedGCIndex - int - - //Set companyUI to the new GC -f_setCompanyUI(p_gridConnection.p_owner.f_getOwnedGridConnections().get(selectedOwnedGCIndex)); - -//Select the gc on the main interface (map) aswell -f_selectGCOnMainInterface(); - - - - - - - 1708522361863 - connections - true - 20 - -160 - - false - true - true - false - COLLECTION_OF_LINKS - true - Object - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - 1708522362017 - zero_Interface - 20 - -120 - - false - true - true - - zerointerfaceloader - Zero_Interface - - - - - - 1714652079023 - uI_Results - -1050 - 1330 - - false - true - true - 1714652081119 - - digital_twin_results - UI_Results - - - - digital_twin_results - UI_Results - 1704197366556 - - - - - energyModel - - zero_Interface.energyModel - - - - p_cutOff_MWh - - - gr_infoText - - - gr_closeInfoText - - - t_infoTextDescription - - - rect_infoText - - - p_currentActiveInfoBubble - - - false - - 100 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089973 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - 1708522361869 - level - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - 1708612468547 - rect_canvas - -1160 - -400 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 4560 - 1800 - 0.0 - -1 - null - - - 1708522459040 - rect_background - 0 - 0 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1920 - 980 - 0.0 - -1 - v_companyUIBackgroundColor - null - - - 1713446065829 - rect_sliders - 0 - 140 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 360 - 840 - 0.0 - -1 - v_companyUIBackgroundColorSliders - null - - - 1708611929678 - rect_scenarios - 0 - 0 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 360 - 140 - 0.0 - -1 - v_companyUIBackgroundColorSliders - null - - - 1708611713278 - text - -440 - 20 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Colors and Styling - - SansSerif - 12 - - - LEFT - - - 1708611755978 - text4 - -750 - 20 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Company parameters - - SansSerif - 12 - - - LEFT - - - 1709571615104 - txt_storedScenarios - -750 - 110 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Scenarios - - SansSerif - 12 - - - LEFT - - - false - 1711555257574 - button1 - 180 - -80 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - p_gridConnection.va_gridConnection.navigateTo(); - - - - Go to GC in engine - - - - 1713447348497 - gr_scenarioRB - 140 - 100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1713447230459 - rb_scenariosPrivateUI - -100 - -60 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - if (p_scenarioSettings_Current != null && p_scenarioSettings_Future != null){ - f_setScenario(rb_scenariosPrivateUI.getValue()); -} - -// Simulate Year button on Interface -zero_Interface.f_resetSettings(); - - - - 0 - VERTICAL - - - - false - - - - 1713447252716 - txt_scenario - -100 - -80 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer een scenario - - Calibri - 20 - - - LEFT - - - - - 1713537625797 - txt_scenarioSettings - -440 - 340 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Set Sliders to Scenario - - SansSerif - 12 - - - LEFT - - - 1713957149840 - txt_sliderPresetsAndLimits - -1100 - 160 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Slider limits and presets - - SansSerif - 12 - - - LEFT - - - 1713957196998 - txt_sliderFunctions - -440 - 460 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Slider functions - - SansSerif - 12 - - - LEFT - - - false - 1714641703973 - button2 - 360 - -80 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - ((GIS_Building)p_gridConnection.c_connectedGISObjects.get(0)).va_building.navigateTo(); - - - - Go to Building in engine - - - - false - 1714641782724 - button3 - 0 - -80 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - p_gridConnection.p_owner.va_ConnectionOwner.navigateTo(); - - - - Go to Owner in engine - - - - 1714655090415 - txt_initialization - -1100 - 10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Initialization - - SansSerif - 12 - - - LEFT - - - 1714660279044 - txt_uiResult - -1060 - 1300 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - UI_Result connection (graphs) - - SansSerif - 12 - - - LEFT - - - 1715626747942 - gr_companyUISliders - 310 - 445 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1713446221121 - txt_warmte - -240 - -270 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Warmte - - Calibri - 22 - - - LEFT - - - 1713446658919 - t_GCCapacityCompany - -85 - 6 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - sl_GCCapacityCompany.getIntValue() + " kW" - - Dialog - 14 - - - RIGHT - - - false - 1713446658921 - sl_GCCapacityCompany - -58 - 1 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - f_setGCCapacity(p_gridConnection, sl_GCCapacityCompany.getValue(), "DELIVERY"); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_defaultGCCapacitySlider - HORIZONTAL - v_minGCCapacitySlider - v_maxGCCapacitySlider - 1 - false - - - - 1713446658933 - txt_GCCapacity - -290 - 6 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Contr. capaciteit (af.) - - Dialog - 14 - - - LEFT - - - 1713446065831 - gr_heatDemandReductionSlider - -120 - -106 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1713446065865 - sl_heatDemandCompanyReduction - 62 - -130 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - double newHeatDemandReduction_pct = sl_heatDemandCompanyReduction.getValue(); -double consumptionScaling_fr = 1 - newHeatDemandReduction_pct/100; - -for (J_EA j_ea : p_gridConnection.c_energyAssets){ - if (j_ea instanceof J_EAConsumption) { - if (j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND) { - ((J_EAConsumption)j_ea).setConsumptionScaling_fr(consumptionScaling_fr); - } - } - if (j_ea instanceof J_EAProfile) { - if (((J_EAProfile) j_ea).energyCarrier== OL_EnergyCarriers.HEAT) { - ((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr ); - } - } -} - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - 0 - HORIZONTAL - v_minSavingsSliders - v_maxSavingsSliders - 1 - false - - - - 1713446065869 - text195 - -170 - -125 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Besparing warmte - - Dialog - 14 - - - LEFT - - - 1713446065871 - t_heatDemandReductionCompanies - 35 - -125 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0% - sl_heatDemandCompanyReduction.getIntValue() + "%" - - Dialog - 14 - - - RIGHT - - - - - 1713446065985 - txt_elektriciteit - -240 - -68 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Elektriciteit - - Calibri - 22 - - - LEFT - - - 1713446438059 - txt_mobiliteit - -240 - 166 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Transport - - Calibri - 22 - - - LEFT - - - 1713446065961 - t_electricityDemandReductionCompany - -85 - -24 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0% - sl_electricityDemandCompanyReduction.getIntValue() + "%" - - - Dialog - 14 - - - RIGHT - - - false - 1713446065963 - sl_electricityDemandCompanyReduction - -58 - -29 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - double newElectricityDemandReduction_pct = sl_electricityDemandCompanyReduction.getValue(); -double consumptionScaling_fr = 1 - newElectricityDemandReduction_pct/100; - -for (J_EA j_ea : p_gridConnection.c_energyAssets) { - if (j_ea instanceof J_EAConsumption) { - if (j_ea.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND) { - ((J_EAConsumption)j_ea).setConsumptionScaling_fr(consumptionScaling_fr); - } - } - if (j_ea instanceof J_EAProfile) { - if (((J_EAProfile) j_ea).energyCarrier == OL_EnergyCarriers.ELECTRICITY) { - ((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr ); - } - } -} - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - - 0 - HORIZONTAL - v_minSavingsSliders - v_maxSavingsSliders - 1 - false - - - - 1713446065965 - text279 - -290 - -24 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Besparing elektriciteit - - Dialog - 14 - - - LEFT - - - 1713447888398 - gr_companyMobilitySliders - -120 - 360 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1713446839189 - sl_electricVansCompany - 62 - -3 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_VAN, (int)sl_electricVansCompany.getValue()); - -//Update the other two sliders aswell -sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); -sl_dieselVansCompany.setValue(v_nbDieselVans, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbEVVans - HORIZONTAL - v_minEVVanSlider - v_maxEVVanSlider - 1 - false - v_nbEVVans - - - - 1713446839191 - text266 - -170 - 0 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Elektrisch - - Dialog - 14 - - - LEFT - - - 1713446839193 - t_numberOfElectricVansCompany - 35 - 0 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_electricVansCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - false - 1713446839195 - sl_hydrogenVansCompany - 62 - 22 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_VAN, (int)sl_hydrogenVansCompany.getValue()); - -//Update the other two sliders aswell -sl_electricVansCompany.setValue(v_nbEVVans, false); -sl_dieselVansCompany.setValue(v_nbDieselVans, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbHydrogenVans - HORIZONTAL - v_minHydrogenVanSlider - v_maxHydrogenVanSlider - 1 - false - v_nbHydrogenVans - - - - 1713446839197 - text271 - -170 - 25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Waterstof - - Dialog - 14 - - - LEFT - - - 1713446839199 - t_numberOfHydrogenVansCompany - 35 - 25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_hydrogenVansCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - false - 1713446839201 - sl_dieselVansCompany - 62 - 47 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_VAN, (int)sl_dieselVansCompany.getValue()); - -//Update the other two sliders aswell -sl_electricVansCompany.setValue(v_nbEVVans, false); -sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbDieselVans - HORIZONTAL - v_minDieselVanSlider - v_maxDieselVanSlider - 1 - false - v_nbDieselVans - - - - 1713446839203 - text285 - -170 - 50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Fossiele brandstof - - Dialog - 14 - - - LEFT - - - 1713446839205 - t_numberOfDieselVansCompany - 35 - 50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_dieselVansCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446839207 - text274 - -170 - -25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Busjes - - Dialog - 14 - - - LEFT - - - 1713446857516 - t_numberOfDieselTrucksCompany - 35 - 145 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_dieselTrucksCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446857518 - t_numberOfHydrogenTrucksCompany - 35 - 120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_hydrogenTrucksCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446857520 - text272 - -170 - 120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Waterstof - - Dialog - 14 - - - LEFT - - - 1713446857522 - text286 - -170 - 145 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Fossiele brandstof - - Dialog - 14 - - - LEFT - - - 1713446857524 - text268 - -170 - 95 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Elektrisch - - Dialog - 14 - - - LEFT - - - 1713446857528 - text275 - -170 - 70 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Trucks - - Dialog - 14 - - - LEFT - - - false - 1713446857530 - sl_hydrogenTrucksCompany - 62 - 117 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_TRUCK, (int)sl_hydrogenTrucksCompany.getValue()); - -//Update the other two sliders aswell -sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); -sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbHydrogenTrucks - HORIZONTAL - v_minHydrogenTruckSlider - v_maxHydrogenTruckSlider - 1 - false - v_nbHydrogenTrucks - - - - 1713446857532 - t_numberOfElectricTrucksCompany - 35 - 95 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_electricTrucksCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - false - 1713446857534 - sl_electricTrucksCompany - 62 - 92 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_TRUCK, (int)sl_electricTrucksCompany.getValue()); - -//Update the other two sliders aswell -sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); -sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbEVTrucks - HORIZONTAL - v_minEVTruckSlider - v_maxEVTruckSlider - 1 - false - v_nbEVTrucks - - - - false - 1713446857526 - sl_dieselTrucksCompany - 62 - 142 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_TRUCK, (int)sl_dieselTrucksCompany.getValue()); - -//Update the other two sliders aswell -sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); -sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbDieselTrucks - HORIZONTAL - v_minDieselTruckSlider - v_maxDieselTruckSlider - 1 - false - v_nbDieselTrucks - - - - false - 1713446065901 - sl_electricCarsCompany - 62 - -103 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_VEHICLE, (int)sl_electricCarsCompany.getValue()); - -//Update the other two sliders aswell -sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); -sl_dieselCarsCompany.setValue(v_nbDieselCars, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbEVCars - HORIZONTAL - v_minEVCarSlider - v_maxEVCarSlider - 1 - false - v_nbEVCars - - - - 1713446065907 - text265 - -170 - -100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Elektrisch - - Dialog - 14 - - - LEFT - - - 1713446065909 - t_numberOfElectricCarsCompany - 35 - -100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_electricCarsCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446065917 - text267 - -170 - -155 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Besparing transport - - Dialog - 14 - - - LEFT - - - false - 1713446065919 - sl_mobilityDemandCompanyReduction - 62 - -160 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - p_gridConnection.c_tripTrackers.forEach(tt -> tt.distanceScaling_fr = 1-sl_mobilityDemandCompanyReduction.getValue()/100); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - 0 - HORIZONTAL - v_minSavingsSliders - v_maxSavingsSliders - 1 - false - - - - 1713446065921 - t_mobilityDemandReductionCompany - 35 - -155 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0% - sl_mobilityDemandCompanyReduction.getIntValue() + "%" - - Dialog - 14 - - - RIGHT - - - false - 1713446065923 - sl_hydrogenCarsCompany - 62 - -78 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_VEHICLE, (int)sl_hydrogenCarsCompany.getValue()); - -//Update the other two sliders aswell -sl_electricCarsCompany.setValue(v_nbEVCars, false); -sl_dieselCarsCompany.setValue(v_nbDieselCars, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbHydrogenCars - HORIZONTAL - v_minHydrogenCarSlider - v_maxHydrogenCarSlider - 1 - false - v_nbHydrogenCars - - - - 1713446065925 - text270 - -170 - -75 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Waterstof - - Dialog - 14 - - - LEFT - - - 1713446065927 - t_numberOfHydrogenCarsCompany - 35 - -75 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_hydrogenCarsCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - false - 1713446065933 - sl_dieselCarsCompany - 62 - -54 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_VEHICLE, (int)sl_dieselCarsCompany.getValue()); - -//Update the other two sliders aswell -sl_electricCarsCompany.setValue(v_nbEVCars, false); -sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbDieselCars - HORIZONTAL - v_minDieselCarSlider - v_maxDieselCarSlider - 1 - false - v_nbDieselCars - - - - 1713446065935 - text284 - -170 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Fossiele brandstof - - Dialog - 14 - - - LEFT - - - 1713446065937 - t_numberOfDieselCarsCompany - 35 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_dieselCarsCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446065939 - text273 - -170 - -125 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Autos - - Dialog - 14 - - - LEFT - - - - - 1713547081193 - gr_selectedGC - -60 - -290 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1713544148158 - cb_selectGC - -84 - -13 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - f_selectDifferentOwnedGC(cb_selectGC.getValueIndex()); - - - - false - - - false - - - - 1713547027389 - text9 - -240 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geselecteerde Aansluiting: - - SansSerif - 12 - - - LEFT - - - - - false - 1713963799790 - sl_batteryCompany - -58 - 61 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //traceln("Slider werkt nog niet volledig!!, batterij sturing werkt nog niet goed"); -f_setBattery(p_gridConnection, sl_batteryCompany.getValue()); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_defaultBatSlider - HORIZONTAL - v_minBatSlider - v_maxBatSlider - 1 - false - - - - 1713963799825 - t_batteryCompany - -85 - 66 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kWh - sl_batteryCompany.getIntValue() + " kWh" - - Dialog - 14 - - - RIGHT - - - 1713963799827 - text283 - -290 - 66 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Batterij capaciteit - - Dialog - 14 - - - LEFT - - - 1715084970828 - g_energyDemandSettings - 280 - -100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1715084970830 - gr_electricityButton1 - -560 - 42 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1715084970832 - ovalElectricityButton1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -32 - null - - - 1715084970834 - image4 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-electricity-3408805.png - - - false - - - - - 1715084970836 - gr_heatButton1 - -560 - -160 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1715084970838 - ovalHeatButton1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -6943 - null - - - 1715084970840 - image11 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-fire-2429630.png - - - false - - - - - 1715084970842 - gr_transportButton1 - -560 - 276 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1715084970844 - ovalTransportButton1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -2625550 - null - - - 1715084970846 - image16 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-car-1777731.png - - - false - - - - - - - false - 1715093089631 - rb_heatingTypePrivateUI - -290 - -206 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - if (!rb_heatingTypePrivateUI.isEnabled()){// check if disabled, if so, skip when called - return; -} - -//Convert radiobutton integer to OL type -OL_GridConnectionHeatingType selectedHeatingType; -switch (rb_heatingTypePrivateUI.getValue()){ - case 0: - selectedHeatingType = OL_GridConnectionHeatingType.GAS_BURNER; - break; - case 1: - selectedHeatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; - break; - case 2: - selectedHeatingType = OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP; - break; - case 3: - selectedHeatingType = OL_GridConnectionHeatingType.DISTRICTHEAT; - break; - case 4: - selectedHeatingType = OL_GridConnectionHeatingType.CUSTOM; - f_setErrorScreen("De 'custom' verwarming optie wordt alleen gebruikt ter visualisatie voor bedrijven die starten met een 'custom' warmte systeem. In plaats van 'custom' is de knop nu gezet op 'HR ketel aardgas'."); - rb_heatingTypePrivateUI.setValue(0); - return; - default: - selectedHeatingType = OL_GridConnectionHeatingType.NONE; -} - - -//Radio button function -f_setHeatingType(p_gridConnection, selectedHeatingType); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - - 0 - VERTICAL - - - - - - false - - - - 1725618990626 - t_rooftopSolarCompany - -85 - 96 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - sl_rooftopPVCompany.getIntValue() + " kW" - - Dialog - 14 - - - RIGHT - - - false - 1725618990628 - sl_rooftopPVCompany - -58 - 91 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - f_setPVSystem(p_gridConnection, sl_rooftopPVCompany.getValue()); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_defaultPVSlider - HORIZONTAL - v_minPVSlider - v_maxPVSlider - 1 - false - - - - 1725618990630 - txt_PVPower - -290 - 96 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - PV vermogen - - Dialog - 14 - - - LEFT - - - 1727796446739 - t_GCCapacityCompany_Feedin - -85 - 36 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - sl_GCCapacityCompany_Feedin.getIntValue() + " kW" - - Dialog - 14 - - - RIGHT - - - false - 1727796446741 - sl_GCCapacityCompany_Feedin - -58 - 31 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - f_setGCCapacity(p_gridConnection, sl_GCCapacityCompany_Feedin.getValue(), "FEEDIN"); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_defaultGCCapacitySlider_Feedin - HORIZONTAL - v_minGCCapacitySlider_Feedin - v_maxGCCapacitySlider_Feedin - 1 - false - - - - 1727796446743 - txt_GCCapacityCompany_Feedin - -290 - 36 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Contr. capaciteit (te.) - - Dialog - 14 - - - LEFT - - - - - false - 1708523022017 - button - 1670 - 20 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - zero_Interface.uI_Results.getCheckbox_KPISummary().setSelected(false, true); - -zero_Interface.va_Interface.navigateTo(); -zero_Interface.v_currentViewArea = zero_Interface.va_Interface; - - - - - Terug naar hoofdscherm - - - - 1725365029204 - gr_companyDetails - 1140 - 80 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725366551214 - roundRect_companyName - -298 - -59.512 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 596 - 119.024 - 0.0 - -1 - null - 10 - - - 1708611721668 - t_companyName - 0 - -46.34 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Company Name - p_companyName - - SansSerif - 48 - - - CENTER - - - 1708611716618 - t_GCadress - 0 - 23.17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Adress - v_adressGC - - SansSerif - 20 - - - CENTER - - - - - 1714652081119 - uI_Results_presentation - 380 - 220 - - false - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - 1725381132369 - mask_resultsUI1 - 370 - 60 - - false - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 470 - 110 - 0.0 - -1 - null - - - 1725381214835 - mask_resultsUI2 - 845 - 270 - - false - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 2495 - 700 - 0.0 - -1 - null - - - 1725382426671 - gr_chartNameLeft - 610 - 200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725381345763 - rect_chartNameLeft - -230 - -30 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth - -16777216 - v_companyUILineColor - null - SOLID - 460 - 50 - 0.0 - -1 - v_chartBackgroundColor - null - - - 1725382366046 - txt_chartNameLeft - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Profielen - - SansSerif - 24 - - - CENTER - - - - - 1725382459577 - gr_chartNameMiddle - 1140 - 200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725382459579 - rect_chartNameMiddle - -230 - -30 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth - -16777216 - v_companyUILineColor - null - SOLID - 460 - 50 - 0.0 - -1 - v_chartBackgroundColor - null - - - 1725382459581 - txt_chartNameMiddle - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Opwek/verbruik diagram - - SansSerif - 24 - - - CENTER - - - - - 1725382464651 - gr_chartNameRight - 1670 - 200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725382464653 - rect_chartNameRight - -230 - -30 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth - -16777216 - v_companyUILineColor - null - SOLID - 460 - 50 - 0.0 - -1 - v_chartBackgroundColor - null - - - 1725382464655 - txt_chartNameRight - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energiestromen - - SansSerif - 24 - - - CENTER - - - - - 1725606178083 - gr_simulateYearScreen - 1375 - 540 - - true - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725606178085 - rect_simulateYearScreen2 - -535 - -320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -6943 - v_companyUIBackgroundColor - null - SOLID - 1060 - 750 - 0.0 - -1 - v_companyUIBackgroundColor - null - - - 1725606178087 - gr_simulateYearToCalculateKPIs - -35 - 40 - - true - true - false - SHAPE_DRAW_2D3D - //Set correct overlay -gr_simulateYearScreen.setVisible(false); -gr_loadIcon.setVisible(true); - - -//Run simulation -new Thread( () -> { - zero_Interface.energyModel.f_runRapidSimulation(); - zero_Interface.uI_Results.f_updateResultsUI(zero_Interface.energyModel); - f_updateUIResultsCompanyUI(); - gr_loadIcon.setVisible(false); - - //Update and show kpi summary chart after run - if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setSelected(true, true); - } - - //Update results up to date boolean - uI_Results.f_enableNonLivePlotRadioButtons(true); - zero_Interface.b_resultsUpToDate = true; - zero_Interface.gr_simulateYear.setVisible(false); - zero_Interface.uI_Results.f_enableNonLivePlotRadioButtons(true); - -}).start(); - - - - - false - 0 - 0.0 - - - 1725606178089 - t_simulateYearToCalculateCostsSmall - -140 - -40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simuleer jaar voor KPI's - - SansSerif - 28 - - - CENTER - - - 1725606178091 - image_simulateYearToCalculateCostsSmall - -420 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 102.315 - 99.723 - 0.0 - - - zerointerfaceloader - icon_greater_than.png - - - false - - - - - - - 1725606178111 - gr_loadIcon - 2360 - 280 - - true - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725606178113 - rect_loadIcon - -1520 - -60.969 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -369756683 - v_loadScreenColor - null - SOLID - 1065 - 755.969 - 0.0 - -369756683 - v_loadScreenColor - null - - - 1729516584700 - rect_GCisPausedScreen3 - -1990 - -60 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -6943 - v_loadScreenColor - null - SOLID - 480 - 755 - 0.0 - -1 - v_loadScreenColor - null - - - 1725606744485 - gr_loadIconText - -1220 - 280 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725606744487 - image_loadIconSmall - -27.610999999999876 - -5.4780000000000655 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 61.016 - 60.969 - 0.0 - - - zerointerfaceloader - icon_loading.gif - - - false - - - 1725606744489 - t_loadIconSmall - 2.8969999999999345 - -55.96199999999999 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Jaar wordt gesimuleerd - - SansSerif - 28 - - - CENTER - - - - - - - 1727797637172 - txt_curtailmentDescriptionCompany - 20 - 571 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Curtailment opwek - - Dialog - 14 - - - LEFT - - - false - 1727797637174 - cb_curtailmentCompany - 291 - 564 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - if (cb_curtailmentCompany.isSelected()) { - p_gridConnection.v_enableCurtailment = true; -} -else { - p_gridConnection.v_enableCurtailment = false; -} - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - - - false - - - - 1727883464770 - txt_nfatoValues - -440 - 680 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - NF ATO values - - SansSerif - 12 - - - LEFT - - - 1727939194812 - gr_TableConnectionCapacity - 565 - 80 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1727939194814 - rect_table_GridconnectionCapacaties - -185 - -60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 380 - 120 - 0.0 - -1 - null - - - 1727939194816 - txt_additionalGCCapacityInfo - -178 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Aansluitings capaciteit type - - SansSerif - 16 - - - LEFT - - - 1727939194818 - text1 - -175 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Fysieke capaciteit - - SansSerif - 14 - - - LEFT - - - 1727939194820 - text2 - -175 - 8 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Contract capaciteit afname - - SansSerif - 14 - - - LEFT - - - 1727939194822 - text3 - -175 - 33 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Contract capaciteit teruglevering - - SansSerif - 14 - - - LEFT - - - 1727939194824 - t_GCCapacityCompany_delivery2 - 152 - 8 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - t_GCCapacityCompany.getText() - - Dialog - 14 - - - CENTER - - - 1727939194826 - t_GCCapacityCompany_Feedin_2 - 152 - 33 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - t_GCCapacityCompany_Feedin.getText() - - Dialog - 14 - - - CENTER - - - 1727939194828 - t_GCCapacityCompany_physical - 152 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - roundToInt(v_physicalConnectionCapacity_kW) + " kW" - - Dialog - 14 - - - CENTER - - - 1727939194830 - line_table_ConnectionCapacityInfo_1 - 41 - -60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1 - 0 - 1 - 0 - 0 - 120 - 0 - - - 1727939194832 - txt_table_ConnectionCapacityInfo_owned - 152 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Capaciteit - - SansSerif - 16 - - - CENTER - - - 1727939194834 - line_table_ConnectionCapacityInfo_3 - -185 - -25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1 - 0 - 1 - 0 - 380 - 0 - 0 - - - 1727939206993 - gr_table_nfato - 225 - 0 - - true - true - false - SHAPE_DRAW_2D3D - v_NFATO_active - - - - - false - 0 - 0.0 - - - 1727939206995 - rect_Table_NFATO - -30 - -60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 65 - 120 - 0.0 - -1 - null - - - 1727939206997 - txt_table_ConnectionCapacityInfo_nfato - 3 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - NF ATO - - SansSerif - 16 - - - CENTER - - - 1727939206999 - t_GCCapacityCompany_delivery_nfato - 0.5 - 8 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - roundToInt(v_NFATO_kW_delivery) + " kW" - - Dialog - 14 - - - CENTER - - - 1727939207001 - t_GCCapacityCompany_Feedin_nfato - 0.5 - 33 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - roundToInt(v_NFATO_kW_feedin) + " kW" - - Dialog - 14 - - - CENTER - - - 1727939207003 - t_GCCapacityCompany_physical_nfato - 0.5 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - --- - - Dialog - 14 - - - CENTER - - - 1727939207005 - line_table_ConnectionCapacityInfo_NFATO - -30 - -25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1 - 0 - 1 - 0 - 65 - 0 - 0 - - - - - 1744645098225 - line_table_ConnectionCapacityInfo_2 - 109 - -60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1 - 0 - 1 - 0 - 0 - 120 - 0 - - - 1744645140831 - txt_table_ConnectionCapacityInfo_known - 75 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Status - - SansSerif - 16 - - - CENTER - - - 1744645285983 - t_GCCapacityCompany_delivery3 - 75 - 8 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Custom - p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW() != sl_GCCapacityCompany.getValue() ? "Custom" : -p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacityKnown ? "Bekend" : "Geschat" - - Dialog - 14 - - - CENTER - - - 1744645285985 - t_GCCapacityCompany_Feedin_3 - 75 - 33 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geschat - p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW() != sl_GCCapacityCompany_Feedin.getValue() ? "Custom" : -p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacityKnown ? "Bekend" : "Geschat" - - Dialog - 14 - - - CENTER - - - 1744645285987 - t_GCCapacityCompany_physical1 - 75 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Bekend - p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW() != v_physicalConnectionCapacity_kW ? "Custom" : -p_gridConnection.v_liveConnectionMetaData.physicalCapacityKnown ? "Bekend" : "Geschat" - - Dialog - 14 - - - CENTER - - - - - 1729511748859 - gr_GCisPausedScreen - 4480 - 920 - - true - false - false - true - SHAPE_DRAW_2D3D - 1375 - 540 - !p_gridConnection.v_isActive - false - 0 - 0.0 - - - 1729511748861 - rect_GCisPausedScreen - -1010 - -320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -369756683 - v_loadScreenColor - null - SOLID - 545 - 760 - 0.0 - -369756683 - v_loadScreenColor - null - - - 1729511748863 - rect_GCisPausedScreen2 - -535 - -320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -6943 - v_companyUIBackgroundColor - null - SOLID - 1075 - 760 - 0.0 - -1 - v_companyUIBackgroundColor - null - - - 1729511748865 - gr_GCisPausedScreenText - -35 - 40 - - true - true - false - SHAPE_DRAW_2D3D - //Set correct overlay -gr_simulateYearScreen.setVisible(false); -gr_loadIcon.setVisible(true); -rect_GCisPausedScreen3.setVisible(true); - -//Unpause gc -p_gridConnection.f_setActive(true); -zero_Interface.b_resultsUpToDate = false; -zero_Interface.f_setScenarioToCustom(); -f_enableAllSliders(true); - - -//Run simulation -new Thread( () -> { - - //Run rapid run in engine - zero_Interface.energyModel.f_runRapidSimulation(); - - //Update map selection and resultsUIs - f_selectGCOnMainInterface(); - f_updateUIResultsCompanyUI(); - - //Update and show kpi summary chart after run - if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setSelected(true, true); - } - - //Remove all simulation screens - zero_Interface.f_removeAllSimulateYearScreens(); - rect_GCisPausedScreen3.setVisible(false); -}).start(); - - -//Update results up to date boolean -zero_Interface.b_resultsUpToDate = true; - - false - 0 - 0.0 - - - 1729511748867 - t_GCisPausedScreen - -140 - -80 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Onpauzeer aansluiting -en -simuleer jaar voor KPI's - - SansSerif - 28 - - - CENTER - - - 1729511748869 - image_simulateYearToCalculateCostsSmall1 - -420 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 102.315 - 99.723 - 0.0 - - - zerointerfaceloader - icon_greater_than.png - - - false - - - - - 1729511999717 - txt_GCisPaused - -235 - -230 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Aansluiting is gepauzeerd! - - SansSerif - 72 - - - CENTER - - - - - false - 1740047018374 - cb_showGridloadPlot - 1450 - 130 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - uI_Results.f_setChartGridLoad_Presentation(null, null, cb_showGridloadPlot.isSelected()); -uI_Results.f_setChartSankey_Presentation(null, null, !cb_showGridloadPlot.isSelected()); - -if(cb_showGridloadPlot.isSelected()){ - txt_chartNameRight.setText("Netbelasting"); -} -else{ - txt_chartNameRight.setText("Energiestromen"); -} - - - - Toon Netbelasting duurkromme - false - - - - 1747234551900 - gr_heatingOptionBlockerCHP - true - 140 - 1500 - - true - true - false - true - SHAPE_DRAW_2D3D - 150 - 350 - false - 0 - 0.0 - - - 1747234424173 - rect_heatingOptionClickBlockerCHP - -140 - -15 - - true - true - false - SHAPE_DRAW_2D3D - rb_heatingTypePrivateUI.isVisible() - ; - false - 0 - 10 - 1 - - null - SOLID - 280 - 30 - 0.0 - - null - - - 1747234398590 - rect_heatingOptionBlockerCHP - -140 - -15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 280 - 30 - 0.0 - -65536 - v_companyUIBackgroundColorSliders - null - - - - - 1747316158314 - gr_errorScreen - 6480 - 600 - - true - false - false - SHAPE_DRAW_2D3D - 960 - 500 - false - 0 - 0.0 - - - 1747316158316 - rect_errorScreenGrayOut - -960 - -500 - - true - true - false - SHAPE_DRAW_2D3D - //traceln(); - false - 0 - 10 - 1 - -2049715245 - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - - - 1747316158318 - rect_errorScreenClickBlocking - -960 - -500 - - true - true - false - SHAPE_DRAW_2D3D - double click_block = 0; - false - 0 - 10 - 1 - -2049715245 - null - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - null - - - 1747326072959 - rect_errorMessage - -270 - -120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 4 - -65536 - null - SOLID - 540 - 200 - 0.0 - -1 - null - 10 - - - 1747316158322 - t_errorMessage - 0 - -70 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - TYPE YOUR ERROR MESSAGE HERE - - SansSerif - 24 - - - CENTER - - - 1747316158324 - button_errorOK - 0 - 50 - - true - true - false - SHAPE_DRAW_2D3D - gr_errorScreen.setVisible(false); - false - 0 - 0.0 - - - 1747316158326 - rect_errorOK - -60 - -20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 120 - 40 - 0.0 - -1 - null - - - 1747316158328 - txt_errorOK - 0 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Ok - - SansSerif - 18 - - - CENTER - - - - - - - 1760974606250 - txt_setSimYearScreen - -440 - 800 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simulate year screen - - SansSerif - 12 - - - LEFT - - - 1760976852165 - txt_selectDifferentOwnedGC - -440 - 250 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Select different owned GC - - SansSerif - 12 - - - LEFT - - - - - - - 1708523262441 - va_companyUI - 0 - 0 - - false - true - false - company UI - 1920 - 980 - - - - - 1709049506453 - UI_EnergyHub - 1754045666929 - import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.annotation.JsonAutoDetect; - -import java.io.IOException; - -import energy.lux.uplux.*; -import java.util.UUID; -import java.util.function.Predicate; - zero_Interface.c_UIResultsInstances.add(uI_Results); - false - - 1709049506460 - 1709049506460 - - T extends Agent - - Generic parameter: - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - 10 - MPS - - - 1 - METER - - - 1 - METER - - - 1 - METER - - - - false - - 1.0 - SECOND - - CONTINUOUS - 500 - 500 - 0 - 100 - 100 - MOORE - USER_DEF - USER_DEF - 2 - 50 - 0.95 - 10 - - - true - 1658477089954 - true - 1709107200000 - - 0 - HOUR - - - 1 - HOUR - - - - 1709049506456 - scale - 0 - -150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1709049506460 - 1709049506454 - - - 1753435936823 - v_energyHubCoop - -370 - 290 - - false - true - true - - EnergyCoop - - - - 1756801110760 - v_scenarioName - -350 - 400 - - false - true - true - - String - - - - 1756806431965 - v_objectMapper - -710 - 350 - - false - true - true - - ObjectMapper - - - - 1753436054975 - p_energyHubBackGroundColor - -800 - 60 - - false - true - true - - Color - NONE - false - - new Color(198, 251, 198) - - - 1753436054973 - COLOR_PICKER - 0 - 100 - NO_DELIMETER - - - - - 1753436082357 - p_energyHubLineColor - -800 - 80 - - false - true - true - - Color - NONE - false - - new Color(118, 171, 118) - - - 1753436082355 - COLOR_PICKER - 0 - 100 - NO_DELIMETER - - - - - 1753705811916 - p_energyHubLineWidth - -800 - 100 - - false - true - true - - double - NONE - false - - 2.0 - - - 1753705811914 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1753705865456 - p_energyHubLineStyle - -800 - 120 - - false - true - true - - LineStyle - NONE - false - - LINE_STYLE_SOLID - - - 1753705865454 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1756388977317 - c_sliderEAGCs - -370 - 250 - - false - true - true - - ArrayList - GridConnection - String - - - - 1756806491891 - c_GISregions - -710 - 400 - - false - true - true - - LinkedHashMap - String - GISRegion - - - - - - VOID - double - 1753446461346 - f_initializeEnergyHubDashboard - -390 - 30 - - false - true - true - //Set map to correct layout -zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); -zero_Interface.b_updateLiveCongestionColors = false; - -// Zoom map to the selected EHub members -f_zoomMapToBuildings(); - -// Sets the names of the members below the map (call before adding sliders) -f_initializeEnergyHubMemberNames(); - -//Add slider GC Needs to happen before EnergyCoop creation in some way!!! -f_addSliderEAGridConnections(); - -//Initialize the ui_results -f_initializeEnergyHubResultsUI(); - -//Initialize the ui_tabs -f_initializeEnergyHubTabs(); - -//Initialize custom user saved scenarios -f_initializeUserSavedScenarios(combobox_selectScenario); - - -runSimulation(); - - - VOID - double - 1753694353046 - f_initializeEnergyHubResultsUI - -370 - 125 - - false - true - true - //Initialize the ui_results -uI_Results.energyModel = zero_Interface.energyModel; -uI_Results.v_interfaceViewAreaXOffset = zero_Interface.va_EHubDashboard.getX(); -uI_Results.v_interfaceViewAreaYOffset = zero_Interface.va_EHubDashboard.getY(); - -//Style resultsUI -f_styleEnergyHubResultsUI(); - -//Set ResultsUI radiobutton setup -uI_Results.v_selectedRadioButtonSetup = OL_RadioButtonSetup.DEFAULT_AND_GESPREKSLEIDRAADBEDRIJVEN_AND_GTO; - - -//Connect resultsUI -uI_Results.f_initializeResultsUI(); -uI_Results.f_updateResultsUI(v_energyHubCoop); - - - VOID - double - 1753694406870 - f_initializeEnergyHubTabs - -370 - 195 - - false - true - true - //Initialize the ui_tabs -uI_Tabs.add_pop_tabElectricity(); -uI_Tabs.add_pop_tabHeating(); -uI_Tabs.add_pop_tabMobility(); - -//Adjust location of buttons to account for missing e-hub tab -uI_Tabs.gr_energyDemandSettings.setX(zero_Interface.uI_Tabs.gr_energyDemandSettings.getX()+40); - -// Group visibilities -// When using an extension of a generic tab don't forget to typecast it! -if (zero_Interface.project_data.project_type() == OL_ProjectType.RESIDENTIAL) { - ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_ResidentialArea().setVisible(true); - ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersResidentialArea().setVisible(true); - ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_residential().setVisible(true); -} -else { - ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_Businesspark().setVisible(true); - ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersCompanies().setVisible(true); - ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_default().setVisible(true); -} - -//Initialize slider gcs and set sliders -uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), new ArrayList<>()); - -uI_Tabs.v_presentationXOffset += zero_Interface.va_EHubDashboard.getX(); -uI_Tabs.v_presentationYOffset += zero_Interface.va_EHubDashboard.getY(); - - - VOID - double - 1753694556229 - f_styleEnergyHubResultsUI - -350 - 145 - - false - true - true - uI_Results.f_styleAllCharts(white, p_energyHubLineColor, p_energyHubLineWidth, p_energyHubLineStyle); -uI_Results.f_styleResultsUIHeader(p_energyHubLineColor, p_energyHubLineColor, p_energyHubLineWidth, p_energyHubLineStyle); - - - VOID - double - 1755014317038 - f_addSliderEAGridConnections - -370 - 100 - - false - true - true - //Check if a slider EA GC has been manually selected -GridConnection manualSelectedSliderGC_solarFarm = null; -GridConnection manualSelectedSliderGC_windFarm = null; -GridConnection manualSelectedSliderGC_gridBattery = null; -for (GridConnection GC : v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()) { - if(GC instanceof GCEnergyProduction){ - if (((GCEnergyProduction)GC).p_isSliderGC) { - if(manualSelectedSliderGC_solarFarm == null && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - manualSelectedSliderGC_solarFarm = GC; - } - else if(manualSelectedSliderGC_windFarm == null && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ - manualSelectedSliderGC_windFarm = GC; - } - } - } - if(manualSelectedSliderGC_gridBattery == null && GC instanceof GCGridBattery && ((GCGridBattery)GC).p_isSliderGC && GC.p_batteryAsset != null){ - manualSelectedSliderGC_gridBattery = GC; - } -} - -//If a slider EA GC has not been manually selected: -GridConnection sliderGC_solarFarm = null; -GridConnection sliderGC_windFarm = null; -GridConnection sliderGC_gridBattery = null; -if(manualSelectedSliderGC_solarFarm == null){ - sliderGC_solarFarm = findFirst(zero_Interface.energyModel.EnergyProductionSites, gc -> gc.p_gridConnectionID.equals("EnergyHub solarfarm slider")); -} -if(manualSelectedSliderGC_windFarm == null){ - sliderGC_windFarm = findFirst(zero_Interface.energyModel.EnergyProductionSites, gc -> gc.p_gridConnectionID.equals("EnergyHub windfarm slider")); -} -if(manualSelectedSliderGC_gridBattery == null){ - sliderGC_gridBattery = findFirst(zero_Interface.energyModel.GridBatteries, gc -> gc.p_gridConnectionID.equals("EnergyHub battery slider")); -} - -//Add to coop and other collections -if(sliderGC_solarFarm != null){ - c_sliderEAGCs.add(sliderGC_solarFarm); -} -if(sliderGC_windFarm != null){ - c_sliderEAGCs.add(sliderGC_windFarm); -} -if(sliderGC_gridBattery != null){ - c_sliderEAGCs.add(sliderGC_gridBattery); -} - -v_energyHubCoop.f_addMemberGCs(c_sliderEAGCs); - - - VOID - double - 1756302765458 - f_initializeEnergyHubMemberNames - -370 - 55 - - false - true - true - t_energyHubMember1.setVisible(false); -t_energyHubMember2.setVisible(false); -t_energyHubMember3.setVisible(false); -t_energyHubMember4.setVisible(false); -t_energyHubMember5.setVisible(false); -t_energyHubMember6.setVisible(false); -t_energyHubMember7.setVisible(false); -t_energyHubMemberOthers.setVisible(false); - -int maxChars = 25; -String name = ""; - -// Filter out GCs without building that are sliderGCs -List<GridConnection> members = v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(); -Predicate<GridConnection> isGenericSliderGC = gc -> (gc instanceof GCGridBattery && ((GCGridBattery)gc).p_isSliderGC && gc.c_connectedGISObjects.size() == 0) || (gc instanceof GCEnergyProduction && ((GCEnergyProduction)gc).p_isSliderGC && gc.c_connectedGISObjects.size() == 0); -members.removeIf(isGenericSliderGC); - -try { - name = members.get(0).p_ownerID; - t_energyHubMember1.setText(f_formatName(name, maxChars)); - t_energyHubMember1.setVisible(true); - name = members.get(1).p_ownerID; - t_energyHubMember2.setText(f_formatName(name, maxChars)); - t_energyHubMember2.setVisible(true); - name = members.get(2).p_ownerID; - t_energyHubMember3.setText(f_formatName(name, maxChars)); - t_energyHubMember3.setVisible(true); - name = members.get(3).p_ownerID; - t_energyHubMember4.setText(f_formatName(name, maxChars)); - t_energyHubMember4.setVisible(true); - name = members.get(4).p_ownerID; - t_energyHubMember5.setText(f_formatName(name, maxChars)); - t_energyHubMember5.setVisible(true); - name = members.get(5).p_ownerID; - t_energyHubMember6.setText(f_formatName(name, maxChars)); - t_energyHubMember6.setVisible(true); - name = members.get(6).p_ownerID; - t_energyHubMember7.setText(f_formatName(name, maxChars)); - t_energyHubMember7.setVisible(true); - if (members.size() == 8) { - name = members.get(7).p_ownerID; - t_energyHubMemberOthers.setText(f_formatName(name, maxChars)); - t_energyHubMemberOthers.setVisible(true); - } - else if (members.size() > 8) { - int nbOthers = members.size() - 7; - t_energyHubMemberOthers.setText("En nog " + nbOthers + " andere leden"); - t_energyHubMemberOthers.setVisible(true); - } -} -catch (Exception exception) { - if (exception instanceof IndexOutOfBoundsException) { - traceln("Ignoring IndexOutOfBoundsException"); // do nothing - } - else { - exception.printStackTrace(); - } -} - - - VOID - double - 1756395572049 - f_initializeUserSavedScenarios - -370 - 340 - - false - true - true - - combo - ShapeComboBox - - if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { - return; -} - -var repository = UserScenarioRepository.builder() - .userId(UUID.fromString(zero_Interface.user.userIdToken())) - .modelName(zero_Interface.project_data.project_name()) - .build(); - -var scenarioList = repository.listUserScenarios(); -int nbScenarios = scenarioList.size(); -String[] scenarioNames = new String[nbScenarios]; -for (int i = 0; i < nbScenarios; i++) { - scenarioNames[i] = scenarioList.get(i).getName(); -} - -combo.setItems(scenarioNames); - - - VOID - double - 1756805429105 - f_loadScenario - -370 - 360 - - false - true - true - - index - int - - zero_Interface.f_setScenarioToCustom(); - -for (UI_Results ui_results : zero_Interface.c_UIResultsInstances) { - if (ui_results.f_getSelectedObjectData() != null) { - zero_Interface.f_enableLivePlotsOnly(ui_results); - } -} - - -if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { - zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's in te laden. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - return; -} -traceln("Loading modelSave..."); -//pauseSimulation(); - -// Collect GIS_Objects into hashmap, to link to new EnergyModel. -zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -pauseSimulation(); -try { - v_objectMapper = new ObjectMapper(); - f_addMixins(); - - var repository = UserScenarioRepository.builder() - .userId(UUID.fromString(zero_Interface.user.userIdToken())) - .modelName(zero_Interface.project_data.project_name()) - .build(); - - var scenarioList = repository.listUserScenarios(); - - // Deserialize the JSON into a new EnergyModel instance: - var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(index).getId()); - - /*int n = 200; // how many characters you want - byte[] buffer = new byte[n]; - int read = jsonStream.read(buffer, 0, n); - - if (read > 0) { - String preview = new String(buffer, 0, read, "UTF-8"); - System.out.println(preview); - }*/ - - //jsonStream.close(); - - //traceln("jsonStream: %s", jsonStream.toString().substring(0,30)); - J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); - //J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); - - EnergyModel deserializedEnergyModel = saveObject.energyModel; - - // Reconstruct all Agents - f_reconstructEnergyModel(deserializedEnergyModel); - f_reconstructGridConnections(deserializedEnergyModel); - f_reconstructActors(deserializedEnergyModel); - f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); - - f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); - - // Get profilePointer tableFunctions from 'original' energyModel - deserializedEnergyModel.c_profiles.forEach(x->{ - J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); - x.setTableFunction(origProfile.getTableFunction()); - }); - // get heatingTypeHashmap from 'old' energyModel. - deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; - - zero_Interface.zero_loader.energyModel = deserializedEnergyModel; - zero_Interface.energyModel = deserializedEnergyModel; - zero_Interface.uI_Results.energyModel = deserializedEnergyModel; - uI_Results.energyModel = deserializedEnergyModel; - - deserializedEnergyModel.f_startAfterDeserialisation(); - - f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); - - - // Putting back the ordered collections in the interface - f_reconstructOrderedCollections(saveObject); - - //zero_Interface.f_clearSelectionAndSelectEnergyModel(); - - /* - zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); - uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); - zero_Interface.f_updateMainInterfaceSliders(); - - zero_Interface.f_resetSettings(); - */ - - ///button_exit.action(); - - // v_energyHubCoop not updated to point to 'new' coop - //uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); - - ///zero_Interface.f_simulateYearFromMainInterface(); - - v_energyHubCoop = findFirst(zero_Interface.energyModel.pop_energyCoops,x->x.p_actorID.equals("eHubConfiguratorCoop")); - if (v_energyHubCoop == null){ - throw new RuntimeException("No energyCoop found with p_actorID = eHubConfiguratorCoop"); - } - zero_Interface.v_customEnergyCoop = v_energyHubCoop; - // Update the E-Hub Dashboard with the loaded E-Hub from savefile - f_initializeEnergyHubMemberNames(); - uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); - uI_Results.f_updateResultsUI(v_energyHubCoop); - - // Update the main interface with the loaded E-Hub from savefile - zero_Interface.c_selectedGridConnections = new ArrayList<>(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()); - - // Update the main interface tabs with the GCs from the new engine - zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); - - // Reset all colors on the GIS map - zero_Interface.energyModel.pop_GIS_Buildings.forEach(x -> zero_Interface.f_styleAreas(x)); - zero_Interface.energyModel.pop_GIS_Objects.forEach(x -> zero_Interface.f_styleAreas(x)); - zero_Interface.energyModel.pop_GIS_Parcels.forEach(x -> zero_Interface.f_styleAreas(x)); - - // Color all selected GC - for (GridConnection gc : zero_Interface.c_selectedGridConnections) { - gc.c_connectedGISObjects.forEach(x -> x.gisRegion.setFillColor(zero_Interface.v_selectionColor)); - } - - // Zoom GIS Map to selected buildings - f_zoomMapToBuildings(); - - // Simulate a year - gr_simulateYearEnergyHub.setVisible(false); - gr_loadIconYearSimulationEnergyHub.setVisible(true); - - - zero_Interface.f_simulateYearFromMainInterface(); - - traceln("ModelSave loaded succesfully!"); - - //zero_Interface.b_inEnergyHubSelectionMode = true; - //zero_Interface.f_finalizeEnergyHubConfiguration(); - - //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); - - /* - Date startDate = getExperiment().getEngine().getStartDate(); - int day = getExperiment().getEngine().getDayOfMonth(); - int month = getExperiment().getEngine().getMonth(); - traceln("day: " + day); - traceln("month: " + month); - startDate.setMonth(startDate.getMonth() - month); - startDate.setDate(startDate.getDate() - day); - getExperiment().getEngine().setStartDate(startDate); - */ - -} catch (IOException e) { - e.printStackTrace(); -} - - - - - VOID - double - 1756805443177 - f_saveScenario - -370 - 380 - - false - true - true - - scenarioName - String - - if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { - zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's op te slaan. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - return; -} - -traceln("Starting model serialisation..."); -J_ModelSave saveObject = new J_ModelSave(); -saveObject.energyModel = zero_Interface.energyModel; - -zero_Interface.energyModel.pop_gridNodes.forEach(x->saveObject.c_gridNodes.add(x)); -zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); -zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); -zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); - -saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; -saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; -saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; -saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; -saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; -saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; -saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; -saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; -saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; -saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; -saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; -saveObject.c_scenarioMap_Current = zero_Interface.c_scenarioMap_Current; -saveObject.c_scenarioMap_Future = zero_Interface.c_scenarioMap_Future; - -List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps = new ArrayList<LinkedHashMap<String, List<J_EAVehicle>>>(); - -saveObject.c_additionalVehicleHashMaps = c_additionalVehicleHashMaps; - -v_objectMapper = new ObjectMapper(); -f_addMixins(); -v_objectMapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE); -traceln("Model serialisation has been completed."); - -traceln("Trying to save to file..."); -try { - - //v_objectMapper.writeValue(new File("energyModel.json"), energyModel); - - //v_objectMapper.writeValue(new File("ModelSave.json"), saveObject); - - var repository = UserScenarioRepository.builder() - .userId(UUID.fromString(zero_Interface.user.userIdToken())) - .modelName(zero_Interface.project_data.project_name()) - .build(); - - repository.saveUserScenario( - scenarioName, - v_objectMapper.writeValueAsBytes(saveObject) - ); - - traceln("Scenario saved to file."); - -} catch (IOException e) { - traceln("Saving to file has failed."); - e.printStackTrace(); -} - - - - VOID - double - 1756806431955 - f_addMixins - -710 - 370 - - false - true - true - v_objectMapper.addMixIn(Agent.class, AgentMixin.class); -//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); - -//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); -//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); - -//Ignore classes - -v_objectMapper.addMixIn(java.awt.Font.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(java.awt.Color.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(java.awt.Paint.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeLine.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeLineFill.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeText.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(DataSet.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(Level.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(TableFunction.class, IgnoreClassMixin.class); -//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeModelElementsGroup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeButton.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.analysis.TimePlot.class, IgnoreClassMixin.class); - - -// Weirdness regarding material handling toolbox -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); - - - - VOID - double - 1756806501010 - f_setEngineInputDataAfterDeserialisation - Functie van gillis voor inladen weer data! - -987 - 310 - - false - true - true - - deserializedEnergyModel - EnergyModel - - deserializedEnergyModel.p_truckTripsCsv = zero_Interface.energyModel.p_truckTripsCsv; -deserializedEnergyModel.p_householdTripsCsv = zero_Interface.energyModel.p_householdTripsCsv; -deserializedEnergyModel.p_cookingPatternCsv = zero_Interface.energyModel.p_cookingPatternCsv; - -//deserializedEnergyModel.avgc_data = zero_Interface.energyModel.avgc_data; -deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; - - - VOID - double - 1756806501019 - f_reconstructGridConnections - -986.667 - 352 - - false - true - true - - deserializedEnergyModel - EnergyModel - - ArrayList<GridConnection> allConnections = new ArrayList<>(); -allConnections.addAll(deserializedEnergyModel.c_gridConnections); -allConnections.addAll(deserializedEnergyModel.c_pausedGridConnections); - -for(GridConnection GC : allConnections){ - GC.energyModel = deserializedEnergyModel; - if (GC instanceof GCHouse){ - //toMove.add(GC); - f_reconstructAgent(GC, deserializedEnergyModel.Houses, deserializedEnergyModel); - } else if (GC instanceof GCEnergyProduction) { - f_reconstructAgent(GC, deserializedEnergyModel.EnergyProductionSites, deserializedEnergyModel); - } else if (GC instanceof GCEnergyConversion) { - f_reconstructAgent(GC, deserializedEnergyModel.EnergyConversionSites, deserializedEnergyModel); - } else if (GC instanceof GCGridBattery) { - f_reconstructAgent(GC, deserializedEnergyModel.GridBatteries, deserializedEnergyModel); - } else if (GC instanceof GCNeighborhood) { - f_reconstructAgent(GC, deserializedEnergyModel.Neighborhoods, deserializedEnergyModel); - } else if (GC instanceof GCPublicCharger) { - f_reconstructAgent(GC, deserializedEnergyModel.PublicChargers, deserializedEnergyModel); - } else if (GC instanceof GCUtility) { - f_reconstructAgent(GC, deserializedEnergyModel.UtilityConnections, deserializedEnergyModel); - } - //GC.f_startAfterDeserialisation(); -} - - - - - VOID - double - 1756806501029 - f_reconstructEnergyModel - -986.667 - 332 - - false - true - true - - energyModel - EnergyModel - - // Code Instead of Agent.goToPopulation() (which resets all parameters to default!) -/* -try{ // Reflection trick to get to Agent.owner private field - energyModel.forceSetOwner(energyModel, pop_energyModels); -} catch (Exception e) { - e.printStackTrace(); -} -*/ - -Agent root = zero_Interface.getRootAgent(); -traceln("root: " + root); -energyModel.restoreOwner(zero_Interface.zero_loader); - -energyModel.setEngine(getEngine()); -energyModel.instantiateBaseStructure_xjal(); -energyModel.setEnvironment(zero_Interface.zero_loader.getEnvironment()); - -traceln("EnergyModel owner: %s", energyModel.getOwner()); - -energyModel.create(); -//energyModel.start(); // Why is this needed? - - - VOID - double - 1756806501040 - f_reconstructAgent - -975 - 429 - - false - true - true - - agent - Agent - - - pop - AgentArrayList - - - energyModel - EnergyModel - - /* // Code Instead of Agent.goToPopulation() (which resets many variables to default!) -try{ // Reflection trick to get to Agent.owner private field - if (agent instanceof GridNode) { - ((GridNode)agent).forceSetOwner(agent,pop); - } else if (agent instanceof GridConnection) { - ((GridConnection)agent).forceSetOwner(agent,pop); - } else if (agent instanceof Actor) { - ((Actor)agent).forceSetOwner(agent,pop); - } else if (agent instanceof GIS_Object) { - ((GIS_Object)agent).forceSetOwner(agent,pop); - } -} catch (Exception e) { - e.printStackTrace(); -}*/ - -agent.restoreOwner(energyModel); // simply sets agent.d = root, should replace reflection hack -agent.restoreCollection_xjal(pop); // simple sets agent.j = pop, should replace reflection hack - -agent.setEngine(getEngine()); -agent.instantiateBaseStructure_xjal(); -agent.setEnvironment(pop.getEnvironment()); - -pop._add(agent); // Add to the population -//int popSize = pop.size(); -//pop.callCreate(agent, popSize); // Update population object -agent.create(); - - - VOID - double - 1756806501050 - f_reconstructActors - -987 - 372 - - false - true - true - - deserializedEnergyModel - EnergyModel - - for(Actor AC : deserializedEnergyModel.c_actors){ - - if (AC instanceof ConnectionOwner) { - ((ConnectionOwner)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_connectionOwners, deserializedEnergyModel); - } else if (AC instanceof EnergySupplier) { - ((EnergySupplier)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_energySuppliers, deserializedEnergyModel); - } else if (AC instanceof EnergyCoop) { - ((EnergyCoop)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_energyCoops, deserializedEnergyModel); - //((EnergyCoop)AC).f_startAfterDeserialisation(); - } else if (AC instanceof GridOperator) { - ((GridOperator)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_gridOperators, deserializedEnergyModel); - } - } - - - - VOID - double - 1756806501060 - f_reconstructGIS_Objects - -987 - 412 - - false - true - true - - deserializedEnergyModel - EnergyModel - - - c_GISObjects - ArrayList<GIS_Object> - - for(GIS_Object GO : c_GISObjects){ - GO.gisRegion = c_GISregions.get(GO.p_id); - - if (GO instanceof GIS_Building) { - ((GIS_Building)GO).energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Buildings, deserializedEnergyModel); - } else if (GO instanceof GIS_Parcel) { - ((GIS_Parcel)GO).energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Parcels, deserializedEnergyModel); - } else { - GO.energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Objects, deserializedEnergyModel); - //GO.f_startAfterDeserialisation(); - } - GO.f_resetStyle(); -} - - - VOID - double - 1756806501070 - f_reconstructGridNodes - -987 - 392 - - false - true - true - - deserializedEnergyModel - EnergyModel - - - c_gridNodes - ArrayList<GridNode> - - for(GridNode GN : c_gridNodes){ - GN.energyModel = deserializedEnergyModel; - f_reconstructAgent(GN, deserializedEnergyModel.pop_gridNodes, deserializedEnergyModel); -} - - - - VOID - double - 1756806501080 - f_reconstructOrderedCollections - -990 - 450 - - false - true - true - - saveObject - J_ModelSave - - zero_Interface.c_orderedPVSystemsCompanies = saveObject.c_orderedPVSystemsCompanies; -zero_Interface.c_orderedPVSystemsHouses = saveObject.c_orderedPVSystemsHouses; -zero_Interface.c_orderedVehicles = saveObject.c_orderedVehicles; -zero_Interface.c_orderedHeatingSystemsCompanies = saveObject.c_orderedHeatingSystemsCompanies; -zero_Interface.c_orderedHeatingSystemsHouses = saveObject.c_orderedHeatingSystemsHouses; -zero_Interface.c_orderedVehiclesPrivateParking = saveObject.c_orderedVehiclesPrivateParking; -zero_Interface.c_orderedParkingSpaces = saveObject.c_orderedParkingSpaces; -zero_Interface.c_orderedV1GChargers = saveObject.c_orderedV1GChargers; -zero_Interface.c_orderedV2GChargers = saveObject.c_orderedV2GChargers; -zero_Interface.c_orderedPublicChargers = saveObject.c_orderedPublicChargers; -zero_Interface.c_mappingOfVehiclesPerCharger = saveObject.c_mappingOfVehiclesPerCharger; -zero_Interface.c_scenarioMap_Current = saveObject.c_scenarioMap_Current; -zero_Interface.c_scenarioMap_Future = saveObject.c_scenarioMap_Future; - -/* -List<ConnectionOwner> c_COCompanies = findAll(zero_Interface.energyModel.pop_connectionOwners, p -> p.p_connectionOwnerType == OL_ConnectionOwnerType.COMPANY); - -int i = 0; -for (ConnectionOwner CO : c_COCompanies) { - UI_company companyUI = zero_Interface.c_companyUIs.get(CO.p_connectionOwnerIndexNr); - companyUI.p_company = CO; - companyUI.c_ownedGridConnections = companyUI.p_company.f_getOwnedGridConnections(); - companyUI.c_additionalVehicles = saveObject.c_additionalVehicleHashMaps.get(i); - companyUI.f_setSelectedGCSliders(); - i++; -} -*/ - - - - RETURNS_VALUE - String - 1762259840876 - f_formatName - -350 - 77 - - false - true - true - - fullName - String - - - maxChars - int - - if (fullName.length() <= maxChars) { - return fullName; -} -StringBuilder output = new StringBuilder(); -String[] subNames = fullName.split(" "); -int remainingChars = maxChars; -for (String subName : subNames) { - remainingChars -= subName.length() + 1; - if (remainingChars >= 0) { - output.append(subName); - output.append(" "); - } -} -// If the output is empty (because the first word is longer than maxChars) cut the first word off at maxChars -if (output.toString().length() == 0) { - output.append(fullName.substring(0, maxChars)); -} -output.append("..."); -return output.toString(); - - - VOID - double - 1762352238220 - f_zoomMapToBuildings - -370 - 470 - - false - true - true - List<GIS_Object> gisObjects = new ArrayList<>(); -for (GridConnection GC : v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()) { //Buildings that are grouped, select as well. - for (GIS_Object object : GC.c_connectedGISObjects) { //Buildings that are grouped, select as well. - gisObjects.add(object); - object.gisRegion.setFillColor(zero_Interface.v_selectionColorAddBuildings); - } -} -zero_Interface.f_setMapViewBounds(gisObjects); - - - VOID - double - 1762356123802 - f_loadScenarioButton - -380 - 580 - - false - true - true - // The function creates a new thread, otherwise visibilities are only updated after the entire button action is finished, which is not enough feedback for the user -gr_forceSaveLoadScenario.setVisible(false); -gr_loadScenario.setVisible(false); -zero_Interface.f_setLoadingScreen(true, zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - -new Thread( () -> { - f_loadScenario(combobox_selectScenario.getValueIndex()); - zero_Interface.f_setLoadingScreen(false, 0, 0); -}).start(); - - - VOID - double - 1762358078152 - f_saveScenarioButton - -380 - 600 - - false - true - true - // The function creates a new thread, otherwise visibilities are only updated after the entire button action is finished, which is not enough feedback for the user -gr_forceSaveLoadScenario.setVisible(false); -gr_saveScenario.setVisible(false); -zero_Interface.f_setLoadingScreen(true, zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - -new Thread( () -> { - f_saveScenario(v_scenarioName); - zero_Interface.f_setLoadingScreen(false, 0, 0); -}).start(); - - - - - - 1709049506454 - connections - 50 - -50 - - false - true - true - false - COLLECTION_OF_LINKS - true - Object - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - 1747229590464 - zero_Interface - 50 - -100 - - false - true - true - - zerointerfaceloader - Zero_Interface - - - - - - 1716193013122 - uI_Results - -350 - 165 - - false - true - true - 1753694648333 - - digital_twin_results - UI_Results - - - - digital_twin_results - UI_Results - 1704197366556 - - - - - energyModel - - - p_cutOff_MWh - - - gr_infoText - - zero_Interface.gr_infoText - - - - gr_closeInfoText - - zero_Interface.gr_closeInfoText - - - - t_infoTextDescription - - zero_Interface.t_infoTextDescription - - - - rect_infoText - - zero_Interface.rect_infoText - - - - p_currentActiveInfoBubble - - zero_Interface.p_currentActiveInfoBubble - - - - false - - 100 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 2658477089962 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722252541830 - uI_Tabs - -350 - 215 - - false - true - true - 1753694955483 - - zerointerfaceloader - UI_Tabs - - - - zerointerfaceloader - UI_Tabs - 1722245292191 - - - - false - - 100 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 2658477089960 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - 1709049506460 - level - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - 1753702320529 - rect_backGround - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 1920 - 980 - 0.0 - -1 - p_energyHubBackGroundColor - null - - - 1747228615096 - rect_settings - 10 - 440 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - p_energyHubLineWidth - -16777216 - p_energyHubLineColor - null - SOLID - p_energyHubLineStyle - 380 - 530 - 0.0 - -1 - null - 10 - - - 1753702302932 - gr_uI_Tabs_presentation - 0 - -20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753694955483 - uI_Tabs_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1753706195332 - rect_uITabsModelBlocker - 400 - 10 - - false - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 0 - - null - SOLID - 1500 - 960 - 0.0 - -1 - null - - - 1747228569476 - rect_scenarios - 10 - 90 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - p_energyHubLineWidth - -16777216 - p_energyHubLineColor - null - SOLID - p_energyHubLineStyle - 380 - 300 - 0.0 - -1 - null - 10 - - - 1747228738085 - t_scenario - 200 - 100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Scenario's - - SansSerif - 36 - - - CENTER - - - 1747228860030 - txt_settings - 200 - 460 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Instellingen - - SansSerif - 36 - - - CENTER - - - 1747231288371 - rect_map - 470 - 190 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - p_energyHubLineWidth - -16777216 - p_energyHubLineColor - null - SOLID - p_energyHubLineStyle - 870 - 550 - 0.0 - -1 - p_energyHubLineColor - null - 10 - - - 1753704667485 - gr_energyHubTitle - 910 - 80 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1747228628985 - rect_title - -440 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - p_energyHubLineWidth - -16777216 - p_energyHubLineColor - null - SOLID - p_energyHubLineStyle - 870 - 110 - 0.0 - -1 - null - 10 - - - 1747228659472 - txt_energyHubTitle - -25 - -25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - EnergyHub Configurator - - SansSerif - 48 - - - CENTER - - - 1753704116114 - gr_energyHubLogo - -350 - 5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753704116116 - ovalEnergyHubLogo - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 48.1235 - 40 - 0.0 - -3736634 - null - - - 1753704116118 - line - -24.062 - -16.844 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 47 - -6 - 0 - - - 1753704116120 - line1 - -14.437 - 14.437 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 37 - -38 - 0 - - - 1753704116122 - line2 - -24.062 - -9.625 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 42 - 35 - 0 - - - 1753704116124 - oval - -26.468 - -14.437 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 7.2185 - 40 - 0.0 - -657931 - null - - - 1753704116126 - oval1 - -19.25 - 19.25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 7.2185 - 40 - 0.0 - -657931 - null - - - 1753704116128 - line3 - 19.25 - 24.062 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - DOTTED - 1 - 0 - 1 - 0 - 1 - -42 - 0 - - - 1753704116130 - oval4 - 19.25 - 24.062 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 7.2185 - 40 - 0.0 - -657931 - null - - - 1753704116132 - oval3 - 24.062 - -21.656 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 7.2185 - 40 - 0.0 - -657931 - null - - - - - - - 1753694681879 - gr_uI_Results_presentation - 1420 - 200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753694648333 - uI_Results_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - false - 1753706469000 - button_reconfigureEnergyHub - 1100 - 760 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - pauseSimulation(); - -//Remove slider GCs from coop -v_energyHubCoop.f_removeMemberGCs(c_sliderEAGCs); - - -zero_Interface.f_getScenarioButtons().setPos( 19, 144); - -zero_Interface.map.setScale( 1.0, 1.0); -zero_Interface.map.setPos(410, 130); - -zero_Interface.va_Interface.navigateTo(); -zero_Interface.v_currentViewArea = zero_Interface.va_Interface; -//zero_Interface.c_selectedGridConnections = new ArrayList<GridConnection>(c_selectedEnergyHubGC); -//zero_Interface.v_customEnergyCoop = v_energyHubCoop; - -v_energyHubCoop = null; - -zero_Interface.b_inEnergyHubSelectionMode = true; - - - - Herconfigureer de EnergyHub - - - - 1753706641851 - gr_exitButton - 1245 - 85 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1747230291770 - rect_exit - -91.459 - -27.63 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 173.773 - 55.262 - 0.0 - -1 - null - 10 - - - false - 1747230286040 - button_exit - -86.886 - -23.025 - - true - true - false - SHAPE_DRAW_2D3D - - false - - true - //Remove slider GCs from coop -v_energyHubCoop.f_removeMemberGCs(c_sliderEAGCs); -c_sliderEAGCs.clear(); - -zero_Interface.f_getScenarioButtons().setPos( 19, 144); - -zero_Interface.map.setScale( 1.0, 1.0); -zero_Interface.map.setPos(410, 130); - - -zero_Interface.button_clearFilters.action(); -zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); -zero_Interface.cb_showFilterInterface.setSelected(false, true); -zero_Interface.f_updateMainInterfaceSliders(); - -zero_Interface.f_setStartView(); - -v_energyHubCoop = null; - -zero_Interface.b_inEnergyHubMode = false; - -runSimulation(); - - - - Terug naar hoofdscherm - - - - - - 1753883623020 - gr_simulateYearScreenEnergyHub - 1900 - 130 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753883623022 - gr_loadIconYearSimulationEnergyHub - -261 - -25 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753883623024 - rect_loadIconSmall - -219 - -50 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - p_energyHubLineColor - null - DASHED - 460 - 250 - 0.0 - -369756683 - null - - - 1753883623026 - image_loadIconSmall - -30 - 60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - zerointerfaceloader - icon_loading.gif - - - false - - - 1753883623028 - t_loadIconSmall - 0 - 15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Jaar wordt gesimuleerd - - SansSerif - 22 - - - CENTER - - - - - 1753883623030 - gr_simulateYearEnergyHub - 270 - 20 - - true - false - false - SHAPE_DRAW_2D3D - -250 - 15 - false - 0 - 0.0 - - - 1753883623032 - rect_simulateYearScreenSmall - -230 - -90 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - DASHED - 460 - 180 - 0.0 - -1 - p_energyHubLineColor - null - - - 1753883623034 - gr_simulateYearButtonEnergyHub - 10 - 50 - - true - true - false - SHAPE_DRAW_2D3D - gr_simulateYearEnergyHub.setVisible(false); -gr_loadIconYearSimulationEnergyHub.setVisible(true); -zero_Interface.f_simulateYearFromMainInterface(); - false - 0 - 0.0 - - - 1753883623036 - t_simulateYearToCalculateCostsSmall - 10 - -60 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simuleer jaar voor KPI's - - SansSerif - 22 - - - CENTER - - - 1753883623038 - image_simulateYearToCalculateCostsSmall - -200 - -75 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - zerointerfaceloader - icon_greater_than.png - - - false - - - - - - - - - 1756302313206 - rect_memberNames - 470 - 760 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 500 - 200 - 0.0 - -1 - null - 10 - - - 1756302430570 - t_energyHubMember1 - 500 - 820 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 1 - - SansSerif - 18 - - - LEFT - - - 1756302500322 - t_energyHubMembers - 720 - 765 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - E-Hub Members - - SansSerif - 36 - - - CENTER - - - 1756302556840 - t_energyHubMember3 - 500 - 850 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 3 - - SansSerif - 18 - - - LEFT - - - 1756302569681 - t_energyHubMember2 - 930 - 820 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 2 - - SansSerif - 18 - - - RIGHT - - - 1756302580797 - t_energyHubMember4 - 930 - 850 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 4 - - SansSerif - 18 - - - RIGHT - - - 1756302616239 - t_energyHubMember5 - 500 - 880 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 5 - - SansSerif - 18 - - - LEFT - - - 1756302630734 - t_energyHubMember7 - 500 - 910 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 7 - - SansSerif - 18 - - - LEFT - - - 1756302634233 - t_energyHubMemberOthers - 930 - 910 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Etc - - SansSerif - 18 - - - RIGHT - - - 1756302654947 - t_energyHubMember6 - 930 - 880 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 6 - - SansSerif - 18 - - - RIGHT - - - 1758546856343 - gr_forceSaveLoadScenario - 0 - -1500 - - true - false - false - SHAPE_DRAW_2D3D - 0 - false - 0 - 0.0 - - - 1758548705448 - rect_forceSaveLoadScenarioClickBlocker1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - ; - false - 0 - 10 - 1 - - null - SOLID - 10 - 980 - 0.0 - 16777215 - null - - - 1758548705454 - rect_forceSaveLoadScenarioClickBlocker2 - 10 - 0 - - true - true - false - SHAPE_DRAW_2D3D - ; - false - 0 - 10 - 1 - - null - SOLID - 380 - 275 - 0.0 - 16777215 - null - - - 1758548705462 - rect_forceSaveLoadScenarioClickBlocker3 - 10 - 390 - - true - true - false - SHAPE_DRAW_2D3D - ; - false - 0 - 10 - 1 - - null - SOLID - 380 - 590 - 0.0 - 16777215 - null - - - 1758548705469 - rect_forceSaveLoadScenarioClickBlocker4 - 390 - 0 - - true - true - false - SHAPE_DRAW_2D3D - ; - false - 0 - 10 - 1 - - null - SOLID - 1530 - 980 - 0.0 - 16777215 - null - - - 1758546863803 - rect_forceSaveLoadScenario1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 10 - 980 - 0.0 - -1765752640 - zero_Interface.v_forcedClickScreenColor - null - - - 1758546863807 - rect_forceSaveLoadScenario2 - 10 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 380 - 275 - 0.0 - -1765752640 - zero_Interface.v_forcedClickScreenColor - null - - - 1758546863812 - rect_forceSaveLoadScenario3 - 10 - 390 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 380 - 590 - 0.0 - -1765752640 - zero_Interface.v_forcedClickScreenColor - null - - - 1758546863816 - rect_forceSaveLoadScenario4 - 390 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1530 - 980 - 0.0 - -1765752640 - zero_Interface.v_forcedClickScreenColor - null - - - false - 1758548909849 - button_cancelSaveLoadScenario - 305 - 355 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - gr_saveScenario.setVisible(false); -gr_loadScenario.setVisible(false); -gr_forceSaveLoadScenario.setVisible(false); - - - - annuleren - - - - - - 1756800864903 - gr_saveAndLoadScenarios - 365 - -270 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1756805661168 - gr_saveScenario - -330 - 610 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1756805661170 - image_saveScenario - 225 - -5 - - true - true - false - SHAPE_DRAW_2D3D - f_saveScenarioButton(); - false - 0 - 32 - 32 - 0.0 - - - zerointerfaceloader - save_icon.png - - - false - - - false - 1756805661172 - eb_scenarioName - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - - - - true - v_scenarioName - - - - 1758545634906 - t_saveScenarioInstructions - 5 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geef je scenario een naam en klik rechts op het icoontje - - SansSerif - 10 - - - LEFT - - - - - 1756805661208 - gr_loadScenario - -330 - 665 - - true - false - false - SHAPE_DRAW_2D3D - 610 - false - 0 - 0.0 - - - 1756805661210 - image_loadScenario - 225 - -5 - - true - true - false - SHAPE_DRAW_2D3D - f_loadScenarioButton(); - false - 0 - 32 - 32 - 0.0 - - - zerointerfaceloader - load_icon.png - - - false - - - false - 1756805661212 - combobox_selectScenario - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - - - - false - - false - - - - 1758545638022 - t_loadScenarioInstructions - 5 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer een scenario in de keuzelijst en klik op het icoontje - - SansSerif - 10 - - - LEFT - - - - - false - 1758532628277 - button_saveScenario - -331 - 555 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - gr_loadScenario.setVisible(false); -gr_forceSaveLoadScenario.setVisible(true); -gr_saveScenario.setVisible(true); - - - - Bewaar een scenario - - - - false - 1758532628290 - button_loadScenario - -181 - 555 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - f_initializeUserSavedScenarios(combobox_selectScenario); -if (combobox_selectScenario.getItems().length == 0) { - zero_Interface.f_setErrorScreen("Er zijn nog geen scenario's opgeslagen.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - return; -} - -gr_saveScenario.setVisible(false); -gr_forceSaveLoadScenario.setVisible(true); -gr_loadScenario.setVisible(true); - - - - - - Laad een scenario in - - - - - - 1762252612468 - t_date - 490 - 160 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Datum - zero_Interface.energyModel.v_isRapidRun ? zero_Interface.f_getDateString() : zero_Interface.f_getDateAndTimeString() - - SansSerif - 16 - - - LEFT - - - - - - - 1747229800342 - va_main - 0 - 0 - - false - true - false - - <Width>1920</Width> - <Height>980</Height> - </Area> - </Areas> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1717506309790</Id> - <Name>UI_Hydrogen</Name> - <Folder>1754045666929</Folder> - <Generic>false</Generic> - <GenericParameter> - <Id>1717506309785</Id> - <Name>1717506309785</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089972</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709107200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1717506309786</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1717506309821</CurrentLevel> - <ConnectionsId>1717506309867</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1717506309811</Id> - <Name>v_sliderStartValue_priceLimit</Name> - <X>-930</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1717506309813</Id> - <Name>v_sliderMinValue_balanceLimit</Name> - <X>-930</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1717506309815</Id> - <Name>v_sliderMaxValue_balanceLimit</Name> - <X>-930</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1717506309817</Id> - <Name>v_sliderStartValue_balanceLimit</Name> - <X>-930</X> - <Y>330</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1717506309819</Id> - <Name>v_sliderStartValue_ElectrolyserP_MW</Name> - <X>-930</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724859028571</Id> - <Name>v_colorH2_blue</Name> - <X>-940</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>new Color(33, 164, 195)</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724859028735</Id> - <Name>v_colorH2_green</Name> - <X>-940</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>new Color(104, 193, 103)</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724859028737</Id> - <Name>v_colorH2_white</Name> - <X>-940</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>white</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724860189446</Id> - <Name>v_currentSelectedElectrolyser</Name> - <X>-360</X> - <Y>510</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724944015553</Id> - <Name>v_currentSelectedStorage</Name> - <X>-360</X> - <Y>530</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724944025798</Id> - <Name>v_currentSelectedFuelCell</Name> - <X>-360</X> - <Y>550</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1724921941090</Id> - <Name>p_amountOfGISObjects</Name> - <X>-360</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1724921941088</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1724921946872</Id> - <Name>p_amountOfGC</Name> - <X>-360</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1724921946870</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724859404446</Id> - <Name>c_GISObjects_Hydrogen</Name> - <X>-360</X> - <Y>80</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GIS_Object</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724859404449</Id> - <Name>c_gridConnections_Hydrogen</Name> - <X>-360</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GridConnection</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724859404455</Id> - <Name>c_connectedGridNodes</Name> - <X>-360</X> - <Y>120</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Object</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724943470087</Id> - <Name>c_connectionOwners_Hydrogen</Name> - <X>-360</X> - <Y>60</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>ConnectionOwner</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724943620236</Id> - <Name>c_hydrogenStorages</Name> - <X>-360</X> - <Y>260</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>J_EAStorageGas</ElementClass> - <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724943636670</Id> - <Name>c_hydrogenElectrolysers</Name> - <X>-360</X> - <Y>240</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>J_EAConversionElectrolyser</ElementClass> - <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724943685107</Id> - <Name>c_hydrogenFuelCells</Name> - <X>-360</X> - <Y>280</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>J_EAConversionFuelCell</ElementClass> - <ValueElementClass>J_EAStorageGas</ValueElementClass> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1717506309797</Id> - <Name>f_styleHydrogenUI</Name> - <X>-960</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1717506309801</Id> - <Name>f_initializeUIElectrolyser</Name> - <X>-960</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>COC</Name> - <Type>ConnectionOwner</Type> - </Parameter> - <Body>//Instantiate sliders -f_instantiateSlidersElectrolyser(COC);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1717506309803</Id> - <Name>f_instantiateSlidersElectrolyser</Name> - <X>-940</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>COC</Name> - <Type>ConnectionOwner</Type> - </Parameter> - <Body>// Electrolyser Power start value -v_sliderStartValue_ElectrolyserP_MW = ((J_EAConversionElectrolyser)COC.f_getOwnedGridConnections().get(0).c_conversionAssets.get(0)).getInputCapacity_kW()/1000; -sl_electrolyserPower.setValue(v_sliderStartValue_ElectrolyserP_MW, false); -t_powerElectrolyser.setText(v_sliderStartValue_ElectrolyserP_MW + " MW"); - - -// Price limit start value -v_sliderStartValue_priceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_electricityPriceMaxForProfit_eurpkWh; -sl_electrolyserElectricityPriceLimit.setValue(v_sliderStartValue_priceLimit, false); -t_electricityPriceLimit.setText("€" + v_sliderStartValue_priceLimit); - - -//Balance limit start value -v_sliderStartValue_balanceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_gridNodeCongestionLimit_kW; -sl_electrolyserElectricityBalanceLimit.setValue(v_sliderStartValue_balanceLimit, false); -t_electricityBalanceLimit.setText(v_sliderStartValue_balanceLimit + " MW"); - - -//Radio button balance or price mode -int rb_value = 0; -switch (((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).p_electrolyserOperationMode){ - - case PRICE: - - rb_value = 0; - //Set visibility of price slider true and balance slider false - gr_electricityPriceSlider.setVisible(true); - gr_electricityBalanceSlider.setVisible(false); - break; - - case BALANCE: - rb_value = 1; - - //Set visibility of balance slider true and price slider false - gr_electricityBalanceSlider.setVisible(true); - gr_electricityPriceSlider.setVisible(false); - break; -} -rb_electrolyserMode.setValue(rb_value, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724859526072</Id> - <Name>f_setScenarioFuture</Name> - <X>-340</X> - <Y>430</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>//Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -//Scenario code here - - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(1, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724859526076</Id> - <Name>f_setScenario</Name> - <X>-360</X> - <Y>390</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>scenario_nr</Name> - <Type>int</Type> - </Parameter> - <Body>switch (scenario_nr){ - - case 0: // Current - - break; - - case 1: // Future - - break; - - case 2: // Hydrogen - traceln("Selected scenario: Hydrogen : DOES NOTHING YET"); - break; - - case 3: // Custom - - if(rb_scenariosPrivateUI.getValue() == 2){ - return; - } - rb_scenariosPrivateUI.setValue(2, false); - traceln("Selected scenario: Custom"); - break; - - default: - -} - -//Set 'results up to date' to false -zero_Interface.b_resultsUpToDate = false;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724859526078</Id> - <Name>f_setScenarioCurrent</Name> - <X>-340</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>//Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -//Scenario code here - - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(0, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724859526080</Id> - <Name>f_setSelectedGC</Name> - <Description>Function that sets the sliders to match the currently present settings of the energy assets owned by the selected GC. Used when a connection owner has multiple grid connections, and wants to set the sliders of a different GC. </Description> - <X>-360</X> - <Y>340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Initialize slider presets to selected GC (min, max, etc.) -//f_setSliderPresets(); - -</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1717506309867</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1717506328385</Id> - <Name>zero_Interface</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1717506309821</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1725003123558</Id> - <Name>rect_canvas</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorH2_blue</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>1920</Width> - <Height>980</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorH2_white</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1724944453528</Id> - <Name>rect_scenarios</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorH2_blue</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>170</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorH2_white</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <TimePlot> - <Id>1717506309825</Id> - <Name>plot</Name> - <X>400</X> - <Y>280</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <AutoUpdate>true</AutoUpdate> - <RecurrenceProperties> - <Id>1751013532514</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709625600000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </RecurrenceProperties> - <EmbeddedIcon>false</EmbeddedIcon> - <Width>540</Width> - <Height>400</Height> - <BackgroundColor/> - <BorderColor/> - <ChartArea> - <XOffset>50</XOffset> - <YOffset>30</YOffset> - <Width>460</Width> - <Height>310</Height> - <BackgroundColor>-1</BackgroundColor> - <BorderColor>-16777216</BorderColor> - <GridColor>-12566464</GridColor> - </ChartArea> - <Legend> - <Place>SOUTH</Place> - <TextColor>-16777216</TextColor> - <Size>30</Size> - </Legend> - <Labels> - <HorLabelsPosition>DEFAULT</HorLabelsPosition> - <VerLabelsPosition>DEFAULT</VerLabelsPosition> - <TextColor>-12566464</TextColor> - </Labels> - <ShowLegend>true</ShowLegend> - <TimeWindowsMovementType>MOVEMENT_WITH_TIME</TimeWindowsMovementType> - <TimeWindowUnits>MODEL_TIME_UNIT</TimeWindowUnits> - <VerScaleFromExpression>0</VerScaleFromExpression> - <VerScaleToExpression>1</VerScaleToExpression> - <VerScaleType>AUTO</VerScaleType> - <DrawLine>true</DrawLine> - <Interpolation>LINEAR</Interpolation> - <SamplesToKeep>100</SamplesToKeep> - <TimeWindowExpression>100</TimeWindowExpression> - <FillAreaUnderLine>false</FillAreaUnderLine> - <LabelFormat>MODEL_TIME_UNITS</LabelFormat> - </TimePlot> - <Rectangle> - <Id>1717506309827</Id> - <Name>rect_sliders</Name> - <X>0</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorH2_blue</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>810</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorH2_white</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1717506309829</Id> - <Name>txt_electrolyserSliders</Name> - <X>70</X> - <Y>200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electrolyser</Text> - <Font> - <Name>Calibri</Name> - <Size>22</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1717506309831</Id> - <Name>gr_buttonH2Electrolyser</Name> - <X>41</X> - <Y>211</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Oval> - <Id>1717506309833</Id> - <Name>ovalElectrolyserButton</Name> - <X>-1</X> - <Y>-1</Y> - <Label> - <X>0</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <RadiusX>20</RadiusX> - <RadiusY>40</RadiusY> - <Rotation>0.0</Rotation> - <FillColor>-14774017</FillColor> - <FillColorCode>v_colorH2_blue</FillColorCode> - <FillMaterial>null</FillMaterial> - </Oval> - <Text> - <Id>1717506309835</Id> - <Name>txt_h21</Name> - <X>-10</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-1</Color> - <Text>H2</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1717506309837</Id> - <Name>gr_electricityPriceSlider</Name> - <X>190</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1717506309839</Id> - <Name>txt_electricityPriceLimit</Name> - <X>-170</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electriciteits prijs limiet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1717506309841</Id> - <Name>sl_electrolyserElectricityPriceLimit</Name> - <X>62</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the maximum price of electricity used to produce hydrogen -((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_electricityPriceMaxForProfit_eurpkWh = sl_electrolyserElectricityPriceLimit.getValue(); - -//Set text accordingly -t_electricityPriceLimit.setText( "€" + sl_electrolyserElectricityPriceLimit.getValue()); - - -//Set scenario to custom -f_setScenario(2); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>v_sliderStartValue_priceLimit</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>0.5</MaxValue> - <Step>0.01</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1717506309843</Id> - <Name>t_electricityPriceLimit</Name> - <X>40</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text> €0.00</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1717506309845</Id> - <Name>gr_electrolyserPowerSlider</Name> - <X>190</X> - <Y>280</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1717506309847</Id> - <Name>txt_powerElectrolyser</Name> - <X>-170</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Vermogen electrolyser</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1717506309849</Id> - <Name>sl_electrolyserPower</Name> - <X>62</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the electric capacity -c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).setInputCapacity_kW(sl_electrolyserPower.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW - -//Adjust grid connection capacity as well (if needed) -if(sl_electrolyserPower.getValue()*1000 > 2000){ - ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_electrolyserPower.getValue()*1000; - ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_electrolyserPower.getValue()*1000; - ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_electrolyserPower.getValue()*1000; -} - -//Set the text accordingly -t_powerElectrolyser.setText(sl_electrolyserPower.getValue() + " MW"); - - -//Set scenario to custom -f_setScenario(2); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>10</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1717506309851</Id> - <Name>t_powerElectrolyser</Name> - <X>35</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>1.0 MW</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1717506309853</Id> - <Name>gr_electrolyserMode</Name> - <X>100</X> - <Y>340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1717506309855</Id> - <Name>rb_electrolyserMode</Name> - <X>-80</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="150" Height="50"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>switch (rb_electrolyserMode.getValue()){ - - case 0: - ((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.PRICE; - - //Set visibility of price slider true and balance slider false - gr_electricityPriceSlider.setVisible(true); - gr_electricityBalanceSlider.setVisible(false); - break; - - case 1: - ((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.BALANCE; - - //Set visibility of balance slider true and price slider false - gr_electricityBalanceSlider.setVisible(true); - gr_electricityPriceSlider.setVisible(false); - break; -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Prijs</Button> - <Button>Balans</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1717506309857</Id> - <Name>txt_electrolyserMode</Name> - <X>-80</X> - <Y>-40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electrolyser modus</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1717506309859</Id> - <Name>gr_electricityBalanceSlider</Name> - <X>190</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1717506309861</Id> - <Name>txt_electricityBalanceLimit</Name> - <X>-170</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electriciteits balans limiet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1717506309863</Id> - <Name>sl_electrolyserElectricityBalanceLimit</Name> - <X>62</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode> -//Adjust the maximum price of electricity used to produce hydrogen -((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_gridNodeCongestionLimit_kW = sl_electrolyserElectricityBalanceLimit.getValue()*1000; - -//Set text accordingly -t_electricityBalanceLimit.setText( sl_electrolyserElectricityBalanceLimit.getValue() + " MW" ); - -//Set scenario to custom -f_setScenario(2); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>v_sliderStartValue_balanceLimit</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>v_sliderMinValue_balanceLimit</MinValue> - <MaxValue>v_sliderMaxValue_balanceLimit</MaxValue> - <Step>0.01</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1717506309865</Id> - <Name>t_electricityBalanceLimit</Name> - <X>50</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0.0 MW</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724859404444</Id> - <Name>text5</Name> - <X>-370</X> - <Y>30</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Connections</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724859526068</Id> - <Name>text7</Name> - <X>-370</X> - <Y>360</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Set Sliders to Scenario</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724859526070</Id> - <Name>txt_setSlidersToSelectedGC</Name> - <X>-370</X> - <Y>310</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Set Sliders to selected GC</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1724859673741</Id> - <Name>gr_scenarioRB</Name> - <X>130</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1724859673743</Id> - <Name>rb_scenariosPrivateUI</Name> - <X>-100</X> - <Y>-60</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="180" Height="120"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setScenario(rb_scenariosPrivateUI.getValue());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="14" Style="0"/> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Huidig - 2023</Button> - <Button>Toekomstplannen</Button> - <Button>Custom</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1724859673745</Id> - <Name>text187</Name> - <X>-100</X> - <Y>-80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Selecteer een scenario</Text> - <Font> - <Name>Calibri</Name> - <Size>20</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724943713523</Id> - <Name>txt_hydrogenAssets</Name> - <X>-370</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hydrogen assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724944232372</Id> - <Name>txt_h2storageSliders</Name> - <X>72</X> - <Y>513</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Waterstof opslag</Text> - <Font> - <Name>Calibri</Name> - <Size>22</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1724944232376</Id> - <Name>gr_buttonH2Storage</Name> - <X>43</X> - <Y>524</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Oval> - <Id>1724944232378</Id> - <Name>ovalH2StorageButton</Name> - <X>-1</X> - <Y>-1</Y> - <Label> - <X>0</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <RadiusX>20</RadiusX> - <RadiusY>40</RadiusY> - <Rotation>0.0</Rotation> - <FillColor>-14774017</FillColor> - <FillColorCode>v_colorH2_blue</FillColorCode> - <FillMaterial>null</FillMaterial> - </Oval> - <Text> - <Id>1724944232380</Id> - <Name>txt_h22</Name> - <X>-10</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-1</Color> - <Text>H2</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724944302875</Id> - <Name>txt_fuelCellSliders</Name> - <X>69</X> - <Y>739</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fuelcell</Text> - <Font> - <Name>Calibri</Name> - <Size>22</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1724944302879</Id> - <Name>gr_buttonH2FuelCell</Name> - <X>40</X> - <Y>750</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Oval> - <Id>1724944302881</Id> - <Name>ovalH2StorageButton1</Name> - <X>-1</X> - <Y>-1</Y> - <Label> - <X>0</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <RadiusX>20</RadiusX> - <RadiusY>40</RadiusY> - <Rotation>0.0</Rotation> - <FillColor>-14774017</FillColor> - <FillColorCode>v_colorH2_blue</FillColorCode> - <FillMaterial>null</FillMaterial> - </Oval> - <Text> - <Id>1724944302883</Id> - <Name>txt_h23</Name> - <X>-10</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-1</Color> - <Text>H2</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724947265014</Id> - <Name>text</Name> - <X>-370</X> - <Y>480</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Current selected assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1725003108502</Id> - <Name>txt_hydrogenControlRoom</Name> - <X>770</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <ColorCode>v_colorH2_blue</ColorCode> - <Text>Hydrogen Controlroom</Text> - <Font> - <Name>Calibri</Name> - <Size>72</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - <Areas> - <Area> - <Id>1725002833718</Id> - <Name>va_hydrogenUI</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Title>Hydrogen UI - 1920 - 980 - - - - - 1722245292185 - UI_Tabs - /* -public ShapeGroup getGroupElectricityPresentation() { - return gr_tabElectricity_presentation; -} - -public ShapeEmbeddedObjectPresentation getElectricityPresentation() { - return pop_tabElectricity_presentation; -} -*/ - 1754045642067 - false - - 1722245292191 - 1722245292191 - - T extends Agent - - Generic parameter: - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - 10 - MPS - - - 1 - METER - - - 1 - METER - - - 1 - METER - - - - false - - 1.0 - SECOND - - CONTINUOUS - 500 - 500 - 0 - 100 - 100 - MOORE - USER_DEF - USER_DEF - 2 - 50 - 0.95 - 10 - - - true - 1658477089971 - true - 1722326400000 - - 0 - HOUR - - - 1 - HOUR - - - - 1722245292188 - scale - 0 - -150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1722245292192 - 1722245292186 - - - 1722245555993 - v_selectedTabType - 270 - 40 - - false - true - true - - EnergyDemandTab - - ELECTRICITY - - - - - 1746099651858 - v_presentationXOffset - 270 - 130 - - false - true - true - - double - - 15 - - - - - 1746099651890 - v_presentationYOffset - 270 - 150 - - false - true - true - - double - - 630 - - - - - 1754908036761 - v_activeSliderGridConnections - 530 - 50 - - false - true - true - - List<GridConnection> - - - - 1755013554753 - v_pausedSliderGridConnections - 530 - 70 - - false - true - true - - List<GridConnection> - - - - 1753869985994 - c_utilityGridConnections - true - 1170 - 75 - - false - true - true - - ArrayList - GCUtility - String - - - - 1753869993825 - c_houseGridConnections - true - 1170 - 100 - - false - true - true - - ArrayList - GCHouse - String - - - - 1753870454474 - c_gridBatteryGridConnections - true - 1170 - 125 - - false - true - true - - ArrayList - GCGridBattery - String - - - - 1753870466643 - c_solarFarmGridConnections - true - 1170 - 150 - - false - true - true - - ArrayList - GCEnergyProduction - String - - - - 1753870491136 - c_windFarmGridConnections - true - 1170 - 175 - - false - true - true - - ArrayList - GCEnergyProduction - String - - - - 1753870502247 - c_chargerGridConnections - true - 1170 - 200 - - false - true - true - - ArrayList - GCPublicCharger - String - - - - - - VOID - double - 1722245473562 - f_showCorrectTab - 270 - 70 - - false - true - true - pop_tabElectricity_presentation.setVisible(false); -pop_tabHeating_presentation.setVisible(false); -pop_tabMobility_presentation.setVisible(false); -pop_tabEHub_presentation.setVisible(false); - -switch (v_selectedTabType) { - case ELECTRICITY: - pop_tabElectricity_presentation.setVisible(true); - break; - case HEAT: - pop_tabHeating_presentation.setVisible(true); - break; - case MOBILITY: - pop_tabMobility_presentation.setVisible(true); - break; - case HUB: - case NFATO: - pop_tabEHub_presentation.setVisible(true); - break; -} - - - - VOID - double - 1722259092945 - f_setTab - 270 - 100 - - false - true - true - - tab - EnergyDemandTab - - v_selectedTabType = tab; -f_showCorrectTab(); - - - - VOID - double - 1753881126492 - f_initializeSliderGridConnections - true - 1170 - 50 - - false - true - true - - gridConnections - List<GridConnection> - - c_utilityGridConnections.clear(); -c_houseGridConnections.clear(); -c_solarFarmGridConnections.clear(); -c_windFarmGridConnections.clear(); -c_gridBatteryGridConnections.clear(); -c_chargerGridConnections.clear(); - - -for(GridConnection GC : gridConnections){ - if(GC instanceof GCUtility){ - c_utilityGridConnections.add((GCUtility)GC); - } - else if(GC instanceof GCHouse){ - c_houseGridConnections.add((GCHouse)GC); - } - else if(GC instanceof GCEnergyProduction){ - if(GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - c_solarFarmGridConnections.add((GCEnergyProduction)GC); - } - if(GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ - c_windFarmGridConnections.add((GCEnergyProduction)GC); - } - } - else if(GC instanceof GCGridBattery){ - c_gridBatteryGridConnections.add((GCGridBattery)GC); - } - else if(GC instanceof GCPublicCharger){ - c_chargerGridConnections.add((GCPublicCharger)GC); - } -} - - - VOID - double - 1754908006859 - f_initializeSliderGCPointers - 530 - 30 - - false - true - true - - activeGridConnections - List<GridConnection> - - - pausedGridConnections - List<GridConnection> - - if(activeGridConnections != null){ - v_activeSliderGridConnections = activeGridConnections; -} -else{ - v_activeSliderGridConnections = new ArrayList<>(); - traceln("WARNING: UITABS HAS BEEN INITIALIZED WITH NO ACTIVE GC"); -} - -if(pausedGridConnections != null){ - v_pausedSliderGridConnections = pausedGridConnections; -} -else{ - v_pausedSliderGridConnections = new ArrayList<>(); -} - - - VOID - double - 1754908356478 - f_initializeUI_Tabs - 50 - 150 - - false - true - true - - activeGridConnections - List<GridConnection> - - - pausedGridConnections - List<GridConnection> - - //Initialize the GridConnections -f_initializeSliderGCPointers(activeGridConnections, pausedGridConnections); - -//Initialize the tabs -f_initializeActiveTabs(); - -//Set sliders to engine state of the gridconnections -f_updateSliders(); - -//Show correct tab -f_showCorrectTab(); - - - RETURNS_VALUE - List<GCHouse> - 1754919017244 - f_getActiveSliderGridConnections_houses - 560 - 240 - - false - true - true - List<GCHouse> houseGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCHouse){ - houseGridConnections.add((GCHouse)GC); - } -} - -return houseGridConnections; - - - RETURNS_VALUE - List<GCUtility> - 1754922545766 - f_getActiveSliderGridConnections_utilities - 560 - 220 - - false - true - true - List<GCUtility> utilityGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCUtility){ - utilityGridConnections.add((GCUtility)GC); - } -} - -return utilityGridConnections; - - - RETURNS_VALUE - List<GCGridBattery> - 1754922546986 - f_getAllSliderGridConnections_gridBatteries - 540 - 300 - - false - true - true - List<GCGridBattery> gridBatteryGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCGridBattery){ - gridBatteryGridConnections.add((GCGridBattery)GC); - } -} -if(v_pausedSliderGridConnections != null){ - for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCGridBattery){ - gridBatteryGridConnections.add((GCGridBattery)GC); - } - } -} -return gridBatteryGridConnections; - - - RETURNS_VALUE - List<GCPublicCharger> - 1754922547989 - f_getSliderGridConnections_chargers - 550 - 380 - - false - true - true - List<GCPublicCharger> chargerGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCPublicCharger){ - chargerGridConnections.add((GCPublicCharger)GC); - } -} - -return chargerGridConnections; - - - RETURNS_VALUE - List<GCEnergyProduction> - 1754922591622 - f_getAllSliderGridConnections_production - 540 - 330 - - false - true - true - List<GCEnergyProduction> productionGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCEnergyProduction){ - productionGridConnections.add((GCEnergyProduction)GC); - } -} -if(v_pausedSliderGridConnections != null){ - for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCEnergyProduction){ - productionGridConnections.add((GCEnergyProduction)GC); - } - } -} -return productionGridConnections; - - - VOID - double - 1754929564839 - f_updateSliders - 50 - 200 - - false - true - true - if(!pop_tabElectricity.isEmpty()){ - pop_tabElectricity.get(0).f_updateSliders_Electricity(); -} -if(!pop_tabHeating.isEmpty()){ - pop_tabHeating.get(0).f_updateSliders_Heating(); -} -if(!pop_tabMobility.isEmpty()){ - pop_tabMobility.get(0).f_updateSliders_Mobility(); -} -if(!pop_tabEHub.isEmpty()){ - pop_tabEHub.get(0).f_updateSliders_EHub(); -} - - - RETURNS_VALUE - List<GridConnection> - 1754986474226 - f_getActiveSliderGridConnections_consumption - 550 - 200 - - false - true - true - List<GridConnection> consumptionGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCUtility){ - consumptionGridConnections.add(GC); - } - else if(GC instanceof GCHouse){ - consumptionGridConnections.add(GC); - } -} - -return consumptionGridConnections; - - - RETURNS_VALUE - List<GridConnection> - 1754991155553 - f_getActiveSliderGridConnections_all - 550 - 130 - - false - true - true - List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); - -return gridConnections; - - - RETURNS_VALUE - List<GCPublicCharger> - 1755013777878 - f_getPausedSliderGridConnections_chargers - 550 - 400 - - false - true - true - List<GCPublicCharger> pausedChargerGridConnections = new ArrayList<>(); - -if(v_pausedSliderGridConnections != null){ - for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCPublicCharger){ - pausedChargerGridConnections.add((GCPublicCharger)GC); - } - } -} - -return pausedChargerGridConnections; - - - VOID - double - 1756302560139 - f_initializeActiveTabs - 70 - 170 - - false - true - true - if(!pop_tabElectricity.isEmpty()){ - pop_tabElectricity.get(0).f_initializeTab_Electricity(); -} -if(!pop_tabHeating.isEmpty()){ - //pop_tabHeating.get(0).f_initializeTab_Heating(); -} -if(!pop_tabMobility.isEmpty()){ - pop_tabMobility.get(0).f_initializeTab_Mobility(); -} -if(!pop_tabEHub.isEmpty()){ - //pop_tabEHub.get(0).f_initializeTab_EHub(); -} - - - RETURNS_VALUE - List<GCPublicCharger> - 1758278620331 - f_getAllSliderGridConnections_chargers - 540 - 360 - - false - true - true - List<GCPublicCharger> chargerGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCPublicCharger){ - chargerGridConnections.add((GCPublicCharger)GC); - } -} -if(v_pausedSliderGridConnections != null){ - for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCPublicCharger){ - chargerGridConnections.add((GCPublicCharger)GC); - } - } -} - -return chargerGridConnections; - - - RETURNS_VALUE - List<GridConnection> - 1761208715194 - f_getAllSliderGridConnections_consumption - 540 - 180 - - false - true - true - List<GridConnection> consumptionGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCUtility){ - consumptionGridConnections.add(GC); - } - else if(GC instanceof GCHouse){ - consumptionGridConnections.add(GC); - } -} - -for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCUtility){ - consumptionGridConnections.add(GC); - } - else if(GC instanceof GCHouse){ - consumptionGridConnections.add(GC); - } -} - -return consumptionGridConnections; - - - RETURNS_VALUE - List<GridConnection> - 1761208797812 - f_getPausedSliderGridConnections_all - 550 - 150 - - false - true - true - List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); - -return gridConnections; - - - RETURNS_VALUE - List<GridConnection> - 1761208826669 - f_getAllSliderGridConnections_all - 530 - 110 - - false - true - true - List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); -gridConnections.addAll(v_pausedSliderGridConnections); - -return gridConnections; - - - - - 1722245292186 - connections - 50 - -40 - - false - true - true - false - COLLECTION_OF_LINKS - true - Object - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - 1722252542602 - zero_Interface - 50 - -100 - - false - true - true - - zerointerfaceloader - Zero_Interface - - - - 1753694295457 - uI_EnergyHub - 50 - -70 - - false - true - true - - zerointerfaceloader - UI_EnergyHub - - - - - - 1722245482640 - pop_tabMobility - 50 - 80 - - false - true - true - 1744964660761 - - zerointerfaceloader - tabMobility - - - - zerointerfaceloader - tabMobility - 1722245324901 - - - - true - - 0 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089970 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722245482641 - pop_tabElectricity - 50 - 40 - - false - true - true - 1744964655611 - - zerointerfaceloader - tabElectricity - - - - zerointerfaceloader - tabElectricity - 1722247653567 - - - - - p_currentPVOnLand_ha - - - p_currentWindTurbines_MW - - - true - - 0 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089969 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722253113248 - pop_tabHeating - 50 - 60 - - false - true - true - 1744964658364 - - zerointerfaceloader - tabHeating - - - - zerointerfaceloader - tabHeating - 1722253108631 - - - - true - - 0 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089968 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722253478328 - pop_tabEHub - 50 - 100 - - false - true - true - 1744964663750 - - zerointerfaceloader - tabEHub - - - - zerointerfaceloader - tabEHub - 1722253463901 - - - - true - - 0 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089967 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - 1722245292192 - level - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - 1722248369298 - gr_energyDemandSettings - 200 - 580 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1722248369300 - gr_electricityButton - -125 - -25 - - true - true - false - SHAPE_DRAW_2D3D - !pop_tabElectricity.isEmpty() - v_selectedTabType = EnergyDemandTab.ELECTRICITY; -f_showCorrectTab(); - false - 0 - 0.0 - - - 1722248369302 - ovalElectricityButton - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -32 - null - - - 1722248369304 - image3 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-electricity-3408805.png - - - false - - - - - 1722248369306 - gr_heatButton - -40 - -25 - - true - true - false - SHAPE_DRAW_2D3D - !pop_tabHeating.isEmpty() - v_selectedTabType = EnergyDemandTab.HEAT; -f_showCorrectTab(); - false - 0 - 0.0 - - - 1722248369308 - ovalHeatButton - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -6943 - null - - - 1722248369310 - image10 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-fire-2429630.png - - - false - - - - - 1722248369312 - gr_mobilityButton - 45 - -25 - - true - true - false - SHAPE_DRAW_2D3D - !pop_tabMobility.isEmpty() - v_selectedTabType = EnergyDemandTab.MOBILITY; -f_showCorrectTab(); - false - 0 - 0.0 - - - 1722248369314 - ovalTransportButton - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -2625550 - null - - - 1722248369316 - image15 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-car-1777731.png - - - false - - - - - 1722248369318 - gr_eHubButton - 130 - -25 - - true - true - false - SHAPE_DRAW_2D3D - !pop_tabEHub.isEmpty() - v_selectedTabType = EnergyDemandTab.HUB; -f_showCorrectTab(); - false - 0 - 0.0 - - - 1722248369320 - ovalHubButton - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -3736634 - null - - - 1722248369322 - line - -10 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 20 - -2 - 0 - - - 1722248369324 - line1 - -6 - 6 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 16 - -15 - 0 - - - 1722248369326 - line2 - -10 - -4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 18 - 15 - 0 - - - 1722248369328 - oval - -11 - -6 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - 1722248369330 - oval1 - -8 - 8 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - 1722248369332 - line3 - 8 - 10 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - DOTTED - 1 - 0 - 1 - 0 - 1 - -17 - 0 - - - 1722248369334 - oval4 - 8 - 10 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - 1722248369336 - oval3 - 10 - -9 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - - - 1722248369338 - txt_electricityButtonDescription - -125 - 10 - - true - true - false - SHAPE_DRAW_2D - gr_electricityButton.isVisible() - false - 0 - 0.0 - -16777216 - Elektriciteit - - Calibri - 12 - - - CENTER - - - 1722248369340 - txt_heatButtonDescription - -40 - 10 - - true - true - false - SHAPE_DRAW_2D - gr_heatButton.isVisible() - false - 0 - 0.0 - -16777216 - Warmte - - Calibri - 12 - - - CENTER - - - 1722248369342 - txt_mobilityButtonDescription - 45 - 10 - - true - true - false - SHAPE_DRAW_2D - gr_mobilityButton.isVisible() - false - 0 - 0.0 - -16777216 - Transport - - Calibri - 12 - - - CENTER - - - 1722248369344 - txt_eHubButtonDescription - 130 - 10 - - true - true - false - SHAPE_DRAW_2D - gr_eHubButton.isVisible() - false - 0 - 0.0 - -16777216 - E-hub - - Calibri - 12 - - - CENTER - - - - - 1744964727616 - gr_tabElectricity_presentation - 15 - 630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744964655611 - pop_tabElectricity_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1744964732289 - gr_tabHeating_presentation - 15 - 630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744964658364 - pop_tabHeating_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1744964737688 - gr_tabEHub_presentation - 15 - 630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744964663750 - pop_tabEHub_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1744964742286 - gr_tabMobility_presentation - 15 - 630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744964660761 - pop_tabMobility_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1753877322668 - txt_allGridConnectionsForTheseSliders - true - 1160 - 20 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - GridConnections displayed in slider - - SansSerif - 12 - - - LEFT - - - - - - - 1658477103140 - Zero_Interface - public ShapeButton getButton_goToUI() { - return this.button_goToUI; -} -public ShapeRadioButtonGroup getBuildingColorsRB(){ - return this.rb_mapOverlay; -} -public ShapeCheckBox getCb_showFilterInterface(){ - return this.cb_showFilterInterface; -} -public ShapeComboBox getCb_filterOptions(){ - return this.cb_filterOptions; -} - - /* -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.databind.node.TextNode; -import com.fasterxml.jackson.databind.node.NumericNode; -import com.fasterxml.jackson.core.type.TypeReference; - -// For deserialisation -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -*/ -import java.io.FileOutputStream; -import java.util.stream.Stream; -import java.util.Dictionary.*; -import java.util.Hashtable.*; -import java.util.*; -import java.util.stream.Collectors; - -import java.io.*; -import java.io.File; -import java.io.IOException; -import java.util.Date; -import java.time.LocalDate; -import java.time.DayOfWeek; -import java.text.SimpleDateFormat; -import com.fasterxml.jackson.databind.node.JsonNodeFactory; - -//Possibility to turn of traceln -import java.io.OutputStream; -import java.io.PrintStream; - -//Curves -import com.anylogic.engine.markup.AbstractCurve; -import com.anylogic.engine.markup.GISMarkupSegment; -import com.anylogic.engine.markup.GISPoint; -//import zero_engine.OL_EnergyCarriers; -//import zero_engine.OL_EnergyCarriers; -import com.querydsl.core.types.dsl.TimeExpression; -//import zero_engine.J_EAStorageElectric; -//import zero_engine.J_EAConsumption; -import org.apache.commons.lang3.tuple.Triple; -import javax.media.jai.widget.ViewportListener; - false - - 1658477103138 - 1658477103138 - - T extends Agent - - Generic parameter: - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - 10 - MPS - - - 1 - METER - - - 1 - METER - - - 1 - METER - - - - false - - 1.0 - SECOND - - GIS - 500 - 500 - 0 - 100 - 100 - MOORE - USER_DEF - USER_DEF - 2 - 50 - 0.95 - 10 - - - false - 1658477089966 - true - 1658563200000 - - 0 - HOUR - - - p_timeStep_h - HOUR - - - - 1658477103136 - scale - 0 - -150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1658477103139 - 1658477103135 - - - 1696837759932 - v_LVGridColor - 395 - 1220 - - false - true - true - - Color - - purple - - - - - 1696837759935 - v_HVGridColor - 395 - 1180 - - false - true - true - - Color - - red - - - - - 1696837759938 - v_gasGridColor - 395 - 1240 - - false - true - true - - Color - - brown - - - - - 1696837759945 - v_energyLabelAColor - 395 - 1325 - - false - true - true - - Color - - darkGreen - - - - - 1696837759948 - v_energyLabelBColor - 395 - 1345 - - false - true - true - - Color - - green - - - - - 1696837759950 - v_energyLabelCColor - 395 - 1365 - - false - true - true - - Color - - yellowGreen - - - - - 1696837759953 - v_energyLabelDColor - 395 - 1385 - - false - true - true - - Color - - gold - - - - - 1696837759955 - v_energyLabelEColor - 395 - 1405 - - false - true - true - - Color - - orange - - - - - 1696837759958 - v_energyLabelFColor - 395 - 1425 - - false - true - true - - Color - - orangeRed - - - - - 1696837759961 - v_energyLabelUnknownColor - 395 - 1465 - - false - true - true - - Color - - gray - - - - - 1696837759963 - v_energyLabelGColor - 395 - 1445 - - false - true - true - - Color - - red - - - - - 1696837759966 - v_MVGridColor - 395 - 1200 - - false - true - true - - Color - - steelBlue - - - - - 1696863329269 - v_gridConnectionInBuildingIndex - 50 - 1480 - - false - true - true - - int - - 0 - - - - - 1701164360663 - b_resultsUpToDate - -240 - 940 - - false - true - true - - boolean - - - - 1701879001472 - v_clickedObjectText - 50 - 1500 - - false - true - true - - String - - "None" - - - - - 1701879014361 - v_clickedObjectAdress - 50 - 1520 - - false - true - true - - String - - "" - - - - - 1702041370471 - v_simulationArea1Color - 1310 - 1230 - - false - true - true - - Color - - new Color(178, 34, 34, 0) - - - - - 1702043349202 - v_companyBuildingColor - 690 - 1060 - - false - true - true - - Color - - teal - - - - - 1702043408687 - v_detailedCompanyBuildingColor - 690 - 1110 - - false - true - true - - Color - - navy - - - - - 1702043479414 - v_houseBuildingColor - 690 - 1160 - - false - true - true - - Color - - new Color(154, 208, 194) - - - - - 1702043554935 - v_restBuildingColor - 690 - 1210 - - false - true - true - - Color - - gainsboro - - - - - 1702046920293 - v_clickedObjectDetails - 50 - 1540 - - false - true - true - - String - - "" - - - - - 1704450852556 - v_solarParkColor - 690 - 1310 - - false - true - true - - Color - - new Color(250, 246, 179, 206) - - - - - 1704463271534 - v_selectionColor - 400 - 1080 - - false - true - true - - Color - - yellow - - - - - 1704463281781 - v_selectionColorAddBuildings - 400 - 1100 - - false - true - true - - Color - - yellow - - - - - 1705663820237 - v_HVMVNodeColor - 1030 - 1060 - - false - true - true - - Color - - new Color(253, 223, 134, 206) - - - - - 1705663820239 - v_HVMVLineColor - 1030 - 1080 - - false - true - true - - Color - - navy - - - - - 1705664070254 - v_solarParkLineColor - 690 - 1330 - - false - true - true - - Color - - gold - - - - - 1705664575869 - v_electrolyserColor - 690 - 1445 - - false - true - true - - Color - - new Color(33, 164, 195) - - - - - 1705664587285 - v_chargingStationColor - 690 - 1490 - - false - true - true - - Color - - cyan - - - - - 1705668042403 - v_antiLayerColor - 1310 - 1210 - - false - true - true - - Color - - new Color(192, 192, 192, 100) - - - - - 1705668569794 - v_electrolyserLineColor - 690 - 1465 - - false - true - true - - Color - - navy - - - - - 1705668590932 - v_chargingStationLineColor - 690 - 1510 - - false - true - true - - Color - - darkBlue - - - - - 1705673181898 - v_clickedGridNode - 50 - 1380 - - false - true - true - - GridNode - - - - 1705673647104 - v_previousClickedObjectType - 50 - 1350 - - false - true - true - - OL_GISObjectType - - - - 1705673714784 - v_previousClickedGridNode - 50 - 1400 - - false - true - true - - GridNode - - - - 1705967311665 - v_simulationArea1LineColor - 1310 - 1250 - - false - true - true - - Color - - dimGray - - - - - 1705967344378 - v_simulationArea2Color - true - 1310 - 1270 - - false - true - true - - Color - - new Color(178, 34, 34, 0) - - - - - 1705967344381 - v_simulationArea2LineColor - true - 1310 - 1290 - - false - true - true - - Color - - dimGray - - - - - 1706892713276 - GISregion_antiLaag - -280 - 250 - - false - true - true - - GISRegion - - - - 1706990958029 - v_backgroundColor - 1312 - 1060 - - false - true - true - - Color - - (new Color(208, 208, 245)).brighter() - - - - - 1707918668189 - v_clickedObjectType - 50 - 1330 - - false - true - true - - OL_GISObjectType - - - - 1709803708318 - v_gridNodeFeedinColor - 400 - 1120 - - false - true - true - - Color - - orange - - - - - 1710162245199 - v_batteryColor - 690 - 1400 - - false - true - true - - Color - - green.darker() - - - - - 1710162245201 - v_batteryLineColor - 690 - 1420 - - false - true - true - - Color - - green - - - - - 1710166484674 - v_windFarmColor - 690 - 1355 - - false - true - true - - Color - - white - - - - - 1710166484676 - v_windFarmLineColor - 690 - 1375 - - false - true - true - - Color - - black - - - - - 1714137967101 - v_MVLVNodeColor - 1030 - 1220 - - false - true - true - - Color - - green - - - - - 1714137970406 - v_MVLVLineColor - 1030 - 1240 - - false - true - true - - Color - - green.brighter() - - - - - 1714137978358 - v_gridNodeColorStrained - 1030 - 1415 - - false - true - true - - Color - - orange - - - - - 1714137980262 - v_gridNodeLineColorStrained - 1030 - 1435 - - false - true - true - - Color - - orange.brighter() - - - - - 1714137982277 - v_gridNodeColorCongested - 1030 - 1460 - - false - true - true - - Color - - red - - - - - 1714137984157 - v_gridLineColorCongested - 1030 - 1480 - - false - true - true - - Color - - red.brighter() - - - - - 1718264413499 - v_unknownConsumptionColor - 395 - 1305 - - false - true - true - - Color - - white - - - - - 1718567214780 - b_updateLiveCongestionColors - 1030 - 1600 - - false - true - true - - boolean - - false - - - - - 1719311576065 - v_newChargingStationColor - 690 - 1540 - - false - true - true - - Color - - new Color(173, 255, 47, 156) - - - - - 1719311576067 - v_newChargingStationLineColor - 690 - 1560 - - false - true - true - - Color - - green - - - - - 1719830571563 - v_outsideTemperature - 940 - -260 - - false - false - true - - double - - - - 1719830581855 - v_solarIrradiance - 940 - -240 - - false - false - true - - int - - - - 1719830591551 - v_windspeed - 940 - -220 - - false - false - true - - String - - - - 1720905248678 - v_selectedGridConnectionIndex - 940 - -130 - - false - true - true - - int - - 0 - - - - - 1720905365617 - v_nbGridConnectionsInSelectedBuilding - 940 - -110 - - false - true - true - - int - - 0 - - - - - 1721652532124 - v_companyBuildingLineColor - 690 - 1080 - - false - true - true - - Color - - black - - - - - 1721652543732 - v_detailedCompanyBuildingLineColor - 690 - 1130 - - false - true - true - - Color - - black - - - - - 1721652554195 - v_houseBuildingLineColor - 690 - 1180 - - false - true - true - - Color - - black - - - - - 1721652564323 - v_restBuildingLineColor - 690 - 1230 - - false - true - true - - Color - - - - 1721729327873 - v_parcelColor - 690 - 1590 - - false - true - true - - Color - - navajoWhite - - - - - 1721729331151 - v_parcelLineColor - 690 - 1610 - - false - true - true - - Color - - black - - - - - 1721996776514 - v_MVMVNodeColor - 1030 - 1150 - - false - true - true - - Color - - new Color(253, 223, 134, 206) - - - - - 1721996776516 - v_MVMVLineColor - 1030 - 1170 - - false - true - true - - Color - - navy - - - - - 1721998215865 - v_HVMVNodeSize - 1030 - 1100 - - false - true - true - - double - - 100 - - - - - 1721998236233 - v_MVMVNodeSize - 1030 - 1190 - - false - true - true - - double - - 30 - - - - - 1721998240384 - v_MVLVNodeSize - 1030 - 1260 - - false - true - true - - double - - 20 - - - - - 1725018118872 - b_showCables - 50 - 1580 - - false - true - true - - boolean - - false - - - - - 1728404379677 - v_energyAssetLineWidth - 690 - 1280 - - false - true - true - - double - - 2 - - - - - 1732027307811 - b_runningMainInterfaceScenarios - -670 - 686 - - false - true - true - - boolean - - false - - - - - 1734617425109 - b_gridLoopsAreDefined - -630 - 510 - - false - true - true - - boolean - - false - - - - - 1739980192808 - v_customEnergyCoop - 50 - 1290 - - false - true - true - - EnergyCoop - - - - 1742298194173 - v_forcedClickScreenColor - 140 - -840 - - false - true - true - - Color - - new Color(105, 105, 105, 150) - - - - - 1743092928263 - b_inManualFilterSelectionMode - -1530 - 500 - - false - true - true - - boolean - - false - - - - - 1743666440153 - v_currentActiveInfoBubble - true - -1990 - 150 - - false - true - true - - ShapeImage - - - - 1744205147072 - v_infoText - -2010 - 80 - - false - true - true - - J_InfoText - - new J_InfoText() - - - - - 1750086295616 - v_parkingSpaceColor_private - 690 - 1720 - - false - true - true - - Color - - salmon - - - - - 1750086307414 - v_parkingSpaceLineColor_private - 690 - 1740 - - false - true - true - - Color - - red - - - - - 1750089169786 - v_parkingSpaceColor_electric - 690 - 1680 - - false - true - true - - Color - - lightGreen - - - - - 1750089169788 - v_parkingSpaceLineColor_electric - 690 - 1700 - - false - true - true - - Color - - green - - - - - 1750089171472 - v_parkingSpaceColor_public - 690 - 1640 - - false - true - true - - Color - - lightBlue - - - - - 1750089171474 - v_parkingSpaceLineColor_public - 690 - 1660 - - false - true - true - - Color - - blue - - - - - 1750165528617 - v_numberOfSurveyCompanies - 1390 - 1520 - - false - true - true - - int - - - - 1750777761770 - v_HVMVNodeIsVisible - 1030 - 1120 - - false - true - true - - boolean - - false - - - - - 1752836273466 - v_gridNodeLineColorUncongested - 1030 - 1390 - - false - true - true - - Color - - green.brighter() - - - - - 1752836375624 - v_gridNodeColorUncongested - 1030 - 1370 - - false - true - true - - Color - - green - - - - - 1752837181466 - v_LVLVNodeColor - 1030 - 1290 - - false - true - true - - Color - - green - - - - - 1752837181468 - v_LVLVLineColor - 1030 - 1310 - - false - true - true - - Color - - green.brighter() - - - - - 1752837181470 - v_LVLVNodeSize - 1030 - 1330 - - false - true - true - - double - - 10 - - - - - 1753105667219 - rb_mapOverlay - 1920 - 1495 - - false - true - true - - ShapeRadioButtonGroup - - - - 1753110308594 - v_amountOfDefinedGridLoops - -630 - 530 - - false - true - true - - int - - 0 - - - - - 1753115730758 - v_gridNodeColorCapacityUnknown - 1030 - 1510 - - false - true - true - - Color - - gray - - - - - 1753115736678 - v_gridNodeLineColorCapacityUnknown - 1030 - 1530 - - false - true - true - - Color - - gray.brighter() - - - - - 1754312936616 - v_parkingSpaceLineColor_unkown - 690 - 1810 - - false - true - true - - Color - - gray.darker() - - - - - 1754312949585 - v_parkingSpaceColor_unkown - 690 - 1790 - - false - true - true - - Color - - gray - - - - - 1756375264408 - v_currentViewArea - -2010 - 100 - - false - true - true - - ViewArea - - va_Interface - - - - - 1758795129963 - zero_loader - 50 - -250 - - false - true - true - - Zero_Loader - - - - 1715858732720 - energyModel - -200 - 1020 - - false - true - true - - EnergyModel - NONE - false - - 1715858732718 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1727251571552 - settings - -670 - 110 - - false - false - true - - Settings - NONE - false - - 1727251571550 - - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1746106585457 - p_currentActiveInfoBubble - -1990 - 170 - - false - true - true - - List<ShapeImage> - NONE - false - - new ArrayList<ShapeImage>() - - - 1746106585455 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1744987127500 - p_maxNrSelectedGCForExport - true - -555 - -440 - - false - true - true - - int - NONE - false - - 20 - - - 1744987127498 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1745937830300 - p_minSelectedGCForPublicAggregation - -670 - 895 - - false - true - true - - int - NONE - false - - 10 - - - 1745937830298 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1753446312779 - b_inEnergyHubSelectionMode - 2240 - -2110 - - false - true - true - - boolean - NONE - false - - false - - - 1753446312777 - CHECK_BOX - 0 - 100 - NO_DELIMETER - - - - - 1753446312783 - b_inEnergyHubMode - 2240 - -2130 - - false - true - true - - boolean - NONE - false - - false - - - 1753446312781 - CHECK_BOX - 0 - 100 - NO_DELIMETER - - - - - 1756395079958 - user - -670 - 130 - - false - false - true - - User - NONE - false - - 1756395079956 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1758028435828 - project_data - Should be filled with the Project_data record created in the startup of the project model - -670 - 90 - - false - false - true - - Project_data - NONE - false - - 1758028435826 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760978961206 - uI_Company - -250 - 480 - - false - false - true - - UI_company - NONE - false - - 1760978961204 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760978964017 - uI_Hydrogen - -250 - 520 - - false - false - true - - UI_Hydrogen - NONE - false - - 1760978964015 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760978968830 - uI_Battery - -250 - 560 - - false - false - true - - UI_Battery - NONE - false - - 1760978968828 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760979190278 - uI_EnergyHub - -250 - 440 - - false - false - true - - UI_EnergyHub - NONE - false - - 1760979190276 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761118903683 - rb_scenarios - -1150 - 100 - - false - true - true - - ShapeRadioButtonGroup - NONE - false - - 1761118903681 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761119479237 - t_scenario_current - -1145 - 245 - - false - true - true - - String - NONE - false - - "Het huidige scenario bevat de energie dynamieken van dit moment. \n" + -"Dit omvat o.a. de huidige zonnepanelen, het aantal elektrische \n" + -"voertuigen in per buurt, de energie consumptie profielen van bedrijven \n" + -"en de huidige gasconsumptie voor verwarming." - - - 1761119479235 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761119479242 - t_scenario_future - -1140 - 290 - - false - true - true - - String - NONE - false - - "Het toekomstige scenario bevat de energie dynamieken van dit moment, \n" + -"plus de toekomst plannen van alle bedrijven die de enquete hebben \n" + -"ingevuld. Deze plannen kunnen bevatten: het instaleren van extra \n" + -"zonnepanelen, aangevraagde net uitbereiding, maar ook plannen voor \n" + -"het electrificeren van het transport." - - - 1761119479240 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761119827711 - t_scenario_custom - -1140 - 335 - - false - true - true - - String - NONE - false - - "" - - - 1761119827709 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761134798639 - p_residentialScenario_Current - -1160 - 150 - - false - true - true - - J_SliderSettings_Residential - NONE - false - - 1761134798637 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1707918668148 - c_GISNeighborhoods - -280 - 230 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1713429665418 - c_scenarioMap_Future - -280 - 340 - - false - true - true - - LinkedHashMap - String - J_scenario_Future - - - - 1713874283959 - c_scenarioMap_Current - -280 - 320 - - false - true - true - - LinkedHashMap - String - J_scenario_Current - - - - 1715178022675 - c_orderedVehicles - 510 - -710 - - false - true - true - - ArrayList - J_EA - String - - - - 1715183417595 - c_orderedHeatingSystemsCompanies - 510 - -650 - - false - true - true - - ArrayList - GCUtility - String - - - - 1715183423011 - c_orderedPVSystemsCompanies - 510 - -690 - - false - true - true - - ArrayList - GCUtility - String - - - - 1719176257019 - c_orderedHeatingSystemsHouses - 840 - -650 - - false - true - true - - ArrayList - GCHouse - String - - - - 1722344496313 - c_GISNetplanes - -280 - 210 - - false - true - true - - ArrayList - GISRegion - GISRegion - - - - 1721302080638 - c_selectedGridConnections - 50 - 1260 - - false - true - true - - ArrayList - GridConnection - String - - - - 1725276677836 - c_LVCables - -280 - 170 - - false - true - true - - ArrayList - GISRoute - String - - - - 1725276688077 - c_MVCables - -280 - 190 - - false - true - true - - ArrayList - GISRoute - String - - - - 1734442668540 - c_selectedFilterOptions - -1550 - 80 - - false - true - true - - ArrayList - OL_FilterOptionsGC - String - - - - 1734512815255 - c_previousSelectedObjects - 50 - 1450 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1734513139372 - c_selectedObjects - 50 - 1430 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1742226708562 - c_manualFilterDeselectedGC - -1530 - 475 - - false - true - true - - ArrayList - GridConnection - String - - - - 1742226748068 - c_manualFilterSelectedGC - -1530 - 455 - - false - true - true - - ArrayList - GridConnection - String - - - - 1742376749972 - c_filterSelectedGridLoops - -1530 - 330 - - false - true - true - - ArrayList - GridNode - String - - - - 1742376765347 - c_filterSelectedNeighborhoods - -1530 - 390 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1744886925970 - c_presentations - Would have to be filled by hand with all presentations that are (indirectly) on the interface canvas. eg: c_presentations.add(uI_Tabs_presentation) - true - -2020 - 210 - - false - true - true - - ArrayList - ShapeEmbeddedObjectPresentation - String - - - - 1749741070275 - c_orderedParkingSpaces - 510 - -630 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1747300275742 - c_orderedPVSystemsHouses - 840 - -690 - - false - true - true - - ArrayList - GCHouse - String - - - - 1750078746618 - c_modelActiveSpecialGISObjects - 1390 - 1480 - - false - true - true - - LinkedHashSet - OL_GISObjectType - String - - - - 1750247117301 - c_orderedV1GChargers - 530 - -590 - - false - true - true - - ArrayList - J_EAChargePoint - String - - - - 1750089494475 - c_modelActiveParkingSpaceTypes - 1390 - 1500 - - false - true - true - - LinkedHashSet - OL_ParkingSpaceType - String - - - - 1750247117305 - c_orderedV2GChargers - 530 - -570 - - false - true - true - - ArrayList - J_EAChargePoint - String - - - - 1750156136377 - c_modelActiveDefaultGISBuildings - 1390 - 1460 - - false - true - true - - LinkedHashSet - OL_GISBuildingTypes - String - - - - 1750333680450 - c_orderedVehiclesPrivateParking - 510 - -530 - - false - true - true - - ArrayList - J_EAVehicle - String - - - - 1750335318608 - c_orderedPublicChargers - Niet laadpleinen, alleen losse palen - 510 - -610 - - false - true - true - - ArrayList - GCPublicCharger - String - - - - 1753087052979 - c_loadedMapOverlayTypes - 1920 - 1470 - - false - true - true - - ArrayList - OL_MapOverlayTypes - String - - - - 1753951769737 - c_orderedPTSystemsHouses - 510 - -670 - - false - true - true - - ArrayList - GCHouse - String - - - - 1756121323600 - c_mappingOfVehiclesPerCharger - 530 - -550 - - false - true - true - - LinkedHashMap - String - List<J_EADieselVehicle> - - - - 1756993771846 - c_UIResultsInstances - -290 - 650 - - false - true - true - - ArrayList - UI_Results - String - - - - 1760715323344 - c_additionalVehicles - 510 - -500 - - false - true - true - - LinkedHashMap - String - List<J_EAVehicle> - - - - - - 1658497469833 - e_calculateEnergyBalance - Trigger voor energieberekeningen in de model backbone. Volgorde is belangrijk voor consistente resultaten. - -@since: Sprint 6 -@author: Jorrit - -240 - 910 - - false - true - true - - - 1 - HOUR - - - 1/p_timeStep_h - PER_HOUR - - 1658477089965 - true - 1658563200000 - - 0 - HOUR - - - energyModel.p_timeStep_h - HOUR - - false - - // Trigger timestep in energymodel for continuous simulation ('interactive mode') -energyModel.f_runTimestep(); - - -// This function colors the trafos according to the amount of congestion. (maybe move this function call somewhere else?) -if ( b_updateLiveCongestionColors ){ - for (GridNode gn : energyModel.pop_gridNodes) { - if ((v_clickedObjectType != OL_GISObjectType.GRIDNODE || v_clickedGridNode != gn) && gn.p_energyCarrier == OL_EnergyCarriers.ELECTRICITY) { - f_setColorsBasedOnCongestion_gridnodes(gn, true); - } - } -} - - -// Update the NFATO values in the selected companyUI -if(c_selectedGridConnections.size() > 0 && c_selectedGridConnections.get(0).v_enableNFato){ - if(uI_Company.v_NFATO_active){ - uI_Company.f_getNFATOValues(); - } -} - -// Get the weather info -f_getWeatherInfo(); - - - 1743509682728 - e_setStartView - -660 - 265 - - false - true - true - - - 1 - HOUR - - - 1 - PER_HOUR - - 1658477089964 - true - 1743580800000 - - 0 - HOUR - - - 1 - HOUR - - false - - f_setStartView(); - - - - - VOID - double - 1696837759924 - f_setColorsBasedOnEnergyLabels - 1960 - 1870 - - false - true - true - - b - GIS_Object - - if (b.gisRegion != null){ - - OL_GridConnectionIsolationLabel buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.NONE; - - //Find the lowest energy label in the building - for(GridConnection GC : b.c_containedGridConnections){ - switch(GC.p_energyLabel){ - case A: - if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.A; - } - break; - case B: - if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.A){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.B; - } - break; - case C: - if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.B - || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.C){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.C; - } - break; - case D: - if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.E || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.F - || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.D; - } - break; - case E: - if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.F || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.E; - } - break; - case F: - if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.F; - } - break; - case G: - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.G; - break; - } - } - - //Color building based on lowest energy label - switch(buildingLowestEnergyLabel){ - - case A: - b.gisRegion.setFillColor(v_energyLabelAColor); - break; - case B: - b.gisRegion.setFillColor(v_energyLabelBColor); - break; - case C: - b.gisRegion.setFillColor(v_energyLabelCColor); - break; - case D: - b.gisRegion.setFillColor(v_energyLabelDColor); - break; - case E: - b.gisRegion.setFillColor(v_energyLabelEColor); - break; - case F: - b.gisRegion.setFillColor(v_energyLabelFColor); - break; - case G: - b.gisRegion.setFillColor(v_energyLabelGColor); - break; - case NONE: - b.gisRegion.setFillColor(v_energyLabelUnknownColor); - break; - } -} - - - VOID - double - 1696863329251 - f_selectGISRegion - Function that selects gisregions after click on the map - 50 - 1060 - - false - true - true - - clickx - double - - - clicky - double - - if(settings.isPublicModel()){ - f_selectGISRegion_publicModel(clickx, clicky); - return; -} - -//After a click, reset previous clicked building/gridNode colors and text -v_previousClickedObjectType = v_clickedObjectType; -c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); -ArrayList<GIS_Object> buildingsConnectedToSelectedBuildingsList = new ArrayList<>(); -c_selectedGridConnections.clear(); -c_selectedObjects.clear(); - -//Deselect previous selection -if( v_previousClickedObjectType != null){ - f_deselectPreviousSelect(); -} - -//Check if click was on Gridnode, if yes, select grid node -for ( GridNode GN : energyModel.pop_gridNodes ){ - if( GN.gisRegion != null && GN.gisRegion.contains(clickx, clicky) && GN.gisRegion.isVisible() ){ - f_selectGridNode(GN); - return; - } -} - -//Check if click was on Building, if yes, select grid building -for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ - if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ - if (b.gisRegion.isVisible()) { //only allow us to click on visible objects - if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections - buildingsConnectedToSelectedBuildingsList = b.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(b, buildingsConnectedToSelectedBuildingsList); - return; - } - } - } -} - -//Check if click was on remaining objects such as chargers, solarfields, parcels: if yes, select object -for ( GIS_Object GISobject : energyModel.pop_GIS_Objects ){ - if( GISobject.gisRegion != null && GISobject.gisRegion.contains(clickx, clicky) ) { - if (GISobject.gisRegion.isVisible()) { //only allow us to click on visible objects - if (GISobject.c_containedGridConnections.size() > 0 ) { // only allow objects with gridconnections - - // Find buildings powered by the same GC as the clicked object - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; - - //Find the (first) connected GC in the object - GridConnection selectedGC = GISobject.c_containedGridConnections.get(0); - - //Set the selected GIS object type - v_clickedObjectType = GISobject.p_GISObjectType; - c_selectedObjects.add(GISobject); - - //Set the correct interface view for each object type - switch(v_clickedObjectType){ - - case CHARGER: - f_selectCharger((GCPublicCharger)selectedGC, GISobject ); - break; - - default: - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(GISobject, buildingsConnectedToSelectedBuildingsList); - break; - } - return; - } - } - } -} - -//Still no clicked object? :select basic region -v_clickedObjectType = OL_GISObjectType.REGION; -uI_Results.f_updateResultsUI(energyModel); - -//Enable kpi summary button -uI_Results.getCheckbox_KPISummary().setEnabled(true); - - - VOID - double - 1702045084338 - f_styleAreas - -670 - 351 - - false - true - true - - gis_area - GIS_Object - - double width = 1; - -if (gis_area instanceof GIS_Parcel || - gis_area.c_containedGridConnections.size() == 0 || - gis_area.c_containedGridConnections.get(0) instanceof GCPublicCharger ) { - // Parcels, Chargers and GIS Objects without GCs are always the default color - gis_area.f_style(null, null, null, null); - return; -} - -//Get selected map overlay type, based on loaded order of the radio buttons -OL_MapOverlayTypes selectedMapOverlayType; -if(rb_mapOverlay != null){ - selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); -} -else{ - selectedMapOverlayType = OL_MapOverlayTypes.DEFAULT; -} -//Set the correct map overlay -switch(selectedMapOverlayType){ - case DEFAULT: - gis_area.f_style(null, null, null, null); - break; - case ELECTRICITY_CONSUMPTION: - if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { - f_setColorsBasedOnConsumptionProfileHouseholds(gis_area); - } - else { - f_setColorsBasedOnElectricityConsumption(gis_area); - } - break; - case PV_PRODUCTION: - f_setColorsBasedOnProduction(gis_area); - break; - case GRID_NEIGHBOURS: - f_setColorsBasedOnGridTopology_objects(gis_area); - break; - case CONGESTION: - f_setColorsBasedOnCongestion_objects(gis_area); - break; - case ENERGY_LABEL: - f_setColorsBasedOnEnergyLabels(gis_area); - break; - case PARKING_TYPE: - f_setColorsBasedOnParkingType_objects(gis_area); - break; -} - - - VOID - double - 1702385530773 - f_styleSimulationAreas - -670 - 331 - - false - true - true - - area - GIS_Object - - GISRegion gisregion = area.gisRegion; - -switch( area.p_GISObjectType ) { - case ANTI_LAYER: - gisregion.setVisible(true); - gisregion.setLineStyle( LINE_STYLE_SOLID ); - gisregion.setLineWidth( 0); - gisregion.setLineColor( v_antiLayerColor ); - gisregion.setFillColor( v_antiLayerColor ); - GISregion_antiLaag = gisregion; - - //Pas p_id aan naar een normale naam - area.p_id = "Buitengebied"; - break; - - default: - gisregion.setVisible(true); - gisregion.setLineColor( v_simulationArea1LineColor ); - gisregion.setLineStyle( LINE_STYLE_SOLID ); - gisregion.setLineWidth( 1); - gisregion.setFillColor( v_simulationArea1Color ); -} - - - VOID - double - 1705499586056 - f_styleGridNodes - -670 - 371 - - false - true - true - - GN - GridNode - - //Get selected map overlay type, based on loaded order of the radio buttons -OL_MapOverlayTypes selectedMapOverlayType; -if(rb_mapOverlay != null){ - selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); -} -else{ - selectedMapOverlayType = OL_MapOverlayTypes.DEFAULT; -} -//Set the correct map overlay -switch(selectedMapOverlayType){ - case DEFAULT: - case ELECTRICITY_CONSUMPTION: - case PV_PRODUCTION: - if(!b_updateLiveCongestionColors){ - switch( GN.p_nodeType ) { - case LVLV: - f_styleLVLV(GN.gisRegion); - break; - case MVLV: - f_styleMVLV(GN.gisRegion); - break; - case SUBMV: - f_styleSUBMV(GN.gisRegion); - break; - case MVMV: - f_styleMVMV(GN.gisRegion); - break; - case HVMV: - f_styleHVMV(GN.gisRegion); - break; - case HT: - - break; - case MT: - - break; - case LT: - - break; - default: - } - } - else{ - f_setColorsBasedOnCongestion_gridnodes(GN, true); - } - break; - case GRID_NEIGHBOURS: - f_setColorsBasedOnGridTopology_gridnodes(GN); - break; - case CONGESTION: - f_setColorsBasedOnCongestion_gridnodes(GN, false); - break; - case PARKING_TYPE: - f_setColorsBasedOnParkingType_gridnodes(GN); - break; -} - - - VOID - double - 1705505495599 - f_styleMVLV - -650 - 451 - - false - true - true - - gisregion - GISRegion - - gisregion.setLineStyle( LINE_STYLE_SOLID ); -gisregion.setLineColor( v_MVLVLineColor ); -gisregion.setLineWidth(2); -gisregion.setFillColor(v_MVLVNodeColor); - - - VOID - double - 1705505509120 - f_styleHVMV - -650 - 391 - - false - true - true - - gisregion - GISRegion - - gisregion.setFillColor(v_HVMVNodeColor); -gisregion.setLineStyle( LINE_STYLE_SOLID ); -gisregion.setLineColor( v_HVMVLineColor ); -gisregion.setLineWidth(2); -gisregion.setVisible(v_HVMVNodeIsVisible); - - - VOID - double - 1705925024602 - f_setUITabs - -670 - 601 - - false - true - true - //Create the tabs for the project -f_createUITabs_default(); - -//Initialize the uI_Tabs with the gridconnections -uI_Tabs.f_initializeUI_Tabs(energyModel.f_getGridConnectionsCollectionPointer(), energyModel.f_getPausedGridConnectionsCollectionPointer()); - -//Initialize sliders with certain presets -f_setSliderPresets(); - -//Store the initial slider state for Residential areas for the scenario current button -if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { - f_storeResidentialScenario_Current(); -} - - - VOID - double - 1707918668161 - f_selectGridNode - 70 - 1100 - - false - true - true - - GN - GridNode - - v_clickedGridNode = GN; -v_clickedObjectType = OL_GISObjectType.GRIDNODE; - -//Disable the KPI summary (button) -uI_Results.getCheckbox_KPISummary().setSelected(false, true); -uI_Results.getCheckbox_KPISummary().setEnabled(false); - - -// 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; -} - -v_clickedObjectAdress = ""; -v_clickedObjectDetails = "Type station:\t" + GN.p_description; - - -// Color the GridNode -GN.gisRegion.setFillColor( v_selectionColor ); -GN.gisRegion.setLineColor( orange ); - -// Color the connected GridConnections -for ( GridConnection GC : GN.f_getAllLowerLVLConnectedGridConnections()){ - if (GC.c_connectedGISObjects.size() == 0){ - //traceln("Gridconnection with ID " + GC.p_ownerID + " and index " + GC.getIndex() + " has no GIS building"); - } - else { - GC.c_connectedGISObjects.forEach(gb -> gb.f_style(v_gridNodeFeedinColor, v_gridNodeFeedinColor, 2.0, null)); - } -} - -uI_Results.f_updateUIresultsGridNode(GN); - - - VOID - double - 1707918668163 - f_selectBuilding - 70 - 1120 - - false - true - true - - b - GIS_Object - - - buildingsConnectedToSelectedGC_list - ArrayList<GIS_Object> - - c_selectedObjects = new ArrayList<GIS_Object>(buildingsConnectedToSelectedGC_list); -v_clickedObjectType = b.p_GISObjectType; - -//Enable checkbox -uI_Results.getCheckbox_KPISummary().setEnabled(true); - -// Color all buildings of the GridConnection associated with the selected building -if (!c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.equals("-") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("woonfunctie") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("Onbekend")){ - for (GIS_Object obj : c_selectedObjects) { //Buildings that are grouped, select as well. - obj.gisRegion.setFillColor(v_selectionColorAddBuildings); - } -} - -//Check the number of GCs in building -v_nbGridConnectionsInSelectedBuilding = b.c_containedGridConnections.size(); - -//Multiple GC in building: set additional adress in building info + buttons -if ( v_nbGridConnectionsInSelectedBuilding > 1 ){ - v_selectedGridConnectionIndex = 0; - v_clickedObjectText = "Pand met " + b.c_containedGridConnections.size() + " adressen: " + b.p_id; - gr_multipleBuildingInfo.setVisible(true); -} -else { - String text = ""; - if (project_data.project_type() == OL_ProjectType.BUSINESSPARK) { - if (b instanceof GIS_Building) { - if(b.c_containedGridConnections.get(0).p_owner.p_detailedCompany){ - text = b.c_containedGridConnections.get(0).p_owner.p_actorID + ", "; - } - else if(b.p_annotation != null){ - text = b.p_annotation + ", "; - } - } - else { - text = b.p_id + ", "; - } - } - else{ - if(b.p_annotation != null){ - text = b.p_annotation + ", "; - } - else{ - text = b.p_id + ", "; - } - } - - //Set adres text - if (c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address == null || c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress() == null) { - text = text + "Onbekend adres"; - } - else { - text = text + c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress(); - } - - v_clickedObjectText = text; - gr_multipleBuildingInfo.setVisible(false); -} - - - -//Update the resultsUI -f_updateUIResultsData(); - -//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(); - - - - VOID - double - 1707918668165 - f_deselectPreviousSelect - 70 - 1080 - - false - true - true - // Update for results_ui when deselecting objects to show entire area again as default option -v_clickedObjectText = "None"; -v_clickedObjectAdress = ""; -v_clickedObjectDetails = ""; -v_clickedObjectType = null; -button_goToUI.setVisible(false); -gr_multipleBuildingInfo.setVisible(false); - -// We restore the colors of what we clicked on before -if (v_previousClickedObjectType == OL_GISObjectType.GRIDNODE){ - v_previousClickedGridNode = v_clickedGridNode; - f_styleGridNodes(v_clickedGridNode); - for ( Agent agent : v_previousClickedGridNode.f_getAllLowerLVLConnectedGridConnections()){ - if (agent instanceof GridConnection) { - GridConnection GC = (GridConnection)agent; - for (GIS_Object a : GC.c_connectedGISObjects) { - f_styleAreas(a); - } - } - } -} -else if (v_previousClickedObjectType == OL_GISObjectType.BUILDING || - v_previousClickedObjectType == OL_GISObjectType.SOLARFARM || - v_previousClickedObjectType == OL_GISObjectType.WINDFARM || - v_previousClickedObjectType == OL_GISObjectType.ELECTROLYSER || - v_previousClickedObjectType == OL_GISObjectType.BATTERY || - v_previousClickedObjectType == OL_GISObjectType.CHARGER || - v_previousClickedObjectType == OL_GISObjectType.PARKING){ - for(GIS_Object previousClickedObject: c_previousSelectedObjects){ - f_styleAreas(previousClickedObject); - } -} - -if(v_customEnergyCoop != null){ - energyModel.f_removeEnergyCoop(v_customEnergyCoop); - v_customEnergyCoop = null; -} - - - VOID - double - 1709716821854 - f_connectResultsUI - -670 - 780 - - false - true - true - //Style resultsUI -f_styleResultsUI(); - -//Set ResultsUI radiobutton setup -if(settings.resultsUIRadioButtonSetup() != null){ - uI_Results.v_selectedRadioButtonSetup = settings.resultsUIRadioButtonSetup(); -} - -//Disable summary button if summary is not selected -if(settings.showKPISummary() == null || !settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setVisible(false); -} - -//Connect resultsUI -uI_Results.f_initializeResultsUI(); - -c_UIResultsInstances.add(uI_Results); - - - VOID - double - 1709718252272 - f_resetSettings - -290 - 750 - - false - true - true - if(!b_runningMainInterfaceScenarios){ - b_resultsUpToDate = false; - - // Update asset flow categories of all agents - energyModel.f_updateActiveAssetsMetaData(); - - // Switch to the live plots and do not allow the user to switch away from the live plot when the year is not yet simulated - for (UI_Results ui_results : c_UIResultsInstances) { - if (ui_results.f_getSelectedObjectData() != null) { - f_enableLivePlotsOnly(ui_results); - } - } - - // On all screens cover the resultsUI Buttons with the simulate year button - f_setAllSimulateYearScreens(); - - runSimulation(); -} - - - VOID - double - 1714130288661 - f_initialPVSystemsOrder - 85 - -690 - - false - true - true - List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); -List<GCHouse> housesWithoutPV = houses.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); -List<GCHouse> housesWithPV = new ArrayList<>(houses); -housesWithPV.removeAll(housesWithoutPV); - -c_orderedPVSystemsHouses = new ArrayList<>(housesWithoutPV); -c_orderedPVSystemsHouses.addAll(housesWithPV); - - -List<GCUtility> companies = new ArrayList<GCUtility>(energyModel.UtilityConnections.findAll( x -> true)); -List<GCUtility> companiesWithoutPV = companies.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); -List<GCUtility> companiesWithPV = companies.stream().filter( gc -> gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); -List<GCUtility> detailedCompaniesWithPV = companiesWithPV.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); -List<GCUtility> genericCompaniesWithPV = new ArrayList<>(companiesWithPV); -genericCompaniesWithPV.removeAll(detailedCompaniesWithPV); - -c_orderedPVSystemsCompanies = new ArrayList<>(companiesWithoutPV); -c_orderedPVSystemsCompanies.addAll(genericCompaniesWithPV); -c_orderedPVSystemsCompanies.addAll(detailedCompaniesWithPV); - - - - - VOID - double - 1714130342440 - f_initialElectricVehiclesOrder - 85 - -710 - - false - true - true - // First we make a copy of all the vehicle energy assets -List<J_EA> EAs = new ArrayList<>(findAll(energyModel.f_getEnergyAssets(), ea -> !(ea.getParentAgent() instanceof GCPublicCharger))); -EAs = EAs.stream().filter(ea -> ea instanceof J_EAVehicle).collect(Collectors.toList()); -// Find all the EVs at the start of the simulation -ArrayList<J_EA> otherEAs = EAs.stream().filter(ea -> !(ea instanceof J_EAEV)).collect(Collectors.toCollection(ArrayList::new)); -// We make sure that the EVs at the start of the simulation are the last in the list - - -for(J_EA vehicle : EAs){ - if(vehicle instanceof J_EAEV && !(vehicle.getParentAgent() instanceof GCUtility)){ // Companies can not get lower EV then current situation - otherEAs.add((J_EAEV) vehicle); - } -} - -c_orderedVehicles = otherEAs; - - - VOID - double - 1714131269202 - f_initialHeatingSystemsOrder - 85 - -650 - - false - true - true - List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); -List<GCHouse> housesWithoutHP = houses.stream().filter( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP ).collect(Collectors.toList()); -List<GCHouse> housesWithHP = new ArrayList<>(houses); -housesWithHP.removeAll(housesWithoutHP); - -c_orderedHeatingSystemsHouses = new ArrayList<>(housesWithoutHP); -c_orderedHeatingSystemsHouses.addAll(housesWithHP); - -List<GCUtility> companies = new ArrayList<GCUtility>(energyModel.UtilityConnections.findAll( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE && gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.CUSTOM)); -List<GCUtility> companiesWithoutHP = companies.stream().filter( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP).collect(Collectors.toList()); -List<GCUtility> companiesWithHP = companies.stream().filter( gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP ).collect(Collectors.toList()); -List<GCUtility> detailedCompaniesWithHP = companiesWithHP.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); -List<GCUtility> genericCompaniesWithHP = new ArrayList<>(companiesWithHP); -genericCompaniesWithHP.removeAll(detailedCompaniesWithHP); - -c_orderedHeatingSystemsCompanies = new ArrayList<>(companiesWithoutHP); -c_orderedHeatingSystemsCompanies.addAll(genericCompaniesWithHP); -c_orderedHeatingSystemsCompanies.addAll(detailedCompaniesWithHP); - - - - - VOID - double - 1714135623471 - f_initialAssetOrdering - 70 - -730 - - false - true - true - f_initialElectricVehiclesOrder(); -f_initialPVSystemsOrder(); -f_initialPTSystemsOrder_households(); -f_initialHeatingSystemsOrder(); -f_initialParkingSpacesOrder(); -f_initialChargerOrder(); -f_initializePrivateAndPublicParkingCarsOrder(); -f_initializeAdditionalVehicles(); -f_projectSpecificOrderedCollectionAdjustments(); - - - - - VOID - double - 1715116336665 - f_setColorsBasedOnElectricityConsumption - 1960 - 1610 - - false - true - true - - gis_area - GIS_Object - - if(gis_area.c_containedGridConnections.size() > 0){ - - double yearlyEnergyConsumption = sum( gis_area.c_containedGridConnections, x -> x.v_rapidRunData.getTotalElectricityConsumed_MWh()); - - if ( yearlyEnergyConsumption < 10){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption < 50){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption < 150){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption < 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption > 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} -} - - - VOID - double - 1715118739710 - f_setColorsBasedOnProduction - 1960 - 1680 - - false - true - true - - gis_area - GIS_Object - - if (gis_area.c_containedGridConnections.size() > 0) { - - //Define medium PV Value - double mediumPVValue_kWp = 100; - if (project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - mediumPVValue_kWp = 5; - } - - //Calculate total pv capacity on the gis object - double totalPVCapacity_kWp = 0; - for(GridConnection GC : gis_area.c_containedGridConnections){ - totalPVCapacity_kWp += GC.v_liveAssetsMetaData.totalInstalledPVPower_kW; - } - - //Set color of object based on total pv capacity - if(totalPVCapacity_kWp == 0){ - gis_area.f_style(rect_mapOverlayLegend_PVProduction1.getFillColor(), null, null, null); - } - else if (totalPVCapacity_kWp < mediumPVValue_kWp){ - gis_area.f_style(rect_mapOverlayLegend_PVProduction2.getFillColor(), null, null, null); - } - else{ - gis_area.f_style(rect_mapOverlayLegend_PVProduction3.getFillColor(), null, null, null); - } -} - - - VOID - double - 1715157302225 - f_projectSpecificSettings - -660 - 240 - - false - false - true - //Should be overridden in child interface!!! -traceln("Forgot to override project specific settings!!"); - - - VOID - double - 1715859145993 - f_UIStartup - -670 - 180 - - false - true - true - // UI elements - -//Project specific settings -f_projectSpecificSettings(); - -// Initialize the slider Asset Ordering lists -f_initialAssetOrdering(); - -//Connect the results UI -f_connectResultsUI(); - -//Initialize the UITabs -f_setUITabs(); - -//Initialize scenario radio button -f_initializeScenarioRadioButton(); - -//Initialize the legend -f_initializeLegend(); - -//Initialize map overlay buttons -f_initializeMapOverlayRadioButton(); - -//Set ui button visibility false at startup -f_createAdditionalUIs(); -button_goToUI.setVisible(false); - -//Create and set the grid topology colors (Netvlakken) -f_setGridTopologyColors(); - -//Disable cable button if no cables have been loaded in -if(c_LVCables.size() == 0 && c_MVCables.size() == 0){ - checkbox_cabels.setVisible(false); -} - -//Set order of certain layovers and submenus -f_initializePresentationOrder(); - -//Set to public model version styling if activated -if(settings.isPublicModel()){ - f_changeDefaultColorOfPrivateGC(); -} - -//Turn on update of live congestion colloring -b_updateLiveCongestionColors = true; - - - - RETURNS_VALUE - GISRegion - 1715868403475 - f_createGISObject - Functino used by the loader to create new GIS objects on the GIS map - -280 - 90 - - false - true - true - - gisTokens - double[] - - GISRegion gisregion = new GISRegion(map, gisTokens); -return gisregion; - - - VOID - double - 1716419446045 - f_enableTraceln - -640 - -120 - - false - true - true - - originalPrintStream - PrintStream - - System.setOut(originalPrintStream); - - - RETURNS_VALUE - PrintStream - 1716419448047 - f_disableTraceln - -640 - -140 - - false - true - true - PrintStream originalPrintStream = System.out; - -System.setOut(new PrintStream(new OutputStream() { - public void write(int b) { - } - })); -return originalPrintStream; - - - VOID - double - 1718263685462 - f_setColorsBasedOnConsumptionProfileHouseholds - 1960 - 1630 - - false - true - true - - gis_area - GIS_Object - - double yearlyElectricityConsumption_kWh = 0; -for( GridConnection gc : gis_area.c_containedGridConnections){ - if(gc.v_rapidRunData != null){ - yearlyElectricityConsumption_kWh += gc.v_rapidRunData.getTotalElectricityConsumed_MWh()*1000; - } - else{ - for ( J_EAConsumption consumptionAsset : gc.c_consumptionAssets){ - if( consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND ){ - yearlyElectricityConsumption_kWh += consumptionAsset.yearlyDemand_kWh; - } - } - } -} - -if ( yearlyElectricityConsumption_kWh == 0) { gis_area.f_style( v_unknownConsumptionColor, null, null, null );} -else if ( yearlyElectricityConsumption_kWh < 1500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} -else if ( yearlyElectricityConsumption_kWh < 2500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} -else if ( yearlyElectricityConsumption_kWh < 4000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} -else if ( yearlyElectricityConsumption_kWh < 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} -else if ( yearlyElectricityConsumption_kWh > 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} - - - - - VOID - double - 1718288402102 - f_updateMainInterfaceSliders - -670 - 666 - - false - true - true - uI_Tabs.f_updateSliders(); -if (uI_EnergyHub != null && uI_EnergyHub.uI_Tabs != null) { - uI_EnergyHub.uI_Tabs.f_updateSliders(); -} - - - - VOID - double - 1718552624959 - f_selectCharger - 70 - 1140 - - false - true - true - - charger - GCPublicCharger - - - objectGIS - GIS_Object - - objectGIS.gisRegion.setFillColor( v_selectionColor ); -objectGIS.gisRegion.setLineColor( orange ); - -//set info text -v_clickedObjectText = ""; //charger.p_CPOName + " laadpunt, "; -if (charger.p_address == null || charger.p_address.getAddress() == null) { - v_clickedObjectAdress = "Onbekend adres"; -} -else{ - v_clickedObjectAdress = charger.p_address.getStreetName(); -} -v_clickedObjectDetails = "No detaild info of charger available"; - -//v_clickedGridConnection = charger; -c_selectedGridConnections = new ArrayList<GridConnection>(Arrays.asList(charger)); -uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - -//Set the UI button -f_setUIButton(); - - - VOID - double - 1718566260603 - f_setColorsBasedOnGridTopology_objects - 1960 - 1730 - - false - true - true - - gis_area - GIS_Object - - if (gis_area.c_containedGridConnections.size() > 0) { - Color c = gis_area.c_containedGridConnections.get(0).p_parentNodeElectric.p_uniqueColor; - gis_area.f_style(c, black, 1.0, null); -} - - - VOID - double - 1719830600300 - f_getWeatherInfo - 940 - -280 - - false - false - true - v_outsideTemperature = roundToDecimal(energyModel.pp_ambientTemperature_degC.getCurrentValue(), 1); -v_solarIrradiance = roundToInt(energyModel.pp_PVProduction35DegSouth_fr.getCurrentValue() * 1000); - -double windspeed = roundToDecimal(energyModel.pp_windProduction_fr.getCurrentValue(), 1); -if (windspeed < 0.2){ - v_windspeed = "Laag"; -} -else if (windspeed < 0.6){ - v_windspeed = "Midden"; -} -else if (windspeed < 0.8){ - v_windspeed = "Hoog"; -} -else { - v_windspeed = "Zeer hoog"; -} - - - VOID - double - 1720793723819 - f_updateUIResultsData - 80 - 1160 - - false - true - true - for (GridConnection gc : c_selectedObjects.get(0).c_containedGridConnections) { - if (!c_selectedGridConnections.contains(gc)) { - c_selectedGridConnections.add(gc); - } -} - -if(c_selectedGridConnections.size()>1){ - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); -} -else{ - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); -} - - - - VOID - double - 1721991420806 - f_setGridTopologyColors - -650 - 491 - - false - true - true - //Find all MV substations -List<GridNode> MVsubstations = findAll(energyModel.pop_gridNodes, GN -> GN.p_nodeType == OL_GridNodeType.SUBMV); - -if(MVsubstations != null || project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - b_gridLoopsAreDefined = true; -} - -v_amountOfDefinedGridLoops = 0; - -if(MVsubstations != null){ - //Set all unique grid topology colors for each substation and its children if the gridloops are defined - for (GridNode MVsub : MVsubstations){ - - //Create a unique color from a spectrum and assign it to the subMV - MVsub.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, MVsubstations.size()); - - //Assign unique color to all underlying grid nodes - MVsub.f_getLowerLVLConnectedGridNodes().forEach(GN -> GN.p_uniqueColor = MVsub.p_uniqueColor); - - //Update spectrum color index and total defined colours - v_amountOfDefinedGridLoops++; - } -} -else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - int totalNotToplevelGridNodes = energyModel.f_getGridNodesNotTopLevel().size(); - //Set all unique grid topology colors for each substation and its children if the gridloops are defined - for (GridNode node : energyModel.f_getGridNodesNotTopLevel()){ - - //Create a unique color from a spectrum and assign it to the subMV - node.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, totalNotToplevelGridNodes); - - //Update spectrum color index and total defined colours - v_amountOfDefinedGridLoops++; - } -} - - - VOID - double - 1721991963719 - f_styleSUBMV - -650 - 431 - - false - true - true - - gisregion - GISRegion - - gisregion.setVisible(false); - - - VOID - double - 1721992103665 - f_styleMVMV - -650 - 411 - - false - true - true - - gisregion - GISRegion - - gisregion.setFillColor(v_MVMVNodeColor); -gisregion.setLineStyle( LINE_STYLE_SOLID ); -gisregion.setLineColor( v_MVMVLineColor ); -gisregion.setLineWidth(2); - - - VOID - double - 1721049341787 - f_listFunctions - 80 - 1180 - - false - true - true - if(c_selectedObjects.get(0).c_containedGridConnections.size() > 1){ - HashMap<String, Integer> functionsList = new HashMap<String, Integer>(); - - for (int i = 0; i < c_selectedObjects.get(0).c_containedGridConnections.size(); i++) { - //split functies als er meerdere zijn - String[] splitFunctions = c_selectedObjects.get(0).c_containedGridConnections.get(i).p_purposeBAG.split(","); - - for (int j = 0; j < splitFunctions.length; j++) { - // als de key al bestaat, itereer - if (functionsList.get(splitFunctions[j]) != null) { - functionsList.put(splitFunctions[j], functionsList.get(splitFunctions[j]) + 1); - } - // zo niet, voeg toe - else { - functionsList.put(splitFunctions[j],1); - } - } - } - - /* - for (String i : functionsList.keySet()) { - traceln(i + ": " + functionsList.get(i)); - } - */ -} - - - VOID - double - 1725006890451 - f_setUIButton - 80 - 1200 - - false - true - true - switch(v_clickedObjectType){ - -case BUILDING: - if (c_selectedGridConnections.size() > 1 || !(c_selectedGridConnections.get(0) instanceof GCUtility) || !c_selectedGridConnections.get(0).v_isActive){ - button_goToUI.setVisible(false); - } - else{ - button_goToUI.setText("Ga naar het Bedrijfsportaal"); - button_goToUI.setVisible(true); - } - break; - -case ELECTROLYSER: - button_goToUI.setText("Ga naar het Waterstof Dashboard"); - button_goToUI.setVisible(true); - break; - -case BATTERY: - button_goToUI.setText("Ga naar het Batterijen Dashboard"); - button_goToUI.setVisible(true); - break; - -case CHARGER: - button_goToUI.setVisible(false); - break; - -default: - button_goToUI.setVisible(false); - break; -} - - - - RETURNS_VALUE - GISRoute - 1725266804325 - f_createGISLine - -280 - 110 - - false - true - true - - GISCoords - double[] - - - objectType - OL_GISObjectType - - -Curve curve = new Curve(); -for(int i = 0; i+3 < GISCoords.length; i += 2){ - GISMarkupSegmentLine segment = new GISMarkupSegmentLine(GISCoords[i], GISCoords[i+1], GISCoords[i+2], GISCoords[i+3]); - curve.addSegment(segment); -} - -//Create route (line) -GISRoute gisroute = new GISRoute(map, curve, true); - -//Object styling -switch(objectType){ - - case LV_CABLE: - c_LVCables.add(gisroute); - //Styling - gisroute.setLineStyle(LINE_STYLE_SOLID); - gisroute.setLineWidth(0.8); - gisroute.setLineColor(v_LVGridColor); - gisroute.setVisible(false); - break; - - case MV_CABLE: - c_MVCables.add(gisroute); - //Styling - gisroute.setLineStyle(LINE_STYLE_SOLID); - gisroute.setLineWidth(1); - gisroute.setLineColor(v_MVGridColor); - gisroute.setVisible(false); - break; -} - -return gisroute; - - - - VOID - double - 1725968656820 - f_setColorsBasedOnGridTopology_gridnodes - 1960 - 1750 - - false - true - true - - GN - GridNode - - if(GN.gisRegion != null){ - GN.gisRegion.setFillColor(GN.p_uniqueColor); - GN.gisRegion.setLineColor(GN.p_uniqueColor.brighter()); -} - - - VOID - double - 1725977409304 - f_setSliderPresets - -650 - 641 - - false - false - true - //Should be overridden in child interface!!! -traceln("Forgot to override project specific slider settings!!"); - - - VOID - double - 1726068314849 - f_projectSpecificStyling - -660 - 220 - - false - true - true - //Function used to set the colors, styling, and other parameters/functions for each specific project -//Should be overridden!! -traceln("DID NOT OVERRIDE THE PROJECT SPECIFIC STYLING!"); - - - VOID - double - 1729685968993 - f_projectSpecificOrderedCollectionAdjustments - 86 - -550 - - false - true - true - //Function that can be used to make project specific adjustments to the ordered collection -//SHOULD BE OVERRIDEN IF YOU WANT TO USE THIS - - - VOID - double - 1734442458629 - f_applyFilter - -1575 - 130 - - false - true - true - - selectedFilter - OL_FilterOptionsGC - - - selectedFilterName - String - - c_selectedFilterOptions.add(selectedFilter); - -ArrayList<GridConnection> toBeFilteredGC = new ArrayList<GridConnection>(); - -if(c_selectedFilterOptions.size()>1 && c_selectedGridConnections.size()> 0){ // Already filtering - toBeFilteredGC = new ArrayList<GridConnection>(c_selectedGridConnections); -} -else{ // First filter - toBeFilteredGC = new ArrayList<GridConnection>(energyModel.f_getActiveGridConnections()); -} - -//After a filter selecttion, reset previous clicked building/gridNode colors and text -v_previousClickedObjectType = v_clickedObjectType; -c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); -c_selectedGridConnections.clear(); -c_selectedObjects.clear(); - - -//Deselect previous selection -if( v_previousClickedObjectType != null){ - f_deselectPreviousSelect(); -} - -//Can filter return 0? (Only allowed for filters who are not inmediately active (gridLoops, nbh, etc.) -boolean filterCanReturnZero = false; - -switch(selectedFilter){ - case COMPANIES: - f_filterCompanies(toBeFilteredGC); - break; - - case HOUSES: - f_filterHouses(toBeFilteredGC); - break; - - case DETAILED: - f_filterDetailed(toBeFilteredGC); - break; - - case NONDETAILED: - f_filterEstimated(toBeFilteredGC); - break; - - case HAS_PV: - f_filterHasPV(toBeFilteredGC); - break; - - case HAS_TRANSPORT: - f_filterHasTransport(toBeFilteredGC); - break; - - case HAS_EV: - f_filterHasEV(toBeFilteredGC); - break; - - case GRIDTOPOLOGY_SELECTEDLOOP: - if(!c_filterSelectedGridLoops.isEmpty()){ - f_filterGridLoops(toBeFilteredGC); - } - else{ - - f_setForcedClickScreenText("Selecteer een lus"); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(true); - } - - if(c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.GRID_NEIGHBOURS)){ - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.GRID_NEIGHBOURS),true); - } - if(c_selectedFilterOptions.size() > 1){ - c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); - } - else{ - filterCanReturnZero = true; - } - } - break; - - case SELECTED_NEIGHBORHOOD: - if(!c_filterSelectedNeighborhoods.isEmpty()){ - f_filterNeighborhoods(toBeFilteredGC); - } - else{ - f_setForcedClickScreenText("Selecteer een buurt"); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(true); - } - if(c_selectedFilterOptions.size() > 1){ - c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); - } - else{ - filterCanReturnZero = true; - } - } - break; - case MANUAL_SELECTION: - if(c_manualFilterSelectedGC.size() > 0){ - f_filterManualSelection(toBeFilteredGC); - } - else if(c_selectedFilterOptions.size() > 1){ - if(c_manualFilterDeselectedGC.size() > 0){ - f_filterManualSelection(toBeFilteredGC); - } - else{ - c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); - } - } - else{ - filterCanReturnZero = true; - } - - break; -} - -if(c_selectedGridConnections.size() == 0 && !filterCanReturnZero){ // Not allowed to return zero, while returning zero - f_removeFilter(selectedFilter, selectedFilterName); - - //Notify filter has not been applied, cause no results are given - f_setErrorScreen("Geselecteerde filter geeft geen resultaten. De filter is gedeactiveerd.", 0, 0); -} -else if(c_selectedGridConnections.size() == 0 && filterCanReturnZero){//Allowed to return zero filtered gc, while returning zero - //Do nothing -} -else{//Filtered GC returns GC - - //Set color of all gis objects of new filter selection - v_clickedObjectType = OL_GISObjectType.BUILDING; - - for (GridConnection GC: c_selectedGridConnections){ - for (GIS_Object objectGIS : GC.c_connectedGISObjects) { - objectGIS.gisRegion.setFillColor(v_selectionColorAddBuildings); - c_selectedObjects.add(objectGIS); - } - } - - //Set graphs - if(c_selectedGridConnections.size()>1){ - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - else{ - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } -} - - - VOID - double - 1734442462084 - f_setFilter - -1575 - 60 - - false - true - true - - selectedFilterName - String - - OL_FilterOptionsGC selectedFilter_OL = null; -switch(selectedFilterName){ - case "-": - //Do nothing - break; - case "Bedrijfspanden": - selectedFilter_OL = OL_FilterOptionsGC.COMPANIES; - break; - case "Woonhuizen": - selectedFilter_OL = OL_FilterOptionsGC.HOUSES; - break; - case "Met bekende data": - selectedFilter_OL = OL_FilterOptionsGC.DETAILED; - break; - case "Met geschatte data": - selectedFilter_OL = OL_FilterOptionsGC.NONDETAILED; - break; - case "Met zonnepanelen": - selectedFilter_OL = OL_FilterOptionsGC.HAS_PV; - break; - case "Met voertuigen": - selectedFilter_OL = OL_FilterOptionsGC.HAS_TRANSPORT; - break; - case "Met EV": - selectedFilter_OL = OL_FilterOptionsGC.HAS_EV; - break; - case "In de aangewezen 'lus'": - selectedFilter_OL = OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP; - break; - case "In de aangwezen 'buurt'": - selectedFilter_OL = OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD; - break; - case "Handmatige selectie": - selectedFilter_OL = OL_FilterOptionsGC.MANUAL_SELECTION; - break; -} - -boolean manualSelectionFilterActive = false; - -//Remove manual filter first -if(!selectedFilterName.equals("Handmatige selectie") && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - button_removeManualSelection.action(); -} - - -if(!selectedFilterName.equals("-") && !c_selectedFilterOptions.contains(selectedFilter_OL)){ // Set filter - traceln("Geselecteerde filter ( " + selectedFilterName + " ) toegevoegd."); - t_activeFilters.setText( t_activeFilters.getText() + selectedFilterName + "\n"); - f_applyFilter(selectedFilter_OL, selectedFilterName); -} -else if(c_selectedFilterOptions.contains(selectedFilter_OL)){ // Remove filter - f_removeFilter(selectedFilter_OL, selectedFilterName); -} - - - VOID - double - 1734445008646 - f_removeAllFilters - -1570 - 525 - - false - true - true - c_selectedFilterOptions.clear(); -t_activeFilters.setText(""); - -//Deselect everything and set region as main -f_clearSelectionAndSelectEnergyModel(); - - - VOID - double - 1734447122780 - f_selectGridLoop - -1530 - 310 - - false - true - true - - clickx - double - - - clicky - double - - -//Check if click was on Building, if yes, select grid building -for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ - if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ - if (b.gisRegion.isVisible()) { //only allow us to click on visible objects - if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections - GridConnection clickedGridConnection = b.c_containedGridConnections.get(0); // Find buildings powered by the same GC as the clicked building - GridNode clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; - ArrayList<GridNode> allGridNodes = new ArrayList<GridNode>(energyModel.f_getGridNodesTopLevel()); - allGridNodes.addAll(energyModel.f_getGridNodesNotTopLevel()); - - while( clickedGridConnectionConnectedGridNode.p_parentNodeID != null && - clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.SUBMV && - clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.MVMV && - clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.HVMV - ){ - String parentNodeName = clickedGridConnectionConnectedGridNode.p_parentNodeID; - if(parentNodeName != null && !parentNodeName.equals("-") && !parentNodeName.equals("")){ - clickedGridConnectionConnectedGridNode = findFirst(allGridNodes, GN -> GN.p_gridNodeID.equals(parentNodeName)); - } - else{ // At top node --> select the directly attached grid node instead, and break out of while loop. - clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; - break; - } - } - - //This deselect the previous selection of gridloops - f_setFilter("In de aangewezen 'lus'"); - - if(c_filterSelectedGridLoops.contains(clickedGridConnectionConnectedGridNode)){ - c_filterSelectedGridLoops.remove(clickedGridConnectionConnectedGridNode); - } - else{ - c_filterSelectedGridLoops.add(clickedGridConnectionConnectedGridNode); - } - - if(gr_forceMapSelection.isVisible()){ - f_setForcedClickScreenText(""); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); - } - } - - //This selects the new selection of gridloops - f_setFilter("In de aangewezen 'lus'"); - - return; - - } - } - } -} - - - - VOID - double - 1734448628428 - f_filterCompanies - -1550 - 150 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC instanceof GCUtility)); - - - - - VOID - double - 1734448687355 - f_filterHouses - -1550 - 170 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC instanceof GCHouse)); - - - - - VOID - double - 1734448688472 - f_filterDetailed - -1550 - 190 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.p_owner.p_detailedCompany)); - - - - VOID - double - 1734448689519 - f_filterEstimated - -1550 - 210 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> !GC.p_owner.p_detailedCompany)); - - - - VOID - double - 1734448690487 - f_filterHasPV - -1550 - 230 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW))); - - - - VOID - double - 1734448691508 - f_filterHasTransport - -1550 - 250 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.c_vehicleAssets.size() > 0)); - - - - - VOID - double - 1734451505770 - f_removeFilter - -1575 - 105 - - false - true - true - - selectedFilter - OL_FilterOptionsGC - - - selectedFilterName - String - - c_selectedFilterOptions.remove(selectedFilter); - -ArrayList<OL_FilterOptionsGC> toBeReappliedFilters = new ArrayList<OL_FilterOptionsGC>(c_selectedFilterOptions); -c_selectedFilterOptions.clear(); - -if(toBeReappliedFilters.size() > 0){ - for(OL_FilterOptionsGC filterOption : toBeReappliedFilters){ - f_applyFilter(filterOption, selectedFilterName); - } - String toBeAdjustedFilterText = t_activeFilters.getText(); - String newActiveFilterText = toBeAdjustedFilterText.replace(selectedFilterName + "\n", ""); - t_activeFilters.setText(newActiveFilterText); - - traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); -} -else{ // All filters removed - traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); - f_removeAllFilters(); -} - - - VOID - double - 1734517589341 - f_filterGridLoops - -1550 - 290 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - HashSet<GridConnection> gridConnectionsOnLoop = new HashSet<GridConnection>(); - -for(GridNode GridLoop : c_filterSelectedGridLoops) - if(b_gridLoopsAreDefined){ - OL_GridNodeType loopTopNodeType= GridLoop.p_nodeType; - switch(loopTopNodeType){ - case MVLV: - for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - break; - case SUBMV: - for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - break; - - case MVMV: - for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - - break; - - case HVMV: - for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - break; - } - } - else{ - for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - } - -c_selectedGridConnections = new ArrayList<>(gridConnectionsOnLoop); - - - VOID - double - 1736344958050 - f_setErrorScreen - 3410 - 930 - - false - true - true - - errorMessage - String - - - xOffset - double - - - yOffset - double - - gr_errorScreen.setPos(xOffset, yOffset); - -//Reset location and height -button_errorOK.setY(550); -rect_errorMessage.setY(380); -rect_errorMessage.setHeight(200); -t_errorMessage.setY(430); - -//Set position above all other things -f_setShapePresentationOnTop(gr_errorScreen); - -int width_numberOfCharacters = 44; - -// Set Text -Pair<String, Integer> p = v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); -errorMessage = p.getFirst(); -int numberOfLines = p.getSecond(); -int additionalLines = max(0, numberOfLines - 3); - -// Set Size -rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); -rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); -//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); -t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); - -t_errorMessage.setText(errorMessage); -gr_errorScreen.setVisible(true); - - - VOID - double - 1736442051389 - f_styleResultsUI - -650 - 800 - - false - true - true - uI_Results.f_styleResultsUIHeader(zenmocolor_blue3.getFillColor(), zenmocolor_blue3.getFillColor(), 1.0, LINE_STYLE_SOLID); -uI_Results.f_styleAllCharts(v_backgroundColor, zenmocolor_blue3.getFillColor(), 1.0, LINE_STYLE_SOLID); - - - VOID - double - 1737653178011 - f_selectNeighborhood - -1530 - 370 - - false - true - true - - clickx - double - - - clicky - double - - -//Check if click was on Building, if yes, select grid building -for ( GIS_Object region : c_GISNeighborhoods ){ - if( region.gisRegion != null && region.gisRegion.contains(clickx, clicky) ){ - if (region.gisRegion.isVisible()) { //only allow us to click on visible objects - - GIS_Object clickedNeighborhood = region; - - - //This deselects the previous selected neighborhood filter - f_setFilter("In de aangwezen 'buurt'"); - - if(c_filterSelectedNeighborhoods.contains(clickedNeighborhood)){ - c_filterSelectedNeighborhoods.remove(clickedNeighborhood); - } - else{ - c_filterSelectedNeighborhoods.add(clickedNeighborhood); - } - - if(gr_forceMapSelection.isVisible()){ - f_setForcedClickScreenText(""); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); - } - } - //This sets the new selected neighborhoods filter - f_setFilter("In de aangwezen 'buurt'"); - - return; - } - } -} - - - - VOID - double - 1737653178013 - f_filterNeighborhoods - -1550 - 350 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - ArrayList<GridConnection> gridConnectionsInNeighborhood = new ArrayList<GridConnection>(); - -for(GridConnection GC : toBeFilteredGC){ - for(GIS_Object nbh : c_filterSelectedNeighborhoods) - if( nbh.gisRegion.contains(GC.p_latitude, GC.p_longitude) ){ - gridConnectionsInNeighborhood.add(GC); - } -} - -//If NBH results in zero GC, remove last added nbh -if(gridConnectionsInNeighborhood.isEmpty() && !c_filterSelectedNeighborhoods.isEmpty()){ - c_filterSelectedNeighborhoods.remove(c_filterSelectedNeighborhoods.size() - 1); -} - -c_selectedGridConnections = new ArrayList<>(gridConnectionsInNeighborhood); - - - VOID - double - 1740043548084 - f_enableLivePlotsOnly - -270 - 770 - - false - true - true - - resultsUI - UI_Results - - if (resultsUI.f_getSelectedObjectData() != null) { - if(resultsUI.getGr_resultsUIHeader().isVisible()){ - resultsUI.getRadioButtons().setValue(0, true); - } - resultsUI.chartProfielen.getPeriodRadioButton().setValue(0, true); - resultsUI.f_enableNonLivePlotRadioButtons(false); -} -for (ShapeRadioButtonGroup rb :resultsUI.chartProfielen.getAllPeriodRadioButtons()) { - rb.setValue(0, false); -} -resultsUI.chartProfielen.getPeriodRadioButton().setValue(0, true); - -resultsUI.f_enableNonLivePlotRadioButtons(false); - - - VOID - double - 1742226689515 - f_filterManualSelection - -1550 - 415 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - ArrayList<GridConnection> resultingGridConnectionSelection = new ArrayList<GridConnection>(); - -if(c_selectedFilterOptions.size() > 1){ - resultingGridConnectionSelection.addAll(toBeFilteredGC); -} -else{//Manual selection is the only active filter -> Resulting grid connection selection should start empty -} - -for(GridConnection manualSelectedGC : c_manualFilterSelectedGC){ - if(!resultingGridConnectionSelection.contains(manualSelectedGC)){ - resultingGridConnectionSelection.add(manualSelectedGC); - } -} -for(GridConnection manualDeselectedGC : c_manualFilterDeselectedGC){ - if(resultingGridConnectionSelection.contains(manualDeselectedGC)){ - resultingGridConnectionSelection.remove(manualDeselectedGC); - } -} - - -c_selectedGridConnections = new ArrayList<>(resultingGridConnectionSelection); - - - VOID - double - 1742226787560 - f_selectManualFilteredGC - -1530 - 435 - - false - true - true - - clickx - double - - - clicky - double - - //Initialize clickedObject -GIS_Object clickedObject = null; - -//Check if click was on Building, if yes, select building -for ( GIS_Object object : energyModel.pop_GIS_Buildings ){//pop_GIS_Buildings - if( object.gisRegion != null && object.gisRegion.contains(clickx, clicky) ){ - if (object.gisRegion.isVisible()) { //only allow us to click on visible objects - if (object.c_containedGridConnections.size() > 0 ){ - clickedObject = object; - break; - } - } - } -} - -//If click was not on a building, check if click was on an EA, if yes, select EA -if(clickedObject == null){ - for ( GIS_Object object : energyModel.pop_GIS_Objects ){//pop_GIS_Buildings - if( object.gisRegion != null && object.gisRegion.contains(clickx, clicky) ){ - if (object.gisRegion.isVisible()) { //only allow us to click on visible objects - if (object.c_containedGridConnections.size() > 0 ){ - clickedObject = object; - break; - } - } - } - } -} - -//If a building or EA has been selected perform click functionality -if(clickedObject != null){ - boolean select = true; // Deselect == false; - boolean removedFromSelectedGC = false; - boolean removedFromDeselectedGC = false; - - ArrayList<GridConnection> clickedGridConnections = new ArrayList<GridConnection>(clickedObject.c_containedGridConnections); - - for (GridConnection clickedGC : clickedGridConnections){ - if(c_selectedGridConnections.contains(clickedGC)){ - c_selectedGridConnections.remove(clickedGC); - select = false; - } - - if(c_manualFilterSelectedGC.contains(clickedGC)){ - c_manualFilterSelectedGC.remove(clickedGC); - } - else if(c_manualFilterDeselectedGC.contains(clickedGC)){ - c_manualFilterDeselectedGC.remove(clickedGC); - } - } - - if(select){ - c_selectedGridConnections.addAll(clickedGridConnections); - c_manualFilterSelectedGC.addAll(clickedGridConnections); - traceln("Handmatig geselecteerd object toegevoegd aan selectie"); - } - else{ - c_manualFilterDeselectedGC.addAll(clickedGridConnections); - traceln("Handmatig geselecteerd object verwijderd van selectie"); - } - - - //Disable traceln - PrintStream originalPrintStream = f_disableTraceln(); - - //This deactivates the previous selection - f_setFilter("Handmatige selectie"); - - //This activates the new selection - f_setFilter("Handmatige selectie"); - - //Enable traceln - f_enableTraceln(originalPrintStream); - - return; -} - - - VOID - double - 1742300624199 - f_setForcedClickScreenText - 140 - -880 - - false - true - true - - forcedClickScreenText - String - - t_forcedClickMessage.setText(forcedClickScreenText); - -if(t_forcedClickMessage.getText().equals("")){ - gr_ForceMapSelectionText.setVisible(false); -} -else{ - gr_ForceMapSelectionText.setVisible(true); -} - - - VOID - double - 1743509491686 - f_setMapViewBounds - -640 - -90 - - false - true - true - - GISObjects - List<GIS_Object> - - // Initialize min and max values -double minLat = Double.MAX_VALUE; -double maxLat = Double.MIN_VALUE; -double minLon = Double.MAX_VALUE; -double maxLon = Double.MIN_VALUE; - -// Loop through all GISRegions and find the bounding box -for(GIS_Object go : GISObjects){ - - GISRegion region = go.gisRegion; - double[] points = region.getPoints(); // Get the boundary points of the region - - for (int i = 0; i < points.length; i += 2) { // i+=2 because data is in lat, lon pairs - double lat = points[i]; // Latitude - double lon = points[i + 1]; // Longitude - - - - // Update min/max latitude and longitude - minLat = Math.min(minLat, lat); - maxLat = Math.max(maxLat, lat); - minLon = Math.min(minLon, lon); - maxLon = Math.max(maxLon, lon); - } -} - -//Make it slightly bigger, so it isnt exact on the line of the regions -minLat = minLat - 0.0001; -maxLat = maxLat + 0.0001; -minLon = minLon - 0.0001; -maxLon = maxLon + 0.0001; - -// Set the map to fit the calculated bounds -map.fitBounds(minLat, minLon, maxLat, maxLon); - - - VOID - double - 1743518032245 - f_setStartView - -640 - 285 - - false - true - true - //traceln("f_setStartView() reached!"); - -if(project_data.map_centre_latitude() != null && project_data.map_centre_longitude() != null && project_data.map_centre_latitude() != 0 && project_data.map_centre_longitude() != 0){ - map.setCenterLatitude(project_data.map_centre_latitude()); - map.setCenterLongitude(project_data.map_centre_longitude()); -} -else{ - ArrayList<GIS_Object> gisObjects_for_mapViewBounds = new ArrayList<GIS_Object>(); - if((settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0) && findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION).size() > 0){ - gisObjects_for_mapViewBounds.addAll(findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION)); - } - else{ - for (GIS_Object building : energyModel.pop_GIS_Buildings) { - if(building.gisRegion.isVisible()){ - gisObjects_for_mapViewBounds.add(building); - } - } - } - f_setMapViewBounds(gisObjects_for_mapViewBounds); -} - -if(project_data.map_scale() != null){ - map.setMapScale(project_data.map_scale()); -} - -va_Interface.navigateTo(); -v_currentViewArea = va_Interface; - - - VOID - double - 1743665953113 - f_setInfoText - -2010 - 120 - - false - true - true - - infoBubble - ShapeImage - - - descriptionText - String - - - xPosition - double - - - yPosition - double - - if ( p_currentActiveInfoBubble.size() > 0 && p_currentActiveInfoBubble.get(0) == infoBubble ) { - // If we click a second time on the same bubble it should close the window - p_currentActiveInfoBubble.clear(); - gr_infoText.setVisible(false); -} -else { - p_currentActiveInfoBubble.clear(); - p_currentActiveInfoBubble.add(infoBubble); - - int width_ch = 50; - // Set Text - Pair<String, Integer> p = v_infoText.restrictWidth(descriptionText, width_ch); - t_infoTextDescription.setText(p.getFirst()); - - // Set Size - rect_infoText.setWidth(width_ch * 7.5); // about 7.5 px per char for sans serif 14 pt - rect_infoText.setHeight(50 + p.getSecond() * 20); // about 50 px for title and 20 px per line for sans serif 14 pt - - // Set Position - // The group position is on the top left, not the centre. - double margin_px = 15; - //double posX = f_getAbsolutePosition(infoBubble).getX(); - //double posY = f_getAbsolutePosition(infoBubble).getY(); - if (xPosition < (v_currentViewArea.getX() + v_currentViewArea.getWidth()/2) ) { - // bubble is on the left half, so text should appear to the right - gr_infoText.setX( xPosition + margin_px + infoBubble.getWidth()/2); - } - else { - // bubble is on the right half, so text should appear to the left - gr_infoText.setX( xPosition - margin_px + infoBubble.getWidth()/2 - rect_infoText.getWidth()); - } - - // In AnyLogic the Y-Axis is inverted - if (yPosition > (v_currentViewArea.getY() + v_currentViewArea.getHeight()/2) ) { - // bubble is on the bottom half, so text should appear above - gr_infoText.setY( yPosition - margin_px + infoBubble.getHeight()/2 - rect_infoText.getHeight()); - } - else { - // bubble is on the top half, so text should appear below - gr_infoText.setY( yPosition + margin_px + infoBubble.getHeight()/2); - } - - // Position of close button - gr_closeInfoText.setX( width_ch * 7.5 - 20 ); // 20 px offset from the right hand side - - gr_infoText.setVisible(true); -} - - - RETURNS_VALUE - Pair<ShapeGroup, Point> - 1744894817569 - f_getGroupPositionIteration - true - -1980 - 265 - - false - true - true - - pair - Pair<ShapeGroup, Point> - - return new Pair(pair.getFirst().getGroup(), new Point(pair.getFirst().getX() + pair.getSecond().getX(), pair.getFirst().getY() + pair.getSecond().getY())); - - - RETURNS_VALUE - Point - 1744894817571 - f_getAbsolutePosition - true - -2000 - 240 - - false - true - true - - shape - Shape - - // Note: Only works if the Agent is not living in the space of the interface! - -// Start with the shape position -Point point = new Point(shape.getX(), shape.getY()); -traceln("point0: " + point); - -// Find presentation the shape is in to get the offset. -if (shape.getPresentable() == this) { - // The shape is on this canvas, no additional offset -} -else { - // The shape is in a (possibly nested) presentation - traceln("shape.getPresentable(): " + shape.getPresentable()); - traceln("shapetoplevel: " + shape.getPresentable().getPresentationShape()); - for (ShapeEmbeddedObjectPresentation ap : c_presentations) { - traceln("AP: " + ap); - traceln("AG: " + ap.getEmbeddedObject()); - } - ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable()); - if (presentation == null) { - throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); - } - traceln("point1: " + point); - - point.add( new Point(presentation.getX(), presentation.getY()) ); - // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. - traceln("point2: " + point); - - point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); - - traceln("point3: " + point); - Pair<ShapeEmbeddedObjectPresentation, Point> pair = new Pair(presentation, point); - while ( pair.getFirst().getPresentable() != this ) { - pair = f_getPresentationPositionIteration(pair); - traceln("pair: " + pair); - traceln("point_i: " + pair.getSecond()); - } - point = pair.getSecond(); -} - -// Recursively add the group offsets. -ShapeGroup group = shape.getGroup(); -traceln("group x: " + group.getX()); -traceln("group y: " + group.getY()); -Pair<ShapeGroup, Point> pair = new Pair(group, point); -while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { - pair = f_getGroupPositionIteration(pair); - traceln("point_j: " + pair.getSecond()); -} -return pair.getSecond(); - - - - - -/* -(main) tabs_presentation (tabs_presentation.getEmbeddedobject() = agent1) - (agent 1) tab_elec_presentation (tab_elec_presentation.getEmbeddedobject() = agent2) - (agent 2) shape (shape.getpresentable() = agent2) - - -findfirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable() ) => tab_elec_presentation - -tab_elec_presentation.getPresentable() => agent 1, so use this in the next iteration - -findfirst(c_presentations, ap -> ap.getEmbeddedObject() == tab_elec_presentation.getPresentable() ) => tabs_presentation - -*/ - - -/* - -double presentationOffsetX; -double presentationOffsetY; -if (shape.getPresentable() == this) { - // The shape is on this canvas, no additional offset - presentationOffsetX = 0.0; - presentationOffsetY = 0.0; -} -else { - traceln("getEmbeddedObject: " + c_presentations.get(0).getEmbeddedObject()); - traceln("getEmbeddedObject: " + c_presentations.get(1).getEmbeddedObject()); - traceln("shape.getPresentable()" + shape.getPresentable()); - traceln("agent presentable: " + agent.presentation); - traceln("this presentable: " + this.presentation); - ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable()); - if (presentation == null) { - throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); - } - presentationOffsetX = presentation.getX(); - presentationOffsetY = presentation.getY(); - // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. - presentationOffsetX += presentation.getGroup().getX(); - presentationOffsetY += presentation.getGroup().getY(); - traceln("presentationOffsetX: " + presentationOffsetX); -} - -// Add the presentation offset to the shape position and then recursively add the group offsets. -Point point = new Point(shape.getX() + presentationOffsetX, shape.getY() + presentationOffsetY); -ShapeGroup group = shape.getGroup(); -Pair<ShapeGroup, Point> pair = new Pair(group, point); -while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { - pair = f_getGroupPositionIteration(pair); -} -return pair.getSecond(); - -*/ - - - - RETURNS_VALUE - Pair<ShapeEmbeddedObjectPresentation, Point> - 1744894817573 - f_getPresentationPositionIteration - true - -1980 - 285 - - false - true - true - - pair - Pair<ShapeEmbeddedObjectPresentation. Point> - - ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == pair.getFirst().getPresentable()); -if (presentation == null) { - throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); -} -Point point = pair.getSecond(); -traceln("presentation agent: " + presentation.getEmbeddedObject()); -traceln("point in presentation iteration before: " + point); -point.add( new Point(presentation.getX(), presentation.getY()) ); -// It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. -traceln("point in presentation iteration middle: " + point); -point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); -traceln("point in presentation iteration after: " + point); - -return new Pair(presentation, point); - - - VOID - double - 1744624088848 - f_harvestEnergyModelLoadData - true - -556 - -710 - - false - true - true - traceln("Start writing Electricity Load Balance data to excel!"); - -//Clear the sheet first -f_clearExportSheet(); - -//Set column names -excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); -excel_exportBalanceLoadData.setCellValue("Totale load van het Hele gebied [kWh]", "Electricity Load Balance", 1, 2); - -//Get energyModel profile -double[] loadArray_kW = energyModel.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); - -for (int i = 0; i < loadArray_kW.length ; i++) { - - //Time series - excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); - - //Data - excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 2); -} - -//Write file -excel_exportBalanceLoadData.writeFile(); - -traceln("Finished writing Electricity Load Balance data to excel!"); - - - VOID - double - 1744624088850 - f_harvestSelectedGCLoadData - true - -556 - -470 - - false - true - true - traceln("Start writing Electricity Load Balance data to excel!"); - -//Clear the sheet first -f_clearExportSheet(); - -//Initialize column index -int columnIndex = 2; - -//Initialize total balance flow for all selected GC -double[] cumulativeLoadArray_kW = new double[energyModel.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW().length]; - -//Loop over gc and add the data -for(GridConnection GC : c_selectedGridConnections){ - - //Add gc data - excel_exportBalanceLoadData.setCellValue(GC.p_ownerID, "Electricity Load Balance", 1, columnIndex); - - double[] loadArray_kW = GC.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); - - for (int i = 0; i < loadArray_kW.length; i++ ) { - excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, columnIndex); - - //Add to cumulative load array - cumulativeLoadArray_kW[i] += loadArray_kW[i]; - } - - //Add timestep column (only the first time) - if (columnIndex == 2) { - excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); - traceln("ArraySize: %s", loadArray_kW.length); - for (int i = 0; i < loadArray_kW.length ; i++) { - excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); - } - } - - //Increase columnIndex - columnIndex++; -} - -//Cumulative data column -if(c_selectedGridConnections.size() > 1){ - excel_exportBalanceLoadData.setCellValue("Totale load [kWh]", "Electricity Load Balance", 1, columnIndex); - for (int i = 0; i < cumulativeLoadArray_kW.length ; i++) { - excel_exportBalanceLoadData.setCellValue( cumulativeLoadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, columnIndex); - } -} - -//Write the file -excel_exportBalanceLoadData.writeFile(); - -traceln("Finished writing Electricity Load Balance data to excel!"); - - - VOID - double - 1744624088852 - f_harvestTotalBalanceLoadOfSelectedEnergyCoop - true - -556 - -590 - - false - true - true - traceln("Start writing Electricity Load Balance data to excel!"); - -//Clear the sheet first -f_clearExportSheet(); - -//Set column names -excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); -excel_exportBalanceLoadData.setCellValue("Totale load van de geselecteerde EnergyCoop [kWh]", "Electricity Load Balance", 1, 2); - -//Get energyModel profile -double[] loadArray_kW = v_customEnergyCoop.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); - -for (int i = 0; i < loadArray_kW.length ; i++) { - - //Time series - excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); - - //Data - excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 2); -} - -//Write file -excel_exportBalanceLoadData.writeFile(); - -traceln("Finished writing Electricity Load Balance data to excel!"); - - - VOID - double - 1744985599017 - f_setAllFileDownloadersDisabled - true - -556 - -410 - - false - true - true - fileChooser_exportBalanceLoadEnergyModel.setEnabled(false); -fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(false); -fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(false); - - - VOID - double - 1744986150240 - f_clearExportSheet - true - -556 - -390 - - false - true - true - //Clear the sheet first -for (int row = 1; row <= 35137; row++) { - for (int col = 1; col <= p_maxNrSelectedGCForExport + 2; col++) { - excel_exportBalanceLoadData.setCellValue("", "Electricity Load Balance", row, col); - } -} - - - VOID - double - 1745936595905 - f_selectGISRegion_publicModel - Function that selects gisregions after click on the map - -670 - 875 - - false - true - true - - clickx - double - - - clicky - double - - //After a click, reset previous clicked building/gridNode colors and text -v_previousClickedObjectType = v_clickedObjectType; -c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); -ArrayList<GIS_Object> buildingsConnectedToSelectedBuildingsList = new ArrayList<>(); -c_selectedGridConnections.clear(); -c_selectedObjects.clear(); - -//Deselect previous selection -if( v_previousClickedObjectType != null){ - f_deselectPreviousSelect(); -} - -//Check if click was on Gridnode, if yes, select grid node -for ( GridNode GN : energyModel.pop_gridNodes ){ - if( GN.gisRegion != null && GN.gisRegion.contains(clickx, clicky) && GN.gisRegion.isVisible() ){ - if(GN.f_getAllLowerLVLConnectedGridConnections().size() >= p_minSelectedGCForPublicAggregation){ - f_selectGridNode(GN); - } - else{ - //Data sharing not agreed? - v_clickedObjectType = OL_GISObjectType.REGION; - uI_Results.f_updateResultsUI(energyModel); - - //Enable kpi summary button - uI_Results.getCheckbox_KPISummary().setEnabled(true); - } - return; - } -} - -//Check if click was on Building, if yes, select grid building -for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ - if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ - if (b.gisRegion.isVisible()) { //only allow us to click on visible objects - if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections - if(b.c_containedGridConnections.get(0).p_owner.b_dataSharingAgreed){ - buildingsConnectedToSelectedBuildingsList = b.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(b, buildingsConnectedToSelectedBuildingsList); - } - else{ - //Data sharing not agreed? - v_clickedObjectType = OL_GISObjectType.REGION; - uI_Results.f_updateResultsUI(energyModel); - - //Enable kpi summary button - uI_Results.getCheckbox_KPISummary().setEnabled(true); - } - return; - } - } - } -} - -//Check if click was on remaining objects such as chargers, solarfields, parcels: if yes, select object -for ( GIS_Object GISobject : energyModel.pop_GIS_Objects ){ - if( GISobject.gisRegion != null && GISobject.gisRegion.contains(clickx, clicky) ) { - if (GISobject.gisRegion.isVisible()) { //only allow us to click on visible objects - if (GISobject.c_containedGridConnections.size() > 0 ) { // only allow objects with gridconnections - if(GISobject.c_containedGridConnections.get(0).p_owner.b_dataSharingAgreed){ - // Find buildings powered by the same GC as the clicked object - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; - - //Find the (first) connected GC in the object - GridConnection selectedGC = GISobject.c_containedGridConnections.get(0); - - //Set the selected GIS object type - v_clickedObjectType = GISobject.p_GISObjectType; - c_selectedObjects.add(GISobject); - - //Set the correct interface view for each object type - switch(v_clickedObjectType){ - - case CHARGER: - f_selectCharger((GCPublicCharger)selectedGC, GISobject ); - break; - - - default: - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(GISobject, buildingsConnectedToSelectedBuildingsList); - break; - } - } - else{ - //Data sharing not agreed? - v_clickedObjectType = OL_GISObjectType.REGION; - uI_Results.f_updateResultsUI(energyModel); - - //Enable kpi summary button - uI_Results.getCheckbox_KPISummary().setEnabled(true); - } - return; - } - } - } -} - -//Still no clicked object? :select basic region -v_clickedObjectType = OL_GISObjectType.REGION; -uI_Results.f_updateResultsUI(energyModel); - -//Enable kpi summary button -uI_Results.getCheckbox_KPISummary().setEnabled(true); - - - VOID - double - 1746085650084 - f_changeDefaultColorOfPrivateGC - -670 - 915 - - false - true - true - for(GIS_Object object : energyModel.pop_GIS_Objects){ - for(GridConnection GC : object.c_containedGridConnections){ - if(!GC.p_owner.b_dataSharingAgreed){ - object.p_defaultFillColor = transparent(object.p_defaultFillColor, 0.6);//v_dataSharingDisagreedColor; - object.p_defaultLineStyle = LINE_STYLE_DOTTED; - object.f_style(null, null, null, null); - break; - } - } -} - -for(GIS_Building building : energyModel.pop_GIS_Buildings){ - for(GridConnection GC : building.c_containedGridConnections){ - if(!GC.p_owner.b_dataSharingAgreed){ - building.p_defaultFillColor = transparent(building.p_defaultFillColor, 0.6);//v_dataSharingDisagreedColor; - building.p_defaultLineStyle = LINE_STYLE_DOTTED; - building.f_style(null, null, null, null); - break; - } - } -} - - - VOID - double - 1749741185117 - f_initialParkingSpacesOrder - 85 - -630 - - false - true - true - //Collections.shuffle(c_orderedParkingSpaces); - - - VOID - double - 1750247111856 - f_initialChargerOrder - 85 - -610 - - false - true - true - c_orderedV1GChargers = new ArrayList<J_EAChargePoint>(); -c_orderedV2GChargers = new ArrayList<J_EAChargePoint>(); -c_orderedPublicChargers = new ArrayList<GCPublicCharger>(); - -List<J_EAChargePoint> c_inactiveV1GChargers = new ArrayList<J_EAChargePoint>(); -List<J_EAChargePoint> c_inactiveV2GChargers = new ArrayList<J_EAChargePoint>(); - -for (GridConnection gc : energyModel.f_getActiveGridConnections()) { - for (J_EAChargePoint charger : gc.c_chargers) { - if (charger.getV1GCapable()) { - c_orderedV1GChargers.add(0, charger); - } - else { - c_orderedV1GChargers.add(charger); - } - if (charger.getV2GCapable()) { - c_orderedV2GChargers.add(0, charger); - } - else { - c_orderedV2GChargers.add(charger); - } - } -} - -for (GridConnection gc : energyModel.f_getPausedGridConnections()) { - for (J_EAChargePoint charger : gc.c_chargers) { - if (charger.getV1GCapable()) { - c_inactiveV1GChargers.add(0, charger); - } - else { - c_inactiveV1GChargers.add(charger); - } - if (charger.getV2GCapable()) { - c_inactiveV2GChargers.add(0, charger); - } - else { - c_inactiveV2GChargers.add(charger); - } - } -} - -c_orderedV1GChargers.addAll( c_inactiveV1GChargers ); -c_orderedV2GChargers.addAll( c_inactiveV2GChargers ); - -for (GCPublicCharger gc : energyModel.PublicChargers) { - if ( !gc.p_isChargingCentre ) { - c_orderedPublicChargers.add(gc); - } -} - -//Collections.shuffle(c_orderedPublicChargers); - - - VOID - double - 1750078798174 - f_initializeSpecialGISObjectsLegend - 1410 - 1630 - - false - true - true - int numberOfSpecialActiveGISObjectTypes = 0; - -for(OL_GISObjectType activeSpecialGISObjectType : c_modelActiveSpecialGISObjects){ - if(activeSpecialGISObjectType == OL_GISObjectType.PARKING){ - for(OL_ParkingSpaceType activeParkingSpaceType : c_modelActiveParkingSpaceTypes){ - numberOfSpecialActiveGISObjectTypes ++; - Pair<ShapeText, ShapeRectangle> legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); - f_setParkingSpaceLegendItem(activeParkingSpaceType, legendShapes.getFirst(), legendShapes.getSecond()); - } - } - else{ - numberOfSpecialActiveGISObjectTypes ++; - Pair<ShapeText, ShapeRectangle> legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); - f_setSpecialGISObjectLegendItem(activeSpecialGISObjectType, legendShapes.getFirst(), legendShapes.getSecond()); - - if(activeSpecialGISObjectType == OL_GISObjectType.CHARGER){ - numberOfSpecialActiveGISObjectTypes ++; - legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); - legendShapes.getFirst().setVisible(true); - legendShapes.getSecond().setVisible(true); - legendShapes.getFirst().setText("Laadpaal/plein (Toegevoegd)"); - legendShapes.getSecond().setFillColor(v_newChargingStationColor); - legendShapes.getSecond().setLineColor(v_newChargingStationLineColor); - } - } -} - - - VOID - double - 1750261221085 - f_setTrafoText - 50 - 1620 - - false - true - true - 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; -} - - - VOID - double - 1750079113839 - f_setSpecialGISObjectLegendItem - 1430 - 1670 - - false - true - true - - activeSpecialGISObjectType - OL_GISObjectType - - - legendText - ShapeText - - - legendRect - ShapeRectangle - - legendText.setVisible(true); -legendRect.setVisible(true); - -switch(activeSpecialGISObjectType){ - case SOLARFARM: - legendText.setText("Zonneveld"); - legendRect.setFillColor(v_solarParkColor); - legendRect.setLineColor(v_solarParkLineColor); - break; - case WINDFARM: - legendText.setText("Windmolen"); - legendRect.setFillColor(v_windFarmColor); - legendRect.setLineColor(v_windFarmLineColor); - break; - case CHARGER: - legendText.setText("Laadpaal/plein (Bestaand)"); - legendRect.setFillColor(v_chargingStationColor); - legendRect.setLineColor(v_chargingStationLineColor); - break; - case BATTERY: - legendText.setText("Batterij"); - legendRect.setFillColor(v_batteryColor); - legendRect.setLineColor(v_batteryLineColor); - break; - case PARCEL: - legendText.setText("Nieuw Perceel"); - legendRect.setFillColor(v_parcelColor); - legendRect.setLineColor(v_parcelLineColor); - break; - case ELECTROLYSER: - legendText.setText("Electrolyser"); - legendRect.setFillColor(v_electrolyserColor); - legendRect.setLineColor(v_electrolyserLineColor); - break; -} - - - VOID - double - 1750080865693 - f_initializeLegend - 1390 - 1550 - - false - true - true - //Default GIS buildings -f_initializeDefaultGISBuildingsLegend(); - -//Special gis objects -f_initializeSpecialGISObjectsLegend(); - - - VOID - double - 1750089851073 - f_setParkingSpaceLegendItem - 1430 - 1690 - - false - true - true - - activeParkingSpaceType - OL_ParkingSpaceType - - - legendText - ShapeText - - - legendRect - ShapeRectangle - - legendText.setVisible(true); -legendRect.setVisible(true); - -switch(activeParkingSpaceType){ - case PUBLIC: - legendText.setText("Parkeerplek: publiek"); - legendRect.setFillColor(v_parkingSpaceColor_public); - legendRect.setLineColor(v_parkingSpaceLineColor_public); - break; - case PRIVATE: - legendText.setText("Parkeerplek: privé"); - legendRect.setFillColor(v_parkingSpaceColor_private); - legendRect.setLineColor(v_parkingSpaceLineColor_private); - break; - case ELECTRIC: - legendText.setText("Parkeerplek: electrisch"); - legendRect.setFillColor(v_parkingSpaceColor_electric); - legendRect.setLineColor(v_parkingSpaceLineColor_electric); - break; -} - - - RETURNS_VALUE - Pair<ShapeText, ShapeRectangle> - 1750092444018 - f_getNextSpecialLegendShapes - 1430 - 1650 - - false - true - true - - legendShapesNumber - int - - ShapeText legendText; -ShapeRectangle legendRect; - -switch(legendShapesNumber){ - case 1: - legendText = t_specialGISObjectLegend1; - legendRect = rect_specialGISObjectLegend1; - break; - case 2: - legendText = t_specialGISObjectLegend2; - legendRect = rect_specialGISObjectLegend2; - break; - case 3: - legendText = t_specialGISObjectLegend3; - legendRect = rect_specialGISObjectLegend3; - break; - case 4: - legendText = t_specialGISObjectLegend4; - legendRect = rect_specialGISObjectLegend4; - break; - case 5: - legendText = t_specialGISObjectLegend5; - legendRect = rect_specialGISObjectLegend5; - break; - case 6: - legendText = t_specialGISObjectLegend6; - legendRect = rect_specialGISObjectLegend6; - break; - case 7: - legendText = t_specialGISObjectLegend7; - legendRect = rect_specialGISObjectLegend7; - break; - case 8: - legendText = t_specialGISObjectLegend8; - legendRect = rect_specialGISObjectLegend8; - break; - case 9: - legendText = t_specialGISObjectLegend9; - legendRect = rect_specialGISObjectLegend9; - break; - case 10: - legendText = t_specialGISObjectLegend10; - legendRect = rect_specialGISObjectLegend10; - break; - case 11: - legendText = t_specialGISObjectLegend11; - legendRect = rect_specialGISObjectLegend11; - break; - case 12: - legendText = t_specialGISObjectLegend12; - legendRect = rect_specialGISObjectLegend12; - break; - default: - legendText = t_specialGISObjectLegend1; - legendRect = rect_specialGISObjectLegend1; - break; -} - -return new Pair(legendText, legendRect); - - - - VOID - double - 1750162397332 - f_initializeDefaultGISBuildingsLegend - 1410 - 1570 - - false - true - true - int numberOfDefaultActiveGISObjectTypes = 1;//Always start at 2 (1 ++) for the building types, cause 'selection' is always present (for now). - -for(OL_GISBuildingTypes activeDefaultGISBuildingType : c_modelActiveDefaultGISBuildings){ - numberOfDefaultActiveGISObjectTypes ++; - Pair<ShapeText, ShapeOval> legendShapes = f_getNextDefaultLegendShapes(numberOfDefaultActiveGISObjectTypes); - f_setDefaultGISBuildingLegendItem(activeDefaultGISBuildingType, legendShapes.getFirst(), legendShapes.getSecond()); -} - - - RETURNS_VALUE - Pair<ShapeText, ShapeOval> - 1750162514744 - f_getNextDefaultLegendShapes - 1430 - 1610 - - false - true - true - - legendShapesNumber - int - - ShapeText legendText; -ShapeOval legendOval; - -switch(legendShapesNumber){ - case 1: - legendText = t_defaultLegend1; - legendOval = oval_defaultLegend1; - break; - case 2: - legendText = t_defaultLegend2; - legendOval = oval_defaultLegend2; - break; - case 3: - legendText = t_defaultLegend3; - legendOval = oval_defaultLegend3; - break; - case 4: - legendText = t_defaultLegend4; - legendOval = oval_defaultLegend4; - break; - case 5: - legendText = t_defaultLegend5; - legendOval = oval_defaultLegend5; - break; - default: - legendText = t_defaultLegend1; - legendOval = oval_defaultLegend1; -} - -return new Pair(legendText, legendOval); - - - - VOID - double - 1750165143690 - f_setDefaultGISBuildingLegendItem - 1430 - 1590 - - false - true - true - - activeDefaultGISBuildingType - OL_GISBuildingTypes - - - legendText - ShapeText - - - legendOval - ShapeOval - - legendText.setVisible(true); -legendOval.setVisible(true); - -switch(activeDefaultGISBuildingType){ - case DETAILED_COMPANY: - legendText.setText("Gedetaileerd bedrijf: " + v_numberOfSurveyCompanies); - legendOval.setFillColor(v_detailedCompanyBuildingColor); - legendOval.setLineColor(v_detailedCompanyBuildingLineColor); - break; - case DEFAULT_COMPANY: - legendText.setText("Standaard bedrijf"); - legendOval.setFillColor(v_companyBuildingColor); - legendOval.setLineColor(v_companyBuildingLineColor); - break; - case HOUSE: - legendText.setText("Huizen"); - legendOval.setFillColor(v_houseBuildingColor); - legendOval.setLineColor(v_houseBuildingLineColor); - break; - case REMAINING: - legendText.setText("Overige gebouwen"); - legendOval.setFillColor(v_restBuildingColor); - legendOval.setLineColor(v_restBuildingLineColor); - break; -} - - - - VOID - double - 1752756002220 - f_setColorsBasedOnCongestion_objects - 1960 - 1800 - - false - true - true - - gis_area - GIS_Object - - if (gis_area.c_containedGridConnections.size() > 0) { - double maxLoad_fr_gis_object = 0; - boolean capacityKnown = false; - - for(GridConnection gc : gis_area.c_containedGridConnections){ - if(gc.v_rapidRunData != null){ - double maxLoad_fr_gc = 0; - double maxLoad_fr_gc_delivery = gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown ? gc.v_rapidRunData.getPeakDelivery_kW()/gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW : 0; - double maxLoad_fr_gc_feedin = gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown ? gc.v_rapidRunData.getPeakFeedin_kW()/gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW : 0; - - switch(rb_mapOverlayLegend_congestion.getValue()){ - case 0: - maxLoad_fr_gc = maxLoad_fr_gc_delivery; - - if(gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ - capacityKnown = true; - } - break; - case 1: - maxLoad_fr_gc = maxLoad_fr_gc_feedin; - if(gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ - capacityKnown = true; - } - break; - case 2: - maxLoad_fr_gc = max(maxLoad_fr_gc_delivery, maxLoad_fr_gc_feedin); - if(maxLoad_fr_gc_delivery > maxLoad_fr_gc_feedin && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ - capacityKnown = true; - } - else if(maxLoad_fr_gc_feedin > maxLoad_fr_gc_delivery && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ - capacityKnown = true; - } - break; - } - if(maxLoad_fr_gc > maxLoad_fr_gis_object){ - maxLoad_fr_gis_object = maxLoad_fr_gc; - } - } - } - - //Set colour based on found parameters - if(!capacityKnown && project_data.project_type() != RESIDENTIAL){ - gis_area.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); - gis_area.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); - } else if (maxLoad_fr_gis_object > 1) { - gis_area.gisRegion.setFillColor(v_gridNodeColorCongested); - gis_area.gisRegion.setLineColor(v_gridLineColorCongested); - } else if (maxLoad_fr_gis_object > 0.7) { - gis_area.gisRegion.setFillColor(v_gridNodeColorStrained); - gis_area.gisRegion.setLineColor(v_gridNodeLineColorStrained); - } else { - gis_area.gisRegion.setFillColor(v_gridNodeColorUncongested); - gis_area.gisRegion.setLineColor(v_gridNodeLineColorUncongested); - } -} - - - VOID - double - 1752756016324 - f_setColorsBasedOnCongestion_gridnodes - 1960 - 1820 - - false - true - true - - gn - GridNode - - - isLiveSim - boolean - - if (gn!=null && gn.gisRegion != null){ - double maxLoad_fr = 0; - if(isLiveSim){ - maxLoad_fr = abs(gn.v_currentLoad_kW)/gn.p_capacity_kW; - } - else{ - J_LoadDurationCurves loadCurves = gn.f_getDuurkrommes(); - double maxLoad_fr_delivery = gn.p_capacity_kW > 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(0))/gn.p_capacity_kW : 0; - double maxLoad_fr_feedin = gn.p_capacity_kW > 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(loadCurves.ds_loadDurationCurveTotal_kW.size()-1))/gn.p_capacity_kW : 0; - - switch(rb_mapOverlayLegend_congestion.getValue()){ - case 0: - maxLoad_fr = maxLoad_fr_delivery; - break; - case 1: - maxLoad_fr = maxLoad_fr_feedin; - break; - case 2: - maxLoad_fr = max(maxLoad_fr_delivery, maxLoad_fr_feedin); - break; - } - } - - if(!isLiveSim && !gn.p_realCapacityAvailable && project_data.project_type() != RESIDENTIAL){ - gn.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); - gn.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); - } else if (maxLoad_fr > 1) { - gn.gisRegion.setFillColor(v_gridNodeColorCongested); - gn.gisRegion.setLineColor(v_gridLineColorCongested); - } else if (maxLoad_fr > 0.7) { - gn.gisRegion.setFillColor(v_gridNodeColorStrained); - gn.gisRegion.setLineColor(v_gridNodeLineColorStrained); - } else { - gn.gisRegion.setFillColor(v_gridNodeColorUncongested); - gn.gisRegion.setLineColor(v_gridNodeLineColorUncongested); - } - - if( gn == v_clickedGridNode && gn != v_previousClickedGridNode){ // dit zorgt ervoor dat de kleuringfunctie correct werkt in zowel live stand als pauze stand - gn.gisRegion.setFillColor( v_selectionColor ); - gn.gisRegion.setLineColor( orange ); - } -} - - - VOID - double - 1752836715726 - f_clearSelectionAndSelectEnergyModel - 50 - 1220 - - false - true - true - v_previousClickedObjectType = v_clickedObjectType; -c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); -c_selectedGridConnections.clear(); -c_selectedObjects.clear(); - -//Deselect previous selection -if( v_previousClickedObjectType != null){ - f_deselectPreviousSelect(); -} - -v_clickedObjectType = OL_GISObjectType.REGION; -uI_Results.f_updateResultsUI(energyModel); - - - - VOID - double - 1752837115143 - f_styleLVLV - -650 - 470 - - false - true - true - - gisregion - GISRegion - - gisregion.setLineStyle( LINE_STYLE_SOLID ); -gisregion.setLineColor( v_LVLVLineColor ); -gisregion.setLineWidth(2); -gisregion.setFillColor(v_LVLVNodeColor); - - - VOID - double - 1753085860778 - f_initializeMapOverlayRadioButton - 1920 - 1450 - - false - true - true - //Set active map overlay types if they are set in the project settings -if(settings.activeMapOverlayTypes() != null && settings.activeMapOverlayTypes().size() > 0){ - c_loadedMapOverlayTypes = new ArrayList<OL_MapOverlayTypes>(settings.activeMapOverlayTypes()); - if(!c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.DEFAULT)){ - c_loadedMapOverlayTypes.add(0, OL_MapOverlayTypes.DEFAULT); // Force default to be available - } -} -else{//Take the default - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.DEFAULT); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.ELECTRICITY_CONSUMPTION); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.PV_PRODUCTION); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.GRID_NEIGHBOURS); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.CONGESTION); - if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.PARKING_TYPE); - } -} - - -//Adjust the visualisation of the radiobuttons -Presentable presentable = gr_mapOverlayLegenda.getPresentable(); -boolean ispublic = true; -double x = 756; -double y = c_loadedMapOverlayTypes.size() < 6 ? 837 : 837 - 18; -double width = 130; -double height = 0;//Not needed, automatically adjust by adding options -Color textColor = Color.BLACK; -boolean enabled = true; -Font font = new Font("Dialog", Font.PLAIN, 11); -boolean vertical = true; - - -//Set words for the radiobutton options -List<String> RadioButtonOptions_list = new ArrayList<String>(); -for(OL_MapOverlayTypes mapOverlayType : c_loadedMapOverlayTypes){ - switch(mapOverlayType){ - case DEFAULT: - RadioButtonOptions_list.add("Standaard"); - break; - case ELECTRICITY_CONSUMPTION: - RadioButtonOptions_list.add("Elektriciteitsverbruik"); - break; - case PV_PRODUCTION: - RadioButtonOptions_list.add("PV Opwek"); - break; - case GRID_NEIGHBOURS: - RadioButtonOptions_list.add("Energie Buren"); - break; - case CONGESTION: - RadioButtonOptions_list.add("Netbelasting"); - break; - case ENERGY_LABEL: - RadioButtonOptions_list.add("Energielabel"); - break; - case PARKING_TYPE: - RadioButtonOptions_list.add("Parkeer type"); - break; - } -} - -String[] RadioButtonOptions = RadioButtonOptions_list.toArray(String[]::new); - -//Create the radiobutton and set the correct action. -rb_mapOverlay = new ShapeRadioButtonGroup(presentable, ispublic, x ,y, width, height, textColor, enabled, font, vertical, RadioButtonOptions){ - @Override - public void action() { - f_setMapOverlay(); - } -}; - -presentation.add(rb_mapOverlay); - -//For now: Adjust location of radiobutton title if 6 buttons -if(c_loadedMapOverlayTypes.size() > 5){ - gr_colorings.setY(-17); -} - - - VOID - double - 1753096794863 - f_setMapOverlay - 1920 - 1540 - - false - true - true - //reset legend -gr_defaultLegenda.setVisible(false); -gr_mapOverlayLegend_ElectricityConsumption.setVisible(false); -gr_mapOverlayLegend_PVProduction.setVisible(false); -gr_mapOverlayLegend_gridNeighbours.setVisible(false); -gr_mapOverlayLegend_congestion.setVisible(false); -gr_mapOverlayLegend_EnergyLabel.setVisible(false); -b_updateLiveCongestionColors = false; - -if(!b_inEnergyHubMode){ - f_clearSelectionAndSelectEnergyModel(); -} - -//Get selected map overlay type, based on loaded order of the radio buttons -OL_MapOverlayTypes selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); - -//Set the correct map overlay -switch(selectedMapOverlayType){ - case DEFAULT: - f_setMapOverlay_Default(); - break; - case ELECTRICITY_CONSUMPTION: - f_setMapOverlay_ElectricityConsumption(); - break; - case PV_PRODUCTION: - f_setMapOverlay_PVProduction(); - break; - case GRID_NEIGHBOURS: - f_setMapOverlay_GridTopology(); - break; - case CONGESTION: - f_setMapOverlay_Congestion(); - break; - case ENERGY_LABEL: - f_setMapOverlay_EnergyLabel(); - break; - case PARKING_TYPE: - f_setMapOverlay_ParkingType(); - break; -} - - - VOID - double - 1753097345978 - f_setMapOverlay_ElectricityConsumption - 1940 - 1590 - - false - true - true - //Set legend -b_updateLiveCongestionColors = true; -gr_mapOverlayLegend_ElectricityConsumption.setVisible(true); - -//Colour gis objects -if (project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnConsumptionProfileHouseholds(building); - } -} -else { - if(energyModel.v_rapidRunData == null){ - f_setErrorScreen("Dit overzicht wordt pas beschikbaar na het uitvoeren van een jaarsimulatie. In plaats daarvan is de standaard kaart geselecteerd.", 0, 0); - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); - return; - } - gr_mapOverlayLegend_ElectricityConsumption.setVisible(true); - for (GIS_Building building : energyModel.pop_GIS_Buildings){ - if(building.gisRegion.isVisible()){ - f_setColorsBasedOnElectricityConsumption(building); - } - } - /*for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_setColorsBasedOnConsumpion(object); - }*/ -} - - - VOID - double - 1753097409446 - f_setMapOverlay_PVProduction - 1940 - 1660 - - false - true - true - //Set legend -b_updateLiveCongestionColors = true; -gr_mapOverlayLegend_PVProduction.setVisible(true); - -//Colour gis objects -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnProduction(building); -} -/*for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_setColorsBasedOnProduction(object); -}*/ - - - VOID - double - 1753097484078 - f_setMapOverlay_GridTopology - 1940 - 1710 - - false - true - true - //Set legend -gr_mapOverlayLegend_gridNeighbours.setVisible(true); -b_updateLiveCongestionColors = false; - -//Colour gis objects -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnGridTopology_objects(building); -} -/*for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_setColorsBasedOnGridTopology_objects(object); -}*/ -for (GridNode GN : energyModel.pop_gridNodes){ - f_setColorsBasedOnGridTopology_gridnodes(GN); -} - - - VOID - double - 1753097518541 - f_setMapOverlay_Congestion - 1940 - 1780 - - false - true - true - if(energyModel.v_rapidRunData == null){ - f_setErrorScreen("Dit overzicht wordt pas beschikbaar na het uitvoeren van een jaarsimulatie. In plaats daarvan is de standaard kaart geselecteerd.", 0, 0); - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); - return; -} - -//Set legend -gr_mapOverlayLegend_congestion.setVisible(true); -b_updateLiveCongestionColors = false; - -//Colour gis objects -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnCongestion_objects(building); -} -/* -for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_setColorsBasedOnCongestion_objects(object); -} -*/ -for (GridNode GN : energyModel.pop_gridNodes){ - f_setColorsBasedOnCongestion_gridnodes(GN, false); -} - - - VOID - double - 1753097561639 - f_setMapOverlay_Default - 1940 - 1565 - - false - true - true - b_updateLiveCongestionColors = true; -gr_defaultLegenda.setVisible(true); -for (GIS_Building b: energyModel.pop_GIS_Buildings) { - f_styleAreas(b); -} -/*for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_styleAreas(object); -}*/ - - - VOID - double - 1753108764992 - f_setMapOverlay_EnergyLabel - 1940 - 1850 - - false - true - true - //Set legend -b_updateLiveCongestionColors = true; -gr_mapOverlayLegend_EnergyLabel.setVisible(true); - -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnEnergyLabels(building); -} - - - VOID - double - 1753440028514 - f_setShapePresentationOnTop - -640 - -60 - - false - true - true - - shape - Shape - - presentation.remove(shape); -presentation.insert(presentation.size(), shape); - - - VOID - double - 1753713001191 - f_updateOrderedListsAfterDeserialising - true - 80 - -490 - - false - true - true - - newEnergyModel - EnergyModel - - // Update references of GClists -for (int i=0; i< c_orderedPVSystemsHouses.size(); i++) { - String GCid = c_orderedPVSystemsHouses.get(i).p_gridConnectionID; - c_orderedPVSystemsHouses.set(i,findFirst(newEnergyModel.Houses, x->x.p_gridConnectionID == GCid)); -} - -for (int i=0; i< c_orderedPVSystemsCompanies.size(); i++) { - String GCid = c_orderedPVSystemsCompanies.get(i).p_gridConnectionID; - c_orderedPVSystemsCompanies.set(i,findFirst(newEnergyModel.UtilityConnections, x->x.p_gridConnectionID == GCid)); -} - -for (int i=0; i< c_orderedHeatingSystemsCompanies.size(); i++) { - String GCid = c_orderedHeatingSystemsCompanies.get(i).p_gridConnectionID; - c_orderedHeatingSystemsCompanies.set(i,findFirst(newEnergyModel.UtilityConnections, x->x.p_gridConnectionID == GCid)); -} - -for (int i=0; i< c_orderedHeatingSystemsHouses.size(); i++) { - String GCid = c_orderedHeatingSystemsHouses.get(i).p_gridConnectionID; - c_orderedHeatingSystemsHouses.set(i,findFirst(newEnergyModel.Houses, x->x.p_gridConnectionID == GCid)); -} - -for (int i=0; i< c_orderedPublicChargers.size(); i++) { - String GCid = c_orderedPublicChargers.get(i).p_gridConnectionID; - c_orderedPublicChargers.set(i,findFirst(newEnergyModel.PublicChargers, x->x.p_gridConnectionID == GCid)); -} - -// TODO: Update references of J_EAlists - - - - VOID - double - 1753440184174 - f_initializePresentationOrder - -660 - 200 - - false - true - true - //Set order of certain layovers and submenus -f_setShapePresentationOnTop(map); -f_setShapePresentationOnTop(gr_zoomButton); -f_setShapePresentationOnTop(gr_sliderClickBlocker); -f_setShapePresentationOnTop(gr_forceMapSelection); -f_setShapePresentationOnTop(gr_filterInterface); -f_setShapePresentationOnTop(gr_infoText); - - - - VOID - double - 1753445407428 - f_setForcedClickScreenVisibility - 140 - -860 - - false - true - true - - showForcedClickScreen - boolean - - gr_forceMapSelection.setVisible(showForcedClickScreen); - - - VOID - double - 1753446312775 - f_selectEnergyHubGC - 2240 - -2090 - - false - true - true - - clickx - double - - - clicky - double - - if(b_inManualFilterSelectionMode){ - f_selectManualFilteredGC(clickx, clicky); -} -else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || - c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ - f_selectGridLoop(clickx, clicky); - } - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - f_selectNeighborhood(clickx, clicky); - } -} - - - VOID - double - 1753698716095 - f_startEnergyHubConfiguration - 2240 - -2180 - - false - true - true - pauseSimulation(); - -b_inEnergyHubMode = true; -b_inEnergyHubSelectionMode = true; - -f_setForcedClickScreenText(""); -f_setForcedClickScreenVisibility(true); - -cb_showFilterInterface.setSelected(true, true); -gr_filterInterface.setPos(170, 580); - - - VOID - double - 1753698810590 - f_finalizeEnergyHubConfiguration - 2240 - -2060 - - false - true - true - if(b_inEnergyHubSelectionMode){ - if(button_completeManualSelectionMode.isVisible()){ - button_completeManualSelectionMode.action(); - } - - - //Move scenario radiobuttons over - f_getScenarioButtons().setPos( - gr_energyHubPresentation.getX() + uI_EnergyHub.rect_scenarios.getX() + 25.0, - gr_energyHubPresentation.getY() + uI_EnergyHub.rect_scenarios.getY() + 50.0 - ); - - //Set map in correct pos and navigate to e-hub view - map.setPos( - gr_energyHubPresentation.getX() + uI_EnergyHub.rect_map.getX() + 10.0, - gr_energyHubPresentation.getY() + uI_EnergyHub.rect_map.getY() + 10.0 - ); - map.setScale( 0.85, 0.85 ); - va_EHubDashboard.navigateTo(); - v_currentViewArea = va_EHubDashboard; - - //Copy selected GC and coop to e-hub dashboard - v_customEnergyCoop.p_actorID = "eHubConfiguratorCoop"; - uI_EnergyHub.v_energyHubCoop = v_customEnergyCoop; - - //Set E-hub selection mode false - b_inEnergyHubSelectionMode = false; - - uI_EnergyHub.f_initializeEnergyHubDashboard(); -} - - - - VOID - ArrayList<GridConnection> - 1753713085487 - f_updateGClistAfterDeserialisation - true - 95 - -470 - - false - true - true - - GClist - ArrayList<? extends GridConnection> - - - newEnergyModel - EnergyModel - - for (int i=0; i< GClist.size(); i++) { - String GCid = GClist.get(i).p_gridConnectionID; - GClist.set(i,findFirst(newEnergyModel.c_gridConnections, x->x.p_gridConnectionID == GCid)); -} - - - - - VOID - ArrayList<GridConnection> - 1753713662613 - f_updateJ_EAlistAfterDeserialisation - true - 110 - -450 - - false - true - true - - EAlist - ArrayList<J_EA> - - - newEnergyModel - EnergyModel - - for (int i=0; i< EAlist.size(); i++) { - String GCid = EAlist.get(i).getParentAgent();p_gridConnectionID; - EAlist.set(i,findFirst(newEnergyModel.c_gridConnections, x->x.p_gridConnectionID == GCid)); -} - - - - - VOID - double - 1753881971788 - f_createUITabs_default - -650 - 620 - - false - true - true - // CHOOSE WHICH TABS YOU WANT TO BE ABLE TO SHOW FOR YOUR PROJECT -// (OVERRIDE FUNCTION IN CHILD IF YOU WANT OTHER THAN DEFAULT) - -// Adding the (child) tabs to the tabArea population - -// If you use an extension of a tab, you must update the pointer to the instance of the interface -// Something like: tabElectricity.zero_Interface = loader_Project.zero_Interface; -// No update to the pointer is needed for the generic tabs - - -uI_Tabs.add_pop_tabElectricity(); -uI_Tabs.add_pop_tabHeating(); -uI_Tabs.add_pop_tabMobility(); - -// Group visibilities -// When using an extension of a generic tab don't forget to typecast it! -if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { - ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_ResidentialArea().setVisible(true); - ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersResidentialArea().setVisible(true); - ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_residential().setVisible(true); -} -else { - uI_Tabs.add_pop_tabEHub(); - ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_Businesspark().setVisible(true); - ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersCompanies().setVisible(true); - ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_default().setVisible(true); - ((tabEHub)uI_Tabs.pop_tabEHub.get(0)).getGroupHubSliders().setVisible(true); -} - - - VOID - double - 1753882411689 - f_initializePrivateAndPublicParkingCarsOrder - 85 - -590 - - false - true - true - //Get all public and private parked cars -c_orderedVehiclesPrivateParking = new ArrayList<J_EAVehicle>(); -List<J_EADieselVehicle> allPublicParkedCars = new ArrayList<J_EADieselVehicle>(); -for (GCHouse house : energyModel.Houses) { - if (house.p_eigenOprit) { - c_orderedVehiclesPrivateParking.addAll(house.c_vehicleAssets); - } - else{ - allPublicParkedCars.addAll(house.c_dieselVehicles); - } -} - -//Shuffle the collections to not have skewed initialization -//Collections.shuffle(c_orderedVehiclesPrivateParking); -//Collections.shuffle(allPublicParkedCars); - -//Get the total amount of public chargers -int totalChargers = c_orderedPublicChargers.size(); - -if(totalChargers > 0){ - // Fair distribution of vehicles across chargers - List<Integer> numberOfCarsPerCharger = f_getNumberOfCarsPerCharger(allPublicParkedCars.size(), totalChargers); - - // Assign vehicles to chargers - c_mappingOfVehiclesPerCharger.clear(); - int index = 0; - for (int i = 0; i < totalChargers; i++) { - GCPublicCharger charger = c_orderedPublicChargers.get(i); - int numberOfCars = numberOfCarsPerCharger.get(i); - - List<J_EADieselVehicle> assignedCars = new ArrayList<>(allPublicParkedCars.subList(index, index + numberOfCars)); - c_mappingOfVehiclesPerCharger.put(charger.p_uid, assignedCars); - - // Place vehicles depending on whether the charger is active - if (charger.v_isActive) { - for (J_EADieselVehicle car : assignedCars) { - J_ActivityTrackerTrips tripTracker = car.getTripTracker(); //Needed, as triptracker is removed when removeEnergyAsset is called. - car.removeEnergyAsset(); - car.setTripTracker(tripTracker);//Re-set the triptracker again, for storing. - } - } - - index += numberOfCars; - } -} - - - - VOID - double - 1753884000493 - f_simulateYearFromMainInterface - 1980 - 390 - - false - true - true - -gr_simulateYear.setVisible(false); -gr_loadIconYearSimulation.setVisible(true); - -new Thread( () -> { - //Run rapid run - energyModel.f_runRapidSimulation(); - - //After rapid run: remove loading screen - f_removeAllSimulateYearScreens(); - - if (c_selectedGridConnections.size() == 0){//Update main area collection - uI_Results.f_updateResultsUI(energyModel); - } - else if (c_selectedGridConnections.size() == 1){//Update selected GC area collection - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } - else if(c_selectedGridConnections.size() > 1){//Update COOP area collection - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - if (uI_EnergyHub != null && uI_EnergyHub.v_energyHubCoop != null) { - uI_EnergyHub.uI_Results.f_updateResultsUI(uI_EnergyHub.v_energyHubCoop); - } - - //Update and show kpi summary chart after run - if(settings.showKPISummary() != null && settings.showKPISummary() && v_clickedObjectType != OL_GISObjectType.GRIDNODE){ - uI_Results.getCheckbox_KPISummary().setSelected(true, true); - } - - //Enable radio buttons again - uI_Results.f_enableNonLivePlotRadioButtons(true); - if(uI_EnergyHub != null){ - uI_EnergyHub.uI_Results.f_enableNonLivePlotRadioButtons(true); - } - if(uI_Company != null){ - uI_Company.uI_Results.f_enableNonLivePlotRadioButtons(true); - } - - b_resultsUpToDate = true; -}).start(); - - - VOID - double - 1753951802256 - f_initialPTSystemsOrder_households - 85 - -670 - - false - true - true - List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); -List<GCHouse> housesWithoutPT = houses.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW) ).collect(Collectors.toList()); -List<GCHouse> housesWithPT = new ArrayList<>(houses); -housesWithPT.removeAll(housesWithoutPT); - -c_orderedPTSystemsHouses = new ArrayList<>(housesWithoutPT); -c_orderedPTSystemsHouses.addAll(housesWithPT); - - - - VOID - double - 1754312747144 - f_setMapOverlay_ParkingType - 1940 - 1900 - - false - true - true - //Set legend -b_updateLiveCongestionColors = true; - -//Colour gis objects -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnParkingType_objects(building); -} -for (GridNode GN : energyModel.pop_gridNodes){ - f_setColorsBasedOnParkingType_gridnodes(GN); -} - - - VOID - double - 1754312755135 - f_setColorsBasedOnParkingType_objects - 1960 - 1920 - - false - true - true - - gis_area - GIS_Object - - if (gis_area.c_containedGridConnections.size() > 0) { - - //Unkown by default - Color objectColor = v_parkingSpaceColor_unkown; - Color objectLineColor = v_parkingSpaceLineColor_unkown; - - //Check if houses and if public parking - boolean containsHouses = false; - boolean containsHousesWithPublicParking = false; - for(GridConnection gc : gis_area.c_containedGridConnections){ - if(gc instanceof GCHouse){ - containsHouses = true; - if(!((GCHouse)gc).p_eigenOprit){ - containsHousesWithPublicParking = true; - } - } - } - - //Change color based on parking type if houses present - if(containsHouses){ - if(containsHousesWithPublicParking){ - objectColor = v_parkingSpaceColor_public; - objectLineColor = v_parkingSpaceLineColor_public; - } - else{ - objectColor = v_parkingSpaceColor_private; - objectLineColor = v_parkingSpaceLineColor_private; - } - } - gis_area.f_style(objectColor, objectLineColor, null, null); -} - - - VOID - double - 1754314128315 - f_setColorsBasedOnParkingType_gridnodes - 1960 - 1940 - - false - true - true - - GN - GridNode - - if(GN.gisRegion != null){ - GN.gisRegion.setFillColor(v_parkingSpaceColor_unkown); - GN.gisRegion.setLineColor(v_parkingSpaceLineColor_unkown); -} - - - RETURNS_VALUE - List<Integer> - 1756122011053 - f_getNumberOfCarsPerCharger - 110 - -570 - - false - true - true - - totalPublicParkedCars - int - - - totalPublicChargers - int - - List<Integer> numberOfCarsPerCharger = new ArrayList<>(); -if(totalPublicChargers > 0){ - - - int baseNumberOfCars = (int) floor(totalPublicParkedCars / totalPublicChargers); //Could also simply be totalPublicParkedCars / totalPublicChargers, as int/int is already floored, but just to make sure what should happen here it is written in full - int remainingCars = totalPublicParkedCars % totalPublicChargers; // extra vehicles that can be distributed - - for (int i = 0; i < totalPublicChargers; i++) { - if (i < remainingCars) { - numberOfCarsPerCharger.add(baseNumberOfCars + 1); // some chargers get one extra - } else { - numberOfCarsPerCharger.add(baseNumberOfCars); - } - } -} - -return numberOfCarsPerCharger; - - - RETURNS_VALUE - ShapeRadioButtonGroup - 1756369604291 - f_getScenarioButtons - -1020 - 100 - - false - true - true - return rb_scenarios; - - - VOID - double - 1756994047356 - f_enableAllPlots - -290 - 680 - - false - true - true - - resultsUI - UI_Results - - - selectedObjectInterface - I_EnergyData - - if (resultsUI.f_getSelectedObjectData() != null) { - uI_Results.f_updateResultsUI(selectedObjectInterface); - uI_Results.f_enableNonLivePlotRadioButtons(true); -} - - - VOID - double - 1756995218301 - f_setAllSimulateYearScreens - -290 - 700 - - false - true - true - gr_simulateYear.setVisible(true); -if(uI_EnergyHub != null){ - uI_EnergyHub.gr_simulateYearEnergyHub.setVisible(true); -} -if(uI_Company != null){ - uI_Company.gr_simulateYearScreen.setVisible(true); -} - - - VOID - double - 1756997038652 - f_removeAllSimulateYearScreens - -290 - 720 - - false - true - true - gr_simulateYear.setVisible(false); -gr_loadIconYearSimulation.setVisible(false); -if(uI_EnergyHub != null){ - uI_EnergyHub.gr_simulateYearEnergyHub.setVisible(false); - uI_EnergyHub.gr_loadIconYearSimulationEnergyHub.setVisible(false); -} -if(uI_Company != null){ - uI_Company.gr_simulateYearScreen.setVisible(false); - uI_Company.gr_loadIcon.setVisible(false); -} - - - VOID - double - 1760014973975 - f_cancelEnergyHubConfiguration - 2250 - -2160 - - false - true - true - button_clearFilters.action(); - -b_inEnergyHubMode = false; -b_inEnergyHubSelectionMode = false; - -f_setForcedClickScreenText(""); -f_setForcedClickScreenVisibility(false); - -cb_showFilterInterface.setSelected(false, true); - - - VOID - double - 1760085891920 - f_filterHasEV - -1550 - 270 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.c_electricVehicles.size() > 0)); -//Werkt nog niet helemaal naar behoren, want ghost assets worden nog niet aangemaakt, -//en dus hebben bedrijven met ghost ev geen c_electricVehicles en dus komen niet door deze filter. -// --> Als ghost vehicles ook worden aangemaakt, werkt het wel. - - - VOID - double - 1760955904715 - f_initializeAdditionalVehicles - 85 - -520 - - false - true - true - for(GridConnection GC : energyModel.UtilityConnections){ - c_additionalVehicles.put(GC.p_uid, new ArrayList<J_EAVehicle>()); -} - - - VOID - double - 1760978860758 - f_createAdditionalUIs - -280 - 400 - - false - true - true - //Energy hub dashboard -if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ - uI_EnergyHub = add_pop_UI_EnergyHub(); -} - -//Private companyUI dashboard -if(energyModel.UtilityConnections.size() > 0){ - uI_Company = add_pop_UI_Company(); -} - -/* -//Hydrogen dashboard NOT FINISHED -for(GCEnergyConversion conversionGC : energyModel.EnergyConversionSites){ - for(J_EAConversion conversionEA : conversionGC.c_conversionAssets){ - if(conversionEA instanceof J_EAConversionElectrolyser){ - uI_Hydrogen = add_pop_UI_Hydrogen(); - break; - } - } -} - -//Battery dashboard NOT FINISHED -for(GCGridBattery batteryGC : energyModel.GridBatteries){ - if(batteryGC.c_connectedGISObjects.size()>0){ - uI_Battery = add_pop_UI_Battery(); - break; - } -} -*/ - - - VOID - double - 1761060882101 - f_setCompaniesScenario - -1160 - 445 - - false - true - true - - scenarioMap - LinkedHashMap - - //Solution for now -int companyUIScenarioRBIndex = 0; -if(scenarioMap == c_scenarioMap_Current){ - companyUIScenarioRBIndex = 0; -} -else if(scenarioMap == c_scenarioMap_Future){ - companyUIScenarioRBIndex = 1; -} -else{ - throw new RuntimeException("Tried to call the setCompaniesScenario function with a non existing companyUI scenario"); -} - -//Set companyUI to correct radio button setting -uI_Company.b_runningMainInterfaceScenarioSettings = true; -for (GCUtility GC : energyModel.UtilityConnections){ - uI_Company.f_setCompanyUI(GC); - uI_Company.getRb_scenariosPrivateUI().setValue(companyUIScenarioRBIndex, true); -} -uI_Company.b_runningMainInterfaceScenarioSettings = false; - - - VOID - double - 1761117997540 - f_initializeScenarioRadioButton - -1180 - 60 - - false - true - true - //Set the default visualisation of the radiobuttons -Presentable presentable = this.presentation.getPresentable(); -boolean ispublic = true; -double x = rb_scenarios_template.getX(); -double y = rb_scenarios_template.getY(); -double width = rb_scenarios_template.getWidth(); -double height = 0;//Not needed, automatically adjust by adding options -Color textColor = Color.BLACK; -boolean enabled = true; -Font font = new Font("Dialog", Font.PLAIN, 14); -boolean vertical = true; - -//Set words for the radiobutton options -String[] RadioButtonOptions = f_getScenarioOptions(); - -//Check if it contains the custom option -boolean containsCustomOption = false; -for(String scenarioOption : RadioButtonOptions){ - if(scenarioOption.equals("Custom")){ - containsCustomOption = true; - } -} - -if(!containsCustomOption){ - traceln("WARNING: Scenario radiobutton option 'Custom' was not included in the custom scenario options, it has automatically been added!"); - RadioButtonOptions = Arrays.copyOf(RadioButtonOptions, RadioButtonOptions.length + 1); - RadioButtonOptions[RadioButtonOptions.length - 1] = "Custom"; -} - -//Create the radiobutton and set the correct action. -rb_scenarios = new ShapeRadioButtonGroup(presentable, ispublic, x ,y, width, height, textColor, enabled, font, vertical, RadioButtonOptions){ - @Override - public void action() { - f_scenarioRadioButtonAction(); - } -}; - -presentation.add(rb_scenarios); - -//For now: Adjust location of radiobutton title if 6 buttons -if(c_loadedMapOverlayTypes.size() > 5){ - gr_colorings.setY(-17); -} - - - RETURNS_VALUE - String - 1761119066060 - f_setSelectedScenario - -1170 - 200 - - false - true - true - //Default scenario switch statement, override this function if you want to add/change scenario options! -String selected_scenario = ""; - -switch(rb_scenarios.getValue()){ - case 0: - selected_scenario = "Huidige situatie"; - f_setScenario_Current(); - - break; - case 1: - if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ - selected_scenario = "Toekomstplannen"; - f_setScenario_Future(); - } - else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - selected_scenario = "Custom"; - t_scenarioDescription.setText(t_scenario_custom); - } - break; - case 2: - selected_scenario = "Custom"; - t_scenarioDescription.setText(t_scenario_custom); - break; - - default: - traceln("Unsupported scenario selected"); -} - -return selected_scenario; - - - RETURNS_VALUE - String[] - 1761119264046 - f_getScenarioOptions - -1150 - 80 - - false - true - true - //OVERRIDE THIS FUNCTION IF YOU WANT TO ADJUST THE SCENARIO OPTIONS. -// -> MAKE SURE TO ALWAYS INCLUDE A CUSTOM -String[] scenarioOptions = null; -if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ - scenarioOptions = new String[]{"Huidige situatie", "Toekomstplannen", "Custom"}; -} -else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - scenarioOptions = new String[]{"Huidige situatie", "Custom"}; -} -return scenarioOptions; - - - VOID - double - 1761119479231 - f_setScenario_Future - -1160 - 270 - - false - true - true - if(c_scenarioMap_Future != null){ - f_setCompaniesScenario(c_scenarioMap_Future); -} -//Set specifc assets active/non-active -f_projectSpecificScenarioSettings("Future"); - -//Set the scenario text -t_scenarioDescription.setText(t_scenario_future); - - - VOID - double - 1761119479233 - f_setScenario_Current - -1160 - 225 - - false - true - true - if(c_scenarioMap_Current != null){ - f_setCompaniesScenario(c_scenarioMap_Current); -} -//Reset sliders for households -if(project_data.project_type() == OL_ProjectType.RESIDENTIAL && p_residentialScenario_Current != null){ - f_setResidentialScenario_Current(); -} - - -//Set specifc assets active/non-active -f_projectSpecificScenarioSettings("Current"); - -//Set the scenario text -t_scenarioDescription.setText(t_scenario_current); - - - VOID - double - 1761119842140 - f_resetSpecialSlidersAndButtons - -1160 - 365 - - false - true - true - uI_Tabs.pop_tabEHub.get(0).getButton_remove_nfato().action(); - - - - - - - -//Project specific sliders and buttons reset -f_resetProjectSpecificSlidersAndButtons(); - - - VOID - double - 1761121949197 - f_resetProjectSpecificSlidersAndButtons - -1140 - 385 - - false - true - true - //OVERRIDE THIS FUNCTION IF YOU WANT TO RESET CERTAIN CUSTOM SLIDERS -//AND BUTTONS THAT ARE NOT IN THE GENERIC LOADERFACE - - - VOID - double - 1761122139097 - f_projectSpecificScenarioSettings - -1160 - 415 - - false - true - true - - selectedScenario - String - - //OVERRIDE IF THIS IS NEEDED FOR YOUR SPECIFIC PROJECT - -//Example code: -/* -//Find specific scenario assets -GridConnection testGC_new = findFirst(energyModel.UtilityConnections, GC -> GC.p_gridConnectionID.equals("testGC_nieuwBouw")); -GIS_Building testBuilding_additionalBuilding = findFirst(energyModel.pop_GIS_Buildings, B -> B.p_id.equals("testBuilding_additionalBuilding")); - -switch(selectedScenario){ - case "Current": - //Pause assets - testGC_new.f_setActive(false); - testBuilding_additionalBuilding.gisRegion.setVisible(false); - break; - - case "Future": - //Unpause assets - testGC_new.f_setActive(true); - testBuilding_additionalBuilding.gisRegion.setVisible(true); - break; -} -*/ - - - - VOID - double - 1761132028131 - f_setResidentialScenario_Current - -1160 - 465 - - false - true - true - ////Electricity -tabElectricity tabElec = uI_Tabs.pop_tabElectricity.get(0); - -double pv_pct = p_residentialScenario_Current.getHousesWithPV_pct(); -tabElec.sl_householdPVResidentialArea_pct.setValue(roundToInt(pv_pct), true); - -double battery_pct = p_residentialScenario_Current.getPvHousesWithBattery_pct(); -tabElec.sl_householdBatteriesResidentialArea_pct.setValue(roundToInt(battery_pct), true); - -//Electric cooking -double cooking_pct = p_residentialScenario_Current.getCooking_pct(); -tabElec.sl_householdElectricCookingResidentialArea_pct.setValue(roundToInt(cooking_pct), true); - -//Consumption growth -double electricityDemandIncrease_pct = p_residentialScenario_Current.getElectricityDemandIncrease_pct(); -tabElec.sl_electricityDemandIncreaseResidentialArea_pct.setValue(roundToInt(electricityDemandIncrease_pct), true); - -//Gridbatteries -double averageNeighbourhoodBatterySize_kWh = p_residentialScenario_Current.getAverageNeighbourhoodBatterySize_kWh(); -tabElec.sl_gridBatteriesResidentialArea_kWh.setValue(averageNeighbourhoodBatterySize_kWh, true); - -////Heating -tabHeating tabHeat = uI_Tabs.pop_tabHeating.get(0); - -double housesWithGasBurners_pct = p_residentialScenario_Current.getHousesWithGasBurners_pct(); -double housesWithHybridHeatpump_pct = p_residentialScenario_Current.getHousesWithHybridHeatpump_pct(); -double housesWithElectricHeatpump_pct = p_residentialScenario_Current.getHousesWithElectricHeatpump_pct(); -boolean cb_householdHTDistrictHeatingActive = p_residentialScenario_Current.getCb_householdHTDistrictHeatingActive(); -boolean cb_householdLTDistrictHeatingActive = p_residentialScenario_Current.getCb_householdLTDistrictHeatingActive(); - -if(cb_householdHTDistrictHeatingActive || cb_householdLTDistrictHeatingActive){ - tabHeat.sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, false); - tabHeat.sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, false); - tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, false); - if(cb_householdHTDistrictHeatingActive){ - tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); - tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, true); - } - else if(cb_householdLTDistrictHeatingActive){ - tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); - tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, true); - } -} -else{ - tabHeat.sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, true); - tabHeat.sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, true); - tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, true); - tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); - tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, false); -} - - -//Houses with Airco -double pctOfHousesWithAirco = p_residentialScenario_Current.getHousesWithAirco_pct(); -tabHeat.sl_householdAircoResidentialArea_pct.setValue(pctOfHousesWithAirco, true); - -//Houses with better isolation -double pctOfHousesWithImprovedInsulation = p_residentialScenario_Current.getHousesWithImprovedInsulation_pct(); -tabHeat.sl_householdHeatDemandReductionResidentialArea_pct.setValue(roundToInt(pctOfHousesWithImprovedInsulation), true); - -//PT -double nbHousesWithPT_pct = p_residentialScenario_Current.getNbHousesWithPT_pct(); -tabHeat.sl_rooftopPTHouses_pct.setValue(roundToInt(nbHousesWithPT_pct), true); - - - -////Mobility -tabMobility tabMob = uI_Tabs.pop_tabMobility.get(0); - -//Private EV -double privateEVs_pct = p_residentialScenario_Current.getPrivateEVs_pct(); -double privateEVsThatSupportV2G_pct = p_residentialScenario_Current.getPrivateEVsThatSupportV2G_pct(); -tabMob.sl_privateEVsResidentialArea_pct.setValue(roundToInt(privateEVs_pct), true); -tabMob.sl_EVsThatSupportV2G_pct.setValue(roundToInt(privateEVsThatSupportV2G_pct), true); - -//Selected charging mode -String selectedChargingAttitudeStringPrivateEV = p_residentialScenario_Current.getSelectedChargingAttitudeStringPrivateEVs(); -boolean V2GActivePrivateEV = p_residentialScenario_Current.getV2GActivePrivateEVs(); - -tabMob.cb_chargingAttitudePrivateParkedCars.setValue(selectedChargingAttitudeStringPrivateEV, true); -tabMob.cb_activateV2GPrivateParkedCars.setSelected(V2GActivePrivateEV, true); - -//Chargers -double activePublicChargers_pct = p_residentialScenario_Current.getActivePublicChargers_pct(); -tabMob.sl_publicChargersResidentialArea_pct.setValue(roundToInt(activePublicChargers_pct), true); - -double V1G_pct = p_residentialScenario_Current.getChargersV1G_pct(); -double V2G_pct = p_residentialScenario_Current.getChargersV2G_pct(); -tabMob.sl_chargersThatSupportV1G_pct.setValue(roundToInt(V1G_pct), true); -tabMob.sl_chargersThatSupportV2G_pct.setValue(roundToInt(V2G_pct), true); - -//Selected charging mode -String selectedChargingAttitudeStringChargers = p_residentialScenario_Current.getSelectedChargingAttitudeStringChargers(); -boolean V2GActiveChargers = p_residentialScenario_Current.getV2GActiveChargers(); - -tabMob.cb_chargingAttitudePrivatePublicChargers.setValue(selectedChargingAttitudeStringChargers, true); -tabMob.cb_activateV2GPublicChargers.setSelected(V2GActiveChargers, true); - - - VOID - double - 1761134737334 - f_storeResidentialScenario_Current - -1180 - 130 - - false - true - true - //Create the class that will store the initial slider settings of a residential model -p_residentialScenario_Current = new J_SliderSettings_Residential(); - -////Electricity -if(uI_Tabs.pop_tabElectricity.size() > 0){ - tabElectricity tabElec = uI_Tabs.pop_tabElectricity.get(0); - - double housesWithPV_pct = tabElec.sl_householdPVResidentialArea_pct.getValue(); - p_residentialScenario_Current.setHousesWithPV_pct(housesWithPV_pct); - - double pvHousesWithBattery_pct = tabElec.sl_householdBatteriesResidentialArea_pct.getValue(); - p_residentialScenario_Current.setPvHousesWithBattery_pct(pvHousesWithBattery_pct); - - - //Electric cooking - double cooking_pct = tabElec.sl_householdElectricCookingResidentialArea_pct.getValue(); - p_residentialScenario_Current.setCooking_pct(cooking_pct); - - //Consumption growth - double electricityDemandIncrease_pct = tabElec.sl_electricityDemandIncreaseResidentialArea_pct.getValue(); - p_residentialScenario_Current.setElectricityDemandIncrease_pct(electricityDemandIncrease_pct); - - //Gridbatteries - double averageNeighbourhoodBatterySize_kWh = tabElec.sl_gridBatteriesResidentialArea_kWh.getValue(); - p_residentialScenario_Current.setAverageNeighbourhoodBatterySize_kWh(averageNeighbourhoodBatterySize_kWh); -} - -////Heating -if(uI_Tabs.pop_tabHeating.size() > 0){ - tabHeating tabHeat = uI_Tabs.pop_tabHeating.get(0); - - double housesWithGasBurners_pct = tabHeat.sl_householdGasBurnerResidentialArea_pct.getValue(); - double housesWithHybridHeatpump_pct = tabHeat.sl_householdHybridHeatpumpResidentialArea.getValue(); - double housesWithElectricHeatpump_pct = tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.getValue(); - boolean cb_householdHTDistrictHeatingActive = tabHeat.cb_householdHTDistrictHeatingResidentialArea.isSelected(); - boolean cb_householdLTDistrictHeatingActive = tabHeat.cb_householdLTDistrictHeatingResidentialArea.isSelected(); - - p_residentialScenario_Current.setHousesWithGasBurners_pct(housesWithGasBurners_pct); - p_residentialScenario_Current.setHousesWithHybridHeatpump_pct(housesWithHybridHeatpump_pct); - p_residentialScenario_Current.setHousesWithElectricHeatpump_pct(housesWithElectricHeatpump_pct); - p_residentialScenario_Current.setCb_householdHTDistrictHeatingActive(cb_householdHTDistrictHeatingActive); - p_residentialScenario_Current.setCb_householdLTDistrictHeatingActive(cb_householdLTDistrictHeatingActive); - - - //Houses with Airco - double housesWithAirco_pct = tabHeat.sl_householdAircoResidentialArea_pct.getValue(); - p_residentialScenario_Current.setHousesWithAirco_pct(housesWithAirco_pct); - - //Houses with better isolation - double housesWithImprovedInsulation_pct = tabHeat.sl_householdHeatDemandReductionResidentialArea_pct.getValue(); - p_residentialScenario_Current.setHousesWithImprovedInsulation_pct(housesWithImprovedInsulation_pct); - - //PT - double nbHousesWithPT_pct = tabHeat.sl_rooftopPTHouses_pct.getValue(); - p_residentialScenario_Current.setNbHousesWithPT_pct(nbHousesWithPT_pct); -} - -////Mobility -if(uI_Tabs.pop_tabMobility.size() > 0){ - tabMobility tabMob = uI_Tabs.pop_tabMobility.get(0); - - //Private EV - double privateEVs_pct = tabMob.sl_privateEVsResidentialArea_pct.getValue(); - double privateEVsThatSupportV2G_pct = tabMob.sl_EVsThatSupportV2G_pct.getValue(); - p_residentialScenario_Current.setPrivateEVs_pct(privateEVs_pct); - p_residentialScenario_Current.setPrivateEVsThatSupportV2G_pct(privateEVsThatSupportV2G_pct); - - //Selected charging mode - String selectedChargingAttitudeStringPrivateEVs = tabMob.cb_chargingAttitudePrivateParkedCars.getValue(); - boolean V2GActivePrivateEVs = tabMob.cb_activateV2GPrivateParkedCars.isSelected(); - p_residentialScenario_Current.setSelectedChargingAttitudeStringPrivateEVs(selectedChargingAttitudeStringPrivateEVs); - p_residentialScenario_Current.setV2GActivePrivateEVs(V2GActivePrivateEVs); - - //Chargers - double activePublicChargers_pct = tabMob.sl_publicChargersResidentialArea_pct.getValue(); - double chargersV1G_pct = tabMob.sl_chargersThatSupportV1G_pct.getValue(); - double chargersV2G_pct = tabMob.sl_chargersThatSupportV2G_pct.getValue(); - - p_residentialScenario_Current.setActivePublicChargers_pct(activePublicChargers_pct); - p_residentialScenario_Current.setChargersV1G_pct(chargersV1G_pct); - p_residentialScenario_Current.setChargersV2G_pct(chargersV2G_pct); - - //Selected charging mode - String selectedChargingAttitudeStringChargers = tabMob.cb_chargingAttitudePrivatePublicChargers.getValue(); - boolean V2GActiveChargers = tabMob.cb_activateV2GPublicChargers.isSelected(); - p_residentialScenario_Current.setSelectedChargingAttitudeStringChargers(selectedChargingAttitudeStringChargers); - p_residentialScenario_Current.setV2GActiveChargers(V2GActiveChargers); -} - - - RETURNS_VALUE - String - 1762253228735 - f_getDateAndTimeString - 940 - -340 - - false - true - true - Date date = energyModel.f_getDate(); - -SimpleDateFormat formatter = new SimpleDateFormat(); -formatter.applyPattern("dd MMM yyyy, kk:mm"); - -return formatter.format(date); - - - RETURNS_VALUE - String - 1762253251373 - f_getDateString - 940 - -320 - - false - true - true - Date date = energyModel.f_getDate(); - -SimpleDateFormat formatter = new SimpleDateFormat(); -formatter.applyPattern("dd MMM yyyy"); - -return formatter.format(date); - - - VOID - double - 1762356801733 - f_setLoadingScreen - 3080 - 930 - - false - true - true - - visibility - boolean - - - xOffset - double - - - yOffset - double - - if (visibility) { - // Screen Size / View Area is 1920 x 980, so centre at 960, 490 - // Icon Size is 180 x 180, so top left at 960 - 90 = 870, 490 - 90 = 400 - double xPos = 870 + xOffset; - double yPos = 400 + yOffset; - - image_loadingScreenIcon.setPos(xPos, yPos); - - // Make sure the image is at the top of the presentation level - f_setShapePresentationOnTop(image_loadingScreenIcon); - image_loadingScreenIcon.setVisible(true); -} -else { - image_loadingScreenIcon.setVisible(false); -} - - - VOID - double - 1762533624267 - f_scenarioRadioButtonAction - -1180 - 180 - - false - true - true - //Set boolean of running main interface scenario true -b_runningMainInterfaceScenarios = true; - -////Set selected scenario -String selected_scenario = f_setSelectedScenario(); - -//Set scenario name text to the correct scenario -t_scenarioName.setText("Scenario: " + selected_scenario); -traceln("Selected scenario: \"" + selected_scenario + "\""); - -//Deselect the selected building, if selected GC is now paused -if(c_selectedGridConnections.size()>0 && !c_selectedGridConnections.get(0).v_isActive){ - f_clearSelectionAndSelectEnergyModel(); -} - -//Set boolean of running main interface scenario false -b_runningMainInterfaceScenarios = false; - -if(!selected_scenario.equals("Custom")){ - f_resetSettings(); - - f_updateMainInterfaceSliders(); - - //Colour recolor pv map again if it is active - if(c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); - } -} - - - -/* -//Pause simulation and set loading screen -pauseSimulation(); -f_setLoadingScreen(true, 0, 0); - -new Thread( () -> { - - //Set selected scenario - String selected_scenario = f_setSelectedScenario(); - - //Set scenario name text to the correct scenario - t_scenarioName.setText("Scenario: " + selected_scenario); - traceln("Selected scenario: \"" + selected_scenario + "\""); - - //Deselect the selected building, if selected GC is now paused - if(c_selectedGridConnections.size()>0 && !c_selectedGridConnections.get(0).v_isActive){ - f_clearSelectionAndSelectEnergyModel(); - } - - //Set boolean of running main interface scenario true - b_runningMainInterfaceScenarios = false; - - if(!selected_scenario.equals("Custom")){ - f_resetSettings(); - - f_updateMainInterfaceSliders(); - - //Colour recolor pv map again if it is active - if(c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); - } - } - - //Resume live simulation and remove loading screen - runSimulation(); - f_setLoadingScreen(false, 0, 0); - -}).start(); -*/ - - - VOID - double - 1762775121080 - f_setScenarioToCustom - -1160 - 315 - - false - true - true - String[] scenarioOptions = f_getScenarioOptions(); - -int customOptionIndex = 0; -for(String scenarioOption : scenarioOptions){ - if(scenarioOption.equals("Custom")){ - break; - } - customOptionIndex++; -} - -rb_scenarios.setValue(customOptionIndex, true); - - - - - 1744624088854 - excel_exportBalanceLoadData - true - -555 - -365 - - false - true - true - - zerointerfaceloader - Export_ModelData.xlsx - - false - true - true - - - - - 1658477103135 - connections - 50 - -230 - - false - true - true - false - COLLECTION_OF_LINKS - true - Object - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - 1708522361909 - pop_UI_Company - -260 - 460 - - false - true - true - - zerointerfaceloader - UI_company - - - - zerointerfaceloader - UI_company - 1708522361868 - - - - - p_companyName - - - p_maxAddedVehicles - - - p_scenarioSettings_Current - - - p_scenarioSettings_Future - - - p_gridConnection - - - true - - 0 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - EMPTY - - 1658477089963 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1709049456144 - pop_UI_Battery - -260 - 540 - - false - true - true - - zerointerfaceloader - UI_Battery - - - - zerointerfaceloader - UI_Battery - 1709049456141 - - - - - p_amountOfGISObjects - - - p_amountOfGC - - - true - - 0 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - EMPTY - - 1658477089962 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1716193013122 - uI_Results - -670 - 760 - - false - true - true - 1716193014596 - - digital_twin_results - UI_Results - - - - digital_twin_results - UI_Results - 1704197366556 - - - - - energyModel - - energyModel - - - - p_cutOff_MWh - - - gr_infoText - - gr_infoText - - - - gr_closeInfoText - - gr_closeInfoText - - - - t_infoTextDescription - - t_infoTextDescription - - - - rect_infoText - - rect_infoText - - - - p_currentActiveInfoBubble - - p_currentActiveInfoBubble - - - - false - - 100 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089961 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1717506326727 - pop_UI_Hydrogen - -260 - 500 - - false - true - true - - zerointerfaceloader - UI_Hydrogen - - - - zerointerfaceloader - UI_Hydrogen - 1717506309785 - - - - - p_amountOfGISObjects - - - p_amountOfGC - - - true - - 0 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - EMPTY - - 1658477089960 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722252541830 - uI_Tabs - -670 - 581 - - false - true - true - 1722252542596 - - zerointerfaceloader - UI_Tabs - - - - zerointerfaceloader - UI_Tabs - 1722245292191 - - - - false - - 100 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089959 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722252541830 - pop_UI_EnergyHub - -260 - 420 - - false - true - true - 1747229957336 - - zerointerfaceloader - UI_EnergyHub - - - - zerointerfaceloader - UI_EnergyHub - 1709049506460 - - - - - p_energyHubBackGroundColor - - - p_energyHubLineColor - - - p_energyHubLineWidth - - - p_energyHubLineStyle - - - true - - 0 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - "" - - EMPTY - - 0 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - 1658477103139 - level - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - 1756124196459 - rect_sliderCollectionOrdering - 0 - -800 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -14774017 - null - SOLID - 1220 - 400 - 0.0 - -1 - null - - - 1701947860073 - rect_canvas - -600 - -200 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 6000 - 2400 - 0.0 - -1 - null - - - 1701952231399 - rect_gismap - 400 - 85 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1020 - 675 - 0.0 - - zenmocolor_blue3.getFillColor() - null - - - 1747229984708 - gr_energyHubPresentation - 2600 - -2200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1747229957336 - pop_UI_EnergyHub_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 52.565832561661324 - 6.28960063917648 - - - - - 1724074923402 - gr_logos - 940 - -10 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074980260 - rect_logoBackground - -960 - -70 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1960 - 160 - 0.0 - 682673374 - v_backgroundColor - null - - - 1724074987235 - image_tueLogo - 730 - 25 - - true - true - false - SHAPE_DRAW_2D3D - getExperimentHost().openWebSite("https://www.tue.nl/en/"); - false - 0 - 205.802 - 60 - 0.0 - - - zerointerfaceloader - logo_TUe_red.png - - - zerointerfaceloader - logo_TUe_white.png - - - false - - - 1731938214224 - image_luxLogo - -858 - 13 - - true - true - false - SHAPE_DRAW_2D3D - //Go to website on click -getExperimentHost().openWebSite("https://lux.energy/"); - - false - 0 - 216 - 90.947 - 0.0 - - - zerointerfaceloader - logo_lux-energy-twin.png - - - false - - - 1758877617096 - image_zenmoLogo - 532 - 16 - - true - true - false - SHAPE_DRAW_2D3D - getExperimentHost().openWebSite("https://zenmo.com/"); - false - 0 - 170 - 73 - 0.0 - - - zerointerfaceloader - logo_zenmo.png - - - false - - - - - 1665052211228 - rect_mainFunctions - -700 - 0 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 680 - 1060 - 0.0 - -1 - null - - - 1705481955546 - rect_simulationEngine - -270 - 860 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 250 - 200 - 0.0 - -1 - null - - - 1665052603927 - rect_input - -700 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 169 - 40 - 0.0 - -1 - null - - - 1665052191319 - t_input - -640 - 5 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16744448 - Input - - SansSerif - 18 - - - LEFT - - - 1690205003572 - line_simulationEngine - -230 - 890 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 170 - 0 - 0 - - - 1690205003577 - t_simulationEngine - -151 - 870 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simulation engine - - SansSerif - 14 - - - CENTER - - - 1690975123923 - t_date - 420 - 54 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Datum - energyModel.v_isRapidRun ? f_getDateString() : f_getDateAndTimeString() - - SansSerif - 16 - - - LEFT - - - 1696520897606 - gr_zoomButton - 1330 - 680 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1696520897608 - arc_zoomIn - -2.5319999999999965 - -20.114000000000004 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -13882324 - null - SOLID - 0 - 0.0 - 17.53 - 40 - -179.1999969482422 - 178.1999969482422 - -13882324 - null - - - 1696520897610 - arc_zoomOut - -2.483000000000004 - 8.137 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -13882324 - null - SOLID - 0 - 0.0 - 17.483 - 40 - 1.2000000476837158 - 178.1999969482422 - -13882324 - null - - - 1696520897612 - rect_zoomButton - -20 - -20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -13882324 - null - SOLID - 35 - 28 - 0.0 - -13882324 - null - - - 1696520897614 - line_zoomButtonSeperator - -16 - -5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 1 - 0 - 1 - 0 - 27 - 0 - 0 - - - 1696520897616 - line_zoomIn1 - -9 - -21 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 12 - 0 - 0 - - - 1696520897618 - line_zoomIn2 - -3 - -27 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 12 - 0 - - - 1696520897620 - line_zoomOut - -10 - 8 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 15 - 0 - 0 - - - 1696520897622 - rect_zoomIn - -20 - -35 - - true - true - false - SHAPE_DRAW_2D3D - map.zoomIn(); - false - 0 - 10 - 1 - - null - SOLID - 35 - 30 - 0.0 - - null - - - 1696520897624 - rect_zoomOut - -20 - -5 - - true - true - false - SHAPE_DRAW_2D3D - map.zoomOut(); - false - 0 - 10 - 1 - - null - SOLID - 35 - 30 - 0.0 - - null - - - - - 1696837759915 - t_legendaColors - 380 - 1020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Legenda Colors - - SansSerif - 18 - - - LEFT - - - 1696863329245 - t_mapClickingFunctions - 40 - 1020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Map connections and clicking - - SansSerif - 18 - - - LEFT - - - 1702552223737 - t_stylingFunctions - -680 - 301 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Interface styling: - - SansSerif - 14 - - - LEFT - - - 1704210756310 - gr_clickedObjectInfo - 370 - 220 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1713259123999 - rect_clickedObjectInfo - 40 - -131 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - zenmocolor_blue3.getFillColor() - null - SOLID - 555 - 20 - 0.0 - -1 - zenmocolor_blue3.getFillColor() - null - - - 1701879145306 - t_clickedObjectInfo - 321 - -129 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer een gebouw - v_clickedObjectText.equals("None") ? -"Selecteer een gebouw of trafostation" : -v_clickedObjectText - - SansSerif - 12 - - - CENTER - - - - - 1705663500141 - t_buildingColors - 680 - 1030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Building colors - - SansSerif - 14 - - - LEFT - - - 1705663820235 - t_gridnodeColors - 1022 - 1030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - GridNode colors - - SansSerif - 14 - - - LEFT - - - 1705664522164 - t_specificBuildingColors - 680 - 1250 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Specific building colors - - SansSerif - 14 - - - LEFT - - - 1705667994053 - t_areaColors - 1300 - 1180 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Area colors - - SansSerif - 14 - - - LEFT - - - 1706004011983 - txt_generalColors - 1300 - 1030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - General styling - - SansSerif - 14 - - - LEFT - - - false - 1708522580070 - button_goToUI - 1140 - 87 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - if(energyModel.v_rapidRunData != null){ - switch(v_clickedObjectType){ - - case BUILDING: - uI_Company.f_setCompanyUI(c_selectedGridConnections.get(0)); - uI_Company.va_companyUI.navigateTo(); - v_currentViewArea = uI_Company.va_companyUI; - break; - - case ELECTROLYSER: - //uI_Hydrogen.f_setHydrogenUI(c_selectedGridConnections.get(0)); - uI_Hydrogen.va_hydrogenUI.navigateTo(); - v_currentViewArea = uI_Hydrogen.va_hydrogenUI; - break; - - case BATTERY: - //uI_Battery.f_setBatteryUI(c_selectedGridConnections.get(0)); - uI_Battery.va_batteryUI.navigateTo(); - v_currentViewArea = uI_Battery.va_batteryUI; - break; - - case SOLARFARM: - case WINDFARM: - case CHARGER: - default: - break; - } -} -else{ - f_setErrorScreen("Je kan alleen naar de companyUI gaan als er een jaar simulatie is voltooid.", 0, 0); -} - - - - - Ga naar bedrijfs interface - - - - 1708595212229 - txt_additionalUIs - -290 - 370 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Additional UIs: - - SansSerif - 14 - - - LEFT - - - false - 1709718299889 - rb_scenarios_template - 19.333 - 144.667 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - false - true - f_scenarioRadioButtonAction(); - - - - 0 - VERTICAL - - - - false - - - - 1709718299891 - t_scenarios - 19.333 - 118.667 - - true - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer een scenario - - Calibri - 20 - - - LEFT - - - 1709718299897 - gr_scenarioDescription - 199.333 - 374.667 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1709718299901 - t_scenarioDescription - 0.667 - -24.667 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Het huidige scenario bevat de energie dynamieken van dit moment. -Dit omvat o.a. de huidige zonnepanelen op de daken van huizen en -bedrijven, het aantal voertuigen per type, de electriciteitsconsumptie -van het gebied, en de huidige gasconsumptie voor verwarming. - - SansSerif - 11 - - - CENTER - - - 1709718299903 - t_scenarioName - 0 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Huidig scenario - - Calibri - 16 - - - CENTER - - - - - 1710174312959 - t_resultsUIFunctions - -680 - 730 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Results UI initialization - - SansSerif - 14 - - - LEFT - - - 1713429772427 - t_scenarioDictionaries - -290 - 290 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Scenario dictionaries - - SansSerif - 12 - - - LEFT - - - 1713431901010 - t_initializationFunctions - -680 - 150 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Interface initialization functions - - SansSerif - 14 - - - LEFT - - - 1715951689412 - t_inputParameters - -680 - 50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Input Parameters - - SansSerif - 14 - - - LEFT - - - false - 1716988295617 - button_gotoEngine - -260 - 960 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - energyModel.va_engine.navigateTo(); - - - - Go to Engine - - - - 1719217632486 - line_ordereringDescription - 40 - -755 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 210 - 0 - 0 - - - 1719217632488 - t_ordereringDescription - 40 - -780 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Initial conditions & ordering - - SansSerif - 16 - - - LEFT - - - 1719829894799 - t_outsideTemperature - 1326 - 17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -7631989 - Buitentemperatuur: 23 graden - "Buiten temperatuur " + v_outsideTemperature + " graden" - - Cambria - 10 - - - RIGHT - - - 1719829988146 - t_solarIrradiance - 1326 - 42 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -7631989 - Zonne instraling: 12 w/m2 - "Zonneinstraling " + v_solarIrradiance + " W/m2" - - Cambria - 10 - - - RIGHT - - - 1719829993001 - t_windSpeed - 1326 - 67 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -7631989 - Windsnelheid: hoog - "Windsnelheid: " + v_windspeed - - Cambria - 10 - - - RIGHT - - - 1719847144211 - plot_outsideTemperature - 1335 - 12 - - true - true - false - SHAPE_DRAW_2D3D - true - - 1751013532916 - true - 1719907200000 - - 0 - HOUR - - - 1 - HOUR - - - false - 84 - 23 - - -16777216 - - 0 - 0 - 84 - 23 - -1 - -16777216 - -6632142 - - - SOUTH - -16777216 - 30 - - - NONE - NONE - -10496 - - false - MOVEMENT_WITH_TIME - MODEL_TIME_UNIT - -5 - 28 - FIXED - true - LINEAR - - Title - 1719847144208 - my_dataset - -16776961 - v_outsideTemperature - true - NONE - 1.0 - - 96 - 96 - true - HH_mm - - - 1719848137592 - plot_solarIrradiance - 1335 - 38 - - true - true - false - SHAPE_DRAW_2D3D - true - - 1751013532918 - true - 1719907200000 - - 0 - HOUR - - - 1 - HOUR - - - false - 84 - 23 - - -16777216 - - 0 - 0 - 84 - 23 - -1 - -16777216 - -6632142 - - - SOUTH - -16777216 - 30 - - - NONE - NONE - -10496 - - false - MOVEMENT_WITH_TIME - MODEL_TIME_UNIT - 0 - 1000 - FIXED - true - LINEAR - - Title - 1719848137589 - my_dataset - -10496 - v_solarIrradiance - true - NONE - 1.0 - - 96 - 96 - true - HH_mm - - - 1720909739871 - gr_multipleBuildingInfo - 1040 - 55 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1720904897811 - button_nextBuilding - -65 - 32 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - v_selectedGridConnectionIndex < v_nbGridConnectionsInSelectedBuilding - if (v_selectedGridConnectionIndex < v_nbGridConnectionsInSelectedBuilding ){ - v_selectedGridConnectionIndex += 1; - - c_selectedGridConnections = new ArrayList<>(); - - if(v_customEnergyCoop != null){ - energyModel.f_removeEnergyCoop(v_customEnergyCoop); - v_customEnergyCoop = null; - } - - if( v_selectedGridConnectionIndex > 0){ - c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } - /* - else { - c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - */ - /* - //Update the resultsUI - f_updateUIResultsData(); - */ - - //Set dashboard UI button - f_setUIButton(); -} - - - - Toon volgend adres - - - - false - 1720904921271 - button_previousBuilding - -65 - 53 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - v_selectedGridConnectionIndex > 0 - if (v_selectedGridConnectionIndex > 0){ - c_selectedGridConnections = new ArrayList<>(); - v_selectedGridConnectionIndex -= 1; - - if( v_selectedGridConnectionIndex > 0){ - c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } - else { - c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); - - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - - /* - //Update the resultsUI - f_updateUIResultsData(); - */ - - //Set dashboard UI button - f_setUIButton(); -} - - - - - - - Toon vorig adres - - - - 1720908988631 - t_multipleBuildingInfo - -360 - 57 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Je kijkt naar de som van alle 5 addressen samen in het geselecteerde pand - v_selectedGridConnectionIndex > 0 && c_selectedGridConnections.size() > 0 && c_selectedGridConnections.get(0).p_owner.p_detailedCompany ? -"Je kijkt naar: " + c_selectedGridConnections.get(0).p_ownerID + ", " + c_selectedGridConnections.get(0).p_address.getAddress() -: -v_selectedGridConnectionIndex > 0 ? -"Je kijkt naar het " + (v_selectedGridConnectionIndex ) + "e adres in het geselecteerde pand" -: -"Je kijkt naar de som van alle " + v_nbGridConnectionsInSelectedBuilding + " addressen in dit pand" - - SansSerif - 11 - - - CENTER - - - - - 1721819768547 - rect_CustomColors - 1880 - 1400 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -10496 - null - SOLID - 630 - 610 - 0.0 - -1 - null - - - 1721819794985 - txt_mapOverlayFunctionalities - 1900 - 1410 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Map Overlay Functionalities - - - SansSerif - 18 - - - LEFT - - - 1722252542596 - uI_Tabs_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 52.51902183517265 - 6.169494834925871 - - - 1724419174775 - rect_scenarioText - -1210 - 0 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 460 - 700 - 0.0 - -1 - null - - - 1724419379552 - txt_scenarioFunctions - -1190 - 20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Scenario functions, text and settings - - SansSerif - 14 - - - LEFT - - - false - 1725017697644 - checkbox_cabels - 20 - 460 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - for(GISRoute GISCable : c_LVCables){ - GISCable.setVisible(b_showCables); -} - -for(GISRoute GISCable : c_MVCables){ - GISCable.setVisible(b_showCables); -} - - - - - Toon stroom kabels - false - true - b_showCables - - - - 1725020138710 - map - 410 - 130 - - true - true - false - true - SHAPE_DRAW_2D3D - if(b_inEnergyHubMode ){ - if(b_inEnergyHubSelectionMode){ - f_selectEnergyHubGC(clickx, clicky); - } -} -else if(b_inManualFilterSelectionMode){ - f_selectManualFilteredGC(clickx, clicky); -} -else{ - if (uI_Tabs.pop_tabEHub.size() > 0 && uI_Tabs.pop_tabEHub.get(0).b_NFATOListener) { - uI_Tabs.pop_tabEHub.get(0).f_checkGISRegion(clickx, clicky); - } - else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || - c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ - f_selectGridLoop(clickx, clicky); - } - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - f_selectNeighborhood(clickx, clicky); - } - } - - else { - if(c_selectedFilterOptions.size() > 0){ - f_removeAllFilters(); - } - f_selectGISRegion(clickx, clicky); - } -} - false - 1000 - 620 - if(b_inEnergyHubMode ){ - if(b_inEnergyHubSelectionMode){ - f_selectEnergyHubGC(clickx, clicky); - } -} -else if(b_inManualFilterSelectionMode){ - f_selectManualFilteredGC(clickx, clicky); -} -else{ - if (uI_Tabs.pop_tabEHub.size() > 0 && uI_Tabs.pop_tabEHub.get(0).b_NFATOListener) { - uI_Tabs.pop_tabEHub.get(0).f_checkGISRegion(clickx, clicky); - } - else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || - c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ - f_selectGridLoop(clickx, clicky); - } - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - f_selectNeighborhood(clickx, clicky); - } - } - - else { - if(c_selectedFilterOptions.size() > 0){ - f_removeAllFilters(); - } - f_selectGISRegion(clickx, clicky); - } -} - - 52.539123187983904 - 6.173604854475837 - 25000 - -4144960 - -1 - true - false - https://a.tile.openstreetmap.org/[zoom]/[x]/[y].png - WEB_SERVICE - CREATE_STRAIGHT_LINE - CAR - FASTEST - DIJKSTRABI - false - - - true - 1000 - - - 1725456122345 - txt_sliderInitialization - -680 - 551 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Slider Initialization - - SansSerif - 14 - - - LEFT - - - 1725525689286 - txt_GISObjectCreationFunctions - -290 - 60 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - GIS Object creation functions - - SansSerif - 14 - - - LEFT - - - 1730113808401 - gr_uI_Results_presentation - 1440 - 230 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1716193014596 - uI_Results_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 52.52173648990926 - 6.109451573117503 - - - - - 1734442437753 - rect_filterFunctions - -1620 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 360 - 560 - 0.0 - -1 - null - - - 1734443343976 - t_selectionColors - 380 - 1050 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selection colors - - SansSerif - 14 - - - LEFT - - - 1734443865835 - txt_filterFunctions - -1580 - 20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Filter Functions - - SansSerif - 14 - - - LEFT - - - false - 1734444497900 - cb_showFilterInterface - 20 - 480 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - cb_showFilterInterface.isEnabled() - true - !settings.isPublicModel() - gr_filterInterface.setVisible(cb_showFilterInterface.isSelected()); - -if(!cb_showFilterInterface.isSelected()){ - button_clearFilters.action(); - gr_sliderClickBlocker.setVisible(false); -} -else{ - gr_sliderClickBlocker.setVisible(true); - gr_filterInterface.setPos(170, 710); -} - - - - Filter opties - false - - - - 1734444441402 - gr_filterInterface - -1470 - 750 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1734443987142 - rect_filterInterface - -150 - -180 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 350 - 350 - 0.0 - -1 - null - - - 1734443492902 - txt_filterDescription - -130 - -140 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer gebouwen: - - SansSerif - 12 - - - LEFT - - - false - 1734442617547 - cb_filterOptions - -10 - -140 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - !gr_ForceMapSelectionText.isVisible() - f_setFilter(cb_filterOptions.getValue()); - -cb_filterOptions.setValueIndex(0); - - - - false - - - - - - - - - - - false - - - - 1734443541801 - txt_activeFilters - -130 - -110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geen Actieve Filters. - !t_activeFilters.getText().equals("") ? "Actieve filters:" : "Geen Actieve Filters." - - SansSerif - 12 - - - LEFT - - - 1734444104065 - t_activeFilters - -130 - -90 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1734444671650 - txt_filterInterface - 25 - -170 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Filter opties - - SansSerif - 14 - - - CENTER - - - false - 1734446701124 - button_clearFilters - 40 - 130 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - c_filterSelectedGridLoops.clear(); -c_filterSelectedNeighborhoods.clear(); -c_manualFilterSelectedGC.clear(); -c_manualFilterDeselectedGC.clear(); -b_inManualFilterSelectionMode = false; -if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - f_setFilter("Handmatige selectie"); -} - -f_setForcedClickScreenText(""); -if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); -} - -f_removeAllFilters(); -traceln("Alle filters zijn verwijderd."); - - - - Verwijder alle filters - - - - 1734524446136 - t_selectedGridLoop - -130 - 140 - - true - true - false - SHAPE_DRAW_2D - c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) - false - 0 - 0.0 - -16777216 - - c_filterSelectedGridLoops.size() == 1 ? "Geselecteerde lus: " + c_filterSelectedGridLoops.get(0).p_gridNodeID : c_filterSelectedGridLoops.size() > 1 ? "Meerdere lussen geselecteerd." : "Geen lus geselecteerd." - - SansSerif - 12 - - - LEFT - - - 1737640715642 - t_selectedNBh - -130 - 117 - - true - true - false - SHAPE_DRAW_2D - c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD) - false - 0 - 0.0 - -16777216 - - c_filterSelectedNeighborhoods.size() == 1 ? "Geselecteerde buurt: " + c_filterSelectedNeighborhoods.get(0).p_id : c_filterSelectedNeighborhoods.size() > 1 ? "Meerdere buurten geselecteerd." : "Geen buurt geselecteerd." - - SansSerif - 12 - - - LEFT - - - false - 1742227694564 - button_removeManualSelection - 40 - 85 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - !(c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty()) - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - c_manualFilterSelectedGC.clear(); - c_manualFilterDeselectedGC.clear(); - - f_setForcedClickScreenText(""); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); - } - - b_inManualFilterSelectionMode = false; - if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - f_setFilter("Handmatige selectie"); - } -} - - - - Wis handmatige selectie - - - - false - 1743092954558 - button_manualFilterSelection - 40 - 50 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - !gr_ForceMapSelectionText.isVisible() || b_inManualFilterSelectionMode - if(!b_inManualFilterSelectionMode){ - b_inManualFilterSelectionMode = true; - - f_setForcedClickScreenText("(De)Selecteer gebouwen"); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(true); - } - - if(!c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - f_setFilter("Handmatige selectie"); - } -} -else{ - b_inManualFilterSelectionMode = false; - - f_setForcedClickScreenText(""); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); - } - - if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - f_setFilter("Handmatige selectie"); - } -} - - - - Handmatige selectie - b_inManualFilterSelectionMode ? "Selectie voltooien" : "Handmatige selectie" - - - - - - 1736337963311 - gr_errorScreen - 3380 - -100 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1736344526647 - rect_errorScreenGrayOut - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - //traceln(); - false - 0 - 10 - 1 - -2049715245 - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - - - 1736443451929 - rect_errorScreenClickBlocking - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - double click_block = 0; - false - 0 - 10 - 1 - -2049715245 - null - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - null - - - 1747320252784 - rect_errorMessage - 690 - 380 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 4 - -65536 - null - SOLID - 540 - 200 - 0.0 - -1 - null - 10 - - - 1736337707551 - t_errorMessage - 960 - 430 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - TYPE YOUR ERROR MESSAGE HERE - - SansSerif - 24 - - - CENTER - - - 1736338014404 - button_errorOK - 960 - 550 - - true - true - false - SHAPE_DRAW_2D3D - gr_errorScreen.setVisible(false); - false - 0 - 0.0 - - - 1736338014406 - rect_errorOK - -60 - -20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 120 - 40 - 0.0 - -1 - null - - - 1736338014408 - txt_errorOK - 0 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Ok - - SansSerif - 18 - - - CENTER - - - - - - - 1742482935391 - gr_sliderClickBlocker - -440 - -1860 - - true - false - false - true - SHAPE_DRAW_2D3D - 200 - 750 - false - 0 - 0.0 - - - 1742482847835 - rect_sliderClickBlocker - -200 - -240 - - true - true - false - SHAPE_DRAW_2D3D - int clickBlocker; - false - 0 - 10 - 1 - - null - SOLID - 400 - 470 - 0.0 - -1 - new Color(255, 255, 255, 0) - null - - - 1742482890780 - rect_sliderClickBlocker2 - -200 - -240 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 400 - 470 - 0.0 - 16777215 - null - - - - - 1744624088806 - gr_writeDataToExcel - true - -410 - -730 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744624088808 - rect_exportToExcelFunctions - -190 - -120 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 450 - 530 - 0.0 - -1 - null - - - false - 1744624088810 - fileChooser_exportBalanceLoadEnergyModel - -156 - -30 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - false - fileChooser_exportBalanceLoadEnergyModel.setEnabled(false); - - - - Klik om kwartierwaarden excel te downloaden (Totaal gebied) - DOWNLOAD - .xlsx, .xls - Export_ModelData.xlsx - - - - false - 1744624088812 - button_exportBalanceLoadEnergyModel - -156 - -70 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - f_setAllFileDownloadersDisabled(); - -f_harvestEnergyModelLoadData(); - -fileChooser_exportBalanceLoadEnergyModel.setEnabled(true); - - - - Schrijf kwartierwaarden naar excel (hele gebied) - - - - 1744624088814 - txt_writeToExcelFunctions - -150 - -100 - - true - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Write data to excel (Un-ignore if you want to use this) - - SansSerif - 14 - - - LEFT - - - false - 1744624088816 - button_exportBalanceLoadSelectedCompanies - -156 - 170 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - c_selectedGridConnections.size() > 0 && c_selectedGridConnections.size()< p_maxNrSelectedGCForExport + 1 - f_setAllFileDownloadersDisabled(); - -f_harvestSelectedGCLoadData(); - -fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(true); - - - - Schrijf kwartierwaarden naar excel (Geselecteerde bedrijven) - - - - false - 1744624088818 - fileChooser_exportBalanceLoadSelectedCompanies - -156 - 210 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - false - fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(false); - - - - Klik om kwartierwaarden excel te downloaden (Geselecteerde bedrijven) - DOWNLOAD - .xlsx, .xls - Export_ModelData.xlsx - - - - false - 1744624088820 - fileChooser_exportBalanceLoadSelectedEnergyCoop - -156 - 90 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - false - fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(false); - - - - Klik om kwartierwaarden excel te downloaden (Totaal geselecteerde COOP) - DOWNLOAD - .xlsx, .xls - Export_ModelData.xlsx - - - - false - 1744624088822 - button_exportBalanceLoadSelectedEnergyCoop - -156 - 50 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - c_selectedGridConnections.size() > 1 && v_customEnergyCoop != null - f_setAllFileDownloadersDisabled(); - -f_harvestTotalBalanceLoadOfSelectedEnergyCoop(); - -fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(true); - - - - Schrijf kwartierwaarden naar excel (Totaal van Geselecteerde Coop) - - - - - - 1745935981029 - txt_publicModelFunctionalities - -680 - 845 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Public model functionalities - - SansSerif - 12 - - - LEFT - - - 1746110300955 - rect_ìnfoBubbleFunctions - -2070 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 360 - 350 - 0.0 - -1 - null - - - 1746110305368 - txt_infoBubbleFunctions - -2040 - 30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Info Bubble Functions - - SansSerif - 14 - - - LEFT - - - 1746187848442 - gr_publicVersionWarningMessage - 460 - -2160 - - true - true - false - SHAPE_DRAW_2D3D - 740 - 40 - settings.isPublicModel() - false - 0 - 0.0 - - - 1746027175818 - txt_publicVersion - -20 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -65536 - Dit is een publieke versie met beperkte functionaliteiten - - SansSerif - 24 - - - CENTER - - - 1746187821228 - i_publicVersionWarningMessage - 304 - -14 - - true - true - false - SHAPE_DRAW_2D3D - f_setInfoText(i_publicVersionWarningMessage, v_infoText.publicVersionWarning, i_publicVersionWarningMessage.getX() + gr_publicVersionWarningMessage.getX(), i_publicVersionWarningMessage.getY() + gr_publicVersionWarningMessage.getY()); - false - 0 - 20 - 20 - 0.0 - - - zerointerfaceloader - icon_i.png - - - false - - - - - 1750078687228 - rect_dynamicLegend - 1360 - 1400 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -65536 - null - SOLID - 470 - 310 - 0.0 - -1 - null - - - 1750078716831 - txt_dynamicLegend - 1380 - 1420 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Dynamic legend functionality - - SansSerif - 18 - - - LEFT - - - 1752231354833 - txt_visualObjects - -290 - 140 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - GIS Objects pure for visuals - - SansSerif - 14 - - - LEFT - - - 1746110287596 - gr_infoText - -2260 - 360 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1746110662246 - rect_infoText - 0 - 0 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 620 - 170 - 0.0 - -1 - null - 10 - - - 1746110287600 - gr_closeInfoText - 600 - 20 - - true - true - false - SHAPE_DRAW_2D3D - p_currentActiveInfoBubble.clear(); -gr_infoText.setVisible(false); - false - 0 - 0.0 - - - 1746110287602 - oval_closeInfoText - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 12 - 40 - 0.0 - -12566464 - null - - - 1746110287604 - line_closeInfoText1 - -6 - 6 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 12 - -12 - 0 - - - 1746110287606 - line_closeInfoText2 - 6 - 6 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 1 - 0 - 1 - 0 - -12 - -12 - 0 - - - - - 1746110287608 - t_infoTextHeader - 20 - 20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Extra Informatie - - Calibri - 18 - - - LEFT - - - 1746110287610 - t_infoTextDescription - 20 - 50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat -nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui -officia deserunt mollit anim id est laborum." - - SansSerif - 14 - - - LEFT - - - - - 1742296970246 - gr_forceMapSelection - 1080 - -1480 - - true - false - false - SHAPE_DRAW_2D3D - 960 - 500 - false - 0 - 0.0 - - - 1742297070582 - rect_forceMapSelectionClickBlocker1 - -960 - -500 - - true - true - false - SHAPE_DRAW_2D3D - int clickblocker; - false - 0 - 10 - 1 - - null - SOLID - 410 - 980 - 0.0 - 16777215 - null - - - 1742297242137 - rect_forceMapSelectionClickBlocker2 - -550 - -500 - - true - true - false - SHAPE_DRAW_2D3D - int clickblocker; - false - 0 - 10 - 1 - - null - SOLID - 1000 - 130 - 0.0 - 16777215 - null - - - 1742297244098 - rect_forceMapSelectionClickBlocker3 - -550 - 250 - - true - true - false - SHAPE_DRAW_2D3D - int clickblocker; - false - 0 - 10 - 1 - - null - SOLID - 1000 - 230 - 0.0 - 16777215 - null - - - 1742297246008 - rect_forceMapSelectionClickBlocker4 - 450 - -500 - - true - true - false - SHAPE_DRAW_2D3D - int clickblocker; - false - 0 - 10 - 1 - - null - SOLID - 510 - 980 - 0.0 - 16777215 - null - - - 1742296784951 - rect_forceMapSelection1 - -960 - -620 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 410 - 1200 - 0.0 - -1765752640 - v_forcedClickScreenColor - null - - - 1742296859875 - rect_forceMapSelection2 - -550 - -620 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1000 - 250 - 0.0 - -1765752640 - v_forcedClickScreenColor - null - - - 1742296941081 - rect_forceMapSelection3 - -550 - 250 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1000 - 330 - 0.0 - -1765752640 - v_forcedClickScreenColor - null - - - 1742296952388 - rect_forceMapSelection4 - 450 - -620 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 510 - 1200 - 0.0 - -1765752640 - v_forcedClickScreenColor - null - - - 1753446087501 - gr_ForceMapSelectionText - -40 - -320 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1742300401759 - rect_selectText - -440 - -40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 860 - 70 - 0.0 - -1 - null - 10 - - - false - 1753445072603 - button_completeManualSelectionMode - 220 - -30 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - gr_ForceMapSelectionText.isVisible() && b_inManualFilterSelectionMode - true - button_completeManualSelectionMode.isVisible() - if(b_inManualFilterSelectionMode){ - button_manualFilterSelection.action(); -} - - - - Voltooi handmatige selectie - - - - 1742300418297 - t_forcedClickMessage - -10 - -30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 36 - - - CENTER - - - - - 1760015470890 - gr_energyHubSelectionButtons - 10 - -240 - - true - true - false - SHAPE_DRAW_2D - b_inEnergyHubSelectionMode //&& gr_forceMapSelection.isVisible() - false - 0 - 0.0 - - - 1760020289242 - gr_completeEnergyHubSelection_grayedOut - -770 - 550 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - - - 1760020289244 - button_completeSelection_grayedOut - -140 - -40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 3 - -8355712 - null - SOLID - 275 - 75 - 0.0 - -2302756 - null - 10 - - - 1760020289246 - txt_completeEnergyHubSelection_grayedOut - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -8355712 - Voltooien - - SansSerif - 28 - - - CENTER - - - - - 1760015470892 - gr_completeEnergyHubSelection - -770 - 550 - - true - true - false - SHAPE_DRAW_2D - c_selectedGridConnections.size()>1 - f_finalizeEnergyHubConfiguration(); - false - 0 - 0.0 - - - 1760015470894 - button_completeSelection - -140 - -40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 275 - 75 - 0.0 - -1 - null - 10 - - - 1760015470896 - txt_completeEnergyHubSelection - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Voltooien - - SansSerif - 28 - - - CENTER - - - - - 1760015470898 - gr_energieHubConfiguratorTxt - -60 - -190 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - - - 1760015470900 - rect_energyHubConfigurator - -500 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 2 - -16777216 - uI_EnergyHub.p_energyHubLineColor - null - SOLID - 1000 - 90 - 0.0 - -1 - uI_EnergyHub.p_energyHubBackGroundColor - null - 10 - - - 1760015470902 - txt_energyHubConfigurator - 0 - -35 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energie Hub Configurator - - SansSerif - 48 - - - CENTER - - - - - 1760015470904 - gr_cancelEnergyHubConfiguration - -820 - 630 - - true - true - false - SHAPE_DRAW_2D - f_cancelEnergyHubConfiguration(); - false - 0 - 0.0 - - - 1760015470906 - button_cancelEnergyHubConfiguration - -90 - -30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 3 - -2345659 - null - SOLID - 275 - 75 - 0.0 - -1 - null - 10 - - - 1760015470908 - txt_cancelEnergyHubConfiguration - 48 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Annuleer - - SansSerif - 28 - - - CENTER - - - - - - - - - 1753440008648 - gr_supportFunctions - -540 - -110 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1716419413991 - rect_supportFunctions - -140 - -80 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 300 - 160 - 0.0 - -1 - null - - - 1716419425042 - t_supportFunctions - -120 - -70 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Support functions - - SansSerif - 14 - - - LEFT - - - - - 1701951640330 - gr_legenda - 910 - 880 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1701951640332 - rect_legendaBackground - true - -510 - -110 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1020 - 210 - 0.0 - -542254 - zenmocolor_red3.getFillColor() - null - - - 1701951640336 - rect_legenda - -500 - -90 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -6632142 - zenmocolor_blue3.getFillColor() - null - SOLID - 1000 - 183 - 0.0 - -1 - null - - - 1701951640338 - t_legenda - -470 - -110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Legenda - - Calibri - 18 - - - LEFT - - - 1701951640396 - line_legendaSeperator1 - -165 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 140 - 0 - - - 1724074247375 - line_legendaSeperator2 - -10 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 140 - 0 - - - 1724074154126 - gr_infrastructure - -340 - 5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074154148 - t_infrastructure - -60 - -79 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Infrastructuur - - Calibri - 16 - - - LEFT - - - 1724074154158 - line_infrastructure - -120 - -59 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 271 - 0 - 0 - - - 1724074839746 - gr_gridnodes - -75 - -19 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074853961 - polyline_congestedGridnode - -55 - 40 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - v_gridLineColorCongested - null - SOLID - 1 - 0 - 1 - 0 - - v_gridNodeColorCongested - null - - - 0 - 0 - 0 - - - 10 - -14 - 0 - - - 20 - 0 - 0 - - - 0 - 0 - 0 - - - false - - - 1724074853963 - txt_congestedGridnode - -25 - 25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Trafo overbelast - - SansSerif - 12 - - - LEFT - - - 1724074853967 - polyline_gridnode - -55 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - v_MVLVLineColor - null - SOLID - 1 - 0 - 1 - 0 - - v_MVLVNodeColor - null - - - 0 - 0 - 0 - - - 10 - -14 - 0 - - - 20 - 0 - 0 - - - 0 - 0 - 0 - - - false - - - 1724074853969 - txt_gridnode - -25 - -21 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Trafo stabiel - - SansSerif - 12 - - - LEFT - - - 1724074853971 - polyline_strainedGridnode - -55 - 15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - v_gridNodeLineColorStrained - null - SOLID - 1 - 0 - 1 - 0 - - v_gridNodeColorStrained - null - - - 0 - 0 - 0 - - - 10 - -14 - 0 - - - 20 - 0 - 0 - - - 0 - 0 - 0 - - - false - - - 1724074853973 - txt_strainedGridnode - -25 - 2 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Trafo belast - - SansSerif - 12 - - - LEFT - - - - - 1724074839748 - gr_cables - 75 - 5 - - true - true - false - SHAPE_DRAW_2D3D - b_showCables - false - 0 - 0.0 - - - 1724074864095 - t_HV - true - -15 - 15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - HS-net - - SansSerif - 12 - - - LEFT - - - 1724074864097 - line_HV - true - -40 - 25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -16776961 - v_HVGridColor - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074870571 - t_MV - -15 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - MS-net - - SansSerif - 12 - - - LEFT - - - 1724074870573 - t_LV - -15 - -25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - LS-net - - SansSerif - 12 - - - LEFT - - - 1724074870575 - line_LV - -40 - -15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -6737204 - v_LVGridColor - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074870577 - line_MV - -40 - -40 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -12156236 - v_MVGridColor - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074875518 - t_gasNetwork - true - -15 - -2.5 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Gasnet - - SansSerif - 12 - - - LEFT - - - 1724074875520 - oval_gasNetwork - true - -35 - 5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 5.75 - 40 - 0.0 - -1 - v_gasGridColor - null - - - - - - - 1724074493431 - gr_buildings - 80 - 10 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074500599 - t_buildings - 50 - -84 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Gebouwen - - Calibri - 16 - - - LEFT - - - 1724074502826 - line_buildings - 380 - -64 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - -458 - 0 - 0 - - - 1724074508882 - gr_colorings - -180 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074508886 - txt_colorings - 4 - -71 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Kleur gebouwen o.b.v.: - - SansSerif - 11 - - - CENTER - - - - - - - 1753868816347 - gr_mapOverlayLegenda - 1750 - 840 - - true - true - false - SHAPE_DRAW_2D3D - 70 - 20 - false - 0 - 0.0 - - - 1753868816349 - gr_mapOverlayLegend_ElectricityConsumption - 180 - -10 - - true - false - false - SHAPE_DRAW_2D3D - 0 - -10 - false - 0 - 0.0 - - - 1753868816351 - rect_mapOverlayLegend_ElectricityConsumption1 - -60 - -52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -1 - null - - - 1753868816353 - rect_mapOverlayLegend_ElectricityConsumption2 - -60 - -28 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -32 - null - - - 1753868816355 - rect_mapOverlayLegend_ElectricityConsumption3 - -60 - -4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -263774 - null - - - 1753868816357 - rect_mapOverlayLegend_ElectricityConsumption4 - -60 - 20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -1063822 - null - - - 1753868816359 - rect_mapOverlayLegend_ElectricityConsumption5 - -60 - 44 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -3318692 - null - - - 1753868816361 - txt_mapOverlayLegend_ElectricityConsumption1 - -20 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 10 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 1500 kWh / jaar" : "< 10 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816363 - txt_mapOverlayLegend_ElectricityConsumption2 - -20 - -28 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 50 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 2500 kWh / jaar" : "< 50 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816365 - txt_mapOverlayLegend_ElectricityConsumption3 - -20 - -3 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 150 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 4000 kWh / jaar" : "< 150 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816367 - txt_mapOverlayLegend_ElectricityConsumption4 - -20 - 21 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 500 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 6000 kWh / jaar" : "< 500 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816369 - txt_mapOverlayLegend_ElectricityConsumption5 - -20 - 45 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - > 500 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "> 6000 kWh / jaar" : "> 500 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - - - 1753868816371 - gr_defaultLegenda - 10 - 10 - - true - true - false - SHAPE_DRAW_2D3D - 10 - 10 - false - 0 - 0.0 - - - 1753868816373 - oval_defaultLegend4 - -60 - 10 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1753868816375 - t_defaultLegend2 - -39.5 - -47.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Gedetaileerd bedrijf - - SansSerif - 12 - - - LEFT - - - 1753868816377 - t_defaultLegend5 - -39.5 - 27.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Overig - - SansSerif - 12 - - - LEFT - - - 1753868816379 - oval_defaultLegend5 - -60 - 35 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1753868816381 - t_defaultLegend3 - -39.5 - -22.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Bedrijf - - SansSerif - 12 - - - LEFT - - - 1753868816383 - oval_defaultLegend2 - -60 - -40 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1753868816385 - t_defaultLegend4 - -39.5 - 2.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Huis - - SansSerif - 12 - - - LEFT - - - 1753868816387 - oval_defaultLegend3 - -60 - -15 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1753868816389 - t_defaultLegend1 - -39.5 - -72.5 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selectie - - SansSerif - 12 - - - LEFT - - - 1753868816391 - oval_defaultLegend1 - -60 - -65 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - v_selectionColor - null - - - - - 1753868816393 - gr_mapOverlayLegend_PVProduction - 380 - 0 - - true - false - false - SHAPE_DRAW_2D3D - 0 - -10 - false - 0 - 0.0 - - - 1753868816395 - rect_mapOverlayLegend_PVProduction1 - -60 - -52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -1 - null - - - 1753868816397 - rect_mapOverlayLegend_PVProduction2 - -60 - -28 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -256 - null - - - 1753868816399 - rect_mapOverlayLegend_PVProduction3 - -60 - -4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -10496 - null - - - 1753868816401 - txt_mapOverlayLegend_PVProduction1 - -20 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geen opwek - - SansSerif - 10 - - - LEFT - - - 1753868816403 - txt_mapOverlayLegend_PVProduction2 - -20 - -28 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 100 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 5000 kWh / jaar" : "< 100 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816405 - txt_mapOverlayLegend_PVProduction3 - -20 - -3 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - > 100 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "> 5000 kWh / jaar" : "> 100 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - - - 1753868816407 - gr_mapOverlayLegend_gridNeighbours - 600 - 0 - - true - false - false - SHAPE_DRAW_2D3D - 0 - -10 - false - 0 - 0.0 - - - 1753868816409 - rect_mapOverlayLegend_gridNeighbours1 - -60 - -52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -8355712 - null - - - 1753868816411 - rect_mapOverlayLegend_gridNeighbours2 - -60 - -28 - - true - true - false - SHAPE_DRAW_2D3D - txt_mapOverlayLegend_gridNeighbours2.isVisible() - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -16776961 - null - - - 1753868816413 - rect_mapOverlayLegend_gridNeighbours3 - -60 - -4 - - true - true - false - SHAPE_DRAW_2D3D - txt_mapOverlayLegend_gridNeighbours3.isVisible() - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -65536 - null - - - 1753868816415 - txt_mapOverlayLegend_gridNeighbours1 - -20 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Onbekend - - SansSerif - 10 - - - LEFT - - - 1753868816417 - txt_mapOverlayLegend_gridNeighbours2 - -20 - -28 - - true - true - false - SHAPE_DRAW_2D - v_amountOfDefinedGridLoops > 0 - false - 0 - 0.0 - -16777216 - Lus 1 - - SansSerif - 10 - - - LEFT - - - 1753868816419 - txt_mapOverlayLegend_gridNeighbours3 - -20 - -3 - - true - true - false - SHAPE_DRAW_2D - v_amountOfDefinedGridLoops > 1 - false - 0 - 0.0 - -16777216 - Lus 2 - - SansSerif - 10 - - - LEFT - - - 1753868816421 - rect_mapOverlayLegend_gridNeighbours4 - -60 - 20 - - true - true - false - SHAPE_DRAW_2D3D - txt_mapOverlayLegend_gridNeighbours4.isVisible() - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -16711936 - null - - - 1753868816423 - txt_mapOverlayLegend_gridNeighbours4 - -20 - 20 - - true - true - false - SHAPE_DRAW_2D - v_amountOfDefinedGridLoops > 2 - false - 0 - 0.0 - -16777216 - Lus 3 - - SansSerif - 10 - - - LEFT - - - 1753868816425 - txt_mapOverlayLegend_gridNeighbours5 - -18 - 50 - - true - false - false - SHAPE_DRAW_2D - v_amountOfDefinedGridLoops > 4 - false - 0 - 0.0 - -16777216 - Etc. - - SansSerif - 10 - - - LEFT - - - - - 1753868816427 - gr_mapOverlayLegend_congestion - 800 - 0 - - true - false - false - SHAPE_DRAW_2D3D - 10 - -10 - false - 0 - 0.0 - - - false - 1753868816429 - rb_mapOverlayLegend_congestion - -80 - 5 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - rb_mapOverlay.setValue(rb_mapOverlay.getValue(), true); - - - - VERTICAL - - - - false - - - - 1753868816431 - txt_mapOverlayLegend_congestion3 - -80 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Type belasting: - - SansSerif - 11 - - - LEFT - - - 1753868816433 - rect_mapOverlayLegend_congestion1 - -80 - -55 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -8355712 - null - - - 1753868816435 - txt_mapOverlayLegend_congestion1 - -40 - -55 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Onbekende capaciteit - - SansSerif - 10 - - - LEFT - - - 1753868816437 - i_mapOverlayLegend_congestion_Degrees - 60 - -33 - - true - true - false - SHAPE_DRAW_2D3D - f_setInfoText(i_mapOverlayLegend_congestion_Degrees, v_infoText.i_mapOverlayLegend_congestion_Degrees, i_mapOverlayLegend_congestion_Degrees.getX() + gr_mapOverlayLegend_congestion.getX() + gr_mapOverlayLegenda.getX() + gr_legenda.getX(), i_mapOverlayLegend_congestion_Degrees.getY() + gr_mapOverlayLegend_congestion.getY() + gr_mapOverlayLegenda.getY() + gr_legenda.getY()); - false - 0 - 20 - 20 - 0.0 - - - zerointerfaceloader - icon_i.png - - - false - - - 1753868816439 - gr_rect_mapOverlayLegend_congestion2 - -65 - -25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753868816441 - rect_mapOverlayLegend_congestion21 - -15 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 8 - 15 - 0.0 - -16744448 - null - - - 1753868816443 - rect_mapOverlayLegend_congestion22 - -7 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 9 - 15 - 0.0 - -23296 - null - - - 1753868816445 - rect_mapOverlayLegend_congestion23 - 2 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 8 - 15 - 0.0 - -65536 - null - - - - - 1753868816447 - txt_mapOverlayLegend_congestion2 - -40 - -30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Stabiel - Overbelast - - SansSerif - 10 - - - LEFT - - - 1753868816449 - i_mapOverlayLegend_congestion_Types - -5 - -12 - - true - true - false - SHAPE_DRAW_2D3D - f_setInfoText(i_mapOverlayLegend_congestion_Types, v_infoText.i_mapOverlayLegend_congestion_Types, i_mapOverlayLegend_congestion_Types.getX() + gr_mapOverlayLegend_congestion.getX() + gr_mapOverlayLegenda.getX() + gr_legenda.getX(), i_mapOverlayLegend_congestion_Types.getY() + gr_mapOverlayLegend_congestion.getY() + gr_mapOverlayLegenda.getY() + gr_legenda.getY()); - false - 0 - 20 - 20 - 0.0 - - - zerointerfaceloader - icon_i.png - - - false - - - - - 1758020855460 - gr_mapOverlayLegend_EnergyLabel - 985 - -5 - - true - false - false - SHAPE_DRAW_2D3D - 10 - -20 - false - 0 - 0.0 - - - 1758020855462 - rect_mapOverlayLegend_EnergyLabelA - -60 - -52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -16751616 - v_energyLabelAColor - null - - - 1758020855464 - rect_mapOverlayLegend_EnergyLabelB - -60 - -35 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -16744448 - v_energyLabelBColor - null - - - 1758020855466 - rect_mapOverlayLegend_EnergyLabelC - -60 - -18 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -6632142 - v_energyLabelCColor - null - - - 1758020855468 - rect_mapOverlayLegend_EnergyLabelD - -60 - -1 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -10496 - v_energyLabelDColor - null - - - 1758020855470 - rect_mapOverlayLegend_EnergyLabelE - -60 - 16 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -23296 - v_energyLabelEColor - null - - - 1758020855472 - txt_mapOverlayLegend_EnergyLabelA - -20 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel A - - SansSerif - 10 - - - LEFT - - - 1758020855474 - txt_mapOverlayLegend_EnergyLabelB - -20 - -35 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel B - - SansSerif - 10 - - - LEFT - - - 1758020855476 - txt_mapOverlayLegend_EnergyLabelC - -20 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel C - - SansSerif - 10 - - - LEFT - - - 1758020855478 - txt_mapOverlayLegend_EnergyLabelD - -20 - 0 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel D - - SansSerif - 10 - - - LEFT - - - 1758020855480 - txt_mapOverlayLegend_EnergyLabelE - -20 - 17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel E - - SansSerif - 10 - - - LEFT - - - 1758022404682 - rect_mapOverlayLegend_EnergyLabelF - -60 - 33 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -47872 - v_energyLabelFColor - null - - - 1758022404684 - txt_mapOverlayLegend_EnergyLabelF - -20 - 34 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel F - - SansSerif - 10 - - - LEFT - - - 1758022520158 - rect_mapOverlayLegend_EnergyLabelG - -60 - 50 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -65536 - v_energyLabelGColor - null - - - 1758022520160 - txt_mapOverlayLegend_EnergyLabelG - -20 - 51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel G - - SansSerif - 10 - - - LEFT - - - 1758026700134 - rect_mapOverlayLegend_EnergyLabelUnknown - -60 - 67 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -8355712 - v_energyLabelUnknownColor - null - - - 1758026700136 - txt_mapOverlayLegend_EnergyLabelUnknown - -20 - 68 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Onbekend - - SansSerif - 10 - - - LEFT - - - - - - - 1750161603547 - gr_specificGISObjectLegend - 440 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074583633 - rect_specialGISObjectLegend1 - -180 - -40 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1724074583635 - t_specialGISObjectLegend1 - -150 - -40 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079302589 - rect_specialGISObjectLegend2 - -180 - -20 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079302591 - t_specialGISObjectLegend2 - -150 - -20 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079303790 - rect_specialGISObjectLegend3 - -180 - 0 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079303792 - t_specialGISObjectLegend3 - -150 - 0 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079304863 - rect_specialGISObjectLegend4 - -180 - 20 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079304865 - t_specialGISObjectLegend4 - -150 - 20 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079305949 - rect_specialGISObjectLegend5 - -180 - 40 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079305951 - t_specialGISObjectLegend5 - -150 - 40 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079521906 - rect_specialGISObjectLegend6 - -180 - 60 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079521908 - t_specialGISObjectLegend6 - -150 - 60 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093126455 - gr_extendedLegend - 170 - 960 - - true - false - false - SHAPE_DRAW_2D3D - 120 - -5 - false - 0 - 0.0 - - - 1750093048056 - rect_extendedLegend_line - true - -100 - -100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 200 - 205 - 0.0 - -542254 - rect_legendaBackground.getFillColor() - null - - - 1760980017754 - rect_extendedLegendLine - -114 - -85 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -6632142 - rect_legenda.getLineColor() - null - SOLID - 204 - 183 - 0.0 - -1 - null - - - 1750092986493 - rect_extendedLegend - -115 - -84.5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 0 - - null - SOLID - 204 - 182 - 0.0 - -1 - null - - - 1750093291589 - rect_specialGISObjectLegend7 - -90 - -35 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093291591 - t_specialGISObjectLegend7 - -60 - -35 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093292693 - rect_specialGISObjectLegend8 - -90 - -15 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093292695 - t_specialGISObjectLegend8 - -60 - -15 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093293851 - rect_specialGISObjectLegend9 - -90 - 5 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093293853 - t_specialGISObjectLegend9 - -60 - 5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093295400 - rect_specialGISObjectLegend10 - -90 - 25 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093295402 - t_specialGISObjectLegend10 - -60 - 25 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093296550 - rect_specialGISObjectLegend11 - -90 - 45 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093296552 - t_specialGISObjectLegend11 - -60 - 45 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093324907 - rect_specialGISObjectLegend12 - -90 - 65 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093324909 - t_specialGISObjectLegend12 - -60 - 65 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093436378 - line - -115 - -49 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 192 - 0 - 0 - - - - - 1750092915668 - t_seeMoreLegend - 0 - -70 - - true - true - false - SHAPE_DRAW_2D - t_specialGISObjectLegend7.isVisible(); - if(!gr_extendedLegend.isVisible()){ - gr_extendedLegend.setVisible(true); - t_seeMoreLegend.setText("Zie minder..."); -} -else{ - gr_extendedLegend.setVisible(false); - t_seeMoreLegend.setText("Zie meer..."); -} - false - 0 - 0.0 - -14774017 - Zie meer... - - SansSerif - 10 - - - LEFT - - - - - - - 1753883303789 - gr_simulateYearScreen - 1920 - 160 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1709717180404 - gr_loadIconYearSimulation - -261 - -25 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1709717180406 - rect_loadIconSmall - -219 - -50 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - zenmocolor_blue1.getFillColor() - null - DASHED - 460 - 250 - 0.0 - -369756683 - null - - - 1709717180408 - image_loadIconSmall - -19 - 60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - zerointerfaceloader - icon_loading.gif - - - false - - - 1709717180410 - t_loadIconSmall - 12 - 15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Jaar wordt gesimuleerd - - SansSerif - 22 - - - CENTER - - - - - 1709717180367 - gr_simulateYear - 270 - 20 - - true - false - false - SHAPE_DRAW_2D3D - -250 - 20 - false - 0 - 0.0 - - - 1709717180369 - rect_simulateYearScreenSmall - -230 - -95 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - DASHED - 460 - 185 - 0.0 - -1 - zenmocolor_blue2.getFillColor() - null - - - 1709717180371 - gr_simulateYearButton - 10 - 50 - - true - true - false - SHAPE_DRAW_2D3D - f_simulateYearFromMainInterface(); - false - 0 - 0.0 - - - 1709717180373 - t_simulateYearToCalculateCostsSmall - 10 - -60 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simuleer jaar voor KPI's - - SansSerif - 22 - - - CENTER - - - 1709717180375 - image_simulateYearToCalculateCostsSmall - -200 - -75 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - zerointerfaceloader - icon_greater_than.png - - - false - - - - - - - - - 1758032385328 - txt_cablesAndPipesColors - 380 - 1150 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Cables and pipes colors - - SansSerif - 14 - - - LEFT - - - 1758032461183 - txt_mapOverlayColors - 380 - 1270 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Specific map overlay colors - - SansSerif - 14 - - - LEFT - - - 1758878134333 - zenmocolor_blue3 - 1920 - 1260 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -4069658 - null - - - 1758878337017 - zenmocolor_blue - 1920 - 1020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -16744828 - null - - - 1758878373971 - zenmocolor_blue1 - 1920 - 1100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -14115680 - null - - - 1758878411330 - zenmocolor_yellow - 2020 - 1020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -212480 - null - - - 1758878483028 - zenmocolor_yellow1 - 2020 - 1100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -405954 - null - - - 1758878529753 - zenmocolor_yellow2 - 2020 - 1180 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -402308 - null - - - 1758878532475 - zenmocolor_yellow3 - 2020 - 1260 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -398405 - null - - - 1758878539502 - zenmocolor_red - 1820 - 1020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -1834917 - null - - - 1758878547235 - zenmocolor_red1 - 1820 - 1100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -1426815 - null - - - 1758878550221 - zenmocolor_red2 - 1820 - 1180 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -886359 - null - - - 1758878552357 - zenmocolor_red3 - 1820 - 1260 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -542254 - null - - - 1758878556881 - zenmocolor_blue2 - 1920 - 1180 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -10502977 - null - - - 1758882933738 - line1 - 10 - 300 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -402308 - null - SOLID - 1 - 0 - 1 - 0 - 375 - 0 - 0 - - - 1758882973077 - line2 - 10 - 440 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -402308 - null - SOLID - 1 - 0 - 1 - 0 - 375 - 0 - 0 - - - 1758882977187 - line3 - 5 - 100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -402308 - null - SOLID - 1 - 0 - 1 - 0 - 375 - 0 - 0 - - - 1761138344359 - txt_projectSpecificScenarios - -1190 - 500 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Project specific scenarios - - SansSerif - 14 - - - LEFT - - - 1762354401486 - image_loadingScreenIcon - 3470 - 3040 - 680 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 180 - 180 - 0.0 - - - zerointerfaceloader - icon_loading.gif - - - false - - - - - 1699290897134 - level1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - - 1696520909213 - va_Interface - 0 - 0 - - false - true - false - - <Width>1920</Width> - <Height>980</Height> - </Area> - <Area> - <Id>1747229303402</Id> - <Name>va_EHubDashboard</Name> - <X>2600</X> - <Y>-2200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Title/> - <Width>1920</Width> - <Height>980</Height> - </Area> - </Areas> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1726584205735</Id> - <Name>Zero_Loader</Name> - <Import>import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.databind.node.TextNode; -import com.fasterxml.jackson.databind.node.NumericNode; -import com.fasterxml.jackson.core.type.TypeReference; - -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.annotation.JsonAutoDetect; - -import java.io.FileOutputStream; -import java.util.stream.Stream; -import java.util.stream.IntStream; -import java.util.Dictionary.*; -import java.util.Hashtable.*; -import java.util.*; -import java.util.stream.Collectors; -import org.apache.commons.lang3.tuple.Triple; - -import java.io.*; -import java.io.File; -import java.io.IOException; -//import java.util.Date; -import java.text.SimpleDateFormat; -import com.fasterxml.jackson.databind.node.JsonNodeFactory; - - -//Possibility to turn of traceln -import java.io.OutputStream; -import java.io.PrintStream; - -//Import survey API library -import com.zenmo.vallum.Vallum; -import com.zenmo.zummon.companysurvey.TimeSeries; - -import zeroPackage.ZeroMath; -import com.zenmo.zummon.companysurvey.PandIDKt; -import com.zenmo.vallum.PandKt; -import kotlinx.datetime.DateTimeUnit; - -import com.zenmo.zummon.companysurvey.HeatingType; -import com.querydsl.core.types.dsl.CaseBuilder; - -import energy.lux.uplux.*; -import java.util.UUID;</Import> - <Generic>false</Generic> - <GenericParameter> - <Id>1726584205730</Id> - <Name>1726584205730</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>GIS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>false</AutoCreate> - <Id>1658477089958</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1658563200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>p_timeStep_h</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1726584205731</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1726584205903</CurrentLevel> - <ConnectionsId>1726584206083</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1726584205883</Id> - <Name>v_timeOfModelStart_ms</Name> - <X>1560</X> - <Y>140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1726584205885</Id> - <Name>v_modelStartUpDuration_s</Name> - <X>1560</X> - <Y>160</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1726584205887</Id> - <Name>v_simStartYear</Name> - <X>1560</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1733235094633</Id> - <Name>v_numberOfSurveyCompanies</Name> - <X>1560</X> - <Y>240</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1733389557748</Id> - <Name>v_simStartHour_h</Name> - <Description>The hour 0 is defined as january 1st, 00:00h in the year energyModel.p_year</Description> - <X>1560</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1733390702422</Id> - <Name>v_simDuration_h</Name> - <X>1560</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>8760</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1737972861302</Id> - <Name>map_buildingData_Vallum</Name> - <X>-370</X> - <Y>395</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Map<String, com.zenmo.bag.Pand></Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1753450969530</Id> - <Name>v_objectMapper</Name> - <X>2100</X> - <Y>49</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>ObjectMapper</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1755876520422</Id> - <Name>v_probabilityForAdditionalCar_privateParking</Name> - <X>1560</X> - <Y>190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1755876547633</Id> - <Name>v_probabilityForAdditionalCar_publicParking</Name> - <X>1560</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206064</Id> - <Name>zero_Interface</Name> - <X>30</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>Zero_Interface</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206062</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206070</Id> - <Name>defaultProfiles_data</Name> - <X>-370</X> - <Y>280</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>DefaultProfiles_data</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206068</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206073</Id> - <Name>project_data</Name> - <Description>Should be filled with the Project_data record created in the startup of the project model</Description> - <X>-370</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>Project_data</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206071</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206076</Id> - <Name>settings</Name> - <Description>Should be filled with the settings record created in the startup of the project model</Description> - <X>-370</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>Settings</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206074</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206079</Id> - <Name>user</Name> - <X>-370</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>User</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206077</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1762184918471</Id> - <Name>p_userIdToken</Name> - <X>2280</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>String</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1762184918469</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1761907535651</Id> - <Name>p_remainingTotals</Name> - <X>1560</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>J_RemainingTotalsManager</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>new J_RemainingTotalsManager(avgc_data)</Code> - </DefaultValue> - <ParameterEditor> - <Id>1761907535649</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205737</Id> - <Name>c_gridNodeIDsInScope</Name> - <X>1560</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>String</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205739</Id> - <Name>c_companyBuilding_data</Name> - <X>-370</X> - <Y>415</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205741</Id> - <Name>c_gridNode_data</Name> - <X>-370</X> - <Y>360</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GridNode_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205743</Id> - <Name>c_surveyCompanyBuilding_data</Name> - <X>-380</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="private" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205745</Id> - <Name>c_houseBuilding_data</Name> - <X>-370</X> - <Y>435</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205747</Id> - <Name>c_solarfarm_data</Name> - <X>-370</X> - <Y>482</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Solarfarm_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205749</Id> - <Name>c_windfarm_data</Name> - <X>-370</X> - <Y>502</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Windfarm_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205751</Id> - <Name>c_electrolyser_data</Name> - <X>-370</X> - <Y>521</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Electrolyser_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205753</Id> - <Name>c_battery_data</Name> - <X>-370</X> - <Y>540</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Battery_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205755</Id> - <Name>c_cable_data</Name> - <X>-370</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Cable_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205757</Id> - <Name>c_neighbourhood_data</Name> - <X>-370</X> - <Y>590</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Neighbourhood_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205759</Id> - <Name>c_remainingBuilding_data</Name> - <X>-370</X> - <Y>455</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205763</Id> - <Name>c_chargingstation_data</Name> - <X>-370</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Chargingstation_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205765</Id> - <Name>c_parcel_data</Name> - <X>-370</X> - <Y>630</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Parcel_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1737744140895</Id> - <Name>c_vallumBuilding_data</Name> - <X>-380</X> - <Y>930</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1748944117397</Id> - <Name>c_customProfiles_data</Name> - <X>-370</X> - <Y>300</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>CustomProfile_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1749631164240</Id> - <Name>c_gridNodeIDsWithProfiles</Name> - <X>1560</X> - <Y>350</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>String</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1749649688266</Id> - <Name>c_chargerProfiles_data</Name> - <X>-370</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>ChargerProfile_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1749738339329</Id> - <Name>c_parkingSpace_data</Name> - <X>-370</X> - <Y>610</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>ParkingSpace_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1759135072429</Id> - <Name>c_GISregions</Name> - <X>2100</X> - <Y>149</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>LinkedHashMap</CollectionClass> - <ElementClass>String</ElementClass> - <ValueElementClass>GISRegion</ValueElementClass> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205769</Id> - <Name>f_createGISRegions</Name> - <Description>Creates the outline of the simulated area</Description> - <X>1546.739</X> - <Y>539</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>// Create neighborhoods and draw them -for (Neighbourhood_data NBH : c_neighbourhood_data) { - GIS_Object area = energyModel.add_pop_GIS_Objects(); - - area.p_id = NBH.districtname(); - area.p_GISObjectType = OL_GISObjectType.valueOf(NBH.neighbourhoodtype()); - - //Create gisregion - area.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(NBH.polygon(), area.p_GISObjectType)); - - //Style area - zero_Interface.f_styleSimulationAreas(area); - zero_Interface.c_GISNeighborhoods.add(area); - - - //Energy totals - p_remainingTotals.addNBH(NBH); -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205771</Id> - <Name>f_createGridConnections</Name> - <X>90</X> - <Y>250</Y> - <Label> - <X>11</X> - <Y>1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Energy production sites -f_createSolarParks(); -f_createWindFarms(); - -//Other infra assets -f_createChargingStations(); -f_createElectrolysers(); -f_createBatteries(); - -//Consumers -f_createCompanies(); -f_createHouses();</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205773</Id> - <Name>f_configureEngine_default</Name> - <Description>Generieke functie die flexibele modelconfiguratie mogelijk maakt op basis van externe data. Expliciet gemodelleerd om profiling en volgorde van initialisatie te kunnen controleren. - -@param: none -@return: none -@since: Sprint 6 -@author: Jorrit</Description> - <X>79</X> - <Y>191</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Set basic input files -energyModel.p_truckTripsCsv = inputCSVtruckTrips; -energyModel.p_householdTripsCsv = inputCSVhouseholdTrips; -energyModel.p_cookingPatternCsv = inputCSVcookingActivities; - -//Initialize specific slider GC -f_initializeSpecificSliderGC(); - -//Actors -f_createActors(); - -//Grid nodes -f_createGridNodes(); - -//Create regions and initialize energy totals per region -f_createGISRegions(); - -//Grid connections -f_createGridConnections(); - -//Additional GIS objects -f_createAdditionalGISObjects(); - -//Initialize the engine -energyModel.p_runStartTime_h = v_simStartHour_h; -energyModel.p_runEndTime_h = v_simStartHour_h + v_simDuration_h; -energyModel.f_initializeEngine(); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205775</Id> - <Name>f_createGridNodes</Name> - <X>50</X> - <Y>540</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//double latitude_c; -//double longitude_c; -OL_GridNodeType nodeType; -GISRegion gisregion; - -// Grid operator (for now only one in the area) -GridOperator Grid_Operator = findFirst(energyModel.pop_gridOperators, p->p.p_actorID.equals(project_data.grid_operator())) ; - -for (GridNode_data GN_data : c_gridNode_data) { - // if no scope selected, or if node has 'all scopes' in input file or if the node specific scope is selected (exists in the arrayList) - if( settings.subscopesToSimulate() == null || settings.subscopesToSimulate().isEmpty() || GN_data.subscope() == null || settings.subscopesToSimulate().indexOf(GN_data.subscope()) > -1 ){ - if (GN_data.status()) { - GridNode GN = energyModel.add_pop_gridNodes(); - GN.p_gridNodeID = GN_data.gridnode_id(); - c_gridNodeIDsInScope.add(GN.p_gridNodeID); - - // Check wether transformer capacity is known or estimated - GN.p_capacity_kW = GN_data.capacity_kw(); - GN.p_originalCapacity_kW = GN.p_capacity_kW; - GN.p_realCapacityAvailable = GN_data.is_capacity_available(); - - // Basic GN information - //GN.p_nodeStatus = GN_data.status(); - GN.p_description = GN_data.description(); - String nodeTypeString = GN_data.type(); - - // Connect - GN.p_parentNodeID = GN_data.parent_node_id(); // Needs to be manually defined in the excel file of the nodes! - GN.p_ownerGridOperator = Grid_Operator; - - //Define node type - switch (nodeTypeString) { - case "LVLV": - GN.p_nodeType = OL_GridNodeType.LVLV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "MVLV": - GN.p_nodeType = OL_GridNodeType.MVLV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "SUBMV": - GN.p_nodeType = OL_GridNodeType.SUBMV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - zero_Interface.b_gridLoopsAreDefined = true; - break; - case "MVMV": - GN.p_nodeType = OL_GridNodeType.MVMV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "HVMV": - GN.p_nodeType = OL_GridNodeType.HVMV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - default: - traceln("There is a gridnode in your input file with an incorrect node type"); - break; - } - - //Define GN location - GN.p_latitude = GN_data.latitude(); - GN.p_longitude = GN_data.longitude(); - GN.setLatLon(GN.p_latitude, GN.p_longitude); - - //Create gis region - GN.gisRegion = zero_Interface.f_createGISObject(f_createGISNodesTokens(GN)); - zero_Interface.f_styleGridNodes(GN); - - //Grid operator nodes - Grid_Operator.c_electricityGridNodes.add(GN); - - - //Gridnode service area - if (GN_data.service_area_polygon() != null){ - //Create service area gis object - //GIS_Object serviceArea = f_createGISObject(GN.p_gridNodeID + ": service area", GN.p_latitude, GN.p_longitude, GN_data.service_area_polygon()); - GN.p_serviceAreaGisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(GN_data.service_area_polygon(), OL_GISObjectType.GN_SERVICE_AREA)); - - //Add to hashmap - zero_Interface.c_GISNetplanes.add( GN.p_serviceAreaGisRegion ); - } - - //Gridnode profile - if(GN_data.profile_data_kWh() != null){ - f_addGridNodeProfile(GN, GN_data.profile_data_kWh()); - } - } - } -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[]</ReturnType> - <Id>1726584205777</Id> - <Name>f_createGISObjectsTokens</Name> - <X>1565.241</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>RegionCoords</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>GISObjectType</Name> - <Type>OL_GISObjectType</Type> - </Parameter> - <Body>if (RegionCoords.startsWith("MultiPolygon")){ - RegionCoords = RegionCoords.replace("MultiPolygon (((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace(")))",""); -} -else if(RegionCoords.startsWith("MULTIPOLYGON")){ - RegionCoords = RegionCoords.replace("MULTIPOLYGON (((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace(")))",""); -} -else if(RegionCoords.startsWith("Poly")){ - RegionCoords = RegionCoords.replace("Polygon ((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace("))",""); -} -else if(RegionCoords.startsWith("POLYGON")){ - RegionCoords = RegionCoords.replace("POLYGON ((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace("))",""); -} -else if(RegionCoords.startsWith("MultiLineString")){ - RegionCoords = RegionCoords.replace("MultiLineString ((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace("))",""); -} -else if(RegionCoords.startsWith("LineString")){ - RegionCoords = RegionCoords.replace("LineString (",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace(")",""); -} -else { - traceln("GIS coordinaten in de excel data die niet starten met Multi of Poly"); -} - - - -if(RegionCoords.contains(")(") || RegionCoords.contains(") (") || RegionCoords.contains(") (")){ - if (GISObjectType == OL_GISObjectType.ANTI_LAYER){ - RegionCoords = RegionCoords.replace(")("," "); // Combine all polies into one! - RegionCoords = RegionCoords.replace(") ("," "); // Combine all polies into one! - } - else{ - RegionCoords = RegionCoords.split("\\)")[0]; - } -} - -RegionCoords = RegionCoords.replace(" "," "); -String delims = " "; -String[] tokens; -tokens = RegionCoords.split(delims); - -int nbCoords = tokens.length; -double[] GISCoords = new double[nbCoords]; - -for (int i=0; i<nbCoords; i++) { - if (i % 2 == 0) { // latitudes - GISCoords[i]=Double.parseDouble(tokens[i+1]); - } else { // longitudes - GISCoords[i]=Double.parseDouble(tokens[i-1]); - } -} -return GISCoords;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205779</Id> - <Name>f_importExcelTablesToDB</Name> - <Description>Automatisch inladen van excel files uit de model map naar de database. - -@author: Ate -@since: 14-12-23</Description> - <X>-390</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//inputHouseholdTrips.readFile(); -//inputCookingActivities.readFile(); -//inputTruckTrips.readFile(); - -//inputCSVcookingActivities.readFile(); -//inputCSVcookingActivities. - -if(settings.reloadDatabase()){ - - //Get the database names that are selected for reloading - List<String[]> databaseNames = project_data.databaseNames(); - - //Get the model database - ModelDatabase modelDB = getEngine().getModelDatabase(); - - //Loop over all databases - for(String[] databaseName : databaseNames){ - - //Create the file path string - String filePathString = "data_" + project_data.project_name() + "/" + databaseName[0] + "_" + project_data.project_name() + ".xlsx"; - - //If file exists, load it into the database - File f = new File(filePathString); - if(f.exists() && !f.isDirectory()) { - Database myFileDatabase = new Database(this, databaseName[1], filePathString); - modelDB.importFromExternalDB(myFileDatabase.getConnection(), databaseName[1], databaseName[1], true, false); - traceln("Database %s has been updated.", databaseName[1]); - } else { // if file does not exist, clear the database to make sure there are no wrong values in the simulation! - executeStatement("DELETE FROM " + databaseName[1] + " c"); - traceln("File not found, database %s has been cleared!", databaseName[1]); - } - } - - //Overwrite specific database values - f_overwriteSpecificDatabaseValues(); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205785</Id> - <Name>f_createSolarParks</Name> - <Description>Function used to generate solar parks: grid connections and park owner (connection owner actor)</Description> - <X>430.001</X> - <Y>790.001</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>ConnectionOwner owner; -GCEnergyProduction solarpark; - -List<String> existing_actors = new ArrayList(); -List<String> existing_solarFields = new ArrayList(); - -for (Solarfarm_data dataSolarfarm : f_getSolarfarmsInSubScope(c_solarfarm_data)) { // MOET NOG CHECK OF ZONNEVELD ACTOR AL BESTAAT OP, zo ja --> Zonneveld koppelen aan elkaar en niet 2 GC en 2 actoren maken. - - if (!existing_solarFields.contains( dataSolarfarm.gc_id() )) { - solarpark = energyModel.add_EnergyProductionSites(); - - solarpark.set_p_gridConnectionID( dataSolarfarm.gc_id() ); - solarpark.set_p_name( dataSolarfarm.gc_name() ); - - //Check wether it can be changed using sliders - solarpark.p_isSliderGC = dataSolarfarm.isSliderGC(); - - //Grid Capacity - solarpark.v_liveConnectionMetaData.physicalCapacity_kW = dataSolarfarm.connection_capacity_kw(); - if ( dataSolarfarm.connection_capacity_kw() > 0 ) { - solarpark.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataSolarfarm.contracted_feed_in_capacity_kw() != null) { - solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.contracted_feed_in_capacity_kw(); - solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.connection_capacity_kw(); - solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - - //solarpark.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - solarpark.set_p_ownerID( dataSolarfarm.owner_id() ); - solarpark.set_p_parentNodeElectricID( dataSolarfarm.gridnode_id() ); - - solarpark.v_isActive = dataSolarfarm.initially_active() ; - - //Add EA - f_addEnergyProduction(solarpark, OL_EnergyAssetType.PHOTOVOLTAIC, "Solar farm" , dataSolarfarm.capacity_electric_kw()); - - - if (!existing_actors.contains(solarpark.p_ownerID)){ // check if owner exists already, if not, create new owner. - owner = energyModel.add_pop_connectionOwners(); - - owner.set_p_actorID( dataSolarfarm.owner_id()); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.SOLARFARM_OP ); - owner.b_dataSharingAgreed = true; - existing_actors.add(owner.p_actorID); - } - else { // Owner exists already: add new GC to existing owner - owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataSolarfarm.owner_id())); - } - - solarpark.set_p_owner( owner ); - - existing_solarFields.add(solarpark.p_gridConnectionID); - } - else { // solarpark and its owner exist already, only create new gis building which is added to the park - solarpark = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataSolarfarm.gc_id()) ); - owner = solarpark.p_owner; - - } - - if (dataSolarfarm.polygon() != null) { - //Create GIS object for the solar park - GIS_Object area = f_createGISObject( dataSolarfarm.gc_name(), dataSolarfarm.latitude(), dataSolarfarm.longitude(), dataSolarfarm.polygon(), OL_GISObjectType.SOLARFARM); - - //Add to collections - area.c_containedGridConnections.add(solarpark); - solarpark.c_connectedGISObjects.add(area); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_solarParkColor ); - area.set_p_defaultLineColor( zero_Interface.v_solarParkLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } -} -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205787</Id> - <Name>f_createBatteries</Name> - <Description>Function used to create (neighborhood) battery grid connection and actor</Description> - <X>430.001</X> - <Y>930</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>for (Battery_data dataBattery : f_getBatteriesInSubScope(c_battery_data)) { // MOET NOG CHECK OF battery ACTOR AL BESTAAT OP, zo ja --> battery koppelen aan elkaar en niet 2 GC en 2 actoren maken. - - ConnectionOwner owner = energyModel.add_pop_connectionOwners(); - GCGridBattery gridbattery = energyModel.add_GridBatteries(); - - //Owner parameters - owner.set_p_actorID( dataBattery.owner_id() ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.BATTERY_OP ); - owner.b_dataSharingAgreed = true; - - //GC parameters - gridbattery.set_p_gridConnectionID( dataBattery.gc_id () ); - gridbattery.set_p_name( dataBattery.gc_name() ); - gridbattery.set_p_ownerID( dataBattery.owner_id() ); - gridbattery.set_p_owner( owner ); - gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); - - //Check wether it can be changed using sliders - gridbattery.p_isSliderGC = dataBattery.isSliderGC(); - - //Grid Capacity - gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); - if ( dataBattery.connection_capacity_kw() > 0 ) { - gridbattery.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataBattery.contracted_delivery_capacity_kw() != null ) { - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.contracted_delivery_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - else { - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.connection_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - if ( dataBattery.contracted_feed_in_capacity_kw() != null ) { - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.contracted_feed_in_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.connection_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - gridbattery.set_p_parentNodeElectricID( dataBattery.gridnode_id() ); - //gridbattery.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - - switch (dataBattery.operation_mode()) { - case PRICE: - gridbattery.f_setBatteryManagement(new J_BatteryManagementPrice(gridbattery)); - break; - case PEAK_SHAVING_PARENT_NODE: - J_BatteryManagementPeakShaving batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); - GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals(gridbattery.p_parentNodeElectricID)); - if (gn == null) { - throw new RuntimeException("Could not find GridNode with ID: " + gridbattery.p_parentNodeElectricID + " for GCGridBattery"); - } - batteryAlgorithm.setTarget(gn); - gridbattery.f_setBatteryManagement(batteryAlgorithm); - break; - case PEAK_SHAVING_COOP: - // target agent is still null, should be set at the moment of coop creation - batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); - batteryAlgorithm.setTargetType( OL_ResultScope.ENERGYCOOP ); - gridbattery.f_setBatteryManagement(batteryAlgorithm); - break; - default: - throw new RuntimeException("Battery Operation Mode: " + dataBattery.operation_mode() + " is not supported for GCGridBattery."); - } - - //Get initial state - gridbattery.v_isActive = dataBattery.initially_active(); - - if (dataBattery.polygon() != null) { - //Create gis object for the battery - GIS_Object area = f_createGISObject( dataBattery.gc_name(), dataBattery.latitude(), dataBattery.longitude(), dataBattery.polygon(), OL_GISObjectType.BATTERY); - - //Add to collections - gridbattery.c_connectedGISObjects.add(area); - area.c_containedGridConnections.add(gridbattery); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_batteryColor ); - area.set_p_defaultLineColor( zero_Interface.v_batteryLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } - //Create energy asset for the battery - f_addStorage(gridbattery, dataBattery.capacity_electric_kw(), dataBattery.storage_capacity_kwh(), OL_EnergyAssetType.STORAGE_ELECTRIC ); - -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205789</Id> - <Name>f_createElectrolysers</Name> - <Description>Function used to create electrolyser grid connections and actors</Description> - <X>430</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>ConnectionOwner owner; -List<String> existing_actors = new ArrayList(); - - -for (Electrolyser_data dataElectrolyser : f_getElectrolysersInSubScope(c_electrolyser_data)) { - GCEnergyConversion H2Electrolyser = energyModel.add_EnergyConversionSites(); - - H2Electrolyser.set_p_gridConnectionID( dataElectrolyser.gc_id() ); - H2Electrolyser.set_p_name( dataElectrolyser.gc_name() ); - //H2Electrolyser.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - H2Electrolyser.set_p_ownerID( dataElectrolyser.owner_id() ); - H2Electrolyser.set_p_parentNodeElectricID( dataElectrolyser.gridnode_id() ); - - //Grid Capacity - H2Electrolyser.v_liveConnectionMetaData.physicalCapacity_kW = dataElectrolyser.connection_capacity_kw(); - if ( dataElectrolyser.connection_capacity_kw() > 0 ) { - H2Electrolyser.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataElectrolyser.contracted_delivery_capacity_kw() != null ) { - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.contracted_delivery_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - else { - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.connection_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - if ( dataElectrolyser.contracted_feed_in_capacity_kw() != null ) { - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.contracted_feed_in_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.connection_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - - - H2Electrolyser.v_isActive = dataElectrolyser.initially_active(); - H2Electrolyser.p_minProductionRatio = dataElectrolyser.min_production_ratio(); - - //Electrolyser operation mode - H2Electrolyser.set_p_electrolyserOperationMode( dataElectrolyser.default_operation_mode()); - - //Create EA for the electrolyser GC - J_EAConversionElectrolyser h2ElectrolyserEA = new J_EAConversionElectrolyser(H2Electrolyser, dataElectrolyser.capacity_electric_kw(), dataElectrolyser.conversion_efficiency(), energyModel.p_timeStep_h, OL_ElectrolyserState.STANDBY, dataElectrolyser.load_change_time_s(), dataElectrolyser.start_up_time_shutdown_s(), dataElectrolyser.start_up_time_standby_s(), dataElectrolyser.start_up_time_idle_s()); - - if (!existing_actors.contains(H2Electrolyser.p_ownerID)){ // check if owner exists already, if not, create new owner. - owner = energyModel.add_pop_connectionOwners(); - - owner.set_p_actorID( H2Electrolyser.p_ownerID ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.ELECTROLYSER_OP ); - owner.b_dataSharingAgreed = true; - } - else { // Owner exists already: add new GC to existing owner - owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataElectrolyser.owner_id())); - } - - H2Electrolyser.set_p_owner( owner ); - - if (dataElectrolyser.polygon() != null) { - //Create GIS object for the electrolyser - GIS_Object area = f_createGISObject( dataElectrolyser.gc_name(), dataElectrolyser.latitude(), dataElectrolyser.longitude(), dataElectrolyser.polygon(), OL_GISObjectType.ELECTROLYSER); - - //Add to collections - area.c_containedGridConnections.add(H2Electrolyser); - H2Electrolyser.c_connectedGISObjects.add(area); - - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_electrolyserColor ); - area.set_p_defaultLineColor( zero_Interface.v_electrolyserLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205791</Id> - <Name>f_createWindFarms</Name> - <Description>Function used to create all windfarm grid connections, actors, EAs and GISObjects</Description> - <X>430.001</X> - <Y>810</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>ConnectionOwner owner; -GCEnergyProduction windfarm; - -List<String> existing_actors = new ArrayList(); -List<String> existing_windFarms = new ArrayList(); - -for (Windfarm_data dataWindfarm : f_getWindfarmsInSubScope(c_windfarm_data)) { - if (!existing_windFarms.contains(dataWindfarm.gc_id())) { // Check if windfarm exists already, if not, create new windfarm GC + turbine - windfarm = energyModel.add_EnergyProductionSites(); - - windfarm.set_p_gridConnectionID( dataWindfarm.gc_id() ); - windfarm.set_p_name( dataWindfarm.gc_name() ); - - //Check wether it can be changed using sliders - windfarm.p_isSliderGC = dataWindfarm.isSliderGC(); - - //Grid capacity - windfarm.v_liveConnectionMetaData.physicalCapacity_kW = dataWindfarm.connection_capacity_kw(); - if ( dataWindfarm.connection_capacity_kw() > 0 ) { - windfarm.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataWindfarm.contracted_feed_in_capacity_kw() != null) { - windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.contracted_feed_in_capacity_kw(); - windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.connection_capacity_kw(); - windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - //windfarm.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - windfarm.set_p_ownerID( dataWindfarm.owner_id() ); - windfarm.set_p_parentNodeElectricID( dataWindfarm.gridnode_id() ); - - //Get initial state - windfarm.v_isActive = dataWindfarm.initially_active(); - - //Create EA for the windturbine GC - f_addEnergyProduction(windfarm, OL_EnergyAssetType.WINDMILL, "Windmill onshore", dataWindfarm.capacity_electric_kw()); - - if (!existing_actors.contains(windfarm.p_ownerID)){ // check if owner exists already, if not, create new owner. - owner = energyModel.add_pop_connectionOwners(); - - owner.set_p_actorID( windfarm.p_ownerID ); - //owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.WINDFARM_OP ); - owner.b_dataSharingAgreed = true; - } - else { // Owner exists already: add new GC to existing owner - owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataWindfarm.owner_id())); - } - - windfarm.set_p_owner( owner ); - - existing_windFarms.add(windfarm.p_gridConnectionID); - } - else { // winfarm and its owner exist already, only create new gis building which is added to the farm - windfarm = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataWindfarm.gc_id()) ); - owner = windfarm.p_owner; - - } - - //Create GIS object for the windfarm - if (dataWindfarm.polygon() != null) { - GIS_Object area = f_createGISObject( dataWindfarm.gc_name(), dataWindfarm.latitude(), dataWindfarm.longitude(), dataWindfarm.polygon(), OL_GISObjectType.WINDFARM ); - - //Add to collections - area.c_containedGridConnections.add(windfarm); - windfarm.c_connectedGISObjects.add(area); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_windFarmColor ); - area.set_p_defaultLineColor( zero_Interface.v_windFarmLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[]</ReturnType> - <Id>1726584205793</Id> - <Name>f_createGISNodesTokens</Name> - <X>70</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GN</Name> - <Type>GridNode</Type> - </Parameter> - <Body>double scaling_factor_LVLV = zero_Interface.v_LVLVNodeSize; -double scaling_factor_MVLV = zero_Interface.v_MVLVNodeSize; -double scaling_factor_MVMV = zero_Interface.v_MVMVNodeSize; -double scaling_factor_HVMV = zero_Interface.v_HVMVNodeSize; - -int nb_GISCoords; -String node_shape = "TRIANGLE"; -double scaling_factor_gridnode = 0; - -switch( GN.p_nodeType ) { - case LVLV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_LVLV; - break; - case MVLV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_MVLV; - break; - case SUBMV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_MVLV; - break; - case MVMV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_MVMV; - break; - case HVMV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_HVMV; - break; - case HT: - nb_GISCoords = 6; - break; - case MT: - nb_GISCoords = 6; - break; - case LT: - nb_GISCoords = 6; - break; - case LT5thgen: - nb_GISCoords = 6; - break; - default: - nb_GISCoords = 6; -} - -double[] GISCoords = new double[nb_GISCoords]; - - -switch(node_shape){ - - case "TRIANGLE": - //latitudes - GISCoords[0]=GN.p_latitude; - GISCoords[2]=GN.p_latitude - scaling_factor_gridnode*0.00001; - GISCoords[4]=GN.p_latitude - scaling_factor_gridnode*0.00001; - - //longitudes - GISCoords[1]=GN.p_longitude; - GISCoords[3]=GN.p_longitude + scaling_factor_gridnode*0.00001; - GISCoords[5]=GN.p_longitude - scaling_factor_gridnode*0.00001; - break; - case "DIAMOND": - //latitudes - GISCoords[0]=GN.p_latitude; - GISCoords[2]=GN.p_latitude - scaling_factor_gridnode*0.00001; - GISCoords[4]=GN.p_latitude; - GISCoords[6]=GN.p_latitude + scaling_factor_gridnode*0.00001; - - //longitudes - GISCoords[1]=GN.p_longitude; - GISCoords[3]=GN.p_longitude + scaling_factor_gridnode*0.00001; - GISCoords[5]=GN.p_longitude + scaling_factor_gridnode*0.00001*2; - GISCoords[7]=GN.p_longitude + scaling_factor_gridnode*0.00001; - break; - /* - case "CIRCLE": - // if you want Circle coordinates --> - //x = r * cos(t) + a - //y = r * sin(t) + b - //t is an angle between 0 and 2π (more steps is more circle points, about 10-12 should suffice. --> adjust nb_GISCoords accordingly - // r is the radius: 0.000009 degrees in latitude is about 1 meter - // a and b are latitude and longitude - break; - */ -} - -return GISCoords; - - - - - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205795</Id> - <Name>f_createEnergyActors</Name> - <Description>Function used to generate specific actors like grid operator, energy supplier and energy coop. Actors used to create variable pricing.</Description> - <X>60</X> - <Y>460</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>// Create the grid operator -GridOperator GO = energyModel.add_pop_gridOperators(); - -GO.p_actorID = project_data.grid_operator(); -GO.p_hasCongestionPricing = project_data.hasCongestionPricing() != null ? project_data.hasCongestionPricing() : false; - - -// Create the energy coop -if (project_data.energy_coop() != null && !project_data.energy_coop().equals("None")){ - - EnergyCoop EC = energyModel.add_pop_energyCoops(); - - EC.p_actorID = project_data.energy_coop(); - EC.p_gridOperator = GO; - //EC.p_CoopParent = EC.p_actorID; // WAT BETEKENT COOP PARENT?? -} - - -// Energy supplier -if (project_data.energy_supplier() != null && !project_data.energy_supplier().equals("None")){ - - EnergySupplier ES = energyModel.add_pop_energySuppliers(); - - ES.p_actorID = project_data.energy_supplier(); -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205799</Id> - <Name>f_createGenericCompanies</Name> - <Description>Creating the companies (using a single GC) + owned buildings, that have not filled in the survey. If created, they will be simulated using average values, scaled with the totals (CBS data) of the area.</Description> - <X>430</X> - <Y>523</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Initialize variables -List<GCUtility> generic_company_GCs = new ArrayList(); -HashMap<GridConnection, Double> map_GC_to_installedBuildingPV = new HashMap(); - -//Get buildings in scope -List<Building_data> buildingDataGenericCompanies = f_getBuildingsInSubScope(c_companyBuilding_data); - -//Add generic companies to the legend if in model -if(buildingDataGenericCompanies.size()>0){ - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DEFAULT_COMPANY); -} - -//Loop over the remaining buildings in c_CompanyBuilding_data (Survey buildings have been removed from this collection) -for (Building_data genericCompany : buildingDataGenericCompanies) { - - GCUtility companyGC = findFirst(generic_company_GCs, GC -> GC.p_gridConnectionID.equals(genericCompany.address_id())); - - if(companyGC == null){ - //Create new companyGC - companyGC = energyModel.add_UtilityConnections(); - - //Update counter and collections - generic_company_GCs.add(companyGC); - map_GC_to_installedBuildingPV.put(companyGC, 0.0); - - //Set parameters for the Grid Connection - companyGC.p_gridConnectionID = genericCompany.address_id(); - - // Check that is needed until connectioncapacity is no longer in 'Panden' excel - if (genericCompany.contracted_capacity_kw() == null || genericCompany.contracted_capacity_kw() <= 0) { - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - } - else{ - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = genericCompany.contracted_capacity_kw(); - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; - } - - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - - //set GC Adress - companyGC.p_address = new J_Address(); - companyGC.p_address.setStreetName(genericCompany.streetname()); - if (genericCompany.house_number() == null) { - companyGC.p_address.setHouseNumber(0); - } - else { - companyGC.p_address.setHouseNumber(genericCompany.house_number()); - } - companyGC.p_address.setHouseLetter(genericCompany.house_letter()); - companyGC.p_address.setHouseAddition(genericCompany.house_addition()); - companyGC.p_address.setPostalcode(genericCompany.postalcode()); - companyGC.p_address.setCity(genericCompany.city()); - - - //Set location of GC - companyGC.p_latitude = genericCompany.latitude(); - companyGC.p_longitude = genericCompany.longitude(); - companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); - - //Update remaining totals (AFTER Lat/Lon has been defined!) - p_remainingTotals.adjustTotalNumberOfAnonymousCompanies(companyGC, 1); - p_remainingTotals.adjustTotalFloorSurfaceAnonymousCompanies_m2(companyGC, genericCompany.address_floor_surface_m2()); - - //Connect GC to grid node - companyGC.p_parentNodeElectricID = genericCompany.gridnode_id (); - - - // Create new actor and assign GC to that - ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company - - COC.p_actorID = genericCompany.address_id(); - COC.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; - COC.p_detailedCompany = false; - COC.b_dataSharingAgreed = true; - - companyGC.p_owner = COC; - companyGC.p_ownerID = COC.p_actorID; - } - - //Check wheter this building already exists - GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(genericCompany.building_id())); - - if(existingBuilding == null){//Create new GIS building and connect - GIS_Building b = f_createGISBuilding( genericCompany, companyGC ); - - companyGC.p_roofSurfaceArea_m2 += b.p_roofSurfaceArea_m2; - map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + (genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0)); - - //Style building - b.p_defaultFillColor = zero_Interface.v_companyBuildingColor; - b.p_defaultLineColor = zero_Interface.v_companyBuildingLineColor; - zero_Interface.f_styleAreas(b); - } - else{// Connect with existing building - //Redistribute the PV installed - List<GridConnection> currentConnectedGCWithBuilding_notDetailed = findAll(existingBuilding.c_containedGridConnections, gc -> !gc.p_owner.p_detailedCompany); - int currentAmountOfConnectedGCWithBuilding_notDetailed = currentConnectedGCWithBuilding_notDetailed.size(); - - double buildingPV = genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0; - double newPVDistributionForAllAttachedGC_kW = buildingPV/(currentAmountOfConnectedGCWithBuilding_notDetailed+1); - double deltaPV_earlierConnectedGC_kW = newPVDistributionForAllAttachedGC_kW - (buildingPV/currentAmountOfConnectedGCWithBuilding_notDetailed); - - for(GridConnection earlierConnectedGC : currentConnectedGCWithBuilding_notDetailed){ - map_GC_to_installedBuildingPV.put(earlierConnectedGC, map_GC_to_installedBuildingPV.get(earlierConnectedGC) + deltaPV_earlierConnectedGC_kW); - if(map_GC_to_installedBuildingPV.get(earlierConnectedGC) < 0){ - new RuntimeException("Negative installed PV for GC: " + earlierConnectedGC.p_gridConnectionID + " after redistribution of PV on the building. This should never be possible!"); - } - } - - map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + newPVDistributionForAllAttachedGC_kW); - - //Connect to the existing building - f_connectGCToExistingBuilding(companyGC, existingBuilding, genericCompany); - } - - companyGC.p_floorSurfaceArea_m2 += genericCompany.address_floor_surface_m2(); -} - -//Finalize the remaining totals distribution -p_remainingTotals.finalizeRemainingTotalsDistributionCompanies(); - -//Add EA to all generic companies (Has to be after the remaining totals finalization, so cant happen at the same time as the creation of the GC and their buildings) -for (GridConnection GCcompany : generic_company_GCs ) { - f_iEAGenericCompanies(GCcompany, map_GC_to_installedBuildingPV.get(GCcompany)); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GIS_Building</ReturnType> - <Id>1726584205801</Id> - <Name>f_createGISBuilding</Name> - <Description>Creates the GIS object(s) building(s) for the companies and houses</Description> - <X>1547.621</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>buildingData</Name> - <Type>Building_data</Type> - </Parameter> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>GIS_Building b = energyModel.add_pop_GIS_Buildings(); - -b.p_id = buildingData.building_id(); -b.p_GISObjectType = OL_GISObjectType.BUILDING; -b.p_buildingYear = buildingData.build_year(); -b.p_status = buildingData.status(); -b.p_useType = buildingData.purpose(); - -// Adres data -b.p_annotation = buildingData.annotation(); - -//Create gisregion -b.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(buildingData.polygon(), b.p_GISObjectType)); - -//Use the first point of the polygon as lat lon -double[] gisregion_points = b.gisRegion.getPoints(); // get all points of the gisArea of the building in the format lat1,lon1,lat2,lon2, etc. - -//position and coordinates -b.p_latitude = gisregion_points[0]; -b.p_longitude = gisregion_points[1]; - -//Set latlon -b.setLatLon(b.p_latitude, b.p_longitude); - - -//Define roof surface area (with Null checks and gisregion area as back up) -b.p_roofSurfaceArea_m2 = buildingData.polygon_area_m2() != null ? buildingData.polygon_area_m2() : b.gisRegion.area(); - -//Define floor surface area (with Null check, and make it 0 if unkown, else counting errors due to order of loadin of building data) -b.p_floorSurfaceArea_m2 = buildingData.address_floor_surface_m2() != null ? buildingData.address_floor_surface_m2() : 0; - -//Add to collections -b.c_containedGridConnections.add(parentGC); -parentGC.c_connectedGISObjects.add(b); - - -return b;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205803</Id> - <Name>f_addElectricityDemandProfile</Name> - <X>900</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityDemand_kWh</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>pvPower_kW</Name> - <Type>Double</Type> - </Parameter> - <Parameter> - <Name>hasQuarterlyData</Name> - <Type>boolean</Type> - </Parameter> - <Parameter> - <Name>profileName</Name> - <Type>String</Type> - </Parameter> - <Body>if ( hasQuarterlyData == true ) { // Add quarterly electricity data pattern if available - - //Initialize the arrays - List<Double> yearlyElectricityFeedin_kWh_list = null; - List<Double> yearlyElectricityProduction_kWh_list = null; - - //Check for PV, and if so: check for additional quarterhourly values - if(pvPower_kW != null && pvPower_kW > 0){ - //Check for feedin values availability, if available: fill the list, if not, list = null; - try { - if(selectFirstValue(Double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption LIMIT 1;") != null){ - yearlyElectricityFeedin_kWh_list = selectValues(double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption;"); - } - } - catch(Exception e) { - //Do nothing, cause initialized with null; - } - - //Check for bruto production values availability, if available: fill the list, if not, list = null; - try { - if(selectFirstValue(Double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption LIMIT 1;") != null){ - yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption;"); - } - } - catch(Exception e) { - //Do nothing, cause initialized with null; - } - } - - //Get the delivery values - List<Double> yearlyElectricityDelivery_kWh_list = selectValues(double.class, "SELECT " + profileName + "_demand FROM comp_elec_consumption;"); - - - //Convert lists into arrays - double[] yearlyElectricityDelivery_kWh_array = (yearlyElectricityDelivery_kWh_list != null) ? yearlyElectricityDelivery_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - double[] yearlyElectricityFeedin_kWh_array = (yearlyElectricityFeedin_kWh_list != null) ? yearlyElectricityFeedin_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - double[] yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - - - //Preprocess and add the profiles - f_createPreprocessedElectricityProfile_PV(parentGC, yearlyElectricityDelivery_kWh_array, yearlyElectricityFeedin_kWh_array, yearlyElectricityProduction_kWh_array, pvPower_kW, null); - -} - -else { // Add regular electricity and consumption profiles - J_EAConsumption profile = new J_EAConsumption(parentGC, OL_EnergyAssetType.ELECTRICITY_DEMAND, profileName, yearlyElectricityDemand_kWh, OL_EnergyCarriers.ELECTRICITY, energyModel.p_timeStep_h, null); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205807</Id> - <Name>f_createGISParcels</Name> - <Description>Creates "empty" parcels on the gismap, these parcels do not contain buildings or gridconnections. Currently no need for the function to return the GIS_Object.</Description> - <X>1547.621</X> - <Y>600</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Add GISObject type to the legenda -if(c_parcel_data.size()>0){ - zero_Interface.c_modelActiveSpecialGISObjects.add(OL_GISObjectType.PARCEL); -} - -for (Parcel_data dataParcel : c_parcel_data) { - - GIS_Parcel parcel = energyModel.add_pop_GIS_Parcels(); - - parcel.set_p_latitude( dataParcel.latitude() ); - parcel.set_p_longitude( dataParcel.longitude() ); - parcel.setLatLon(parcel.p_latitude, parcel.p_longitude); - parcel.set_p_id( dataParcel.parcel_id() ); - parcel.set_p_GISObjectType(OL_GISObjectType.PARCEL); - - //Building + styling the gisregion and putting it on the map - GISRegion gisregion = zero_Interface.f_createGISObject(f_createGISObjectsTokens( dataParcel.polygon(), parcel.p_GISObjectType)); - parcel.gisRegion = gisregion; - - parcel.set_p_defaultFillColor( zero_Interface.v_parcelColor ); - parcel.set_p_defaultLineColor( zero_Interface.v_parcelLineColor ); - parcel.set_p_defaultLineStyle( LineStyle.LINE_STYLE_DASHED ); - zero_Interface.f_styleAreas(parcel); -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205809</Id> - <Name>f_addEnergyProduction</Name> - <X>900</X> - <Y>200</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>asset_type</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>asset_name</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>installedPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>double assetCapacity_kW = 0; -double timestep_h = energyModel.p_timeStep_h; -J_ProfilePointer profilePointer = null; -OL_EnergyCarriers energyCarrier = OL_EnergyCarriers.ELECTRICITY; -switch (asset_type){ - -case PHOTOVOLTAIC: - energyCarrier = OL_EnergyCarriers.ELECTRICITY; - profilePointer = energyModel.pp_PVProduction35DegSouth_fr; - assetCapacity_kW = installedPower_kW; - break; - -case WINDMILL: - energyCarrier = OL_EnergyCarriers.ELECTRICITY; - profilePointer=energyModel.pp_windProduction_fr; - assetCapacity_kW = installedPower_kW; - break; - -case PHOTOTHERMAL: //NOT USED YET - energyCarrier = OL_EnergyCarriers.HEAT; - profilePointer = energyModel.pp_PVProduction35DegSouth_fr; // Voor nu om te testen! Misschien valt dit wel te gebruiken met bepaalde efficientie factor! - assetCapacity_kW = installedPower_kW; - break; -} - -J_EAProduction production_asset = new J_EAProduction(parentGC, asset_type, asset_name, energyCarrier, assetCapacity_kW, timestep_h, profilePointer); - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GIS_Object</ReturnType> - <Id>1726584205811</Id> - <Name>f_createGISObject</Name> - <Description>Creates the GIS object for the area EA (windfarms, solarparks, electrolysers, batteries, etc.)</Description> - <X>1547.621</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>name</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>latitude</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>longitude</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>polygon</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>GISObjectType</Name> - <Type>OL_GISObjectType</Type> - </Parameter> - <Body>GIS_Object area = energyModel.add_pop_GIS_Objects(); - -area.p_id = name; -area.p_GISObjectType = GISObjectType; - -//position and coordinates -area.p_latitude = latitude; -area.p_longitude = longitude; -area.setLatLon(area.p_latitude, area.p_longitude); - -//Create gisregion -area.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(polygon, area.p_GISObjectType)); - -//Add GISObject type to the legenda -zero_Interface.c_modelActiveSpecialGISObjects.add(area.p_GISObjectType); - -return area; -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205815</Id> - <Name>f_createSurveyCompanies_Zorm</Name> - <X>429.001</X> - <Y>129</Y> - <Label> - <X>10.999</X> - <Y>1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Get the survey data -List<com.zenmo.zummon.companysurvey.Survey> surveys = f_getSurveys(); -traceln("Size of survey List: %s", surveys.size()); - -//Get the building data -try{ - map_buildingData_Vallum = com.zenmo.vallum.PandKt.fetchBagPanden(surveys); -} -catch (Exception e){ //if api of bag is down, leave bag buildings empty and display error message - zero_Interface.f_setErrorScreen("BAG API is offline, het is mogelijk dat bepaalde panden niet zijn ingeladen!", 0, 0); -} - - -traceln("Companies that filled in the survey:"); -for (var survey : surveys) { - - traceln(survey.getCompanyName()); - - //Create connection owner - ConnectionOwner survey_owner = energyModel.add_pop_connectionOwners(); - survey_owner.p_actorID = survey.getCompanyName(); - //survey_owner.p_actorType = OL_ActorType.CONNECTIONOWNER; - survey_owner.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; - survey_owner.p_detailedCompany = true; - survey_owner.b_dataSharingAgreed = survey.getDataSharingAgreed(); - - for (var address : survey.getAddresses()) { - - //Update number of survey companies (locations) - v_numberOfSurveyCompanies++; - - for (var gridConnection: address.getGridConnections()) { - - //Check if it has (or will have) a direct connection with the grid (either gas or electric), if not: skip this gc. - boolean hasNaturalGasConnection = (gridConnection.getNaturalGas().getHasConnection() != null)? gridConnection.getNaturalGas().getHasConnection() : false; - boolean hasExpansionRequest = (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null ) ? gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() : false; - - if (!gridConnection.getElectricity().getHasConnection() && !hasExpansionRequest && !hasNaturalGasConnection){ - traceln("surveyGC with sequence: " + gridConnection.getSequence() + " is not created, as it has no connection to the grid, future grid connection or current gas connection."); - continue; - } - - //Create GC - GCUtility companyGC = energyModel.add_UtilityConnections(); - - //Set parameters for the Grid Connection - companyGC.p_ownerID = survey.getCompanyName(); - companyGC.p_gridConnectionID = gridConnection.getSequence().toString() ; - - //Find actor and connect GC - companyGC.p_owner = survey_owner; - - //Adress data - companyGC.p_address = new J_Address(); - companyGC.p_address.setStreetName(address.getStreet().substring(0,1).toUpperCase() + address.getStreet().substring(1).toLowerCase()); - companyGC.p_address.setHouseNumber(address.getHouseNumber()); - companyGC.p_address.setHouseLetter(address.getHouseLetter().equals("") ? null : address.getHouseLetter()); - companyGC.p_address.setHouseAddition(address.getHouseNumberSuffix().equals("") ? null : address.getHouseNumberSuffix()); - companyGC.p_address.setPostalcode(address.getPostalCode().equals("") ? null : address.getPostalCode().toUpperCase().replaceAll("\\s","")); - companyGC.p_address.setCity(address.getCity().substring(0,1).toUpperCase() + address.getCity().substring(1).toLowerCase()); - - //Get attached building info - List<Building_data> buildings = f_getSurveyGCBuildingData(companyGC, gridConnection); - - //Total new additional floor/roof surface area - double totalNewFloorSurfaceAreaGC_m2 = 0; - double totalNewRoofSurfaceAreaGC_m2 = 0; - - //Create the GIS buildings - for (Building_data buildingData : buildings) { - GIS_Building gisBuilding = findFirst(energyModel.pop_GIS_Buildings, b -> b.p_id.equals(buildingData.building_id())); // Check if building already exists in engine - if (gisBuilding != null) { - // Connect GC to existing building in engine - f_connectGCToExistingBuilding(companyGC, gisBuilding, buildingData); - } - else{ - gisBuilding = f_createGISBuilding( buildingData, companyGC); - } - - //Set name of building - if(gisBuilding.p_annotation == null){ - gisBuilding.p_annotation = companyGC.p_ownerID; - } - - //Accumulate surface areas - totalNewFloorSurfaceAreaGC_m2 += buildingData.address_floor_surface_m2(); - totalNewRoofSurfaceAreaGC_m2 += gisBuilding.p_roofSurfaceArea_m2; - - //Set trafo ID - companyGC.p_parentNodeElectricID = buildingData.gridnode_id(); - - //Style building - gisBuilding.p_defaultFillColor = zero_Interface.v_detailedCompanyBuildingColor; - gisBuilding.p_defaultLineColor = zero_Interface.v_detailedCompanyBuildingLineColor; - zero_Interface.f_styleAreas(gisBuilding); - - } - - //Add (combined) building data to GC (latitude and longitude + area) - companyGC.p_floorSurfaceArea_m2 += totalNewFloorSurfaceAreaGC_m2; - companyGC.p_roofSurfaceArea_m2 += totalNewRoofSurfaceAreaGC_m2; - - - if(!companyGC.c_connectedGISObjects.isEmpty()){ - companyGC.p_longitude = companyGC.c_connectedGISObjects.get(0).p_longitude; // Get longitude of first building (only used to get nearest trafo) - companyGC.p_latitude = companyGC.c_connectedGISObjects.get(0).p_latitude; // Get latitude of first building (only used to get nearest trafo) - - if(buildings.isEmpty()){ //GC will not have gotten a gridnode assigned, - for (var PID : gridConnection.getPandIds() ) { - Building_data surveyBuildingData = findFirst(c_surveyCompanyBuilding_data, b -> b.building_id().equals(PID.getValue())); - if(surveyBuildingData != null){ - companyGC.p_parentNodeElectricID = surveyBuildingData.gridnode_id(); - break; - } - } - } - - //In Subscope check - if(companyGC.p_parentNodeElectricID != null && !c_gridNodeIDsInScope.contains(companyGC.p_parentNodeElectricID)){ - //--> Company not in subscope -> PAUSE AND REMOVE FROM ASSIGNED GRIDNODE - companyGC.p_parentNodeElectricID = null; - companyGC.v_isActive = false; - } - } - else{ - traceln("Gridconnection %s with owner %s has no buildings!!!", companyGC.p_gridConnectionID, companyGC.p_ownerID); - } - - //Set lat lon - companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); - - //Energy asset initialization - f_iEASurveyCompanies_Zorm(companyGC, gridConnection); - } - } -} - -//If survey companies are present, add to the ui legend -if(v_numberOfSurveyCompanies>0){ - //Add to the legend - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DETAILED_COMPANY); - - //Pass the number of survey companies to interface for the dynamic legend - zero_Interface.v_numberOfSurveyCompanies = v_numberOfSurveyCompanies; -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<com.zenmo.zummon.companysurvey.Survey></ReturnType> - <Id>1726584205819</Id> - <Name>f_getSurveys</Name> - <X>449</X> - <Y>149</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Connect with API to database -Vallum vallum = new Vallum(user.PROJECT_CLIENT_ID(), user.PROJECT_CLIENT_SECRET()); - - -List<com.zenmo.zummon.companysurvey.Survey> surveys = new ArrayList(); - - -String[] zorm_project_names; -if(project_data.zorm_project_names() != null){ - zorm_project_names = project_data.zorm_project_names(); -} -else{ - zorm_project_names = new String[]{project_data.project_name()}; -} - -surveys = vallum.getEnabledSurveysByProjectNames(zorm_project_names); - -//Clear vallum user data -user.clearVallumUser(); - -return surveys;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205821</Id> - <Name>f_createActors</Name> - <X>90</X> - <Y>231</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Create specific actors like Grid operator, energy supplier, energy coop -f_createEnergyActors();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>OL_GridConnectionHeatingType</ReturnType> - <Id>1726584205825</Id> - <Name>f_getHeatingTypeSurvey</Name> - <Description>This function determines the heatingType (OL_GridConnectionHeatingType) from the list of heating types (zummon.companysurvey.HeatingType)</Description> - <X>480</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>// This function determines a heatingType for the GC, which will be passed on to the function that determines the heating management -OL_GridConnectionHeatingType heatingType = null; - -if (surveyGC.getHeat().getHeatingTypes().size() > 1) { - // We currently only recognize a couple of combinations that we assume are meant as hybrid heatpumps - if (surveyGC.getHeat().getHeatingTypes().size() == 2) { - if (surveyGC.getHeat().getHeatingTypes().contains(HeatingType.GAS_BOILER)) { - if (surveyGC.getHeat().getHeatingTypes().contains(HeatingType.HYBRID_HEATPUMP) || surveyGC.getHeat().getHeatingTypes().contains(HeatingType.ELECTRIC_HEATPUMP)) { - heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; - } - } - } -} -else if (surveyGC.getHeat().getHeatingTypes().size() == 1) { - // We translate the survey enum to the OL_GridConnectionHeatingType - switch(surveyGC.getHeat().getHeatingTypes().get(0)) { - case GAS_BOILER: - heatingType = OL_GridConnectionHeatingType.GAS_BURNER; - break; - case HYBRID_HEATPUMP: - heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; - break; - case ELECTRIC_HEATPUMP: - heatingType = OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP; - break; - case DISTRICT_HEATING: - heatingType = OL_GridConnectionHeatingType.DISTRICTHEAT; - break; - case COMBINED_HEAT_AND_POWER: - heatingType = OL_GridConnectionHeatingType.GAS_CHP; - break; - case OTHER: - heatingType = OL_GridConnectionHeatingType.CUSTOM; - break; - default: - throw new RuntimeException("Incorrect heating: " + surveyGC.getHeat().getHeatingTypes().get(0) + " detected for '" + engineGC.p_ownerID + "'"); - } -} -else if (surveyGC.getHeat().getHeatingTypes().size() == 0) { - // There is no heating type in the survey, but there is gas consumption (either yearly total or hourly values) - if ( (surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) - || ( surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear() ) ) { - // We assume that all gas consumption is to heat the building(s) - heatingType = OL_GridConnectionHeatingType.GAS_BURNER; - } - else { - heatingType = OL_GridConnectionHeatingType.NONE; - } -} -if (heatingType == null) { - heatingType = OL_GridConnectionHeatingType.CUSTOM; -} - -return heatingType;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_EAEV</ReturnType> - <Id>1726584205827</Id> - <Name>f_addElectricVehicle</Name> - <X>900</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>vehicle_type</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>isDefaultVehicle</Name> - <Type>boolean</Type> - </Parameter> - <Parameter> - <Name>annualTravelDistance_km</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>maxChargingPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>double storageCapacity_kWh = 0; -double energyConsumption_kWhpkm = 0; -double capacityElectricity_kW = 0; -double stateOfCharge_fr = 1; // Initial state of charge -double timestep_h = energyModel.p_timeStep_h; -double vehicleScaling = 1.0; - -switch(vehicle_type){ - - /* - case ELECTRIC_VEHICLE_COMUTERS: // ??? Hoe laad je andere laadprofielen in.?? Deze moet ander laadprofiel dan de Standaard Electric_vehicle - capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - storageCapacity_kWh = avgc_data.p_avgEVStorageCar_kWh; - energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; - break; - */ - - case ELECTRIC_VEHICLE: - capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - storageCapacity_kWh = avgc_data.p_avgEVStorageCar_kWh; - energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; - break; - - case ELECTRIC_VAN: - capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerVan_kW; - storageCapacity_kWh = avgc_data.p_avgEVStorageVan_kWh; - energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; - break; - - case ELECTRIC_TRUCK: - capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerTruck_kW; - storageCapacity_kWh = avgc_data.p_avgEVStorageTruck_kWh; - energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - break; - -} - -if (!isDefaultVehicle && maxChargingPower_kW > 0){ - capacityElectricity_kW = maxChargingPower_kW; -} -if (!isDefaultVehicle && maxChargingPower_kW <= 0) { - traceln("Trying to create an EV with no/negative maxChargingPower_kW: %s", maxChargingPower_kW); -} - -//Create the EV vehicle energy asset with the set parameters + links -J_EAEV electricVehicle = new J_EAEV(parentGC, capacityElectricity_kW, storageCapacity_kWh, stateOfCharge_fr, timestep_h, energyConsumption_kWhpkm, vehicleScaling, vehicle_type, null); - -if (!isDefaultVehicle && annualTravelDistance_km > 1000){ - electricVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); -} -else if (vehicle_type == OL_EnergyAssetType.ELECTRIC_VAN){ - electricVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); -} - -return electricVehicle;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_EADieselVehicle</ReturnType> - <Id>1726584205829</Id> - <Name>f_addDieselVehicle</Name> - <X>900</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>vehicle_type</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>isDefaultVehicle</Name> - <Type>Boolean</Type> - </Parameter> - <Parameter> - <Name>annualTravelDistance_km</Name> - <Type>double</Type> - </Parameter> - <Body>double energyConsumption_kWhpkm = 0; -double vehicleScaling = 1.0; - -//Diesel car -switch (vehicle_type){ - - case DIESEL_VEHICLE: - energyConsumption_kWhpkm = roundToDecimal(uniform(0.7, 1.3),2) * avgc_data.p_avgDieselConsumptionCar_kWhpkm; - break; - - case DIESEL_VAN: - energyConsumption_kWhpkm = avgc_data.p_avgDieselConsumptionVan_kWhpkm; - break; - - case DIESEL_TRUCK: - energyConsumption_kWhpkm = avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - break; -} - -//Create EA -J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); - -//Set annual travel distance -if (!isDefaultVehicle && annualTravelDistance_km > 1000){ - dieselVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); -} -else if (vehicle_type == OL_EnergyAssetType.DIESEL_VAN){ - dieselVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); -} - -return dieselVehicle; - - - -</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205831</Id> - <Name>f_addStorage</Name> - <X>900</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>storagePower_kw</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>storageCapacity_kWh</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>storageType</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Body>J_EAStorage storage = null; - -switch (storageType){ - - case STORAGE_ELECTRIC: - double initialStateOfCharge_fr = 0.5; - storage = new J_EAStorageElectric(parentGC, storagePower_kw, storageCapacity_kWh, initialStateOfCharge_fr, energyModel.p_timeStep_h); - //traceln("Battery with StorageCapacity_kWh: %s", storageCapacity_kWh); - break; - - case STORAGE_HEAT: - double lossFactor_WpK = 0; // For now no losses, waiting for new setup heating assets before this can be implemented correctly (its JEA_Building depedent) - double minTemperature_degC = avgc_data.p_avgMinHeatBufferTemperature_degC; - double maxTemperature_degC = avgc_data.p_avgMaxHeatBufferTemperature_degC; - double initialTemperature_degC = (minTemperature_degC + maxTemperature_degC) / 2; - double setTemperature_degC = initialTemperature_degC; - //double storageCapacity_kg = (storageCapacity_kWh*3.6e6)/(avgc_data.p_waterHeatCapacity_JpkgK * (maxTemperature_degC - minTemperature_degC)); - //double heatCapacity_JpK = avgc_data.p_waterHeatCapacity_JpkgK * storageCapacity_kg; - //in short -> - double heatCapacity_JpK = storageCapacity_kWh*3.6e6 / (maxTemperature_degC - minTemperature_degC); - new J_EAStorageHeat(parentGC, storageType, storagePower_kw, lossFactor_WpK, energyModel.p_timeStep_h, initialTemperature_degC, minTemperature_degC, maxTemperature_degC, setTemperature_degC, heatCapacity_JpK, OL_AmbientTempType.AMBIENT_AIR ); - - break; - - case STORAGE_GAS: - - break; - - default: - - return; -} -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205833</Id> - <Name>f_iEAGenericCompanies</Name> - <Description>Initialisation of the Energy assets using average values for companies that have not filled in the survey (yet) combined with totals (floor surface, electricity/yr, gas/yr and trucks) of the simulated area.</Description> - <X>450</X> - <Y>543</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>pv_installed_kwp</Name> - <Type>Double</Type> - </Parameter> - <Body>//Create current & future scenario parameter list -J_scenario_Current current_scenario_list = new J_scenario_Current(); -zero_Interface.c_scenarioMap_Current.put(companyGC.p_uid, current_scenario_list); - -J_scenario_Future future_scenario_list = new J_scenario_Future(); -zero_Interface.c_scenarioMap_Future.put(companyGC.p_uid, future_scenario_list); - -//Set parent -current_scenario_list.setParentAgent(companyGC); -future_scenario_list.setParentAgent(companyGC); - -//Add current grid capacity to current (and future, feedin, physical, as no data on plans so assumption it is/stays the same) scenario list -current_scenario_list.setCurrentContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); -future_scenario_list.setRequestedContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); -current_scenario_list.setCurrentContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); -future_scenario_list.setRequestedContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); -current_scenario_list.setCurrentPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); -future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); - -//Basic heating and electricity demand profiles -if (companyGC.p_floorSurfaceArea_m2 > 0){ - - if(p_remainingTotals.getRemainingElectricityDeliveryCompanies_kWh(companyGC) > 0){ - //Buidling Base electricity load - double Remaining_electricity_demand_kWh_p_m2_yr = p_remainingTotals.getElectricityDeliveryOfAnonymousCompanies_kWhpm2(companyGC); - double yearlyElectricityDemand_kWh = Remaining_electricity_demand_kWh_p_m2_yr * companyGC.p_floorSurfaceArea_m2; - - //Add base load profile - f_addElectricityDemandProfile(companyGC, yearlyElectricityDemand_kWh, null, false, "default_office_electricity_demand_fr"); - } - - if(p_remainingTotals.getRemainingGasDeliveryCompanies_m3(companyGC) > 0){ - //Building Gas demand profile (purely heating) - double Remaining_gas_demand_m3_p_m2_yr = p_remainingTotals.getGasDeliveryOfAnonymousCompanies_m3pm2(companyGC); - double yearlyGasDemand_m3 = Remaining_gas_demand_m3_p_m2_yr*companyGC.p_floorSurfaceArea_m2; - double ratioGasUsedForHeating = 1; - - //Add heat demand profile - OL_GridConnectionHeatingType heatingType = avgc_data.p_avgCompanyHeatingMethod; - double maxHeatOutputPower_kW = f_createHeatProfileFromAnnualGasTotal(companyGC, heatingType, yearlyGasDemand_m3, ratioGasUsedForHeating); - f_addHeatAsset(companyGC, heatingType, maxHeatOutputPower_kW); - companyGC.f_addHeatManagement(heatingType, false); - - //Set current scenario heating type - current_scenario_list.setCurrentHeatingType(heatingType); - future_scenario_list.setPlannedHeatingType(heatingType); - } -} - - -//Production asset (PV) ??????????????????????????????????????????? willen we die toevoegen aan generieke bedrijven? -if(pv_installed_kwp != null && pv_installed_kwp > 0){ - f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", pv_installed_kwp); -} - - -//add to scenario: current & future -current_scenario_list.setCurrentBatteryPower_kW(0f); -current_scenario_list.setCurrentBatteryCapacity_kWh(0f); -future_scenario_list.setPlannedBatteryPower_kW(0f); -future_scenario_list.setPlannedBatteryCapacity_kWh(0f); - - -//Transport (total remaining cars, vans and trucks (total as defined in project selection - survey company usage) - -//Cars -if(p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.CAR) > 0){ - int nbCars = 0; - int ceiledRemainingNumberOfCarsPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.CAR); - for (int k = 0; k < ceiledRemainingNumberOfCarsPerCompany; k++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.CAR, - 1); - nbCars++; - } - - //Reduce remaining number of anonymous companies that still can get vehicles - p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.CAR, - 1); - - //Set current scenario cars - current_scenario_list.setCurrentDieselCars(nbCars); - //Set planned scenario cars - future_scenario_list.setPlannedEVCars(0); -} - -//Vans -if(p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN) > 0){ - int nbVans = 0; - int ceiledRemainingNumberOfVansPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.VAN); - for (int k = 0; k< ceiledRemainingNumberOfVansPerCompany; k++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, true, 0); - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - 1); - nbVans++; - } - - //Reduce remaining number of anonymous companies that still can get vehicles - p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.VAN, - 1); - - //Set current scenario vans - current_scenario_list.setCurrentDieselVans(nbVans); - //Set planned scenario vans - future_scenario_list.setPlannedEVVans(0); -} - -//Trucks -if (p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK) > 0){ - int nbTrucks= 0; - int ceiledRemainingNumberOfTrucksPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.TRUCK); - for (int k = 0; k< ceiledRemainingNumberOfTrucksPerCompany; k++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, true, 0); - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK, - 1); - nbTrucks++; - } - - //Reduce remaining number of anonymous companies that still can get vehicles - p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.TRUCK, - 1); - - //Set current scenario trucks - current_scenario_list.setCurrentDieselTrucks(nbTrucks); - //Set planned scenario trucks - future_scenario_list.setPlannedEVTrucks(0); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205835</Id> - <Name>f_createRemainingBuildings</Name> - <X>1546.739</X> - <Y>639</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//If remaining buildings in model, add to legend -if(c_remainingBuilding_data.size()>0){ - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.REMAINING); -} - -for (Building_data remainingBuilding_data : c_remainingBuilding_data) { - - GIS_Building building = energyModel.add_pop_GIS_Buildings(); - building.p_id = remainingBuilding_data.building_id(); - building.p_longitude = remainingBuilding_data.longitude(); - building.p_latitude = remainingBuilding_data.latitude(); - building.setLatLon(building.p_latitude, building.p_longitude); - building.p_GISObjectType = OL_GISObjectType.REMAINING_BUILDING; - - //Building + styling the gisregion and putting it on the map - building.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(remainingBuilding_data.polygon(), building.p_GISObjectType)); - - building.p_defaultFillColor = zero_Interface.v_restBuildingColor; - building.p_defaultLineColor = zero_Interface.v_restBuildingLineColor; - zero_Interface.f_styleAreas(building); -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205837</Id> - <Name>f_addTransportHydrogen</Name> - <X>900</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>vehicle_type</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>isDefaultVehicle</Name> - <Type>boolean</Type> - </Parameter> - <Parameter> - <Name>annualTravelDistance_km</Name> - <Type>double</Type> - </Parameter> - <Body>double energyConsumption_kWhpkm = 0; -double vehicleScaling = 1.0; - -//Hydrogen car -switch (vehicle_type){ - - case HYDROGEN_VEHICLE: - energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionCar_kWhpkm; - break; - - case HYDROGEN_VAN: - energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionVan_kWhpkm; - break; - - case HYDROGEN_TRUCK: - energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - break; -} - -//Create EA -J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); - -//Set annual travel distance -if (!isDefaultVehicle && annualTravelDistance_km > 1000){ - hydrogenVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); -} -else if (vehicle_type == OL_EnergyAssetType.HYDROGEN_VAN){ - hydrogenVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205845</Id> - <Name>f_addChargingDemandProfile</Name> - <X>900</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GCPublicCharger</Type> - </Parameter> - <Parameter> - <Name>profileName</Name> - <Type>String</Type> - </Parameter> - <Body>J_EAProfile profile = new J_EAProfile(GC, OL_EnergyCarriers.ELECTRICITY, null, OL_AssetFlowCategories.evChargingPower_kW, energyModel.p_timeStep_h); -profile.energyAssetName = "charging profile"; -List<Double> quarterlyEnergyDemand_kWh = selectValues(double.class, "SELECT " + profileName + " FROM charging_profiles;"); -profile.a_energyProfile_kWh = quarterlyEnergyDemand_kWh.stream().mapToDouble(d -> max(0,d)).map( d -> d / 4).toArray();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GISRegion</ReturnType> - <Id>1726584205847</Id> - <Name>f_createGISRegionChargingStation</Name> - <X>1547.621</X> - <Y>620</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>lat</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>lon</Name> - <Type>double</Type> - </Parameter> - <Body>//create shape Coords -int nb_points = 6; -double[] GISCoords = new double[nb_points * 2]; - -for (int i=0; i < nb_points ; i++){ - double size = 0.00004; - GISCoords[i * 2] = size * cos( i * ( 2 * Math.PI ) / nb_points) + lat; - GISCoords[i * 2 + 1] = 1.64 * size * sin( i * ( 2 * Math.PI ) / nb_points) + lon; -} - -//Create the region -GISRegion gisregion = zero_Interface.f_createGISObject( GISCoords ); - -return gisregion; -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205849</Id> - <Name>f_createChargingStations</Name> - <X>431</X> - <Y>831</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Initialize parameters -int laadpaal_nr = 1; -int laadstation_nr = 1; - -//Loop over charging stations -for (Chargingstation_data dataChargingStation : f_getChargingstationsInSubScope(c_chargingstation_data)){ - - GCPublicCharger chargingStation = energyModel.add_PublicChargers(); - - chargingStation.set_p_gridConnectionID( dataChargingStation.gc_id()); - chargingStation.set_p_name( dataChargingStation.gc_name() ); - - //Electric Capacity - if (dataChargingStation.connection_capacity_kw() != null) { - // Assume the connection capacity is both physical and contracted. - chargingStation.v_liveConnectionMetaData.physicalCapacity_kW = dataChargingStation.connection_capacity_kw(); - chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataChargingStation.connection_capacity_kw(); - chargingStation.v_liveConnectionMetaData.physicalCapacityKnown = true; - chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - - //chargingStation.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - - //Set parent node - chargingStation.p_parentNodeElectricID = dataChargingStation.gridnode_id(); - - //Is active at start? - chargingStation.v_isActive = dataChargingStation.initially_active(); - - //chargingStation.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.SIMPLE); - - //Create and connect owner - ConnectionOwner owner = energyModel.add_pop_connectionOwners(); - - chargingStation.set_p_ownerID( dataChargingStation.owner_id()); - owner.set_p_actorID( chargingStation.p_ownerID ); - //owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.CHARGEPOINT_OP ); - owner.b_dataSharingAgreed = true; - - chargingStation.set_p_owner( owner ); - - - //Check if centre or single - chargingStation.p_isChargingCentre = dataChargingStation.is_charging_centre(); - if (chargingStation.p_isChargingCentre) { - - if (chargingStation.p_ownerID == null){ - chargingStation.p_ownerID = "Publiek laadstation " + laadstation_nr; - laadstation_nr++; - } - - chargingStation.set_p_nbOfChargers( dataChargingStation.number_of_chargers() ); - chargingStation.set_p_maxChargingPower_kW( dataChargingStation.power_per_charger_kw() ); - - //If check on connection capacity to prevent more charging than possible - if(chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW > chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW){ - chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW; - } - - //Set vehicle type - chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); - - //Create vehicles that charge at the charging centre - if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ - List<J_ChargingSession> chargerProfile = f_getChargerProfile(); - boolean V1GCapable = randomTrue(avgc_data.p_v1gProbability); - boolean V2GCapable = randomTrue(avgc_data.p_v2gProbability); - new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); - } - else{ - for(int k = 0; k < chargingStation.p_nbOfChargers*avgc_data.p_avgVehiclesPerChargePoint; k++ ){ - f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); - } - } - - - if (dataChargingStation.polygon() != null) { - //Create EA GIS object (building) for the charging centre - GIS_Object area = f_createGISObject( dataChargingStation.gc_name(), dataChargingStation.latitude(), dataChargingStation.longitude(), dataChargingStation.polygon(), OL_GISObjectType.CHARGER ); - - //Set gis object type - area.p_GISObjectType = OL_GISObjectType.CHARGER; - - //Add to collections - area.c_containedGridConnections.add(chargingStation); - chargingStation.c_connectedGISObjects.add(area); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); - area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } - else{ - traceln("No gisobject created for charge centre: " + chargingStation.p_name); - } - } - else { - - if (chargingStation.p_ownerID == null){ - chargingStation.p_ownerID = "Publieke laadpaal " + laadpaal_nr; - laadpaal_nr++; - } - - //Set charging power - chargingStation.set_p_maxChargingPower_kW( dataChargingStation.power_per_charger_kw() ); - - //Set vehicle type - chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); - - //Create vehicles that charge at the charging station - if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ - List<J_ChargingSession> chargerProfile = f_getChargerProfile(); - boolean V1GCapable = true; //randomTrue(avgc_data.p_v1gProbability); - boolean V2GCapable = true; //randomTrue(avgc_data.p_v2gProbability); - new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); - } - else{ - for(int k = 0; k < avgc_data.p_avgVehiclesPerChargePoint; k++ ){ - f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); - } - } - - - //Create GIS object for the chargingStation - GIS_Object area = energyModel.add_pop_GIS_Objects(); - - //position and coordinates - area.p_latitude = dataChargingStation.latitude(); - area.p_longitude = dataChargingStation.longitude(); - area.setLatLon(area.p_latitude, area.p_longitude); - - //Create gisregion - area.gisRegion = f_createGISRegionChargingStation( area.p_latitude, area.p_longitude ); - - //Set area type - area.p_GISObjectType = OL_GISObjectType.CHARGER; - - chargingStation.c_connectedGISObjects.add(area); - area.c_containedGridConnections.add(chargingStation); - if(chargingStation.v_isActive){ - area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); - area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); - } - else{ - area.set_p_defaultFillColor( zero_Interface.v_newChargingStationColor ); - area.set_p_defaultLineColor( zero_Interface.v_newChargingStationLineColor ); - } - zero_Interface.f_styleAreas(area); - - zero_Interface.c_modelActiveSpecialGISObjects.add(area.p_GISObjectType); - } -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205853</Id> - <Name>f_createInterface</Name> - <X>30</X> - <Y>930</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//OVERRIDE THE zero_Interface parameter here -//zero_Interface = YOUR INTERFACE; -throw new RuntimeException("Didnt replace the generic interface with a project interface!");</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205859</Id> - <Name>f_createGISCables</Name> - <X>1547.621</X> - <Y>660</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Create cables -for (Cable_data dataCable : c_cable_data) { - if(dataCable.line().contains("Multi")){ - continue; - } - zero_Interface.f_createGISLine(f_createGISObjectsTokens(dataCable.line(), dataCable.type()), dataCable.type()); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205861</Id> - <Name>f_createPreprocessedElectricityProfile_PV</Name> - <Description>Principe: -verbruik = levering + productie - teruglevering</Description> - <X>920</X> - <Y>130</Y> - <Label> - <X>9</X> - <Y>-1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityDelivery_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityFeedin_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityProduction_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>pvPower_kW</Name> - <Type>Double</Type> - </Parameter> - <Parameter> - <Name>yearlyHeatPumpElectricityConsumption_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Body>//Create the profile -J_EAProfile profile = new J_EAProfile(parentGC, OL_EnergyCarriers.ELECTRICITY, null, OL_AssetFlowCategories.fixedConsumptionElectric_kW, energyModel.p_timeStep_h); -profile.setStartTime_h(v_simStartHour_h); -profile.energyAssetName = parentGC.p_ownerID + " custom profile"; -double extraConsumption_kWh = 0; - -//Initialize parameters -double nettDelivery_kWh; - -//Preprocessing and adding new array to the J_EAProfile -if (yearlyElectricityProduction_kWh != null && yearlyElectricityFeedin_kWh != null) { // When delivery, feedin and production profiles are available - double[] yearlyElectricityConsumption_kWh = new double[yearlyElectricityDelivery_kWh.length]; - for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { - yearlyElectricityConsumption_kWh[i] = yearlyElectricityDelivery_kWh[i] - yearlyElectricityFeedin_kWh[i] + yearlyElectricityProduction_kWh[i]; - extraConsumption_kWh += -min(yearlyElectricityConsumption_kWh[i],0); - yearlyElectricityConsumption_kWh[i] = max(0,yearlyElectricityConsumption_kWh[i]); - } - profile.a_energyProfile_kWh = yearlyElectricityConsumption_kWh; - nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum() - Arrays.stream(yearlyElectricityFeedin_kWh).sum(); - //traceln("Calculating consumption profile on delivery, feedin and production profiles for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); -} else if (pvPower_kW != null && pvPower_kW > 0) { // When only delivery, feedin profiles are available, in addition to PV power, make explicit consumption and production arrays using delivery profile and PV installed power [kW] - double[] yearlyElectricityConsumption_kWh = new double[yearlyElectricityDelivery_kWh.length]; - if (yearlyElectricityFeedin_kWh != null) { // Terugleveringsdata beschikbaar - //traceln("Estimating electricity consumption based on delivery and feedin profiles with pv power estimate for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); - double addedConsumption_kWh = 0; - for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { - double pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); - double estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); - addedConsumption_kWh += max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); - yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); - } - //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); - } else { // Zonder terugleveringsdata, alleen afname - traceln("Estimating electricity consumption based on delivery profile and pv power for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); - double pvPowerEstimate_kW = 0; - double estimatedConsumption_kWh = 0; - double addedConsumption_kWh = 0; - for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { - pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); - - if (yearlyElectricityDelivery_kWh[i] != 0) { // Only update consumption if delivery is non-zero, otherwise hold previously estimated consumption constant - estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + pvPowerEstimate_kW*0.25; - //addedConsumption_kWh += pvPowerEstimate_kW * 0.25; - } else { - estimatedConsumption_kWh = min(pvPowerEstimate_kW*0.25, estimatedConsumption_kWh); // Take minimum to prevent to much consumption when there is not enough sun in model sun, compared to real sun data!! - - //addedConsumption_kWh += max(0, estimatedConsumption_kWh - pvPowerEstimate_kW*0.25);//* 0.25; - } - yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); - } - //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); - } - profile.a_energyProfile_kWh = yearlyElectricityConsumption_kWh; - nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); -} else { // No PV production - profile.a_energyProfile_kWh = yearlyElectricityDelivery_kWh; - nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); -} - -//Adjust remaining totals -p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(parentGC, - nettDelivery_kWh); - -if (extraConsumption_kWh > 1) { - traceln("Preprocessing of delivery and production data led to negative consumption of: %s kWh", extraConsumption_kWh); - traceln("Consumption profile was capped to 0kW"); -} - -if(yearlyHeatPumpElectricityConsumption_kWh != null){ - for(int i = 0; i < yearlyHeatPumpElectricityConsumption_kWh.length; i++){ - yearlyHeatPumpElectricityConsumption_kWh[i] = max(0,yearlyHeatPumpElectricityConsumption_kWh[i]); - } - double[] preProcessedDefaultConsumptionProfile = new double[profile.a_energyProfile_kWh.length]; - for(int i = 0; i < preProcessedDefaultConsumptionProfile.length; i++){ - preProcessedDefaultConsumptionProfile[i] = max(0,profile.a_energyProfile_kWh[i] - yearlyHeatPumpElectricityConsumption_kWh[i]); - } - profile.a_energyProfile_kWh = preProcessedDefaultConsumptionProfile; - - J_EAProfile profileHeatPumpElectricityConsumption = new J_EAProfile(parentGC, OL_EnergyCarriers.ELECTRICITY, yearlyHeatPumpElectricityConsumption_kWh, OL_AssetFlowCategories.heatPumpElectricityConsumption_kW, energyModel.p_timeStep_h); - profileHeatPumpElectricityConsumption.setStartTime_h(v_simStartHour_h); - profileHeatPumpElectricityConsumption.energyAssetName = parentGC.p_ownerID + " custom heat pump electricity consumption profile"; -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205865</Id> - <Name>f_startUpLoader_default</Name> - <X>60</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>traceln("---------------------------"); -traceln("======= STARTING UP ======="); -traceln("---------------------------"); -traceln(""); - -double startTime = System.currentTimeMillis(); -v_timeOfModelStart_ms = startTime; - -//Get simulation start time -f_getSimulationTimeVariables(); - -//Send avgc data to engine -avgc_data.f_setAVGC_data(); - -// Set default heating strategies -f_setDefaultHeatingStrategies(); - -//Import excel data to the anylogic database -f_importExcelTablesToDB(); - -//Fill the record collections -f_readDatabase(); - -//Initialize model totals -p_remainingTotals.initializeModelTotals(project_data); - -//Weather market data -f_setEngineProfiles(); - -//Create the project interface -f_createInterface(); - -//Initialize the pointers on the interface -f_initializeInterfacePointers(); - -//Project specific styling (Needs to happen before configuring the engine) -zero_Interface.f_projectSpecificStyling(); - -// Populate the model -f_configureEngine_default(); - -//Start up of the User Interface (Needs to happen after configuring the engine) -zero_Interface.f_UIStartup(); - -//Ending of the start up -double endTime = System.currentTimeMillis(); -double duration = endTime - startTime; -v_modelStartUpDuration_s = roundToDecimal(duration / 1000, 3); - -traceln(" "); -traceln("*** Start up finished *** "); -traceln("*** Start up duration: "+ v_modelStartUpDuration_s + " s ***"); -traceln(" "); - - -//Simulate full year simulation for initial KPIs -if( settings.runHeadlessAtStartup() ){ - energyModel.f_runRapidSimulation(); // Do a full year run to have KPIs right away! - - if(project_data.project_type() == BUSINESSPARK){ - for(GCUtility GC : energyModel.UtilityConnections){ - if(GC.p_owner.p_detailedCompany){ // For now only detailed companies - GC.v_originalRapidRunData = GC.v_rapidRunData; - } - } - } - zero_Interface.gr_simulateYear.setVisible(false); - zero_Interface.gr_loadIconYearSimulation.setVisible(false); - zero_Interface.b_resultsUpToDate = true; - zero_Interface.uI_Results.f_enableNonLivePlotRadioButtons(true); -} -else { - zero_Interface.f_resetSettings(); -} - -zero_Interface.uI_Results.f_updateResultsUI(energyModel); - -//Clear all data record collections after loader is done -f_clearDataRecords();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205867</Id> - <Name>f_readDatabase</Name> - <X>-390</X> - <Y>190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Override this function and: -//Fill the data parameters and collections using your own functions here</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205869</Id> - <Name>f_clearDataRecords</Name> - <X>-390</X> - <Y>700</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Function used to clear all data record collections after the loader is done -//-> no longer needed, by clearing it is send to the garbage collector -> saves memory - -/* -genericProfiles_data = null; -c_GridNode_data.clear(); -c_SurveyCompanyBuilding_data.clear(); -c_GenericCompanyBuilding_data.clear(); -c_HouseBuilding_data.clear(); -c_remainingBuilding_data.clear(); -c_Solarfarm_data.clear(); -c_Windfarm_data.clear(); -c_Electrolyser_data.clear(); -c_Battery_data.clear(); -c_Chargingstation_data.clear(); -c_Neighbourhood_data.clear(); -c_Parcel_data.clear(); -c_Cable_data_LV.clear(); -c_Cable_data_MV.clear(); -*/ -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205871</Id> - <Name>f_createSurveyCompanies_Excel</Name> - <X>430</X> - <Y>498</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>traceln("Survey companies excel should be overridden with your own code");</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205873</Id> - <Name>f_createCompanies</Name> - <X>420</X> - <Y>110</Y> - <Label> - <X>11</X> - <Y>1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Create survey companies based on survey inload structure -switch(project_data.survey_type()){ - - case ZORM: - f_createSurveyCompanies_Zorm(); - break; - - case EXCEL: - f_createSurveyCompanies_Excel(); - break; - - case NONE: - //Do nothing. - break; -} - -//Create generic companies -f_createGenericCompanies();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205881</Id> - <Name>f_createAdditionalGISObjects</Name> - <X>90</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Parking spaces -f_createParkingSpots(); - -//Parcels -f_createGISParcels(); - -//Remaining buildings (no GC or EA) -f_createRemainingBuildings(); - -//Cables -f_createGISCables();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1727792666396</Id> - <Name>f_overwriteSpecificDatabaseValues</Name> - <X>-390</X> - <Y>140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//SHOULD BE OVERRIDDEN - -//Function used to overwrite specific database values after the databases have been loaded in -//Usecases for example are adjusting floor surface area to 0, to cause no consumption, etc. -// --> without the loss of data in your database sources itself - -//Example code -/* -//Adjust building floor surface area to 0 to cause no consumption (empty buildings) - -List<String> buildingIDS = new ArrayList<String>(); - -// Define the building ids that need to have no consumption -String buildingID_XXXX = "XXXX"; - -buildingIDS.add(buildingID_XXXX); - - -for(String buildingID : buildingIDS){ - update(buildings) - .where(buildings.building_id.eq(buildingID)) - .set(buildings.cumulative_floor_surface_m2, 0.0) - .execute(); -} -*/</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[]</ReturnType> - <Id>1728035809860</Id> - <Name>f_convertFloatArrayToDoubleArray</Name> - <X>1550</X> - <Y>880</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>floatArray</Name> - <Type>float[]</Type> - </Parameter> - <Body>if (floatArray == null) { - return null; -} -double[] doubleArray = new double[floatArray.length]; -for (int i = 0; i < floatArray.length; i++) { - doubleArray[i] = floatArray[i]; -} -return doubleArray;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1728039545686</Id> - <Name>f_getPreprocessedElectricityConsumptionTotal</Name> - <X>920</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>annualElectricityDelivery_kWh</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>annualElectricityFeedin_kWh</Name> - <Type>Integer</Type> - </Parameter> - <Parameter> - <Name>annualElectricityProduction_kWh</Name> - <Type>Integer</Type> - </Parameter> - <Parameter> - <Name>pvPower_kW</Name> - <Type>Double</Type> - </Parameter> - <Body>double annualElectricityConsumption_kWh = 0; -if(annualElectricityFeedin_kWh != null){ - if(annualElectricityProduction_kWh != null){ - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh - annualElectricityFeedin_kWh + annualElectricityProduction_kWh; - } - else if(pvPower_kW != null && pvPower_kW > 0){ - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh - annualElectricityFeedin_kWh + pvPower_kW*avgc_data.p_avgFullLoadHoursPV_hr; - } - else{//Geen opwek - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; - } -} -else if(pvPower_kW != null && pvPower_kW > 0){ - //WAT HIER?? Voor nu consumption = delivery - //Maar: moet preprocessing van standaard profiel worden, waar gelijktijdigheid gecheckt wordt! - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; -} -else{ - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; -} -return annualElectricityConsumption_kWh; -</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1732112209863</Id> - <Name>f_createCustomPVAsset</Name> - <X>900</X> - <Y>220</Y> - <Label> - <X>9</X> - <Y>-1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityProduction_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>pvPower_kW</Name> - <Type>Double</Type> - </Parameter> - <Body>if (yearlyElectricityProduction_kWh.length != 35040) { - traceln("Skipping creation of PV asset: need 35040 data points, got %d", yearlyElectricityProduction_kWh.length); - return; -} - -// Generate custom PV production asset using production data! -double[] a_arguments = IntStream.range(0, 35040).mapToDouble(i -> v_simStartHour_h + i*0.25).toArray(); // time axis - -// From kWh/quarter to normalized power -double totalProduction_kWh = Arrays.stream(yearlyElectricityProduction_kWh).sum(); -double fullLoadHours_h = totalProduction_kWh / pvPower_kW; -double[] a_normalizedPower_fr = Arrays.stream(yearlyElectricityProduction_kWh).map(i -> 4 * i / totalProduction_kWh * fullLoadHours_h ).toArray(); - -//traceln("Full load hours of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).sum()/4); -//traceln("Max of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).max()); - -TableFunction tf_customPVproduction_fr = new TableFunction(a_arguments, a_normalizedPower_fr, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); -J_ProfilePointer profilePointer = new J_ProfilePointer((parentGC.p_ownerID + "_PVproduction") , tf_customPVproduction_fr); -energyModel.f_addProfile(profilePointer); -J_EAProduction production_asset = new J_EAProduction(parentGC, OL_EnergyAssetType.PHOTOVOLTAIC, (parentGC.p_ownerID + "_rooftopPV"), OL_EnergyCarriers.ELECTRICITY, (double)pvPower_kW, energyModel.p_timeStep_h, profilePointer); - -traceln("Custom PV asset added to GC: " + parentGC.p_ownerID); -//traceln("Custom PV asset added to %s with installed power %s kW and %s full load hours!", parentGC.p_ownerID, pvPower_kW, fullLoadHours_h); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1732112244908</Id> - <Name>f_iEASurveyCompanies_Zorm</Name> - <X>448</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>gridConnection</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>//Initialize boolean that sets the creation of currently existing electric (demand) EA -boolean createElectricEA = true; - -//Create current scenario parameter list -J_scenario_Current current_scenario_list = new J_scenario_Current(); -zero_Interface.c_scenarioMap_Current.put(companyGC.p_uid, current_scenario_list); - -//Create future scenario parameter list -J_scenario_Future future_scenario_list = new J_scenario_Future(); -zero_Interface.c_scenarioMap_Future.put(companyGC.p_uid, future_scenario_list); - - - -//Get PV power (used for preprocessing and estimating grid capacity if unknown) -Double pvPower_kW = (gridConnection.getSupply().getPvInstalledKwp() != null) ? new Double(gridConnection.getSupply().getPvInstalledKwp()) : null; - - -////Electricity (connection and consumption) -//Initialize contract capacity with 0 for when companies fill in survey already but currently have no connection yet -companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = 0.0; -companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = 0.0; -companyGC.v_liveConnectionMetaData.physicalCapacity_kW = 0.0; - -f_createDieselTractors(companyGC, gridConnection.getTransport().getAgriculture()); - -//Check for electricity connection and data -if (gridConnection.getElectricity().getHasConnection()){ - - //Connection capacities - if(gridConnection.getElectricity().getContractedConnectionCapacityKw() != null && gridConnection.getElectricity().getContractedConnectionCapacityKw() >= 0){ - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = gridConnection.getElectricity().getContractedConnectionCapacityKw(); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - else if((gridConnection.getElectricity().getContractedConnectionCapacityKw() == null || - gridConnection.getElectricity().getContractedConnectionCapacityKw() < 0) && - (gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() == null || - gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() <= 0)) { - traceln("SURVEYOWNER HAS NOT FILLED IN DELIVERY OR PHYSICAL CONNECTION CAPACITY!!!"); - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - else{ - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw()); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - - - //Check if contract capacity feedin has been filled in: if not, make the same as pv capacity - if(gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() >= 0){ - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw()); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else{ - if(pvPower_kW != null){ - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = pvPower_kW; - } - else{ - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = 0.0; - } - companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - //Check if physical capacity has been filled in: if not, make the same as maximum of contract delivery and feedin - if(gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() > 0){ - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = (double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw(); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - else{ - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = max(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW, companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.physicalCapacityKnown = false; - } - - - //Add to current scenario list - current_scenario_list.setCurrentContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - current_scenario_list.setCurrentContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - current_scenario_list.setCurrentPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); - - - //Electricity consumption profile - String profileName = "default_office_electricity_demand_fr"; - - //Check if quarter hourly values are available in vallum - boolean createdTimeSeriesAssets = f_createElectricityTimeSeriesAssets(companyGC, gridConnection); - - if(createdTimeSeriesAssets){ - if(!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile or total is known. - createElectricEA = false; - } - } - else{ //(!createdTimeSeriesAssets) { // - double yearlyElectricityConsumption_kWh = 0; - try { // Check if quarterly hour values are available in excel database - if(selectFirstValue(Double.class, "SELECT " + "ccid" + gridConnection.getSequence().toString() + "_demand FROM comp_elec_consumption LIMIT 1;") != null){ - companyGC.v_hasQuarterHourlyValues = true; - profileName = "ccid" + companyGC.p_gridConnectionID; - - //Check if solar was already producing in simualtion year (Check for now: if year production = 0 , no solar yet, if year production = null, no data: so assume there was solar already) - if(gridConnection.getElectricity().getAnnualElectricityProduction_kWh() != null && gridConnection.getElectricity().getAnnualElectricityProduction_kWh () == 0){ - pvPower_kW = null; - } - - if (!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile is present. - createElectricEA = false; - } - } - } - catch(Exception e) { - //Data not available, do nothing and leave v_hasQuarterHourlyValues on false. - } - - if(companyGC.v_hasQuarterHourlyValues == false){//Calculate yearly consumption based on yearly delivery (and yearly feedin, production or solarpanels if available) - //Get totals - double yearlyElectricityDelivery_kWh = (gridConnection.getElectricity().getAnnualElectricityDemandKwh() != null) ? gridConnection.getElectricity().getAnnualElectricityDemandKwh() : 0; // Yearly electricity consumption (0 if value is null) - Integer yearlyElectricityFeedin_kWh = gridConnection.getElectricity().getAnnualElectricityFeedIn_kWh(); - Integer yearlyElectricityProduction_kWh = gridConnection.getElectricity().getAnnualElectricityProduction_kWh(); - - //Calculate consumption - yearlyElectricityConsumption_kWh = f_getPreprocessedElectricityConsumptionTotal(companyGC, yearlyElectricityDelivery_kWh, yearlyElectricityFeedin_kWh, yearlyElectricityProduction_kWh, pvPower_kW); - - //If no electricity consumption, determine the consumption based on average values and floor surface and connection capacity - if(yearlyElectricityConsumption_kWh == 0){ - yearlyElectricityConsumption_kWh = avgc_data.p_avgCompanyElectricityConsumption_kWhpm2*companyGC.p_floorSurfaceArea_m2; - - //Check if it is within the contracted limits (peak should at least be 20% lower than contracted capacity - if(yearlyElectricityConsumption_kWh*defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr() > 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW){ - yearlyElectricityConsumption_kWh = 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW/defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr(); - } - - } - else if(!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile or total is known. - createElectricEA = false; - } - - //Update total Yearly electricity consumption (only when no timestep data available, cause when thats avaiable, it happens in the preprocessing function) - if (yearlyElectricityDelivery_kWh != 0){ - p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(companyGC, - yearlyElectricityDelivery_kWh); - } - else{ - p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(companyGC, - yearlyElectricityConsumption_kWh); - } - } - - //Add base electricity demand profile (with profile if available, with generic pattern if only yearly data is available) - f_addElectricityDemandProfile(companyGC, yearlyElectricityConsumption_kWh, pvPower_kW, companyGC.v_hasQuarterHourlyValues, profileName); - } -} - -//If everything is 0 set the GC as non active -if(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.physicalCapacity_kW == 0){ - companyGC.v_isActive = false; -} - -//Grid expansion request -if (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null && gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator()){ - future_scenario_list.setRequestedContractDeliveryCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - future_scenario_list.setRequestedContractFeedinCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(max(companyGC.v_liveConnectionMetaData.physicalCapacity_kW, max(future_scenario_list.getRequestedContractDeliveryCapacity_kW(), future_scenario_list.getRequestedContractFeedinCapacity_kW()))); -} -else{ - future_scenario_list.setRequestedContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - future_scenario_list.setRequestedContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); -} - - -////Supply (pv, wind, etc.) -if (gridConnection.getSupply().getHasSupply() != null && gridConnection.getSupply().getHasSupply()){ - //gridConnection.getElectricity().getAnnualElectricityProductionKwh() // Staat niet meer in het formulier! - - double[] yearlyElectricityProduction_kWh_array = null; - - var quarterHourlyProduction_kWh = gridConnection.getElectricity().getQuarterHourlyProduction_kWh(); - if (quarterHourlyProduction_kWh != null && quarterHourlyProduction_kWh.hasNumberOfValuesForOneYear()) { - yearlyElectricityProduction_kWh_array = f_timeSeriesToQuarterHourlyDoubleArray(quarterHourlyProduction_kWh); - } - - if(yearlyElectricityProduction_kWh_array == null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ - try { - if(selectFirstValue(Double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption LIMIT 1;") != null){ - List<Double> yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption;"); - yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - } - } - catch(Exception e) { - } - } - if (yearlyElectricityProduction_kWh_array != null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0 && !gridConnection.getHeat().getHeatingTypes().contains(com.zenmo.zummon.companysurvey.HeatingType.COMBINED_HEAT_AND_POWER)){ - f_createCustomPVAsset(companyGC, yearlyElectricityProduction_kWh_array, (double)gridConnection.getSupply().getPvInstalledKwp()); // Create custom PV asset when production data is available! - current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); - } else if (gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ - //gridConnection.getSupply().getPvOrientation(); // Wat doen we hier mee????? Nog niets! - f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", gridConnection.getSupply().getPvInstalledKwp()); - - //add to scenario: current - current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); - //current_scenario_list.currentPV_orient = gridConnection.getSupply().getPvOrientation(); - } - //Wind - if (gridConnection.getSupply().getWindInstalledKw() != null && gridConnection.getSupply().getWindInstalledKw() > 0){ - f_addEnergyProduction(companyGC, OL_EnergyAssetType.WINDMILL, "Wind mill", gridConnection.getSupply().getWindInstalledKw()); - - //add to scenario: current - current_scenario_list.setCurrentWind_kW(gridConnection.getSupply().getWindInstalledKw()); - } -} - -//Planned supply (PV) -if (gridConnection.getSupply().getPvPlanned() != null && gridConnection.getSupply().getPvPlanned()){ - future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW() + (gridConnection.getSupply().getPvPlannedKwp() != null ? gridConnection.getSupply().getPvPlannedKwp() : 0)); - future_scenario_list.setPlannedPV_year(gridConnection.getSupply().getPvPlannedYear()); - //gridConnection.getSupply().getPvPlannedOrientation(); -} -else{ - future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW()); -} - -//Planned supply (Wind) -if (gridConnection.getSupply().getWindPlannedKw() != null && gridConnection.getSupply().getWindPlannedKw() > 0){ - future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW() + (gridConnection.getSupply().getWindPlannedKw() != null ? gridConnection.getSupply().getWindPlannedKw() : 0)); - // plannedWind_year // ??? -} -else{ - future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW()); -} - -////Heating and gas -OL_GridConnectionHeatingType heatingType = f_heatingSurveyCompany(companyGC, gridConnection); - -//add heating type to scenario: current and future -current_scenario_list.setCurrentHeatingType(heatingType); -future_scenario_list.setPlannedHeatingType(heatingType); - - -// Electric Storage -Float battery_power_kW = 0f; -Float battery_capacity_kWh = 0f; - -if (gridConnection.getStorage().getHasBattery() != null && gridConnection.getStorage().getHasBattery() && createElectricEA){ // Check if battery present and if electric demand EA should be created - if (gridConnection.getStorage().getBatteryPowerKw() != null){ - battery_power_kW = gridConnection.getStorage().getBatteryPowerKw(); - } - if (gridConnection.getStorage().getBatteryCapacityKwh() != null){ - battery_capacity_kWh = gridConnection.getStorage().getBatteryCapacityKwh(); - } - - if (battery_power_kW > 0 && battery_capacity_kWh > 0) { - f_addStorage(companyGC, battery_power_kW, battery_capacity_kWh, OL_EnergyAssetType.STORAGE_ELECTRIC); - companyGC.f_setBatteryManagement(new J_BatteryManagementSelfConsumption(companyGC)); - } -} - -//add to scenario: current -current_scenario_list.setCurrentBatteryCapacity_kWh(battery_capacity_kWh); -current_scenario_list.setCurrentBatteryPower_kW(battery_power_kW); - - - -if (gridConnection.getStorage().getHasThermalStorage() != null && gridConnection.getStorage().getHasThermalStorage()){ // Check for thermal storage - //gridConnection.getStorage().getThermalStorageKw() - //J_EAStorageHeat(Agent parentAgent, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { - //J_EAStorageHeat(companyGC, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { - //Denk ook aan aansturing?!! -} - -if (gridConnection.getStorage().getHasPlannedBattery() != null && gridConnection.getStorage().getHasPlannedBattery()){ // Check for planned battery - future_scenario_list.setPlannedBatteryCapacity_kWh((gridConnection.getStorage().getPlannedBatteryCapacityKwh() != null ? gridConnection.getStorage().getPlannedBatteryCapacityKwh() : 0) + current_scenario_list.getCurrentBatteryCapacity_kWh()); - future_scenario_list.setPlannedBatteryPower_kW((gridConnection.getStorage().getPlannedBatteryPowerKw() != null ? gridConnection.getStorage().getPlannedBatteryPowerKw() : 0) + current_scenario_list.getCurrentBatteryPower_kW()); -} -else{ -future_scenario_list.setPlannedBatteryCapacity_kWh(current_scenario_list.getCurrentBatteryCapacity_kWh()); -future_scenario_list.setPlannedBatteryPower_kW(current_scenario_list.getCurrentBatteryPower_kW()); -} - - - -////Transport - -//Cars of comuters and visitors -int nbDailyCarVisitors_notNull = (gridConnection.getTransport().getNumDailyCarVisitors() != null) ? gridConnection.getTransport().getNumDailyCarVisitors() : 0; -int nbDailyCarCommuters_notNull = (gridConnection.getTransport().getNumDailyCarAndVanCommuters() != null) ? gridConnection.getTransport().getNumDailyCarAndVanCommuters() : 0; - -if (nbDailyCarCommuters_notNull + nbDailyCarVisitors_notNull > 0){ - - int nbEVCarsComute = (gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() != null) ? gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() : 0; // Wat doen we hier mee???? - int nbDieselCarsComute = gridConnection.getTransport().getNumDailyCarAndVanCommuters() + nbDailyCarVisitors_notNull - nbEVCarsComute; - - boolean isDefaultVehicle = true; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - - for (int i = 0; i< nbDieselCarsComute; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, 0); - } - - - //check if charge power is filled in - if (nbEVCarsComute > 0 && gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ - if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() <= 0) { - traceln("Survey data contains no/negative Car maxChargingPower_kW: %s", gridConnection.getTransport().getCars().getPowerPerChargePointKw()); - } - else{ - maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - } - - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVCarsComute; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, 0, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVCars(nbEVCarsComute); - current_scenario_list.setCurrentDieselCars(nbDieselCarsComute); - - //Initialize future cars - future_scenario_list.setPlannedEVCars(current_scenario_list.getCurrentEVCars()); - -} - - -//Business vehicles -if (gridConnection.getTransport().getHasVehicles() != null && gridConnection.getTransport().getHasVehicles()){ - - //Cars - if (gridConnection.getTransport().getCars().getNumCars() != null && gridConnection.getTransport().getCars().getNumCars() != 0){ - - - //Update remaning amount of cars (company owned only) - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - gridConnection.getTransport().getCars().getNumCars()); - - //Get amount of EV and diesel cars - Integer nbEVCars = gridConnection.getTransport().getCars().getNumElectricCars(); - if (nbEVCars == null) { - nbEVCars = 0; - } - int nbDieselCars = gridConnection.getTransport().getCars().getNumCars() - nbEVCars; - - //Initialize parameters - boolean isDefaultVehicle = true; - double annualTravelDistance_km = 0; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - - //check if annual travel distance is filled in - if (gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm() != null){ - annualTravelDistance_km = gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm(); - isDefaultVehicle = false; - } - - //create diesel vehicle - for (int i = 0; i< nbDieselCars; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, annualTravelDistance_km); - } - - //Get number of chargepoints if filled in - //int numberOfChargepointsBusinessCars = gridConnection.getTransport().getCars().getNumChargePoints() != null ? gridConnection.getTransport().getCars().getNumChargePoints() : 0; - - //check if charge power is filled in - if (nbEVCars > 0 && gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ - if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() <= 0) { - traceln("Survey data contains no/negative Car maxChargingPower_kW: %s", gridConnection.getTransport().getCars().getPowerPerChargePointKw()); - } - else{ - maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - } - - //create EV - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVCars; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVCars(((current_scenario_list.getCurrentEVCars() != null) ? current_scenario_list.getCurrentEVCars() : 0) + nbEVCars); - current_scenario_list.setCurrentDieselCars(((current_scenario_list.getCurrentDieselCars() != null) ? current_scenario_list.getCurrentDieselCars() : 0) + nbDieselCars); - current_scenario_list.setCurrentEVCarChargePower_kW(maxChargingPower_kW); - - //Update Planned cars - future_scenario_list.setPlannedEVCars((gridConnection.getTransport().getCars().getNumPlannedElectricCars() != null ? gridConnection.getTransport().getCars().getNumPlannedElectricCars() : 0) + current_scenario_list.getCurrentEVCars()); - future_scenario_list.setPlannedHydrogenCars((gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() != null) ? gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() : 0); - - } - - - //Vans - if (gridConnection.getTransport().getVans().getNumVans() != null && gridConnection.getTransport().getVans().getNumVans() != 0){ - - //Update remaning amount of vans - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - gridConnection.getTransport().getVans().getNumVans()); - - Integer nbEVVans = gridConnection.getTransport().getVans().getNumElectricVans(); - if (nbEVVans == null) { - nbEVVans = 0; - } - int nbDieselVans = gridConnection.getTransport().getVans().getNumVans() - nbEVVans; - - boolean isDefaultVehicle = true; - double annualTravelDistance_km = 0; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerVan_kW; - - //check if annual travel distance is filled in - if (gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm() != null){ - annualTravelDistance_km = gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm(); - isDefaultVehicle = false; - } - - //create diesel vehicles - for (int i = 0; i< nbDieselVans; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, isDefaultVehicle, annualTravelDistance_km); - } - - //Get number of chargepoints if filled in - //int numberOfChargepointsVans = gridConnection.getTransport().getVans().getNumChargePoints() != null ? gridConnection.getTransport().getVans().getNumChargePoints() : 0; - - - //check if charge power is filled in - if (nbEVVans > 0 && gridConnection.getTransport().getVans().getPowerPerChargePointKw() != null){ - if (gridConnection.getTransport().getVans().getPowerPerChargePointKw() < 0) { - traceln("Survey data contains no/negative Van maxChargingPower_kW: %s", gridConnection.getTransport().getVans().getPowerPerChargePointKw()); - } - else{ - maxChargingPower_kW = gridConnection.getTransport().getVans().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - } - - //create electric vehicles - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVVans; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VAN, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVVans(nbEVVans); - current_scenario_list.setCurrentDieselVans(nbDieselVans); - current_scenario_list.setCurrentEVVanChargePower_kW(maxChargingPower_kW); - - //Planned - future_scenario_list.setPlannedEVVans((gridConnection.getTransport().getVans().getNumPlannedElectricVans() != null ? gridConnection.getTransport().getVans().getNumPlannedElectricVans() : 0) + current_scenario_list.getCurrentEVVans()); - future_scenario_list.setPlannedHydrogenVans((gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() != null) ? gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() : 0); - } - - - - //Trucks - if (gridConnection.getTransport().getTrucks().getNumTrucks() != null && gridConnection.getTransport().getTrucks().getNumTrucks() != 0){ - - //Update remaning amount of trucks - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK, - gridConnection.getTransport().getTrucks().getNumTrucks()); - - Integer nbEVTrucks = gridConnection.getTransport().getTrucks().getNumElectricTrucks(); - if (nbEVTrucks == null) { - nbEVTrucks = 0; - } - int nbDieselTrucks = gridConnection.getTransport().getTrucks().getNumTrucks() - nbEVTrucks; - - boolean isDefaultVehicle = true; - double annualTravelDistance_km = 0; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerTruck_kW; - - //check if annual travel distance is filled in - if (gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm() != null){ - annualTravelDistance_km = gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm(); - isDefaultVehicle = false; - } - - //create diesel vehicles - for (int i = 0; i< nbDieselTrucks; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, isDefaultVehicle, annualTravelDistance_km); - } - - //Get number of chargepoints if filled in - //int numberOfChargepointsVans = gridConnection.getTransport().getTrucks().getNumChargePoints() != null ? gridConnection.getTransport().getTrucks().getNumChargePoints() : 0; - - - //check if charge power is filled in - if (nbEVTrucks > 0 && gridConnection.getTransport().getTrucks().getPowerPerChargePointKw() != null){ - if (gridConnection.getTransport().getTrucks().getPowerPerChargePointKw() <= 0) { - traceln("Survey data contains no/negative Truck maxChargingPower_kW: %s", gridConnection.getTransport().getTrucks().getPowerPerChargePointKw()); - } - else{ - maxChargingPower_kW = gridConnection.getTransport().getTrucks().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - } - - //create electric vehicles - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVTrucks; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_TRUCK, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVTrucks(nbEVTrucks); - current_scenario_list.setCurrentDieselTrucks(nbDieselTrucks); - current_scenario_list.setCurrentEVTruckChargePower_kW(maxChargingPower_kW); - - //Planned - future_scenario_list.setPlannedEVTrucks((gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() != null ? gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() : 0) + current_scenario_list.getCurrentEVTrucks()); - future_scenario_list.setPlannedHydrogenTrucks((gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() != null) ? gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() : 0); - } - - - //Other - if (Objects.nonNull(gridConnection.getTransport().getOtherVehicles().getHasOtherVehicles())){ - - // Wat doen we hier mee??? - - } -} -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Building_data</ReturnType> - <Id>1737741603780</Id> - <Name>f_createBuildingData_Vallum</Name> - <X>470</X> - <Y>190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>PandID</Name> - <Type>String</Type> - </Parameter> - <Body>com.zenmo.bag.Pand pand_data_vallum = map_buildingData_Vallum.get(PandID); - -Building_data building_data_record = null; -if(pand_data_vallum != null){ // Only happens if building has been selected in survey, that is no longer available in BAG (Destroyed for example). - //Calculate surface area - GISRegion gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(pand_data_vallum.getGeometry().toString(), OL_GISObjectType.BUILDING)); - double surfaceArea_m2 = gisRegion.area(); - gisRegion.remove(); - - - //Create a building_data record - building_data_record = Building_data.builder(). - - address_id("verblijfsobject." + PandID). - building_id(PandID). - streetname(companyGC.p_address.getStreetName()). - house_number(companyGC.p_address.getHouseNumber()). - house_letter(companyGC.p_address.getHouseLetter()). - house_addition(companyGC.p_address.getHouseAddition()). - postalcode(companyGC.p_address.getPostalcode()). - city(companyGC.p_address.getPostalcode()). - build_year(pand_data_vallum.getBouwjaar()). - status(pand_data_vallum.getStatus()). - //purpose(row.get( buildings.purpose )). - address_floor_surface_m2(surfaceArea_m2). - polygon_area_m2(surfaceArea_m2). - annotation(companyGC.p_owner.p_actorID). - //extra_info(row.get( buildings.extra_info )). - //gridnode_id(row.get( buildings.gridnode_id )). - //latitude(row.get( buildings.latitude )). - //longitude(row.get( buildings.longitude )). - polygon(pand_data_vallum.getGeometry().toString()). - build(); -} -else{ - traceln("WARNING: SELECTED BUILDING IN SURVEY IS NO LONGER IN THE BAG DATABASE -> BUILDING CAN/HAS NOT BE(EN) CREATED!"); -} - -return building_data_record;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1737712184349</Id> - <Name>f_createDieselTractors</Name> - <X>900</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGridConnection</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>agricultureSurveyData</Name> - <Type>com.zenmo.zummon.companysurvey.Agriculture</Type> - </Parameter> - <Body>final double annualDiesel_L = Optional.ofNullable(agricultureSurveyData.getAnnualDieselUsage_L()).orElse(0.0); -final int numTractors = Optional.ofNullable(agricultureSurveyData.getNumTractors()).orElse(annualDiesel_L > 0.0 ? 1 : 0); - -if (numTractors > 0 && annualDiesel_L <= 0.0) { - // TODO: this should be in Tractor constructor - throw new RuntimeException("Tractor diesel usage missing for " + companyGridConnection.p_gridConnectionID); -} - -CustomProfile_data tractorProfile = findFirst(c_customProfiles_data, profile -> profile.customProfileID().equals("TractorProfile")); ///???? - -for (int i = 0; i < numTractors; i++) { - if(tractorProfile == null){ - throw new RuntimeException("Trying to make a tractor, without having loaded in a tractor profile for GC: " + companyGridConnection.p_gridConnectionID); - } - new J_EADieselTractor(companyGridConnection, annualDiesel_L / numTractors, tractorProfile.getValuesArray(), energyModel.p_timeStep_h); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1738248965949</Id> - <Name>f_createElectricityTimeSeriesAssets</Name> - <X>460</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gridConnection</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>gridConnectionSurvey</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>var electricitySurvey = gridConnectionSurvey.getElectricity(); - -double[] deliveryTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyDelivery_kWh()); -if (deliveryTimeSeries_kWh == null) { - // delivery is the minimum we require to do anything with timeseries data - return false; -} - -double[] feedInTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyFeedIn_kWh()); -double[] productionTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyProduction_kWh()); - -Double pvPower_kW = Optional.ofNullable(gridConnectionSurvey.getSupply().getPvInstalledKwp()) - .map(it -> (double) it) - .orElse(null); - -double[] heatPumpElectricityTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(gridConnectionSurvey.getHeat().getHeatPumpElectricityConsumptionTimeSeries_kWh()); - -//Preprocess the arrays and create the consumption pattern -f_createPreprocessedElectricityProfile_PV(gridConnection, deliveryTimeSeries_kWh, feedInTimeSeries_kWh, productionTimeSeries_kWh, pvPower_kW, heatPumpElectricityTimeSeries_kWh); - -gridConnection.v_hasQuarterHourlyValues = true; - -return true;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[]</ReturnType> - <Id>1738572338816</Id> - <Name>f_timeSeriesToQuarterHourlyDoubleArray</Name> - <X>1550</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>timeSeries</Name> - <Type>com.zenmo.zummon.companysurvey.TimeSeries</Type> - </Parameter> - <Body>int targetYear = v_simStartYear; -if (timeSeries == null) { - return null; -} - -if (!timeSeries.hasNumberOfValuesForOneYear()) { - traceln("Time series has too few values for one year"); - return null; -} - -return f_convertFloatArrayToDoubleArray(timeSeries.convertToQuarterHourly().getFullYearOrFudgeIt(targetYear));</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1742915722586</Id> - <Name>f_connectGCToExistingBuilding</Name> - <X>1550</X> - <Y>790</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>connectingGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>existingBuilding</Name> - <Type>GIS_Building</Type> - </Parameter> - <Parameter> - <Name>connectingBuildingData</Name> - <Type>Building_data</Type> - </Parameter> - <Body>//Get the total roof surface of the building -double buildingRoofSurface = existingBuilding.p_roofSurfaceArea_m2; - -//Building roof surface removal from all earlier connected GC (so excluding the new one!) -int currentAmountOfConnectedGCWithBuilding = existingBuilding.c_containedGridConnections.size(); -for(GridConnection earlierConnectedGC : existingBuilding.c_containedGridConnections){ - earlierConnectedGC.p_roofSurfaceArea_m2 -= buildingRoofSurface/currentAmountOfConnectedGCWithBuilding; - - if(earlierConnectedGC.p_roofSurfaceArea_m2 < 0){ - new RuntimeException("Negative roofsurface for GC: " + earlierConnectedGC.p_gridConnectionID + " after removal of earlier distributed building roofsurface. This should never be possible!"); - } -} - -//Connect new GC to the building now -existingBuilding.c_containedGridConnections.add(connectingGC); -connectingGC.c_connectedGISObjects.add(existingBuilding); - - -//Adding the newly distributed roof surfaces to the gc (now including the new one!) -int newAmountOfConnectedGCWithBuilding = currentAmountOfConnectedGCWithBuilding + 1; -for(GridConnection connectedGC : existingBuilding.c_containedGridConnections){ - connectedGC.p_roofSurfaceArea_m2 += buildingRoofSurface/newAmountOfConnectedGCWithBuilding; -} - -//Also add the new connecting building data address floor surface -existingBuilding.p_floorSurfaceArea_m2 += connectingBuildingData.address_floor_surface_m2();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1745336570663</Id> - <Name>f_addHeatAsset</Name> - <X>900</X> - <Y>500</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatAssetType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>maxHeatOutputPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>//Initialize parameters -double heatOutputCapacityGasBurner_kW; -double inputCapacityElectric_kW; -double efficiency; -double baseTemperature_degC; -double outputTemperature_degC; -OL_AmbientTempType ambientTempType; -double sourceAssetHeatPower_kW; -double belowZeroHeatpumpEtaReductionFactor; -if(parentGC.p_BuildingThermalAsset == null){ - maxHeatOutputPower_kW = maxHeatOutputPower_kW*2; // Make the asset capacity twice as high, to make sure it can handle the load in other scenarios with more heat consumption. -} - -switch (heatAssetType){ // There is always only one heatingType, If there are many assets the type is CUSTOM - - case GAS_BURNER: - heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); - J_EAConversionGasBurner gasBurner = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW , avgc_data.p_avgEfficiencyGasBurner_fr, energyModel.p_timeStep_h, 90); - break; - - case HYBRID_HEATPUMP: - - //Add primary heating asset (heatpump) (if its not part of the basic profile already - inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW / 3); //-- /3, kan nog kleiner want is hybride zodat gasbrander ook bij springt, dus kleiner MOETEN aanname voor hoe klein onderzoeken - efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; - baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType); - - zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); - - //Add secondary heating asset (gasburner) - heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); - efficiency = avgc_data.p_avgEfficiencyGasBurner_fr; - outputTemperature_degC = avgc_data.p_avgOutputTemperatureGasBurner_degC; - - J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC); - break; - - case ELECTRIC_HEATPUMP: - //Add primary heating asset (heatpump) - inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW); // Could be a lot smaller due to high cop - efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; - baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - break; - - case GAS_CHP: - - double outputCapacityElectric_kW = (maxHeatOutputPower_kW/avgc_data.p_avgEfficiencyCHP_thermal_fr) * avgc_data.p_avgEfficiencyCHP_electric_fr; - outputTemperature_degC = avgc_data.p_avgOutputTemperatureCHP_degC; - efficiency = avgc_data.p_avgEfficiencyCHP_thermal_fr + avgc_data.p_avgEfficiencyCHP_electric_fr; - - new J_EAConversionGasCHP(parentGC, outputCapacityElectric_kW, maxHeatOutputPower_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC ); - break; - - case DISTRICTHEAT: - double heatOutputCapacityDeliverySet_kW = max(avgc_data.p_minDistrictHeatingDeliverySetOutputCapacity_kW, maxHeatOutputPower_kW); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - efficiency = avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - - new J_EAConversionHeatDeliverySet(parentGC, heatOutputCapacityDeliverySet_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC); - - //Add GC to heat grid - GridNode heatgrid = findFirst(energyModel.pop_gridNodes, node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - if(heatgrid == null){ - heatgrid = f_createHeatGridNode(); - } - parentGC.p_parentNodeHeatID = heatgrid.p_gridNodeID; - break; - - case CUSTOM: - f_addCustomHeatAsset(parentGC, maxHeatOutputPower_kW); - break; - - default: - traceln("HEATING TYPE NOT FOUND FOR GC: " + parentGC); -} </Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GridNode</ReturnType> - <Id>1747300761144</Id> - <Name>f_createHeatGridNode</Name> - <X>50</X> - <Y>600</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>GridNode GN_heat = energyModel.add_pop_gridNodes(); -GN_heat.p_gridNodeID = "Heatgrid"; - -// Check wether transformer capacity is known or estimated -GN_heat.p_capacity_kW = 1000000; -GN_heat.p_realCapacityAvailable = false; - -// Basic GN information -GN_heat.p_description = "Warmtenet"; - -/* -//Owner -GN_heat.p_ownerGridOperator = Grid_Operator; -*/ - -//Define node type -GN_heat.p_nodeType = OL_GridNodeType.HT; -GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - -//Define GN location -GN_heat.p_latitude = 0; -GN_heat.p_longitude = 0; -GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - -//Create gis region -/* -GN.gisRegion = zero_Interface.f_createGISObject(f_createGISNodesTokens(GN)); -zero_Interface.f_styleGridNodes(GN); -zero_Interface.c_GISNodes.add(GN.gisRegion); -*/ - -return GN_heat;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747829476305</Id> - <Name>f_addSliderSolarfarm</Name> - <X>50</X> - <Y>340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>sliderGCID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>gridNodeID</Name> - <Type>String</Type> - </Parameter> - <Body>c_solarfarm_data.add(0, Solarfarm_data.builder(). -isSliderGC(true). - -gc_id(sliderGCID). -gc_name("Slider solarfarm"). -owner_id("Slider solarfarm owner"). -streetname(null). -house_number(null). -house_letter(null). -house_addition(null). -postalcode(null). -city(null). -gridnode_id(gridNodeID). -initially_active(false). - -capacity_electric_kw(0.0). -connection_capacity_kw(0.0). -contracted_delivery_capacity_kw(0.0). -contracted_feed_in_capacity_kw(0.0). - -latitude(0). -longitude(0). -polygon(null). -build());</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747829476307</Id> - <Name>f_addSliderWindfarm</Name> - <X>50</X> - <Y>360</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>sliderGCID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>gridNodeID</Name> - <Type>String</Type> - </Parameter> - <Body>c_windfarm_data.add(0, Windfarm_data.builder(). -isSliderGC(true). - -gc_id(sliderGCID). -gc_name("Slider windfarm"). -owner_id("Slider windfarm owner"). -streetname(null). -house_number(null). -house_letter(null). -house_addition(null). -postalcode(null). -city(null). -gridnode_id(gridNodeID). -initially_active(false). - -capacity_electric_kw(0.0). -connection_capacity_kw(0.0). -contracted_delivery_capacity_kw(0.0). -contracted_feed_in_capacity_kw(0.0). - -latitude(0). -longitude(0). -polygon(null). -build()); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747829476311</Id> - <Name>f_addSliderBattery</Name> - <X>50</X> - <Y>378</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>sliderGCID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>gridNodeID</Name> - <Type>String</Type> - </Parameter> - <Body>c_battery_data.add(0, Battery_data.builder(). -isSliderGC(true). - -gc_id(sliderGCID). -gc_name("Slider battery"). -owner_id("Slider battery owner"). -streetname(null). -house_number(null). -house_letter(null). -house_addition(null). -postalcode(null). -city(null). -gridnode_id(gridNodeID). -initially_active(false). - -capacity_electric_kw(0.0). -connection_capacity_kw(0.0). -contracted_delivery_capacity_kw(0.0). -contracted_feed_in_capacity_kw(0.0). - -storage_capacity_kwh(0.0). -operation_mode(OL_BatteryOperationMode.PEAK_SHAVING_PARENT_NODE). -latitude(0). -longitude(0). -polygon(null). -build());</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747830228830</Id> - <Name>f_initializeSpecificSliderGC</Name> - <X>90</X> - <Y>212</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Create slider GC data packages for assetGC that do not have a sliderGC data package yet -Solarfarm_data sliderSolarfarm_data = findFirst(c_solarfarm_data, sf_data -> sf_data.isSliderGC()); -Windfarm_data sliderWindfarm_data = findFirst(c_windfarm_data, wf_data -> wf_data.isSliderGC()); -Battery_data sliderBattery_data = findFirst(c_battery_data, bat_data -> bat_data.isSliderGC()); - -//Get top gridnode id -GridNode_data topGridNode = findFirst(c_gridNode_data, node_data -> node_data.type().equals("HVMV")); -if ( topGridNode == null ) { - throw new RuntimeException("Unable to find top GridNode of type HVMV to create slider assets."); -} -String topGridNodeID = topGridNode.gridnode_id(); - -//Create data package for e-hub dashboard slider gcs -if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ - f_addSliderSolarfarm("EnergyHub solarfarm slider", topGridNodeID); - f_addSliderWindfarm("EnergyHub windfarm slider", topGridNodeID); - f_addSliderBattery("EnergyHub battery slider", topGridNodeID); -} - -//If no slider data package is present yet for the main: add one as well. -if(sliderSolarfarm_data == null){ - f_addSliderSolarfarm("Main solarfarm slider", topGridNodeID); -} -if(sliderWindfarm_data == null){ - f_addSliderWindfarm("Main windfarm slider", topGridNodeID); -} -if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - for(GridNode_data nodeData : c_gridNode_data){ - f_addSliderBattery("Main battery slider", nodeData.gridnode_id()); - } -} -else{ - if(sliderBattery_data == null){ - f_addSliderBattery("Main battery slider", topGridNodeID); - } -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_ProfilePointer</ReturnType> - <Id>1749125189323</Id> - <Name>f_createEngineProfile</Name> - <Description>Functie van gillis voor inladen weer data!</Description> - <X>99</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>profileID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>arguments</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>values</Name> - <Type>double[]</Type> - </Parameter> - <Body>TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); -J_ProfilePointer profilePointer = new J_ProfilePointer(profileID, tf_profile); -energyModel.f_addProfile(profilePointer); -return profilePointer;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749138089965</Id> - <Name>f_setEngineProfiles</Name> - <Description>Functie van gillis voor inladen weer data!</Description> - <X>80</X> - <Y>130</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Profile Arguments -double[] a_arguments_hr = ListUtil.doubleListToArray(defaultProfiles_data.arguments_hr()); - -//Weather data -double[] a_ambientTemperatureProfile_degC = ListUtil.doubleListToArray(defaultProfiles_data.ambientTemperatureProfile_degC()); -double[] a_PVProductionProfile35DegSouth_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile35DegSouth_fr()); -double[] a_PVProductionProfile15DegEastWest_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile15DegEastWest_fr()); -double[] a_windProductionProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.windProductionProfile_fr()); - -//EPEX data -double[] a_epexProfile_eurpMWh = ListUtil.doubleListToArray(defaultProfiles_data.epexProfile_eurpMWh()); - -//Various demand data -double[] a_defaultHouseElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseElectricityDemandProfile_fr()); -double[] a_defaultHouseHotWaterDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseHotWaterDemandProfile_fr()); -double[] a_defaultHouseCookingDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseCookingDemandProfile_fr()); -double[] a_defaultOfficeElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultOfficeElectricityDemandProfile_fr()); -double[] a_defaultBuildingHeatDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultBuildingHeatDemandProfile_fr()); - -//Create Weather engine profiles -energyModel.pp_ambientTemperature_degC = f_createEngineProfile("ambient_temperature_degC", a_arguments_hr, a_ambientTemperatureProfile_degC); -energyModel.pp_PVProduction35DegSouth_fr = f_createEngineProfile("pv_production_south_fr", a_arguments_hr, a_PVProductionProfile35DegSouth_fr); -energyModel.pp_PVProduction15DegEastWest_fr = f_createEngineProfile("pv_production_eastwest_fr", a_arguments_hr, a_PVProductionProfile15DegEastWest_fr); -energyModel.pp_windProduction_fr = f_createEngineProfile("wind_production_fr", a_arguments_hr, a_windProductionProfile_fr); - -//Create Epex engine profile -energyModel.pp_dayAheadElectricityPricing_eurpMWh = f_createEngineProfile("epex_price_eurpMWh", a_arguments_hr, a_epexProfile_eurpMWh); - -//Create Consumption engine profiles: -f_createEngineProfile("default_house_electricity_demand_fr", a_arguments_hr, a_defaultHouseElectricityDemandProfile_fr); -f_createEngineProfile("default_house_hot_water_demand_fr", a_arguments_hr, a_defaultHouseHotWaterDemandProfile_fr); -f_createEngineProfile("default_house_cooking_demand_fr", a_arguments_hr, a_defaultHouseCookingDemandProfile_fr); -f_createEngineProfile("default_office_electricity_demand_fr", a_arguments_hr, a_defaultOfficeElectricityDemandProfile_fr); -f_createEngineProfile("default_building_heat_demand_fr", a_arguments_hr, a_defaultBuildingHeatDemandProfile_fr); - - -//Create custom engine profiles -for(CustomProfile_data customProfile : c_customProfiles_data){ - f_createEngineProfile(customProfile.customProfileID(), customProfile.getArgumentsArray(), customProfile.getValuesArray()); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749628581470</Id> - <Name>f_addGridNodeProfile</Name> - <X>70</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gridnode</Name> - <Type>GridNode</Type> - </Parameter> - <Parameter> - <Name>profile_data_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Body>//Create gridconnection where the profile is attached to -GridConnection GC_GridNode_profile = energyModel.add_pop_gridConnections(); - -//Set GC id -GC_GridNode_profile.p_gridConnectionID = "GridNode " + gridnode.p_gridNodeID + " profile GC"; - -//Set gridnode as parent -GC_GridNode_profile.p_parentNodeElectricID = gridnode.p_gridNodeID; - -//Set capacity same as gridnode -GC_GridNode_profile.v_liveConnectionMetaData.physicalCapacity_kW = gridnode.p_capacity_kW; -GC_GridNode_profile.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = gridnode.p_capacity_kW; -GC_GridNode_profile.v_liveConnectionMetaData.contractedFeedinCapacity_kW = gridnode.p_capacity_kW; - -GC_GridNode_profile.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; -GC_GridNode_profile.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; -GC_GridNode_profile.v_liveConnectionMetaData.physicalCapacityKnown = false; - -//Set lat lon same as gridnode -GC_GridNode_profile.p_latitude = gridnode.p_latitude; // Get latitude of first building (only used to get nearest trafo) -GC_GridNode_profile.p_longitude = gridnode.p_longitude; // Get longitude of first building (only used to get nearest trafo) - -if(project_data.gridnode_profile_timestep_hr() == null){ - new RuntimeException("Trying to load in gridnode profiles, without specifying the timestep of the data in the project_data"); -} - -double profileTimestep_hr = project_data.gridnode_profile_timestep_hr(); - -//Add profile to the GC -J_EAProfile profile = new J_EAProfile(GC_GridNode_profile, OL_EnergyCarriers.ELECTRICITY, profile_data_kWh, OL_AssetFlowCategories.fixedConsumptionElectric_kW, profileTimestep_hr); -profile.setStartTime_h(v_simStartHour_h); -profile.energyAssetName = "GridNode " + gridnode.p_gridNodeID + " profile"; - -//Set boolean has profile data true -gridnode.p_hasProfileData = true; -c_gridNodeIDsWithProfiles.add(gridnode.p_gridNodeID);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_ChargingSession</ReturnType> - <Id>1749648772203</Id> - <Name>f_createChargingSession</Name> - <X>490</X> - <Y>890</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>chargingSessionData</Name> - <Type>String</Type> - </Parameter> - <Body>String[] chargingSessionInfo = chargingSessionData.split("/"); - -double startIndex = Double.parseDouble(chargingSessionInfo[0]); -double endIndex = Double.parseDouble(chargingSessionInfo[1]); -double chargingDemand_kWh = Double.parseDouble(chargingSessionInfo[2]); -double batteryCap_kWh = Double.parseDouble(chargingSessionInfo[3]); -double chargingPower_kW = Double.parseDouble(chargingSessionInfo[5]); -int socket = Integer.parseInt(chargingSessionInfo[6]); - -//Cap charging demand to what is actual possible according to chargetime interval * charge power -chargingDemand_kWh = min(chargingPower_kW * (endIndex - startIndex) * 0.25, chargingDemand_kWh); - -return new J_ChargingSession(startIndex, endIndex, chargingDemand_kWh, batteryCap_kWh, chargingPower_kW, socket, 0.25);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<J_ChargingSession> </ReturnType> - <Id>1749649169603</Id> - <Name>f_createNewChargerProfile</Name> - <X>470</X> - <Y>870</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>chargerProfileData</Name> - <Type>ChargerProfile_data</Type> - </Parameter> - <Body>// example: 2/54/50.3/72.1/21.8/10.8/2 -List<String> chargerProfileDataValues = chargerProfileData.valuesList(); -List<J_ChargingSession> chargerProfile = new ArrayList<J_ChargingSession>(); - -for(int i = 0; i < chargerProfileDataValues.size(); i++){ - chargerProfile.add(f_createChargingSession(chargerProfileDataValues.get(i))); -} - -return chargerProfile;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<J_ChargingSession> </ReturnType> - <Id>1749649390125</Id> - <Name>f_getChargerProfile</Name> - <X>450</X> - <Y>850</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<J_ChargingSession> chargerProfile; -int randomIndex; - -if(c_chargerProfiles_data.size()>0){ - randomIndex = uniform_discr(0, c_chargerProfiles_data.size() - 1); - chargerProfile = f_createNewChargerProfile(c_chargerProfiles_data.get(randomIndex)); - c_chargerProfiles_data.remove(randomIndex); - energyModel.c_chargerProfiles.add(chargerProfile); -} -else{ - randomIndex = uniform_discr(0, energyModel.c_chargerProfiles.size() - 1); - chargerProfile = energyModel.c_chargerProfiles.get(randomIndex); -} - -return chargerProfile;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749726189312</Id> - <Name>f_addCookingAsset</Name> - <X>900</X> - <Y>620</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gc</Name> - <Type>GCHouse</Type> - </Parameter> - <Parameter> - <Name>CookingType</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>cookingDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Body>double yearlyCookingDemand_kWh = cookingDemand_kwhpa; - -if(cookingDemand_kwhpa == 0){ - //yearlyCookingDemand_kWh = uniform_discr(200,600); //way to high compared to referentiewoningen - yearlyCookingDemand_kWh = uniform_discr(70,130); - // traceln("Cooking demand unknown"); -} - -switch(CookingType){ - - case ELECTRIC_HOB: - new J_EAConsumption(gc, OL_EnergyAssetType.ELECTRIC_HOB, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.ELECTRICITY, energyModel.p_timeStep_h, null); - gc.p_cookingMethod = OL_HouseholdCookingMethod.ELECTRIC; - break; - - case GAS_PIT: - new J_EAConsumption(gc, OL_EnergyAssetType.GAS_PIT, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.METHANE, energyModel.p_timeStep_h, null); - gc.p_cookingMethod = OL_HouseholdCookingMethod.GAS; - break; -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749726279652</Id> - <Name>f_addHotWaterDemand</Name> - <X>900</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>houseGC</Name> - <Type>GCHouse</Type> - </Parameter> - <Parameter> - <Name>surface_m2</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>hotWaterDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Body>double yearlyHWD_kWh = hotWaterDemand_kwhpa; -if(hotWaterDemand_kwhpa == 0){ - int aantalBewoners; - if( surface_m2 > 150){ - aantalBewoners = uniform_discr(2,6); - } - else if (surface_m2 > 50){ - aantalBewoners = uniform_discr(1,4); - } - else { - aantalBewoners = uniform_discr(1,2); - } - - yearlyHWD_kWh = 1000 + aantalBewoners * 150; //Aangepast Naud 13-11-2025 omdat waardes van PBL totaal niet aansloten bij oude aantal bewoners * 600 //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix -} -//TEST -//yearlyHWD_kWh += 0; - -J_EAConsumption hotwaterDemand = new J_EAConsumption( houseGC, OL_EnergyAssetType.HOT_WATER_CONSUMPTION, "default_house_hot_water_demand_fr", yearlyHWD_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, null); - -//traceln("yearlyHWD_kWh "+ yearlyHWD_kWh); -if( surface_m2 > 200){ - //traceln("House created with " + surface_m2 + "m2 surace area, will have large hot water demand"); -} -if (surface_m2 < 25){ - //traceln("House created with " + surface_m2 + "m2 surace area, will have low hot water demand"); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749727623536</Id> - <Name>f_addBuildingHeatModel</Name> - <X>900</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>floorArea_m2</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>heatDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Body>double maxPowerHeat_kW = 1000; //Dit is hoeveel vermogen het huis kan afgeven/opnemen, mag willekeurige waarden hebben. Wordt alleen gebruikt in rekenstap van ratio of capacity -double lossfactor_WpK; //Dit is wat bepaalt hoeveel warmte het huis verliest/opneemt per tijdstap per delta_T -double initialTemp = uniform_discr(15,22); //starttemperatuur -double heatCapacity_JpK; //hoeveel lucht zit er in je huis dat je moet verwarmen? -double solarAbsorptionFactor_m2; //hoeveel m2 effectieve dak en muur oppervlakte er is dat opwarmt door zonneinstraling - -//Heat demand from PBL referentiewoningen used for HeatCapacity and lossFactor_WpK -if(heatDemand_kwhpa > 0){ //Not missing in data - lossfactor_WpK = heatDemand_kwhpa / 63; // = manually calibrated value tested on 3 neighborhoods -} -else{ - switch (parentGC.p_energyLabel){ - case A: - lossfactor_WpK = 0.35 * floorArea_m2; - break; - case B: - lossfactor_WpK = 0.45 * floorArea_m2; - break; - case C: - lossfactor_WpK = 0.65 * floorArea_m2; - break; - case D: - lossfactor_WpK = 0.85 * floorArea_m2; - break; - case E: - lossfactor_WpK = 1.05 * floorArea_m2; - break; - case F: - lossfactor_WpK = 1.25 * floorArea_m2; - break; - case G: - lossfactor_WpK = 1.45 * floorArea_m2; - break; - case NONE: - default: - lossfactor_WpK = uniform (0.85, 1.2) * floorArea_m2; - } -} -lossfactor_WpK = roundToDecimal(lossfactor_WpK,2); -solarAbsorptionFactor_m2 = floorArea_m2 * 0.01; //solar irradiance [W/m2] - -heatCapacity_JpK = floorArea_m2 * 50000; //What is the 5000 based upon? - -parentGC.p_BuildingThermalAsset = new J_EABuilding( parentGC, maxPowerHeat_kW, lossfactor_WpK, energyModel.p_timeStep_h, initialTemp, heatCapacity_JpK, solarAbsorptionFactor_m2 ); -energyModel.c_ambientDependentAssets.add( parentGC.p_BuildingThermalAsset ); - -//FOR NOW DEFAULT NO INTERIOR/EXTERIOR HEAT BUFFERS -> NOT NECESSARY -/* -double delayHeatReleaseInteriorHeatsink_hr = 0; -double lossToExteriorFromInteriorHeatSink_fr; -if(randomTrue(0.2)){ - delayHeatReleaseInteriorHeatsink_hr = 3; -} -else { - delayHeatReleaseInteriorHeatsink_hr = 0.5; -} - -parentGC.p_BuildingThermalAsset.addInteriorHeatBuffer(delayHeatReleaseInteriorHeatsink_hr); - -double delayHeatReleaseRoofAndWall_hr = 8.0; -parentGC.p_BuildingThermalAsset.addExteriorHeatBuffer(delayHeatReleaseRoofAndWall_hr); -*/</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Building_data></ReturnType> - <Id>1749728889982</Id> - <Name>f_getBuildingsInSubScope</Name> - <X>50</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialBuildingList</Name> - <Type>List<Building_data></Type> - </Parameter> - <Body>List<Building_data> scopedBuildingList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedBuildingList.addAll(initialBuildingList); -} -else{ - for (Building_data dataBuilding : initialBuildingList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataBuilding.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedBuildingList.add(dataBuilding); - } - } - } -} -return scopedBuildingList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749728889984</Id> - <Name>f_createHouses</Name> - <Description>Creates the houses using a single GC, and their building. After creation, they will be simulated using average values.</Description> - <X>420</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<Building_data> buildingDataHouses = f_getBuildingsInSubScope(c_houseBuilding_data); - -traceln("Aantal panden met woonfunctie in BAG data: " + buildingDataHouses.size()); - -int i = 0; - - -if(buildingDataHouses.size()>0){ - //Add houses to the legend if in model - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.HOUSE); - - //PreCalculate the probabilities for an additional Car for houses - f_calculateProbabilitiesForAdditionalCar(buildingDataHouses); -} - - - -for (Building_data houseBuildingData : buildingDataHouses) { - GCHouse GCH = energyModel.add_Houses(); - ConnectionOwner COH = energyModel.add_pop_connectionOwners(); - - //Set parameters for the Grid Connection - GCH.p_gridConnectionID = houseBuildingData.address_id(); - GCH.p_ownerID = "Woonhuis" + Integer.toString(i); //aanname : huiseigenaar is eigenbaas - - GCH.p_purposeBAG = houseBuildingData.purpose(); - - //pand gegevens - GCH.p_bouwjaar = houseBuildingData.build_year(); - GCH.p_eigenOprit = houseBuildingData.has_private_parking() != null ? houseBuildingData.has_private_parking() : false; - - //Nageisoleerd - if (houseBuildingData.energy_label() != null){ // && houseBuildingData.energy_label() != OL_GridConnectionIsolationLabel.NONE) { - GCH.p_energyLabel = houseBuildingData.energy_label(); - } - else { - if (GCH.p_bouwjaar < 1980) { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.D; - } - else if (GCH.p_bouwjaar < 1996) { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.C; - } - else if (GCH.p_bouwjaar < 2008) { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.B; - } - else { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.A; - } - } - //aansluiting gegevens - GCH.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; - GCH.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; - GCH.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; - - GCH.v_liveConnectionMetaData.physicalCapacityKnown = false; - GCH.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - GCH.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - - // Address data - GCH.p_address = new J_Address(); - GCH.p_address.setStreetName( houseBuildingData.streetname()); - if (houseBuildingData.house_number() == null) { - GCH.p_address.setHouseNumber( 0 ); - } else { - GCH.p_address.setHouseNumber( houseBuildingData.house_number()); - } - GCH.p_address.setHouseLetter( houseBuildingData.house_letter()); - GCH.p_address.setHouseAddition( houseBuildingData.house_addition()); - GCH.p_address.setPostalcode( houseBuildingData.postalcode()); - GCH.p_address.setCity( houseBuildingData.city()); - - //locatie - GCH.p_longitude = houseBuildingData.longitude(); - GCH.p_latitude = houseBuildingData.latitude(); - GCH.setLatLon(GCH.p_latitude, GCH.p_longitude); - - //Connect GC to grid node - GCH.p_parentNodeElectricID = houseBuildingData.gridnode_id(); - - //Set parameters for the Actor: ConnectionOwner - COH.p_actorID = GCH.p_ownerID; - COH.p_connectionOwnerType = OL_ConnectionOwnerType.HOUSEHOLD; - COH.p_detailedCompany = false; - GCH.p_owner = COH; - - - //Check wheter this building already exists - GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(houseBuildingData.building_id())); - - if(existingBuilding == null){//Create new GIS building and connect - GIS_Building b = f_createGISBuilding( houseBuildingData, GCH ); - GCH.p_roofSurfaceArea_m2 = houseBuildingData.polygon_area_m2(); - - //Style building - b.p_defaultFillColor = zero_Interface.v_houseBuildingColor; - b.p_defaultLineColor = zero_Interface.v_houseBuildingLineColor; - zero_Interface.f_styleAreas(b); - } - else{// Connect with existing building - f_connectGCToExistingBuilding(GCH, existingBuilding, houseBuildingData); - } - - //Floor surface of GC - GCH.p_floorSurfaceArea_m2 = houseBuildingData.address_floor_surface_m2(); - - //Instantiate energy assets - double annualElectricityConsumption_kwhpa; - double annualNaturalGasConsumption_kwhpa; - double annualSpaceHeatingConsumption_kwhpa; - double annualDHWConsumption_kwhpa; - double annualCookingConsumption_kwhpa; - try { - annualElectricityConsumption_kwhpa = houseBuildingData.electricity_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualElectricityConsumption_kwhpa = Double.valueOf(uniform_discr(1200, 3800)); - } - try { - annualNaturalGasConsumption_kwhpa = houseBuildingData.gas_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualNaturalGasConsumption_kwhpa = Double.valueOf(uniform_discr(600, 2000)); - } - try { - annualSpaceHeatingConsumption_kwhpa = houseBuildingData.space_heating_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualSpaceHeatingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.85; //assumed share gas space heating - traceln("DOESTHISHAPPEN??"); - } - try { - annualDHWConsumption_kwhpa = houseBuildingData.dhw_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualDHWConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.1; //assumed share gas dhw heating - } - try { - annualCookingConsumption_kwhpa = houseBuildingData.cooking_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualCookingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.05; //assumed share gas cooking - } - //GCH.p_initialPVpanels = houseBuildingData.pv_default(); - GCH.v_liveAssetsMetaData.initialPV_kW = houseBuildingData.pv_installed_kwp() != null ? houseBuildingData.pv_installed_kwp() : 0; - GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.v_liveAssetsMetaData.initialPV_kW > 0 ? GCH.v_liveAssetsMetaData.initialPV_kW : houseBuildingData.pv_potential_kwp(); // To prevent sliders from changing outcomes - - // TODO: Above we load in data of gas use, but the houses always have a thermal model?? - f_addEnergyAssetsToHouses(GCH, annualElectricityConsumption_kwhpa, annualSpaceHeatingConsumption_kwhpa, annualDHWConsumption_kwhpa, annualCookingConsumption_kwhpa ); - - i ++; -} - -//Backup for when pv_potential kWp is null, needs to be after all houses have been made, so rooftop surface is distributed correctly -for(GCHouse GCH : energyModel.Houses){ - if(GCH.v_liveAssetsMetaData.PVPotential_kW == null){ - GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.p_roofSurfaceArea_m2*avgc_data.p_avgRatioRoofPotentialPV*avgc_data.p_avgPVPower_kWpm2; - } -} - -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749728889986</Id> - <Name>f_addEnergyAssetsToHouses</Name> - <Description>Initialisation of the Energy assets using average values for houses</Description> - <X>440</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>house</Name> - <Type>GCHouse</Type> - </Parameter> - <Parameter> - <Name>electricityDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>spaceHeatingDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>dhwDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>cookingDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Body>//Add generic electricity demand profile -GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals( house.p_parentNodeElectricID)); - -if ( ! gn.p_hasProfileData ){ - f_addElectricityDemandProfile(house, electricityDemand_kwhpa, null, false, "default_house_electricity_demand_fr"); -} - -//Add building heat model and asset -f_addBuildingHeatModel(house, house.p_floorSurfaceArea_m2, spaceHeatingDemand_kwhpa); - -//Determine required heating capacity for the heating asset -double maximalTemperatureDifference_K = 30.0; // Approximation -double maxHeatOutputPower_kW = house.p_BuildingThermalAsset.getLossFactor_WpK() * maximalTemperatureDifference_K / 1000; - - -//Add heat demand profile -OL_GridConnectionHeatingType heatingType = avgc_data.p_avgHouseHeatingMethod; -f_addHeatAsset(house, heatingType, maxHeatOutputPower_kW); -house.f_addHeatManagement(heatingType, false); -house.f_setHeatingPreferences(f_getHouseHeatingPreferences()); - -//Add hot water and cooking demand -f_addHotWaterDemand(house, house.p_floorSurfaceArea_m2, dhwDemand_kwhpa); -f_addCookingAsset(house, OL_EnergyAssetType.GAS_PIT, cookingDemand_kwhpa); - - -//Add pv -double installedRooftopSolar_kW = house.v_liveAssetsMetaData.initialPV_kW != null ? house.v_liveAssetsMetaData.initialPV_kW : 0; -if (gn.p_hasProfileData){ //dont count production if there is measured data on Node - installedRooftopSolar_kW = 0; -} - -if (installedRooftopSolar_kW > 0) { - f_addEnergyProduction(house, OL_EnergyAssetType.PHOTOVOLTAIC, "Residential Solar", installedRooftopSolar_kW ); -} - -//Add cars -f_addCarsToHouses(house); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_HeatingPreferences</ReturnType> - <Id>1749728889988</Id> - <Name>f_getHouseHeatingPreferences</Name> - <X>460</X> - <Y>700</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>double nightTimeSetPoint_degC = 18; -double dayTimeSetPoint_degC = 20; -double startOfDayTime_h = 8; -double startOfNightTime_h = 23; - -if( randomTrue(0.5) ){ //50% kans op ochtend ritme - nightTimeSetPoint_degC = uniform_discr(12,18); - dayTimeSetPoint_degC = uniform_discr(18, 24); - startOfDayTime_h = uniform_discr(5,10) + uniform_discr(0,4) / 4.0; - startOfNightTime_h = uniform_discr(21,23); - -} -else if (randomTrue(0.5) ){ // 25% kans op hele dag aan - nightTimeSetPoint_degC = uniform_discr(18,21); - dayTimeSetPoint_degC = nightTimeSetPoint_degC; - startOfDayTime_h = -1; - startOfNightTime_h = 25; - -} -else { // 25% kans op smiddags/savonds aan - nightTimeSetPoint_degC = uniform_discr(14,18); - dayTimeSetPoint_degC = uniform_discr(18, 24); - startOfDayTime_h = uniform_discr(14, 16) + uniform_discr(0,4) / 4.0; - startOfNightTime_h = uniform_discr(21,23); -} - -double maxComfortTemperature_degC = dayTimeSetPoint_degC + 2; -double minComfortTemperature_degC = dayTimeSetPoint_degC - 2; - -//Create heating preferences class -J_HeatingPreferences heatingPreferences = new J_HeatingPreferences(startOfDayTime_h, startOfNightTime_h, dayTimeSetPoint_degC, nightTimeSetPoint_degC, maxComfortTemperature_degC, minComfortTemperature_degC); - -return heatingPreferences;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749729268458</Id> - <Name>f_createParkingSpots</Name> - <X>430</X> - <Y>950</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GCEnergyProduction> carportGCList = new ArrayList<GCEnergyProduction>(); - -for (ParkingSpace_data dataParkingSpace : f_getParkingSpacesInSubScope(c_parkingSpace_data)){ - - //Create parking gis object - GIS_Object parkingSpace = f_createGISObject(dataParkingSpace.parking_id(), dataParkingSpace.latitude(), dataParkingSpace.longitude(), dataParkingSpace.polygon(), OL_GISObjectType.PARKING); - String parkingSpaceType = dataParkingSpace.type().toString().substring(0, 1).toUpperCase() + dataParkingSpace.type().toString().substring(1).toLowerCase(); - parkingSpace.p_annotation = "Parkeerplek: " + parkingSpaceType + ", " + dataParkingSpace.additional_info(); - - //Set correct color and legend collection based on parking type - switch(dataParkingSpace.type()){ - case PRIVATE: - case DISABLED: - case KISS_AND_RIDE: - parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_private; - parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_private; - zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PRIVATE); - break; - case PUBLIC: - parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_public; - parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_public; - zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PUBLIC); - break; - case ELECTRIC: - parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_electric; - parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_electric; - zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.ELECTRIC); - break; - } - - //Add to ordered collection on the interface - zero_Interface.c_orderedParkingSpaces.add(parkingSpace); - - //Style gis object - parkingSpace.f_style(null, null, null, null); - - //Get energyProduction GC - GCEnergyProduction carportGC = findFirst(carportGCList, gc -> gc.p_parentNodeElectricID.equals(dataParkingSpace.gridnode_id())); - - if(carportGC == null){ // If non existend -> Create one. - carportGC = energyModel.add_EnergyProductionSites(); - - carportGC.p_gridConnectionID = "Parking space gridconnection: " + dataParkingSpace.parking_id(); - carportGC.v_liveConnectionMetaData.physicalCapacity_kW = dataParkingSpace.pv_potential_kwp(); - carportGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = 0.0; - carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataParkingSpace.pv_potential_kwp(); - - carportGC.v_liveConnectionMetaData.physicalCapacityKnown = false; - carportGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - carportGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - - carportGC.p_parentNodeElectricID = dataParkingSpace.gridnode_id(); - - carportGC.p_latitude = dataParkingSpace.latitude(); - carportGC.p_longitude = dataParkingSpace.longitude(); - - //Address - carportGC.p_address = new J_Address(); - carportGC.p_address.setStreetName(dataParkingSpace.street()); - - //CO - ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company - - COC.p_actorID = "Parking space connection owner: " + dataParkingSpace.parking_id(); - COC.p_connectionOwnerType = OL_ConnectionOwnerType.PARKINGSPACE_OP; - COC.p_detailedCompany = false; - COC.b_dataSharingAgreed = true; - - carportGC.p_owner = COC; - carportGC.p_ownerID = COC.p_actorID; - - //Add to collections - parkingSpace.c_containedGridConnections.add(carportGC); - carportGC.c_connectedGISObjects.add(parkingSpace); - carportGCList.add(carportGC); - } - else{ - carportGC.v_liveConnectionMetaData.physicalCapacity_kW += dataParkingSpace.pv_potential_kwp(); - carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW += dataParkingSpace.pv_potential_kwp(); - - //Add to collections - parkingSpace.c_containedGridConnections.add(carportGC); - carportGC.c_connectedGISObjects.add(parkingSpace); - } - - //Update pv potential of carport energy production site - carportGC.v_liveAssetsMetaData.PVPotential_kW += dataParkingSpace.pv_potential_kwp() != null ? dataParkingSpace.pv_potential_kwp() : 0; -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Solarfarm_data></ReturnType> - <Id>1749739602491</Id> - <Name>f_getSolarfarmsInSubScope</Name> - <X>50</X> - <Y>700</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialSolarfarmsList</Name> - <Type>List<Solarfarm_data></Type> - </Parameter> - <Body>List<Solarfarm_data> scopedSolarfarmsList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedSolarfarmsList.addAll(initialSolarfarmsList); -} -else{ - for (Solarfarm_data dataSolarfarm : initialSolarfarmsList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataSolarfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedSolarfarmsList.add(dataSolarfarm); - } - } - } -} -return scopedSolarfarmsList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Windfarm_data></ReturnType> - <Id>1750857080998</Id> - <Name>f_getWindfarmsInSubScope</Name> - <X>50</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialWindfarmsList</Name> - <Type>List<Windfarm_data></Type> - </Parameter> - <Body>List<Windfarm_data> scopedWindfarmsList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedWindfarmsList.addAll(initialWindfarmsList); -} -else{ - for (Windfarm_data dataWindfarm : initialWindfarmsList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataWindfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedWindfarmsList.add(dataWindfarm); - } - } - } -} -return scopedWindfarmsList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Chargingstation_data></ReturnType> - <Id>1750857082460</Id> - <Name>f_getChargingstationsInSubScope</Name> - <X>50</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialChargingstationsList</Name> - <Type>List<Chargingstation_data></Type> - </Parameter> - <Body>List<Chargingstation_data> scopedChargingstationsList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedChargingstationsList.addAll(initialChargingstationsList); -} -else{ - for (Chargingstation_data dataChargingstation : initialChargingstationsList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataChargingstation.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedChargingstationsList.add(dataChargingstation); - } - } - } -} -return scopedChargingstationsList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Electrolyser_data></ReturnType> - <Id>1750857083468</Id> - <Name>f_getElectrolysersInSubScope</Name> - <X>50</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialElectrolysersList</Name> - <Type>List<Electrolyser_data></Type> - </Parameter> - <Body>List<Electrolyser_data> scopedElectrolysersList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedElectrolysersList.addAll(initialElectrolysersList); -} -else{ - for (Electrolyser_data dataElectrolyser : initialElectrolysersList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataElectrolyser.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedElectrolysersList.add(dataElectrolyser); - } - } - } -} -return scopedElectrolysersList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<ParkingSpace_data></ReturnType> - <Id>1750857084547</Id> - <Name>f_getParkingSpacesInSubScope</Name> - <X>50</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialParkingSpaceList</Name> - <Type>List<ParkingSpace_data></Type> - </Parameter> - <Body>List<ParkingSpace_data> scopedParkingSpacesList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedParkingSpacesList.addAll(initialParkingSpaceList); -} -else{ - for (ParkingSpace_data dataParkingSpace : initialParkingSpaceList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataParkingSpace.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedParkingSpacesList.add(dataParkingSpace); - } - } - } -} -return scopedParkingSpacesList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Battery_data></ReturnType> - <Id>1750861476829</Id> - <Name>f_getBatteriesInSubScope</Name> - <X>50</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialBatteriesList</Name> - <Type>List<Battery_data></Type> - </Parameter> - <Body>List<Battery_data> scopedBatteriesList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedBatteriesList.addAll(initialBatteriesList); -} -else{ - for (Battery_data dataBattery : initialBatteriesList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataBattery.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedBatteriesList.add(dataBattery); - } - } - } -} -return scopedBatteriesList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Building_data></ReturnType> - <Id>1752239414416</Id> - <Name>f_getSurveyGCBuildingData</Name> - <X>450</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>vallumGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>List<Building_data> connectedBuildingsData = new ArrayList<Building_data>(); - -if ( vallumGC.getPandIds() != null && !vallumGC.getPandIds().isEmpty()) { - for (var PID : vallumGC.getPandIds() ) { - List<Building_data> buildingsDataSameID = findAll(c_companyBuilding_data, b -> b.building_id().equals(PID.getValue())); - Building_data connectedBuildingData = null; - if(buildingsDataSameID.size() == 1){ // Only one building package with same id, so this building package belongs to this GC - connectedBuildingData = buildingsDataSameID.get(0); - } - else{//Multiple building packages with this building id -> Find the right one based on address, if none are found: pick a package without address - connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() != null && buildingData.house_number() == companyGC.p_address.getHouseNumber()); - if(connectedBuildingData == null){ //If no matching house numbers, find first object that has no house number. - connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() == null); - } - } - - if (connectedBuildingData != null) { - // Remove from company building data and add to survey - c_companyBuilding_data.remove(connectedBuildingData); - c_surveyCompanyBuilding_data.add(connectedBuildingData); - // Set trafo ID - companyGC.p_parentNodeElectricID = connectedBuildingData.gridnode_id(); - } - else if (map_buildingData_Vallum != null && !map_buildingData_Vallum.isEmpty()) { - // Create new building package - connectedBuildingData = f_createBuildingData_Vallum(companyGC, PID.getValue()); - c_vallumBuilding_data.add(connectedBuildingData); - } - - if (connectedBuildingData != null) { - connectedBuildingsData.add(connectedBuildingData); - } - } -} -else {// No building connected in zorm? -> check if it is manually connected in excel (using gc_id column) - connectedBuildingsData = findAll(c_companyBuilding_data, b -> b.gc_id() != null && b.gc_id().equals(companyGC.p_gridConnectionID)); - if(connectedBuildingsData == null || connectedBuildingsData.size() == 0){ - traceln("GC %s has no building in zorm and also no manual connection with building in excel", companyGC.p_gridConnectionID); - } - else{ - c_companyBuilding_data.removeAll(connectedBuildingsData); - } -} - -return connectedBuildingsData;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_ProfilePointer</ReturnType> - <Id>1753349205424</Id> - <Name>f_createEngineProfile1</Name> - <Description>Functie van gillis voor inladen weer data!</Description> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2069</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>profileID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>arguments</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>values</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>energyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); -J_ProfilePointer profilePointer; -if (energyModel.f_findProfile(profileID)!=null) { - profilePointer=energyModel.f_findProfile(profileID); - profilePointer.setTableFunction(tf_profile); -} else { - profilePointer = new J_ProfilePointer(profileID, tf_profile); - energyModel.f_addProfile(profilePointer); -} -return profilePointer;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753349205426</Id> - <Name>f_setEngineInputDataAfterDeserialisation</Name> - <Description>Functie van gillis voor inladen weer data!</Description> - <X>2083</X> - <Y>260</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>deserializedEnergyModel.p_truckTripsCsv = inputCSVtruckTrips; -deserializedEnergyModel.p_householdTripsCsv = inputCSVhouseholdTrips; -deserializedEnergyModel.p_cookingPatternCsv = inputCSVcookingActivities; -deserializedEnergyModel.avgc_data = energyModel.avgc_data; -deserializedEnergyModel.c_defaultHeatingStrategies = energyModel.c_defaultHeatingStrategies;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>OL_GridConnectionHeatingType</ReturnType> - <Id>1753799111185</Id> - <Name>f_heatingSurveyCompany</Name> - <X>460</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>// Set heatingType -OL_GridConnectionHeatingType heatingType = f_getHeatingTypeSurvey(engineGC, surveyGC); - -if(heatingType == OL_GridConnectionHeatingType.CUSTOM){ - f_addCustomHeatingSetup(engineGC, surveyGC); -} -else{ - // Create building profiles, peakHeatConsumption_kW is null if there is no heat consumption - Double peakHeatConsumption_kW = f_createSurveyHeatProfiles( engineGC, surveyGC, heatingType ); - - // Create EA conversions - if (peakHeatConsumption_kW != null) { - f_addHeatAsset(engineGC, heatingType, peakHeatConsumption_kW); - } - - if (surveyGC.getStorage() != null && surveyGC.getStorage().getHasThermalStorage() != null) { - //if (surveyGC.getStorage().getThermalStorageKw() != null) { - //double storagePower_kW = surveyGC.getStorage().getThermalStorageKw(); - //} - // TODO: find a way to determine the storage capacity - // f_addStorage(parentGC, storagePower_kw, storageCapacity_kWh, storageType); - } - - // Heating management (needs: heatingType & assets such as building thermal model or profiles, survey companies never have a thermal building mdoel) - boolean isGhost = heatingType != OL_GridConnectionHeatingType.NONE && peakHeatConsumption_kW == null; - - //Add heating management - engineGC.f_addHeatManagement(heatingType, isGhost); -} - -return heatingType;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Double</ReturnType> - <Id>1753801098736</Id> - <Name>f_createSurveyHeatProfiles</Name> - <X>480</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Body>////Gas and Heating -if (surveyGC.getNaturalGas().getHasConnection() != null && surveyGC.getNaturalGas().getHasConnection() ) { - switch (heatingType) { - case HYBRID_HEATPUMP: - // Exception for hybrid heatpumps, when it will be a ghost asset make gas profile - if (!settings.createCurrentElectricityEA() && (engineGC.v_hasQuarterHourlyValues || f_surveyHasGasData(surveyGC)) ) { - f_createGasProfileFromSurvey( engineGC, surveyGC ); - return null; - } - else { - // We know there is no data, hence we directly call the estimate function - return f_createHeatProfileFromEstimates(engineGC); - } - case GAS_BURNER: - case GAS_CHP: - // heat consumption profiel - return f_createHeatProfileFromGasSurvey( engineGC, surveyGC, heatingType ); - default: - if (surveyGC.getNaturalGas().getPercentageUsedForHeating() != null && surveyGC.getNaturalGas().getPercentageUsedForHeating() != 0.0) { - // TODO: Find a solution to surveys filled in without heatingType that is not this hacky - if (surveyGC.getNaturalGas().getEan().equals("123456789012345678")) { - return null; - } - throw new RuntimeException("Gas data used for heating in survey, but no corresponding heating type"); - } - else { - f_createGasProfileFromSurvey( engineGC, surveyGC ); - return null; - } - } -} -else if ( heatingType == OL_GridConnectionHeatingType.DISTRICTHEAT || heatingType == OL_GridConnectionHeatingType.LT_DISTRICTHEAT ) { - return f_createHeatProfileFromSurvey(engineGC, surveyGC); -} -else if ( heatingType == OL_GridConnectionHeatingType.NONE ) { - return null; -} -else { - if(!settings.createCurrentElectricityEA() && engineGC.v_hasQuarterHourlyValues){ - if(heatingType == OL_GridConnectionHeatingType.HYBRID_HEATPUMP){ - return null; // Could create an estimated gas profile here: not done for now. - } - if(heatingType == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP){ - return null; - } - } - return f_createHeatProfileFromEstimates(engineGC); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1753803212846</Id> - <Name>f_surveyHasGasData</Name> - <X>500</X> - <Y>330</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>if ( surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { - return true; -} -else if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { - return true; -} -else { - return false; -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753804393557</Id> - <Name>f_createGasProfileFromGasTS</Name> - <X>520</X> - <Y>370</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>// Gas delivery profile in m3 -double[] profile_m3 = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getNaturalGas().getHourlyDelivery_m3()); - -//Calculate yearly gas delivery -double yearlyGasDelivery_m3 = Arrays.stream(profile_m3).sum(); - -// We assume all delivery is consumption and convert m3 to kWh -ZeroMath.arrayMultiply(profile_m3, avgc_data.p_gas_kWhpm3); -// Then we create the profile asset and name it -J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.METHANE, profile_m3, null, energyModel.p_timeStep_h); -j_ea.energyAssetName = engineGC.p_ownerID + " custom gas profile"; - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753449467888</Id> - <Name>f_reconstructGridConnections</Name> - <X>2083.333</X> - <Y>302</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>ArrayList<GridConnection> allConnections = new ArrayList<>(); -allConnections.addAll(deserializedEnergyModel.c_gridConnections); -allConnections.addAll(deserializedEnergyModel.c_pausedGridConnections); - -for(GridConnection GC : allConnections){ - GC.energyModel = deserializedEnergyModel; - if (GC instanceof GCHouse){ - //toMove.add(GC); - f_reconstructAgent(GC, deserializedEnergyModel.Houses, deserializedEnergyModel); - } else if (GC instanceof GCEnergyProduction) { - f_reconstructAgent(GC, deserializedEnergyModel.EnergyProductionSites, deserializedEnergyModel); - } else if (GC instanceof GCEnergyConversion) { - f_reconstructAgent(GC, deserializedEnergyModel.EnergyConversionSites, deserializedEnergyModel); - } else if (GC instanceof GCGridBattery) { - f_reconstructAgent(GC, deserializedEnergyModel.GridBatteries, deserializedEnergyModel); - } else if (GC instanceof GCNeighborhood) { - f_reconstructAgent(GC, deserializedEnergyModel.Neighborhoods, deserializedEnergyModel); - } else if (GC instanceof GCPublicCharger) { - f_reconstructAgent(GC, deserializedEnergyModel.PublicChargers, deserializedEnergyModel); - } else if (GC instanceof GCUtility) { - f_reconstructAgent(GC, deserializedEnergyModel.UtilityConnections, deserializedEnergyModel); - } - //GC.f_startAfterDeserialisation(); -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753883660006</Id> - <Name>f_createHeatProfileFromAnnualGasTotal</Name> - <X>900</X> - <Y>365</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>yearlyGasDelivery_m3</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>ratioGasUsedForHeating</Name> - <Type>double</Type> - </Parameter> - <Body>// First check what the heat conversion efficiency is from gas -double gasToHeatEfficiency = f_getGasToHeatEfficiency(heatingType); -// Finally, multiply the gas delivery with the total conversion factor to get the heat consumption -double yearlyConsumptionHeat_kWh = yearlyGasDelivery_m3 * avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating; -// We assume the heat consumption follows a standard profile -String profileName = "default_building_heat_demand_fr"; -J_ProfilePointer profilePointer = energyModel.f_findProfile(profileName); -new J_EAConsumption(engineGC, OL_EnergyAssetType.HEAT_DEMAND, profileName, yearlyConsumptionHeat_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, profilePointer); - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -} - -return yearlyConsumptionHeat_kWh * max(profilePointer.getAllValues())/energyModel.p_timeStep_h;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753883738731</Id> - <Name>f_createGasProfileFromAnnualGasTotal</Name> - <X>900</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyGasDelivery_m3</Name> - <Type>double</Type> - </Parameter> - <Body>// We assume all delivery is consumption and convert m3 to kWh -double yearlyGasConsumption_kWh = yearlyGasDelivery_m3 * avgc_data.p_gas_kWhpm3; -// We assume the gas consumption follows a standard heat consumption profile -String profileName = "default_building_heat_demand_fr"; -new J_EAConsumption(engineGC, OL_EnergyAssetType.METHANE_DEMAND, profileName, yearlyGasConsumption_kWh, OL_EnergyCarriers.METHANE, energyModel.p_timeStep_h, null); - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753449467890</Id> - <Name>f_reconstructEnergyModel</Name> - <X>2083.333</X> - <Y>282</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>energyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>// Code Instead of Agent.goToPopulation() (which resets all parameters to default!) -/* -try{ // Reflection trick to get to Agent.owner private field - energyModel.forceSetOwner(energyModel, pop_energyModels); -} catch (Exception e) { - e.printStackTrace(); -} -*/ - -Agent root = this.getRootAgent(); -energyModel.restoreOwner(this); - -energyModel.setEngine(getEngine()); -energyModel.instantiateBaseStructure_xjal(); -energyModel.setEnvironment(this.getEnvironment()); - -traceln("EnergyModel owner: %s", energyModel.getOwner()); - -energyModel.create(); // What does this do? Does it affect default values? -//energyModel.start(); // Why is this needed?</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753884183970</Id> - <Name>f_createGasProfileFromSurvey</Name> - <X>500</X> - <Y>350</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { - f_createGasProfileFromGasTS( engineGC, surveyGC ); -} -else if (surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { - double yearlyGasDelivery_m3 = surveyGC.getNaturalGas().getAnnualDelivery_m3(); - f_createGasProfileFromAnnualGasTotal( engineGC, yearlyGasDelivery_m3 ); -} -else { - f_createGasProfileFromEstimates( engineGC ); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753884186444</Id> - <Name>f_createHeatProfileFromGasSurvey</Name> - <X>500</X> - <Y>390</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Body>if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { - return f_createHeatProfileFromGasTS( engineGC, surveyGC, heatingType ); -} -else if ( surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { - double yearlyGasDelivery_m3 = surveyGC.getNaturalGas().getAnnualDelivery_m3(); - double ratioGasUsedForHeating = f_getRatioGasUsedForHeating(surveyGC); - return f_createHeatProfileFromAnnualGasTotal( engineGC, heatingType, yearlyGasDelivery_m3, ratioGasUsedForHeating ); -} -else { - return f_createHeatProfileFromEstimates( engineGC ); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753949286953</Id> - <Name>f_createHeatProfileFromGasTS</Name> - <X>520</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Body>// Gas profile -double[] profile_m3 = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getNaturalGas().getHourlyDelivery_m3()); - -double yearlyGasDelivery_m3 = Arrays.stream(profile_m3).sum(); - -// First check what the heat conversion efficiency is from gas -double gasToHeatEfficiency = f_getGasToHeatEfficiency(heatingType); -// Then check which part of the gas consumption is used for heating -double ratioGasUsedForHeating = f_getRatioGasUsedForHeating(surveyGC); -// Finally, multiply the gas profile with the total conversion factor to get the heat profile -double[] profile_kWh = ZeroMath.arrayMultiply(profile_m3, avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating); -// Then we create the profile asset and name it -J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.HEAT, profile_kWh, null , energyModel.p_timeStep_h); -j_ea.energyAssetName = engineGC.p_ownerID + " custom building heat profile"; - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -} - -return max(profile_m3)/energyModel.p_timeStep_h;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753449467892</Id> - <Name>f_reconstructAgent</Name> - <X>2095</X> - <Y>379</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>agent</Name> - <Type>Agent</Type> - </Parameter> - <Parameter> - <Name>pop</Name> - <Type>AgentArrayList</Type> - </Parameter> - <Parameter> - <Name>energyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>/* // Code Instead of Agent.goToPopulation() (which resets many variables to default!) -try{ // Reflection trick to get to Agent.owner private field - if (agent instanceof GridNode) { - ((GridNode)agent).forceSetOwner(agent,pop); - } else if (agent instanceof GridConnection) { - ((GridConnection)agent).forceSetOwner(agent,pop); - } else if (agent instanceof Actor) { - ((Actor)agent).forceSetOwner(agent,pop); - } else if (agent instanceof GIS_Object) { - ((GIS_Object)agent).forceSetOwner(agent,pop); - } -} catch (Exception e) { - e.printStackTrace(); -}*/ - -agent.restoreOwner(energyModel); // simply sets agent.d = root, should replace reflection hack -agent.restoreCollection_xjal(pop); // simple sets agent.j = pop, should replace reflection hack - -agent.setEngine(getEngine()); -agent.instantiateBaseStructure_xjal(); -agent.setEnvironment(pop.getEnvironment()); - -pop._add(agent); // Add to the population -//int popSize = pop.size(); -//pop.callCreate(agent, popSize); // Update population object -agent.create();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753951013582</Id> - <Name>f_getGasToHeatEfficiency</Name> - <X>920</X> - <Y>385</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Body>switch (heatingType){ - case GAS_BURNER: - case HYBRID_HEATPUMP: - return avgc_data.p_avgEfficiencyGasBurner_fr; - case GAS_CHP: - return avgc_data.p_avgEfficiencyCHP_thermal_fr; - default: - throw new RuntimeException("Unable to find Gas to Heat efficiency of heatingType: " + heatingType); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753951039103</Id> - <Name>f_getRatioGasUsedForHeating</Name> - <X>540</X> - <Y>430</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>if (surveyGC.getNaturalGas().getPercentageUsedForHeating() != null) { - return surveyGC.getNaturalGas().getPercentageUsedForHeating() / 100.0; -} -else { - return 1.0; -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753955686832</Id> - <Name>f_createGasProfileFromEstimates</Name> - <X>900</X> - <Y>340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>double yearlyGasDelivery_m3 = engineGC.p_floorSurfaceArea_m2 * avgc_data.p_avgCompanyGasConsumption_m3pm2; -f_createGasProfileFromAnnualGasTotal(engineGC, yearlyGasDelivery_m3); - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753961830063</Id> - <Name>f_createHeatProfileFromEstimates</Name> - <X>900</X> - <Y>430</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>double yearlyGasConsumption_m3 = engineGC.p_floorSurfaceArea_m2 * avgc_data.p_avgCompanyGasConsumption_m3pm2; -double yearlyHeatConsumption_kWh = yearlyGasConsumption_m3 * avgc_data.p_gas_kWhpm3; -return f_createHeatProfileFromAnnualHeatTotal( engineGC, yearlyHeatConsumption_kWh );</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753964366889</Id> - <Name>f_createHeatProfileFromHeatTS</Name> - <X>520</X> - <Y>470</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>// Heat profile -double[] profile = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getHeat().getHeatDeliveryTimeSeries_kWh()); -// We multiply by the delivery set efficiency to go from delivery to consumption -// TODO: Fix this for LT_DISTRICTHEAT, they have a different efficiency! -ZeroMath.arrayMultiply(profile, avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr); -// Then we create the profile asset and name it -J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.HEAT, profile, null , energyModel.p_timeStep_h); -j_ea.energyAssetName = engineGC.p_ownerID + " custom building heat profile"; - -return max(profile)/energyModel.p_timeStep_h;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753449467894</Id> - <Name>f_reconstructGridConnections1</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2070</X> - <Y>480</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>energyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>// Code Instead of Agent.goToPopulation() (which resets many variables to default!) -GC.energyModel = energyModel; -try{ // Reflection trick to get to Agent.owner private field - GC.forceSetOwner(GC,pop); -} catch (Exception e) { - e.printStackTrace(); -} - -traceln("GC owner: %s", GC.getOwner()); -GC.setEngine(getEngine()); -GC.instantiateBaseStructure_xjal(); -GC.setEnvironment(pop.getEnvironment()); - -pop._add(GC); // Add to the population -int popSize = pop.size(); -pop.callCreate(GC, popSize); // Update population object -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753451091785</Id> - <Name>f_addMixins_old</Name> - <X>2390</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>v_objectMapper.addMixIn(Agent.class, AgentMixin.class); -v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); -//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); -//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); -//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); -v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); - -v_objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, IgnoreClassMixin.class); -//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); - -// Weirdness regarding material handling toolbox -v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753964605708</Id> - <Name>f_createHeatProfileFromAnnualHeatTotal</Name> - <X>900</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyConsumptionHeat_kWh</Name> - <Type>double</Type> - </Parameter> - <Body>// We assume the heat consumption follows a standard profile -String profileName = "default_building_heat_demand_fr"; -J_ProfilePointer profilePointer = energyModel.f_findProfile(profileName); -new J_EAConsumption(engineGC, OL_EnergyAssetType.HEAT_DEMAND, profileName, yearlyConsumptionHeat_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, profilePointer); - -return yearlyConsumptionHeat_kWh * max(profilePointer.getAllValues())/energyModel.p_timeStep_h;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753964654729</Id> - <Name>f_createHeatProfileFromSurvey</Name> - <X>500</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>if (surveyGC.getHeat() != null && surveyGC.getHeat().getHeatDeliveryTimeSeries_kWh() != null) { - return f_createHeatProfileFromHeatTS(engineGC, surveyGC); -} -else if (surveyGC.getHeat() != null && surveyGC.getHeat().getAnnualDistrictHeatingDelivery_GJ() != null) { - double yearlyHeatDelivery_kWh = surveyGC.getHeat().getAnnualDistrictHeatingDelivery_GJ()*277.777778 ; - // TODO: Fix this for LT_DISTRICTHEAT, they have a different efficiency! - double yearlyHeatConsumption_kWh = yearlyHeatDelivery_kWh * avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - return f_createHeatProfileFromAnnualHeatTotal(engineGC, yearlyHeatConsumption_kWh); -} -else { - return f_createHeatProfileFromEstimates(engineGC); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753968816374</Id> - <Name>f_setDefaultHeatingStrategies</Name> - <X>80</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>// Triples ( heatingType, hasThermalBuilding, hasHeatBuffer ) -Triple<OL_GridConnectionHeatingType, Boolean, Boolean> triple = null; - -triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrol.class ); -triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrol.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementProfileHybridHeatPump.class ); -triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrolHybridHeatpump.class ); -triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrolHybridHeatpump.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class );</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754048849906</Id> - <Name>f_addCustomHeatingSetup</Name> - <X>480</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>throw new RuntimeException("HeatingType is CUSTOM. You must override the function: f_addCustomHeatingSetup!");</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753712630322</Id> - <Name>f_reconstructActors</Name> - <X>2083</X> - <Y>322</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>for(Actor AC : deserializedEnergyModel.c_actors){ - - if (AC instanceof ConnectionOwner) { - ((ConnectionOwner)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_connectionOwners, deserializedEnergyModel); - } else if (AC instanceof EnergySupplier) { - ((EnergySupplier)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_energySuppliers, deserializedEnergyModel); - } else if (AC instanceof EnergyCoop) { - ((EnergyCoop)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_energyCoops, deserializedEnergyModel); - //((EnergyCoop)AC).f_startAfterDeserialisation(); - } else if (AC instanceof GridOperator) { - ((GridOperator)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_gridOperators, deserializedEnergyModel); - } - } -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754050106254</Id> - <Name>f_addCustomHeatAsset</Name> - <X>920</X> - <Y>520</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>maxHeatOutputPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>throw new RuntimeException("HeatingType is CUSTOM. You must override the function: f_addCustomHeatAsset!");</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753712697685</Id> - <Name>f_reconstructGIS_Objects</Name> - <X>2083</X> - <Y>362</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Parameter> - <Name>c_GISObjects</Name> - <Type>ArrayList<GIS_Object></Type> - </Parameter> - <Body>for(GIS_Object GO : c_GISObjects){ - GO.gisRegion = c_GISregions.get(GO.p_id); - - if (GO instanceof GIS_Building) { - ((GIS_Building)GO).energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Buildings, deserializedEnergyModel); - } else if (GO instanceof GIS_Parcel) { - ((GIS_Parcel)GO).energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Parcels, deserializedEnergyModel); - } else { - GO.energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Objects, deserializedEnergyModel); - //GO.f_startAfterDeserialisation(); - } - GO.f_resetStyle(); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753712761420</Id> - <Name>f_reconstructGridNodes</Name> - <X>2083</X> - <Y>342</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Parameter> - <Name>c_gridNodes</Name> - <Type>ArrayList<GridNode></Type> - </Parameter> - <Body>for(GridNode GN : c_gridNodes){ - GN.energyModel = deserializedEnergyModel; - f_reconstructAgent(GN, deserializedEnergyModel.pop_gridNodes, deserializedEnergyModel); -} -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1755866291695</Id> - <Name>f_addCarsToHouses</Name> - <X>460</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>house</Name> - <Type>GCHouse</Type> - </Parameter> - <Body>double probabilityForLeftOverCar = house.p_eigenOprit ? v_probabilityForAdditionalCar_privateParking : v_probabilityForAdditionalCar_publicParking; -int amountOfOwnedCars = (int) floor(avgc_data.p_avgNrOfCarsPerHouse) + (randomTrue(probabilityForLeftOverCar) ? 1 : 0); - -////Create Vehicles based on the amount of owned cars -for(int i = 0; i < amountOfOwnedCars ; i++){ - double tripTrackerScaling = 1; - - if(i>0){//If more than 1 car: 2+ cars all have smaller travel average travel distance - tripTrackerScaling *= avgc_data.p_avgAnnualTravelDistanceSecondVSFirstCar_fr; - } - //Oprit? -> only then you should have a chance to start with EV (public ev is not supported by sliders, public chargepoint is then used instead) - if( house.p_eigenOprit){ - if (randomTrue( avgc_data.p_shareOfElectricVehicleOwnership)){ - J_EAEV ev = f_addElectricVehicle(house, OL_EnergyAssetType.ELECTRIC_VEHICLE, true, 0, 0); - ev.tripTracker.setAnnualDistance_km(ev.tripTracker.getAnnualDistance_km()*tripTrackerScaling); - } - else{ - J_EADieselVehicle dieselVehicle = f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); - dieselVehicle.tripTracker.setAnnualDistance_km(dieselVehicle.tripTracker.getAnnualDistance_km()*tripTrackerScaling); - } - } - else { - J_EADieselVehicle dieselVehicle = f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); - dieselVehicle.tripTracker.setAnnualDistance_km(dieselVehicle.tripTracker.getAnnualDistance_km()*tripTrackerScaling); - } -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1755876470177</Id> - <Name>f_calculateProbabilitiesForAdditionalCar</Name> - <X>440</X> - <Y>660</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>buildingDataHouses</Name> - <Type>List<Building_data></Type> - </Parameter> - <Body>//Precalculate the amount of households and households that have private parking for vehicle distribution -int totalNumberOfHouses = 0; -int numberOfHousesPrivateParking = 0; -for (Building_data houseBuildingData : buildingDataHouses) { - totalNumberOfHouses++; - if(houseBuildingData.has_private_parking() != null && houseBuildingData.has_private_parking()){ - numberOfHousesPrivateParking++; - } -} - -//Determine the total cars in the area based on the average of the area -int totalCars = roundToInt(avgc_data.p_avgNrOfCarsPerHouse * totalNumberOfHouses); -int numberOfHousesPublicParking = totalNumberOfHouses - numberOfHousesPrivateParking; - -//Calculate the base number of cars that everyone gets, and the total leftover cars that should be distributed -int baseCars = (int) floor(avgc_data.p_avgNrOfCarsPerHouse); -int leftOverCars = totalCars - baseCars * totalNumberOfHouses; - -// Determine leftover cars distributed for private and public parking (bias to private parking) -int leftOverForPrivateParking = min(leftOverCars, numberOfHousesPrivateParking); -int leftOverForPublicParking = max(0, leftOverCars - leftOverForPrivateParking); - -//Calculate the leftover car probability for private and public parking -v_probabilityForAdditionalCar_privateParking = ((double) leftOverForPrivateParking) / numberOfHousesPrivateParking; // Calculate probability for leftover car for private parking -v_probabilityForAdditionalCar_publicParking = ((double) leftOverForPublicParking) / numberOfHousesPublicParking; // Calculate probability for leftover car for public parking -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1756395236522</Id> - <Name>f_initializeInterfacePointers</Name> - <X>30</X> - <Y>950</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Set parameters/pointers in the interface -zero_Interface.zero_loader = this; -zero_Interface.energyModel = energyModel; -zero_Interface.uI_Results.energyModel = energyModel; -zero_Interface.project_data = project_data; -zero_Interface.settings = settings; -zero_Interface.user = user; -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1756735137677</Id> - <Name>f_reconstructOrderedCollections</Name> - <X>2080</X> - <Y>400</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>saveObject</Name> - <Type>J_ModelSave</Type> - </Parameter> - <Body>zero_Interface.c_orderedPVSystemsCompanies = saveObject.c_orderedPVSystemsCompanies; -zero_Interface.c_orderedPVSystemsHouses = saveObject.c_orderedPVSystemsHouses; -zero_Interface.c_orderedVehicles = saveObject.c_orderedVehicles; -zero_Interface.c_orderedHeatingSystemsCompanies = saveObject.c_orderedHeatingSystemsCompanies; -zero_Interface.c_orderedHeatingSystemsHouses = saveObject.c_orderedHeatingSystemsHouses; -zero_Interface.c_orderedVehiclesPrivateParking = saveObject.c_orderedVehiclesPrivateParking; -zero_Interface.c_orderedParkingSpaces = saveObject.c_orderedParkingSpaces; -zero_Interface.c_orderedV1GChargers = saveObject.c_orderedV1GChargers; -zero_Interface.c_orderedV2GChargers = saveObject.c_orderedV2GChargers; -zero_Interface.c_orderedPublicChargers = saveObject.c_orderedPublicChargers; -zero_Interface.c_mappingOfVehiclesPerCharger = saveObject.c_mappingOfVehiclesPerCharger; -zero_Interface.c_scenarioMap_Current = saveObject.c_scenarioMap_Current; -zero_Interface.c_scenarioMap_Future = saveObject.c_scenarioMap_Future; - - -/* -List<ConnectionOwner> c_COCompanies = findAll(zero_Interface.energyModel.pop_connectionOwners, p -> p.p_connectionOwnerType == OL_ConnectionOwnerType.COMPANY); - - -int i = 0; -for (ConnectionOwner CO : c_COCompanies) { - UI_company companyUI = zero_Interface.c_companyUIs.get(CO.p_connectionOwnerIndexNr); - companyUI.p_company = CO; - companyUI.c_ownedGridConnections = companyUI.p_company.f_getOwnedGridConnections(); - companyUI.c_additionalVehicles = saveObject.c_additionalVehicleHashMaps.get(i); - companyUI.f_setSelectedGCSliders(); - i++; -} -*/ -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758714675284</Id> - <Name>f_getSimulationTimeVariables</Name> - <X>80</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Sim start year -v_simStartYear = getExperiment().getEngine().getStartDate().getYear() + 1900; // 1900 years because of Java convention - -// Create date at start of simulation year to use to calculate v_simStartHour_h -Date d = new Date(); -d.setYear(v_simStartYear - 1900); // 1900 jaar Compenseren door anylogic bug -d.setMonth(0); -d.setHours(0); -d.setSeconds(0); -d.setMinutes(0); -d.setDate(1); - -//Calculate sim start hour -v_simStartHour_h = roundToInt((getExperiment().getEngine().getStartDate().getTime() - d.getTime())/1000.0/60/60); //Get time is in ms -> converted into hours - -//Fix for if start is within summer time, the v_simStartHour_h is not correct anymore -double summerTimeStart_h = avgc_data.map_yearlySummerWinterTimeStartHour.get(v_simStartYear).getFirst(); -double winterTimeStart_h = avgc_data.map_yearlySummerWinterTimeStartHour.get(v_simStartYear).getSecond(); -if(v_simStartHour_h > summerTimeStart_h && v_simStartHour_h < winterTimeStart_h){ - v_simStartHour_h += 1; -} - - - -//Set sim duration if it is set -if(getExperiment().getEngine().getStopDate() != null){ //If experiment has set time, it gets bias - v_simDuration_h = roundToInt(((double)getExperiment().getEngine().getStopDate().getTime() - getExperiment().getEngine().getStartDate().getTime())/1000.0/60/60); //Get time is in ms -> converted into hours - if(v_simStartHour_h > summerTimeStart_h && v_simStartHour_h + v_simDuration_h > winterTimeStart_h){//Compensate if start time is in summer time, and end time is in winter time -> simulation would otherwise have 1 hour too much - v_simDuration_h -= 1; - } - if(v_simStartHour_h < summerTimeStart_h && v_simStartHour_h + v_simDuration_h < winterTimeStart_h){//Compensate if start time is in winter time, and end time is in summer time -> simulation would otherwise have 1 hour too less - v_simDuration_h += 1; - } -} -else if(settings.simDuration_h() != null){//Else if manual set, use that instead - v_simDuration_h = settings.simDuration_h(); -} - -if (v_simStartHour_h % 24 != 0) { - throw new RuntimeException("Impossible to run a model that does not start at midnight. Please check the start in the simulation settings."); -} -if (v_simDuration_h % 24 != 0) { - throw new RuntimeException("Impossible to run a model that does not have a runtime that is an exact multiple of a day. Please check the start and endtime in the simulation settings."); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1759128970777</Id> - <Name>f_addMixins</Name> - <X>2100</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>v_objectMapper.addMixIn(Agent.class, AgentMixin.class); -//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); - -//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); -//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); - -//Ignore classes - -v_objectMapper.addMixIn(java.awt.Font.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(java.awt.Color.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(java.awt.Paint.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeLine.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeLineFill.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeText.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(DataSet.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(Level.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(TableFunction.class, IgnoreClassMixin.class); -//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeModelElementsGroup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeButton.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.analysis.TimePlot.class, IgnoreClassMixin.class); - - -// Weirdness regarding material handling toolbox -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1759133710571</Id> - <Name>f_loadScenario</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2080</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>index</Name> - <Type>int</Type> - </Parameter> - <Body>if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { - zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's in te laden. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - return; -} -traceln("Loading modelSave..."); -//pauseSimulation(); - -// Collect GIS_Objects into hashmap, to link to new EnergyModel. -zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -pauseSimulation(); -try { - v_objectMapper = new ObjectMapper(); - f_addMixins(); - - var repository = UserScenarioRepository.builder() - .userId(UUID.fromString(zero_Interface.user.userIdToken())) - .modelName(zero_Interface.project_data.project_name()) - .build(); - - var scenarioList = repository.listUserScenarios(); - - // Deserialize the JSON into a new EnergyModel instance: - var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(index).getId()); - - /*int n = 200; // how many characters you want - byte[] buffer = new byte[n]; - int read = jsonStream.read(buffer, 0, n); - - if (read > 0) { - String preview = new String(buffer, 0, read, "UTF-8"); - System.out.println(preview); - }*/ - - //jsonStream.close(); - - //traceln("jsonStream: %s", jsonStream.toString().substring(0,30)); - J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); - //J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); - - EnergyModel deserializedEnergyModel = saveObject.energyModel; - - // Reconstruct all Agents - f_reconstructEnergyModel(deserializedEnergyModel); - f_reconstructGridConnections(deserializedEnergyModel); - f_reconstructActors(deserializedEnergyModel); - f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); - - f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); - - // Get profilePointer tableFunctions from 'original' energyModel - deserializedEnergyModel.c_profiles.forEach(x->{ - J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); - x.setTableFunction(origProfile.getTableFunction()); - }); - // get heatingTypeHashmap from 'old' energyModel. - deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; - - zero_Interface.zero_loader.energyModel = deserializedEnergyModel; - zero_Interface.energyModel = deserializedEnergyModel; - zero_Interface.uI_Results.energyModel = deserializedEnergyModel; - uI_Results.energyModel = deserializedEnergyModel; - - deserializedEnergyModel.f_startAfterDeserialisation(); - - f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); - - - // Putting back the ordered collections in the interface - f_reconstructOrderedCollections(saveObject); - - //zero_Interface.f_clearSelectionAndSelectEnergyModel(); - - /* - zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); - uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); - zero_Interface.f_updateMainInterfaceSliders(); - - zero_Interface.f_resetSettings(); - */ - - ///button_exit.action(); - - ///zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); - // v_energyHubCoop not updated to point to 'new' coop - //uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); - - ///zero_Interface.f_simulateYearFromMainInterface(); - - v_energyHubCoop = findFirst(zero_Interface.energyModel.pop_energyCoops,x->x.p_actorID.equals("eHubConfiguratorCoop")); - if (v_energyHubCoop == null){ - throw new RuntimeException("No energyCoop found with p_actorID = eHubConfiguratorCoop"); - } - zero_Interface.v_customEnergyCoop = v_energyHubCoop; - // Update the E-Hub Dashboard with the loaded E-Hub from savefile - f_initializeEnergyHubMemberNames(); - uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); - uI_Results.f_updateResultsUI(v_energyHubCoop); - - // Update the main interface with the loaded E-Hub from savefile - zero_Interface.c_selectedGridConnections = new ArrayList<>(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()); - - // Reset all colors on the GIS map - zero_Interface.energyModel.pop_GIS_Buildings.forEach(x -> zero_Interface.f_styleAreas(x)); - zero_Interface.energyModel.pop_GIS_Objects.forEach(x -> zero_Interface.f_styleAreas(x)); - zero_Interface.energyModel.pop_GIS_Parcels.forEach(x -> zero_Interface.f_styleAreas(x)); - - // Color all selected GC - for (GridConnection gc : zero_Interface.c_selectedGridConnections) { - gc.c_connectedGISObjects.forEach(x -> x.gisRegion.setFillColor(zero_Interface.v_selectionColor)); - } - - // Simulate a year - gr_simulateYearEnergyHub.setVisible(false); - gr_loadIconYearSimulationEnergyHub.setVisible(true); - - - zero_Interface.f_simulateYearFromMainInterface(); - - traceln("ModelSave loaded succesfully!"); - - //zero_Interface.b_inEnergyHubSelectionMode = true; - //zero_Interface.f_finalizeEnergyHubConfiguration(); - - //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); - - /* - Date startDate = getExperiment().getEngine().getStartDate(); - int day = getExperiment().getEngine().getDayOfMonth(); - int month = getExperiment().getEngine().getMonth(); - traceln("day: " + day); - traceln("month: " + month); - startDate.setMonth(startDate.getMonth() - month); - startDate.setDate(startDate.getDate() - day); - getExperiment().getEngine().setStartDate(startDate); - */ - -} catch (IOException e) { - e.printStackTrace(); -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>java.util.UUID</ReturnType> - <Id>1762185034341</Id> - <Name>f_getUserUUID</Name> - <X>2280</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>p_userIdToken</Name> - <Type>String</Type> - </Parameter> - <Body>java.util.UUID usedId = new JWTDecoder().jwtToUserId(p_userIdToken); -return usedId; -</Body> - </Function> - </Functions> - <Connectivity> - <TextFile> - <Id>1756980503493</Id> - <Name>inputCSVcookingActivities</Name> - <X>-369</X> - <Y>759</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <FileType>FILE</FileType> - <Url>null</Url> - <ResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>data_Generic/inputECookerPatterns.csv</ClassName> - </ResourceReference> - <FileMode>READ</FileMode> - <CharsetName>null</CharsetName> - <Separators>,</Separators> - </TextFile> - <TextFile> - <Id>1756980506290</Id> - <Name>inputCSVhouseholdTrips</Name> - <X>-369</X> - <Y>799</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <FileType>FILE</FileType> - <Url>null</Url> - <ResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>data_Generic/AlbatrossProcessedVehicleTrips.csv</ClassName> - </ResourceReference> - <FileMode>READ</FileMode> - <CharsetName>null</CharsetName> - <Separators>,</Separators> - </TextFile> - <TextFile> - <Id>1756980507645</Id> - <Name>inputCSVtruckTrips</Name> - <X>-369</X> - <Y>779</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <FileType>FILE</FileType> - <Url>null</Url> - <ResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>data_Generic/inputTruckTripPatterns.csv</ClassName> - </ResourceReference> - <FileMode>READ</FileMode> - <CharsetName>null</CharsetName> - <Separators>,</Separators> - </TextFile> - </Connectivity> - <AgentLinks> - <AgentLink> - <Id>1726584206083</Id> - <Name>connections</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <EmbeddedObjects> - <EmbeddedObject> - <Id>1726584206041</Id> - <Name>energyModel</Name> - <X>30</X> - <Y>890</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zero_engine</PackageName> - <ClassName>EnergyModel</ClassName> - </ActiveObjectClass> - <GenericParameterSubstitute> - <GenericParameterSubstituteReference> - <PackageName>zero_engine</PackageName> - <ClassName>EnergyModel</ClassName> - <ItemName>1658477103138</ItemName> - </GenericParameterSubstituteReference> - </GenericParameterSubstitute> - <Parameters> - <Parameter> - <Name>p_timeStep_h</Name> - </Parameter> - <Parameter> - <Name>p_forecastTime_h</Name> - </Parameter> - <Parameter> - <Name>p_year</Name> - </Parameter> - <Parameter> - <Name>avgc_data</Name> - </Parameter> - <Parameter> - <Name>b_parallelizeConnectionOwners</Name> - </Parameter> - <Parameter> - <Name>b_parallelizeGridConnections</Name> - </Parameter> - <Parameter> - <Name>b_enableDLR</Name> - </Parameter> - <Parameter> - <Name>p_winterWeekNumber</Name> - </Parameter> - <Parameter> - <Name>p_summerWeekNumber</Name> - </Parameter> - <Parameter> - <Name>p_runStartTime_h</Name> - </Parameter> - <Parameter> - <Name>p_runEndTime_h</Name> - </Parameter> - <Parameter> - <Name>b_isInitialized</Name> - </Parameter> - <Parameter> - <Name>b_storePreviousRapidRunData</Name> - </Parameter> - <Parameter> - <Name>p_regionName</Name> - </Parameter> - <Parameter> - <Name>p_truckTripsCsv</Name> - </Parameter> - <Parameter> - <Name>p_householdTripsCsv</Name> - </Parameter> - <Parameter> - <Name>p_cookingPatternCsv</Name> - </Parameter> - <Parameter> - <Name>b_isDeserialised</Name> - </Parameter> - </Parameters> - <ReplicationFlag>false</ReplicationFlag> - <Replication Class="CodeValue"> - <Code>100</Code> - </Replication> - <CollectionType>ARRAY_LIST_BASED</CollectionType> - <InEnvironment>true</InEnvironment> - <InitialLocationType>XYZ</InitialLocationType> - <XCode Class="CodeValue"> - <Code>0</Code> - </XCode> - <YCode Class="CodeValue"> - <Code>0</Code> - </YCode> - <ZCode Class="CodeValue"> - <Code>0</Code> - </ZCode> - <ColumnCode Class="CodeValue"> - <Code>0</Code> - </ColumnCode> - <RowCode Class="CodeValue"> - <Code>0</Code> - </RowCode> - <LocationNameCode Class="CodeValue"> - <Code>""</Code> - </LocationNameCode> - <InitializationType>SPECIFIED_NUMBER</InitializationType> - <InitializationDatabaseTableQuery> - <Id>1658477089957</Id> - <TableReference/> - </InitializationDatabaseTableQuery> - <InitializationDatabaseType>ONE_AGENT_PER_DATABASE_RECORD</InitializationDatabaseType> - <QuantityColumn/> - </EmbeddedObject> - <EmbeddedObject> - <Id>1726584829907</Id> - <Name>avgc_data</Name> - <X>-370</X> - <Y>830</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>AVGC_data</ClassName> - </ActiveObjectClass> - <GenericParameterSubstitute> - <GenericParameterSubstituteReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>AVGC_data</ClassName> - <ItemName>1726584205523</ItemName> - </GenericParameterSubstituteReference> - </GenericParameterSubstitute> - <Parameters> - <Parameter> - <Name>p_avgHouseConnectionCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgHouseHeatingMethod</Name> - </Parameter> - <Parameter> - <Name>p_avgUtilityConnectionCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgUtilityHeatingMethod</Name> - </Parameter> - <Parameter> - <Name>p_avgHouseElectricityConsumption_kWh_yr</Name> - </Parameter> - <Parameter> - <Name>p_avgHouseGasConsumption_m3_yr</Name> - </Parameter> - <Parameter> - <Name>p_shareOfElectricVehicleOwnership</Name> - </Parameter> - <Parameter> - <Name>p_ratioHouseInstalledPV</Name> - </Parameter> - <Parameter> - <Name>p_avgHousePVInstallationPower_kWp</Name> - </Parameter> - <Parameter> - <Name>p_avgEVStorageCar_kWh</Name> - </Parameter> - <Parameter> - <Name>p_avgEVMaxChargePowerCar_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgEVStorageVan_kWh</Name> - </Parameter> - <Parameter> - <Name>p_avgEVStorageTruck_kWh</Name> - </Parameter> - <Parameter> - <Name>p_avgEVMaxChargePowerVan_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgEVMaxChargePowerTruck_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgEVEnergyConsumptionCar_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgEVEnergyConsumptionVan_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgEVEnergyConsumptionTruck_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_gas_kWhpm3</Name> - </Parameter> - <Parameter> - <Name>p_hydrogenEnergyDensity_kWh_Nm3</Name> - </Parameter> - <Parameter> - <Name>p_hydrogenDensity_kg_Nm3</Name> - </Parameter> - <Parameter> - <Name>p_oxygenDensity_kg_Nm3</Name> - </Parameter> - <Parameter> - <Name>p_oxygenProduction_kgO2pkgH2</Name> - </Parameter> - <Parameter> - <Name>p_hydrogenSpecificEnergy_kWh_kg</Name> - </Parameter> - <Parameter> - <Name>p_diesel_kWhpl</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionCar_kmpl</Name> - </Parameter> - <Parameter> - <Name>p_avgGasolineConsumptionCar_kmpl</Name> - </Parameter> - <Parameter> - <Name>p_gasoline_kWhpl</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionCar_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgGasolineConsumptionCar_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionVan_kmpl</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionVan_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionTruck_kmpl</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionTruck_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgCOPHeatpump</Name> - </Parameter> - <Parameter> - <Name>p_avgUtilityPVPower_kWp</Name> - </Parameter> - <Parameter> - <Name>p_ratioElectricTrucks</Name> - </Parameter> - <Parameter> - <Name>p_avgCompanyHeatingMethod</Name> - </Parameter> - <Parameter> - <Name>p_avgPVPower_kWpm2</Name> - </Parameter> - <Parameter> - <Name>p_avgRatioBatteryCapacity_v_Power</Name> - </Parameter> - <Parameter> - <Name>p_avgHydrogenConsumptionCar_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgHydrogenConsumptionVan_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgHydrogenConsumptionTruck_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgRatioRoofPotentialPV</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyHeatpump_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureElectricHeatpump_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyGasBurner_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureGasBurner_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyHydrogenBurner_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureHydrogenBurner_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgVehiclesPerChargePoint</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistanceVan_km</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistanceCompanyCar_km</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistanceTruck_km</Name> - </Parameter> - <Parameter> - <Name>p_avgFullLoadHoursPV_hr</Name> - </Parameter> - <Parameter> - <Name>p_avgCompanyElectricityConsumption_kWhpm2</Name> - </Parameter> - <Parameter> - <Name>p_avgCompanyGasConsumption_m3pm2</Name> - </Parameter> - <Parameter> - <Name>p_avgCompanyHeatConsumption_kWhpm2</Name> - </Parameter> - <Parameter> - <Name>p_avgSolarFieldPower_kWppha</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyCHP_thermal_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyCHP_electric_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureCHP_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyDistrictHeatingDeliverySet_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureDistrictHeatingDeliverySet_degC</Name> - </Parameter> - <Parameter> - <Name>p_v2gProbability</Name> - </Parameter> - <Parameter> - <Name>p_v1gProbability</Name> - </Parameter> - <Parameter> - <Name>p_avgEVsPerPublicCharger</Name> - </Parameter> - <Parameter> - <Name>p_avgPTPower_kWpm2</Name> - </Parameter> - <Parameter> - <Name>p_avgHeatBufferWaterVolumePerHPPower_m3pkW</Name> - </Parameter> - <Parameter> - <Name>p_avgHeatBufferWaterVolumePerPTSurface_m3pm2</Name> - </Parameter> - <Parameter> - <Name>p_waterHeatCapacity_JpkgK</Name> - </Parameter> - <Parameter> - <Name>p_waterDensity_kgpm3</Name> - </Parameter> - <Parameter> - <Name>p_avgMaxHeatBufferTemperature_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgMinHeatBufferTemperature_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgPTPanelSize_m2</Name> - </Parameter> - <Parameter> - <Name>p_avgRatioHouseBatteryStorageCapacity_v_PVPower</Name> - </Parameter> - <Parameter> - <Name>p_avgNrOfCarsPerHouse</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistancePrivateCar_km</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistanceSecondVSFirstCar_fr</Name> - </Parameter> - <Parameter> - <Name>map_yearlySummerWinterTimeStartHour</Name> - </Parameter> - <Parameter> - <Name>p_minHeatpumpElectricCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_minGasBurnerOutputCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_minHydrogenBurnerOutputCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_minDistrictHeatingDeliverySetOutputCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureHybridHeatpump_degC</Name> - </Parameter> - </Parameters> - <ReplicationFlag>false</ReplicationFlag> - <Replication Class="CodeValue"> - <Code>100</Code> - </Replication> - <CollectionType>ARRAY_LIST_BASED</CollectionType> - <InEnvironment>true</InEnvironment> - <InitialLocationType>XYZ</InitialLocationType> - <XCode Class="CodeValue"> - <Code>0</Code> - </XCode> - <YCode Class="CodeValue"> - <Code>0</Code> - </YCode> - <ZCode Class="CodeValue"> - <Code>0</Code> - </ZCode> - <ColumnCode Class="CodeValue"> - <Code>0</Code> - </ColumnCode> - <RowCode Class="CodeValue"> - <Code>0</Code> - </RowCode> - <LocationNameCode Class="CodeValue"> - <Code>""</Code> - </LocationNameCode> - <InitializationType>SPECIFIED_NUMBER</InitializationType> - <InitializationDatabaseTableQuery> - <Id>1658477089956</Id> - <TableReference/> - </InitializationDatabaseTableQuery> - <InitializationDatabaseType>ONE_AGENT_PER_DATABASE_RECORD</InitializationDatabaseType> - <QuantityColumn/> - </EmbeddedObject> - </EmbeddedObjects> - <Presentation> - <Level> - <Id>1726584205903</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1726584205905</Id> - <Name>rect_canvas</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16744448</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>1920</Width> - <Height>980</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205907</Id> - <Name>rect_projectDataTracking</Name> - <X>1520</X> - <Y>20</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-65536</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>360</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205909</Id> - <Name>rect_loader</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16744448</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>169</Width> - <Height>40</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205911</Id> - <Name>txt_input</Name> - <X>55</X> - <Y>7</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16744448</Color> - <Text>Loader</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205915</Id> - <Name>rect_connectedModels</Name> - <X>0</X> - <Y>840</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16744448</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>290</Width> - <Height>140</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205917</Id> - <Name>t_connectedModels</Name> - <X>20</X> - <Y>850</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Connected Models</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205921</Id> - <Name>txt_projectDataTracking</Name> - <X>1540</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Time and data Tracking</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205923</Id> - <Name>rect_defaultStartup</Name> - <X>20</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>240</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205925</Id> - <Name>rect_dataCollections</Name> - <X>-440</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-360334</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>437</Width> - <Height>980</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205927</Id> - <Name>rect_GridNodeFunctions</Name> - <X>20</X> - <Y>500</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>120</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205929</Id> - <Name>txt_loaderStartupDefault</Name> - <X>40</X> - <Y>60</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Loader default startup:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205931</Id> - <Name>txt_createGridNodes</Name> - <X>40</X> - <Y>510</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Grid node functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205933</Id> - <Name>rect_dataInput</Name> - <X>-440</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-360334</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>169</Width> - <Height>40</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205935</Id> - <Name>text</Name> - <X>-400</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-360334</Color> - <Text>Data input</Text> - <Font> - <Name>SansSerif</Name> - <Size>16</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205937</Id> - <Name>t_inputFiles</Name> - <X>-380</X> - <Y>720</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Basic Input files:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205939</Id> - <Name>t_inputFileFunctions</Name> - <X>-400</X> - <Y>60</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Read input files to database:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205941</Id> - <Name>txt_dataCollectionFill</Name> - <X>-400</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fill the data collections:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205943</Id> - <Name>rect_ActorFunctions</Name> - <X>20</X> - <Y>420</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>60</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205945</Id> - <Name>txt_createActorFunctions</Name> - <X>40</X> - <Y>430</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Actor functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205947</Id> - <Name>rect_createEnergyGC</Name> - <X>400</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>400</Width> - <Height>230</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205949</Id> - <Name>txt_createEnergyGC</Name> - <X>410</X> - <Y>750</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Energy GC functions -</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1726584205951</Id> - <Name>gr_consumerGC_residential</Name> - <X>570</X> - <Y>610</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1726584205953</Id> - <Name>rect_createHouses</Name> - <X>-170</X> - <Y>-20</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>400</Width> - <Height>140</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205955</Id> - <Name>txt_createHouses</Name> - <X>-160</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Houses</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1726584205957</Id> - <Name>gr_consumerGC_businesspark</Name> - <X>570</X> - <Y>230</Y> - <Label> - <X>9.883</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1726584205959</Id> - <Name>rect_createCompanies</Name> - <X>-170</X> - <Y>-168.017</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>400</Width> - <Height>508.017</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205961</Id> - <Name>txt_createCompanies</Name> - <X>-158.134</X> - <Y>-158.134</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Companies</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1726584205963</Id> - <Name>gr_addEAFunctions</Name> - <X>1040</X> - <Y>200</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1726584205965</Id> - <Name>rect_addEA</Name> - <X>-180</X> - <Y>-140</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>450</Width> - <Height>780</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205967</Id> - <Name>txt_addEnergyAssetFunctions</Name> - <X>-160</X> - <Y>-130</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Add EA functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1726584205969</Id> - <Name>gr_createGISObjects</Name> - <X>1700</X> - <Y>610</Y> - <Label> - <X>9.938</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1726584205971</Id> - <Name>rect_createGISObjects</Name> - <X>-180</X> - <Y>-120</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>230</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205973</Id> - <Name>txt_createGISObjects</Name> - <X>-161.492</X> - <Y>-109.13</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create GIS objects</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1727792637339</Id> - <Name>txt_overwriteDatabaseValues</Name> - <X>-400</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Overwrite specific database values:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1730217549237</Id> - <Name>rect_supportFunctions</Name> - <X>1520</X> - <Y>830</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>140</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1730217578770</Id> - <Name>txt_supportFunctions</Name> - <X>1540</X> - <Y>840</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Support Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1742919550888</Id> - <Name>rect_connectToFunctions</Name> - <X>1520</X> - <Y>730</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>80</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1742919565761</Id> - <Name>txt_connectToFunctions</Name> - <X>1540</X> - <Y>750</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Connect To Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1744808981703</Id> - <Name>txt_DebuggingDataCollections</Name> - <X>-400</X> - <Y>870</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Data collections used for Debugging</Text> - <Font> - <Name>SansSerif</Name> - <Size>16</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1747830521606</Id> - <Name>rect_addSpecificSliderGC</Name> - <X>20</X> - <Y>300</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>100</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1747830569531</Id> - <Name>txt_addSpecificSliderGC</Name> - <X>30</X> - <Y>310</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Add specific slider GC</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1750856789809</Id> - <Name>rect_subScopeFunctions</Name> - <X>20</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>180</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1750857047506</Id> - <Name>txt_filterSubScopeFunctions</Name> - <X>40</X> - <Y>650</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>SubScope filter functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1753349205420</Id> - <Name>rect_defaultStartup1</Name> - <X>2010</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>420</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1753349205422</Id> - <Name>txt_loaderStartupDeserialisation</Name> - <X>2030</X> - <Y>9</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Loader after deserialisation (in Progress!)</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1753449467882</Id> - <Name>deserialize2</Name> - <X>2063.333</X> - <Y>172</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="162" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode> -pauseSimulation(); -// Collect GIS_Objects into hashmap, to link to new EnergyModel. -c_GISregions.clear(); -energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); - -try { - v_objectMapper = new ObjectMapper(); - f_addMixins(); - - /* - String userIdToken = "6b87f0f9-fdf6-4c05-9e0f-b75e46950113"; //user.userIdToken(); - - var repository = UserScenarioRepository.builder() - //.userId(UUID.fromString("6b87f0f9-fdf6-4c05-9e0f-b75e46950113")) - .userId(UUID.fromString(userIdToken)) - .modelName("ModelTestName") - .build(); - - var scenarioList = repository.listUserScenarios(); - for (var scenario : scenarioList) { - System.out.println(scenario.getName()); - } - - var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(0).getId()); - J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); - */ - - // Deserialize the JSON into a new EnergyModel instance: - J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); - EnergyModel deserializedEnergyModel = saveObject.energyModel; - - // Reconstruct all Agents - f_reconstructEnergyModel(deserializedEnergyModel); - f_reconstructGridConnections(deserializedEnergyModel); - f_reconstructActors(deserializedEnergyModel); - f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); - - f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); - - // Get profilePointer tableFunctions from 'original' energyModel - deserializedEnergyModel.c_profiles.forEach(x->{ - J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); - x.setTableFunction(origProfile.getTableFunction()); - }); - // get heatingTypeHashmap from 'old' energyModel. - deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; - - energyModel = deserializedEnergyModel; - zero_Interface.energyModel = deserializedEnergyModel; - zero_Interface.uI_Results.energyModel = deserializedEnergyModel; - //zero_Interface.f_clearSelectionAndSelectEnergyModel(); - //uI_Results.energyModel = deserializedEnergyModel; - - deserializedEnergyModel.f_startAfterDeserialisation(); - - f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); - - // Putting back the ordered collections in the interface - f_reconstructOrderedCollections(saveObject); - - - - - /* - // Reconstruct all Agents - f_reconstructEnergyModel(deserializedEnergyModel); - - - f_reconstructGridConnections(deserializedEnergyModel); - f_reconstructActors(deserializedEnergyModel); - f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); - - f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); - - // Get profilePointer tableFunctions from 'original' energyModel - deserializedEnergyModel.c_profiles.forEach(x->{ - J_ProfilePointer origProfile = energyModel.f_findProfile(x.name); - x.setTableFunction(origProfile.getTableFunction()); - }); - - energyModel.f_startAfterDeserialisation(); - - energyModel = deserializedEnergyModel; - zero_Interface.energyModel = deserializedEnergyModel; - zero_Interface.uI_Results.energyModel = deserializedEnergyModel; - - // Reinitialize energy model - //deserializedEnergyModel.b_isInitialized = false; - //deserializedEnergyModel.f_initializeEngine(); - */ - - //zero_Interface.f_clearSelectionAndSelectEnergyModel(); - zero_Interface.uI_Tabs.f_initializeUI_Tabs(energyModel.f_getGridConnectionsCollectionPointer(), energyModel.f_getPausedGridConnectionsCollectionPointer()); - zero_Interface.f_updateMainInterfaceSliders(); - - //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); - -} catch (IOException e) { - e.printStackTrace(); -} - -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>deserialize_energy_model</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1753449467884</Id> - <Name>serialize1</Name> - <X>2066.333</X> - <Y>99</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="160" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>traceln("Starting model serialisation..."); -J_ModelSave saveObject = new J_ModelSave(); -saveObject.energyModel = energyModel; - -energyModel.pop_gridNodes.forEach(x->saveObject.c_gridNodes.add(x)); -energyModel.pop_GIS_Buildings.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); -energyModel.pop_GIS_Objects.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); -energyModel.pop_GIS_Parcels.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); - -/* -saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; -saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; -saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; -saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; -saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; -saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; -saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; -saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; -saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; -saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; -//saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; -*/ - -saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; -saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; -saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; -saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; -saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; -saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; -saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; -saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; -saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; -saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; -saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; -saveObject.c_scenarioMap_Current = zero_Interface.c_scenarioMap_Current; -saveObject.c_scenarioMap_Future = zero_Interface.c_scenarioMap_Future; - -List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps = new ArrayList<LinkedHashMap<String, List<J_EAVehicle>>>(); -saveObject.c_additionalVehicleHashMaps = c_additionalVehicleHashMaps; - - -v_objectMapper = new ObjectMapper(); -f_addMixins(); -v_objectMapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE); - -try { - traceln("Trying to save to file"); - //v_objectMapper.writeValue(new File("energyModel.json"), energyModel); - - v_objectMapper.writeValue(new File("ModelSave.json"), saveObject); - /* - String userIdToken = "6b87f0f9-fdf6-4c05-9e0f-b75e46950113"; //user.userIdToken(); - - var repository = UserScenarioRepository.builder() - //.userId(UUID.fromString("6b87f0f9-fdf6-4c05-9e0f-b75e46950113")) - .userId(UUID.fromString(userIdToken)) - .modelName("ModelTestName") - .build(); - - repository.saveUserScenario( - "Test Scenario", - v_objectMapper.writeValueAsBytes(saveObject) - ); - */ - -} catch (IOException e) { - e.printStackTrace(); -} -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>serialize_energy_model</LabelText> - </ExtendedProperties> - </Control> - </Presentation> - </Level> - <Level> - <Id>1726584205975</Id> - <Name>level1</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - </Level> - </Presentation> - <Areas> - <Area> - <Id>1726584206081</Id> - <Name>viewArea</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Title/> - <Width>1920</Width> - <Height>980</Height> - </Area> - </Areas> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1709049506453</Id> - <Name>Z_UnusedAgent</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <Generic>false</Generic> - <GenericParameter> - <Id>1709049506459</Id> - <Name>1709049506459</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089955</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709107200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1709049506456</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1709049506460</CurrentLevel> - <ConnectionsId>1709049506454</ConnectionsId> - <AgentLinks> - <AgentLink> - <Id>1709049506454</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <Presentation> - <Level> - <Id>1709049506460</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - </Level> - </Presentation> - </ActiveObjectClass> - </ActiveObjectClasses> - <DifferentialEquationsMethod>EULER</DifferentialEquationsMethod> - <MixedEquationsMethod>RK45_NEWTON</MixedEquationsMethod> - <AlgebraicEquationsMethod>MODIFIED_NEWTON</AlgebraicEquationsMethod> - <AbsoluteAccuracy>1.0</AbsoluteAccuracy> - <FixedTimeStep>1.0</FixedTimeStep> - <RelativeAccuracy>1.0</RelativeAccuracy> - <TimeAccuracy>0.1</TimeAccuracy> - <InspectionWindowColorTheme>DEFAULT</InspectionWindowColorTheme> - <Frame> - <Id>1658477089982</Id> - <Width>1920</Width> - <Height>980</Height> - </Frame> - <Database> - <Id>1658477089953</Id> - <Logging>false</Logging> - <AutoExport>false</AutoExport> - <ShutdownCompact>false</ShutdownCompact> - <ImportSettings/> - <ExportSettings/> - </Database> - <RunConfiguration ActiveObjectClassId="1658477103140"> - <Id>1658477103163</Id> - <Name>RunConfiguration</Name> - <MaximumMemory>4096</MaximumMemory> - <ModelTimeProperties> - <StopOption>Stop at specified date</StopOption> - <InitialDate>1672531200000</InitialDate> - <InitialTime>0.0</InitialTime> - <FinalDate>1704067200000</FinalDate> - <FinalTime>8760.0</FinalTime> - </ModelTimeProperties> - <AnimationProperties> - <StopNever>false</StopNever> - <ExecutionMode>realTimeScaled</ExecutionMode> - <RealTimeScale>5.0</RealTimeScale> - <EnableZoomAndPanning>false</EnableZoomAndPanning> - <EnableDeveloperPanel>false</EnableDeveloperPanel> - <ShowDeveloperPanelOnStart>false</ShowDeveloperPanelOnStart> - </AnimationProperties> - <Inputs/> - <Outputs/> - </RunConfiguration> - <JavaClasses> - <JavaClass> - <Id>1715862317301</Id> - <Name>J_scenario_Current</Name> - <Folder>1761915047244</Folder> - <Text>/** - * Scenario_future - */ - -import com.fasterxml.jackson.annotation.JsonIdentityInfo; -import com.fasterxml.jackson.annotation.ObjectIdGenerators; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; - - -@JsonAutoDetect( - fieldVisibility = Visibility.ANY, // ✅ only public fields are serialized - getterVisibility = Visibility.NONE, - isGetterVisibility = Visibility.NONE, - setterVisibility = Visibility.NONE, - creatorVisibility = Visibility.NONE -) - -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type" // 👈 this will be the field name in your JSON - ) -@JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = "@id") - -public class J_scenario_Current implements Serializable { - - private Agent parentAgent; - private boolean isCurrentlyActive = true; - private Double currentContractDeliveryCapacity_kW = 0.0; - private Double currentContractFeedinCapacity_kW = 0.0; - private Double currentPhysicalConnectionCapacity_kW = 0.0; - private Integer currentPV_kW = 0; - //String currentPV_orient; - private Float currentWind_kW = 0f; - private Float currentBatteryPower_kW = 0f; - private Float currentBatteryCapacity_kWh = 0f; - private OL_GridConnectionHeatingType currentHeatingType = OL_GridConnectionHeatingType.NONE; - private Integer currentDieselCars = 0; - private Integer currentDieselVans = 0; - private Integer currentDieselTrucks = 0; - private Integer currentHydrogenCars = 0; - private Integer currentHydrogenVans = 0; - private Integer currentHydrogenTrucks = 0; - private Integer currentEVCars = 0; - private Integer currentEVVans = 0; - private Integer currentEVTrucks = 0; - private Double currentEVCarChargePower_kW = 0.0; - private Double currentEVVanChargePower_kW = 0.0; - private Double currentEVTruckChargePower_kW = 0.0; - - - /** - * Default constructor - */ - public J_scenario_Current() { - } - - /** - * Constructor initializing the fields - */ - /* - public J_scenario_Current() { - } - */ - - // Setters - public void setParentAgent(Agent parentAgent) { - this.parentAgent = parentAgent; - } - - public void setIsCurrentlyActive(boolean isCurrentlyActive) { - this.isCurrentlyActive = isCurrentlyActive; - } - - public void setCurrentContractDeliveryCapacity_kW(Double currentContractDeliveryCapacity_kW) { - this.currentContractDeliveryCapacity_kW = currentContractDeliveryCapacity_kW; - } - - public void setCurrentContractFeedinCapacity_kW(Double currentContractFeedinCapacity_kW) { - this.currentContractFeedinCapacity_kW = currentContractFeedinCapacity_kW; - } - - public void setCurrentPhysicalConnectionCapacity_kW(Double currentPhysicalConnectionCapacity_kW) { - this.currentPhysicalConnectionCapacity_kW = currentPhysicalConnectionCapacity_kW; - } - - public void setCurrentPV_kW(int currentPV_kW) { - this.currentPV_kW = currentPV_kW; - } - - /* - public void setCurrentPV_orient(String currentPV_orient) { - this.currentPV_orient = currentPV_orient; - } - */ - public void setCurrentWind_kW(Float currentWind_kW) { - this.currentWind_kW = currentWind_kW; - } - - public void setCurrentBatteryPower_kW(Float currentBatteryPower_kW) { - this.currentBatteryPower_kW = currentBatteryPower_kW; - } - - public void setCurrentBatteryCapacity_kWh(Float currentBatteryCapacity_kWh) { - this.currentBatteryCapacity_kWh = currentBatteryCapacity_kWh; - } - - public void setCurrentHeatingType(OL_GridConnectionHeatingType currentHeatingType) { - this.currentHeatingType = currentHeatingType; - } - - public void setCurrentDieselCars(Integer currentDieselCars) { - this.currentDieselCars = currentDieselCars; - } - - public void setCurrentDieselVans(Integer currentDieselVans) { - this.currentDieselVans = currentDieselVans; - } - - public void setCurrentDieselTrucks(Integer currentDieselTrucks) { - this.currentDieselTrucks = currentDieselTrucks; - } - - public void setCurrentHydrogenCars(Integer currentHydrogenCars) { - this.currentHydrogenCars = currentHydrogenCars; - } - - public void setCurrentHydrogenVans(Integer currentHydrogenVans) { - this.currentHydrogenVans = currentHydrogenVans; - } - - public void setCurrentHydrogenTrucks(Integer currentHydrogenTrucks) { - this.currentHydrogenTrucks = currentHydrogenTrucks; - } - - public void setCurrentEVCars(Integer currentEVCars) { - this.currentEVCars = currentEVCars; - } - - public void setCurrentEVVans(Integer currentEVVans) { - this.currentEVVans = currentEVVans; - } - - public void setCurrentEVTrucks(Integer currentEVTrucks) { - this.currentEVTrucks = currentEVTrucks; - } - - public void setCurrentEVCarChargePower_kW(Double currentEVCarChargePower_kW) { - this.currentEVCarChargePower_kW = currentEVCarChargePower_kW; - } - - public void setCurrentEVVanChargePower_kW(Double currentEVVanChargePower_kW) { - this.currentEVVanChargePower_kW = currentEVVanChargePower_kW; - } - - public void setCurrentEVTruckChargePower_kW(Double currentEVTruckChargePower_kW) { - this.currentEVTruckChargePower_kW = currentEVTruckChargePower_kW; - } - - - // Getters - public Agent getParentAgent() { - return parentAgent; - } - - public boolean getIsCurrentlyActive() { - return isCurrentlyActive; - } - - public Double getCurrentContractDeliveryCapacity_kW() { - return currentContractDeliveryCapacity_kW; - } - - public Double getCurrentContractFeedinCapacity_kW() { - return currentContractFeedinCapacity_kW; - } - - public Double getCurrentPhysicalConnectionCapacity_kW() { - return currentPhysicalConnectionCapacity_kW; - } - - public Integer getCurrentPV_kW() { - if (currentPV_kW == null) { - return 0; - } - return currentPV_kW; - } - - /* - public String getCurrentPV_orient() { - return currentPV_orient; - } - */ - - public Float getCurrentWind_kW() { - return currentWind_kW; - } - - public Float getCurrentBatteryPower_kW() { - return currentBatteryPower_kW; - } - - public Float getCurrentBatteryCapacity_kWh() { - return currentBatteryCapacity_kWh; - } - - public OL_GridConnectionHeatingType getCurrentHeatingType() { - return currentHeatingType; - } - - public Integer getCurrentDieselCars() { - return currentDieselCars; - } - - public Integer getCurrentDieselVans() { - return currentDieselVans; - } - - public Integer getCurrentDieselTrucks() { - return currentDieselTrucks; - } - - public Integer getCurrentHydrogenCars() { - return currentHydrogenCars; - } - - public Integer getCurrentHydrogenVans() { - return currentHydrogenVans; - } - - public Integer getCurrentHydrogenTrucks() { - return currentHydrogenTrucks; - } - - public Integer getCurrentEVCars() { - return currentEVCars; - } - - public Integer getCurrentEVVans() { - return currentEVVans; - } - - public Integer getCurrentEVTrucks() { - return currentEVTrucks; - } - - public Double getCurrentEVCarChargePower_kW() { - return currentEVCarChargePower_kW; - } - - public Double getCurrentEVVanChargePower_kW() { - return currentEVVanChargePower_kW; - } - - public Double getCurrentEVTruckChargePower_kW() { - return currentEVTruckChargePower_kW; - } - - - - @Override - public String toString() { - return super.toString(); - } - - /** - * This number is here for model snapshot storing purpose<br> - * It needs to be changed when this class gets changed - */ - private static final long serialVersionUID = 1L; - -}</Text> - </JavaClass> - <JavaClass> - <Id>1715862317307</Id> - <Name>J_scenario_Future</Name> - <Folder>1761915047244</Folder> - <Text>/** - * Scenario_future - */ - -import com.fasterxml.jackson.annotation.JsonIdentityInfo; -import com.fasterxml.jackson.annotation.ObjectIdGenerators; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; - - -@JsonAutoDetect( - fieldVisibility = Visibility.ANY, // ✅ only public fields are serialized - getterVisibility = Visibility.NONE, - isGetterVisibility = Visibility.NONE, - setterVisibility = Visibility.NONE, - creatorVisibility = Visibility.NONE -) - -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type" // 👈 this will be the field name in your JSON - ) -@JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = "@id") - -public class J_scenario_Future implements Serializable { - - private Agent parentAgent; - private boolean isActiveInFuture = true; //Boolean used to see if gc is active in future scenario - private Double requestedContractDeliveryCapacity_kW = 0.0; - private Double requestedContractFeedinCapacity_kW = 0.0; - private Double requestedPhysicalConnectionCapacity_kW = 0.0; - private double plannedHeatSavings_pct = 0; - private OL_GridConnectionHeatingType plannedHeatingType = OL_GridConnectionHeatingType.NONE; - private double plannedElectricitySavings_pct = 0; - private boolean plannedCurtailment = false; - private Integer plannedPV_kW = 0; - private Integer plannedPV_year; - private Float plannedWind_kW = 0f; - private Float plannedBatteryPower_kW = 0f; - private Float plannedBatteryCapacity_kWh = 0f; - //Integer plannedWind_year; - private double plannedTransportSavings_pct = 0; - private Integer plannedEVCars = 0; - private Integer plannedEVVans = 0; - private Integer plannedEVTrucks = 0; - private Integer plannedHydrogenCars = 0; - private Integer plannedHydrogenVans = 0; - private Integer plannedHydrogenTrucks = 0; - - /** - * Default constructor - */ - public J_scenario_Future() { - } - - /** - * Constructor initializing the fields - */ - /* - public J_scenario_Future(Agent parentAgent, Integer plannedPV_kW, Integer plannedPV_year, Float plannedWind_kW, Integer plannedEVCars, Integer plannedEVVans, Integer plannedEVTrucks) { - - - } - */ - - // Setters - public void setParentAgent(Agent parentAgent) { - this.parentAgent = parentAgent; - } - - public void setIsActiveInFuture(boolean isActiveInFuture) { - this.isActiveInFuture = isActiveInFuture; - } - - public void setRequestedContractDeliveryCapacity_kW(Double requestedContractDeliveryCapacity_kW) { - this.requestedContractDeliveryCapacity_kW = requestedContractDeliveryCapacity_kW; - } - - public void setRequestedContractFeedinCapacity_kW(Double requestedContractFeedinCapacity_kW) { - this.requestedContractFeedinCapacity_kW = requestedContractFeedinCapacity_kW; - } - - public void setRequestedPhysicalConnectionCapacity_kW(Double requestedPhysicalConnectionCapacity_kW) { - this.requestedPhysicalConnectionCapacity_kW = requestedPhysicalConnectionCapacity_kW; - } - - public void setPlannedHeatSavings_pct(double plannedHeatSavings_pct) { - this.plannedHeatSavings_pct = plannedHeatSavings_pct; - } - - public void setPlannedHeatingType(OL_GridConnectionHeatingType plannedHeatingType) { - this.plannedHeatingType = plannedHeatingType; - } - - public void setPlannedElectricitySavings_pct(double plannedElectricitySavings_pct) { - this.plannedElectricitySavings_pct = plannedElectricitySavings_pct; - } - - public void setPlannedCurtailment(boolean plannedCurtailment) { - this.plannedCurtailment = plannedCurtailment; - } - - public void setPlannedPV_kW(Integer plannedPV_kW) { - this.plannedPV_kW = plannedPV_kW; - } - - public void setPlannedPV_year(Integer plannedPV_year) { - this.plannedPV_year = plannedPV_year; - } - - public void setPlannedWind_kW(Float plannedWind_kW) { - this.plannedWind_kW = plannedWind_kW; - } - - public void setPlannedBatteryPower_kW(Float plannedBatteryPower_kW) { - this.plannedBatteryPower_kW = plannedBatteryPower_kW; - } - - public void setPlannedBatteryCapacity_kWh(Float plannedBatteryCapacity_kWh) { - this.plannedBatteryCapacity_kWh = plannedBatteryCapacity_kWh; - } - - public void setPlannedTransportSavings_pct(double plannedTransportSavings_pct) { - this.plannedTransportSavings_pct = plannedTransportSavings_pct; - } - - public void setPlannedEVCars(Integer plannedEVCars) { - this.plannedEVCars = plannedEVCars; - } - - public void setPlannedEVVans(Integer plannedEVVans) { - this.plannedEVVans = plannedEVVans; - } - - public void setPlannedEVTrucks(Integer plannedEVTrucks) { - this.plannedEVTrucks = plannedEVTrucks; - } - - public void setPlannedHydrogenCars(Integer plannedHydrogenCars) { - this.plannedHydrogenCars = plannedHydrogenCars; - } - - public void setPlannedHydrogenVans(Integer plannedHydrogenVans) { - this.plannedHydrogenVans = plannedHydrogenVans; - } - - public void setPlannedHydrogenTrucks(Integer plannedHydrogenTrucks) { - this.plannedHydrogenTrucks = plannedHydrogenTrucks; - } - - // Getters - public Agent getParentAgent() { - return parentAgent; - } - - public boolean getIsActiveInFuture() { - return isActiveInFuture; - } - - public Double getReques \ No newline at end of file diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index b4e61e8..2513fc9 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -3369,6 +3369,15 @@ List<Building_data> f_getBuildingsInSubScope(List<Building_data> initialBuilding GCH.p_bouwjaar = houseBuildingData.build_year(); GCH.p_eigenOprit = houseBuildingData.has_private_parking() != null ? houseBuildingData.has_private_parking() : false; + //For PBL heating + GCH.p_constructionPeriod_heatingPBL = houseBuildingData.constructionPeriod_int(); + GCH.p_buildingType_heatingPBL = houseBuildingData.buildingType_int(); + GCH.p_ownership_heatingPBL = houseBuildingData.ownership_int(); + GCH.p_localFactor_heatingPBL = houseBuildingData.localFactor(); + GCH.p_regionalClimateCorrectionFactor_heatingPBL = houseBuildingData.regionalClimateCorrectionFactor(); + + + //Nageisoleerd if (houseBuildingData.energy_label() != null){ // && houseBuildingData.energy_label() != OL_GridConnectionIsolationLabel.NONE) { GCH.p_energyLabel = houseBuildingData.energy_label(); diff --git a/_alp/Classes/Building_data.java b/_alp/Classes/Class.Building_data.java similarity index 85% rename from _alp/Classes/Building_data.java rename to _alp/Classes/Class.Building_data.java index a0c14f9..d9f93e6 100644 --- a/_alp/Classes/Building_data.java +++ b/_alp/Classes/Class.Building_data.java @@ -36,4 +36,10 @@ public class Building_data { Double latitude; Double longitude; String polygon; + + Integer ownership_int; + Integer constructionPeriod_int; + Integer buildingType_int; + Double localFactor; + Double regionalClimateCorrectionFactor; } \ No newline at end of file From 51d807960ac8ab9154fbd386454ac4626fd3bdc1 Mon Sep 17 00:00:00 2001 From: Naud Loomans <38351577+naudloomans@users.noreply.github.com> Date: Fri, 12 Dec 2025 09:43:38 +0100 Subject: [PATCH 6/8] final version mannually calibrated to 3 nbhs --- Zero_Interface-Loader.alpx | 2 +- Zero_Interface-Loader.original.alp | 68542 ++++++++++++++++ .../Agents/Zero_Interface/Code/Functions.java | 39 +- _alp/Agents/Zero_Loader/Code/Functions.java | 17 +- 4 files changed, 68574 insertions(+), 26 deletions(-) create mode 100644 Zero_Interface-Loader.original.alp diff --git a/Zero_Interface-Loader.alpx b/Zero_Interface-Loader.alpx index d78122b..e033b5d 100644 --- a/Zero_Interface-Loader.alpx +++ b/Zero_Interface-Loader.alpx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <AnyLogicWorkspace splitVersion="1" WorkspaceVersion="1.9" - AnyLogicVersion="8.9.7.202512010504" + AnyLogicVersion="8.9.7.202512010500" AlpVersion="8.9.7"> <Model> <Id>1658477103134</Id> diff --git a/Zero_Interface-Loader.original.alp b/Zero_Interface-Loader.original.alp new file mode 100644 index 0000000..19bcd53 --- /dev/null +++ b/Zero_Interface-Loader.original.alp @@ -0,0 +1,68542 @@ +<?xml version="1.0" encoding="UTF-8"?> +<AnyLogicWorkspace splitVersion="1" + WorkspaceVersion="1.9" + AnyLogicVersion="8.9.7.202512010504" + AlpVersion="8.9.7"> + <Model xmlns:al="http://anylogic.com"> + <Id>1658477103134</Id> + <Name>Zero_Interface-Loader</Name> + <EngineVersion>6</EngineVersion> + <JavaPackageName>zerointerfaceloader</JavaPackageName> + <ModelTimeUnit>Hour</ModelTimeUnit> + <OptionLists> + <OptionList> + <Id>1658478100573</Id> + <Name>OL_FilterOptionsGC</Name> + <Option> + <Id>1734448498882</Id> + <Name>COMPANIES</Name> + </Option> + <Option> + <Id>1734442884762</Id> + <Name>HOUSES</Name> + </Option> + <Option> + <Id>1734442348652</Id> + <Name>DETAILED</Name> + </Option> + <Option> + <Id>1734442871159</Id> + <Name>NONDETAILED</Name> + </Option> + <Option> + <Id>1734442372415</Id> + <Name>HAS_PV</Name> + </Option> + <Option> + <Id>1734442386815</Id> + <Name>HAS_TRANSPORT</Name> + </Option> + <Option> + <Id>1760086039728</Id> + <Name>HAS_EV</Name> + </Option> + <Option> + <Id>1734444382736</Id> + <Name>GRIDTOPOLOGY_SELECTEDLOOP</Name> + </Option> + <Option> + <Id>1734442896763</Id> + <Name>ENERGYASSETS</Name> + </Option> + <Option> + <Id>1737653098541</Id> + <Name>SELECTED_NEIGHBORHOOD</Name> + </Option> + <Option> + <Id>1737656249784</Id> + <Name>SELECTED_MUNICIPALITY</Name> + </Option> + <Option> + <Id>1741874937291</Id> + <Name>FARMER</Name> + </Option> + <Option> + <Id>1742233248626</Id> + <Name>MANUAL_SELECTION</Name> + </Option> + </OptionList> + <OptionList> + <Id>1660743989698</Id> + <Name>OL_GISBuildingTypes</Name> + <Option> + <Id>1750173978462</Id> + <Name>DETAILED_COMPANY</Name> + </Option> + <Option> + <Id>1750173986048</Id> + <Name>DEFAULT_COMPANY</Name> + </Option> + <Option> + <Id>1750173990031</Id> + <Name>HOUSE</Name> + </Option> + <Option> + <Id>1750173992447</Id> + <Name>REMAINING</Name> + </Option> + </OptionList> + <OptionList> + <Id>1660743989798</Id> + <Name>OL_ProjectType</Name> + <Option> + <Id>1660743990769</Id> + <Name>BUSINESSPARK</Name> + </Option> + <Option> + <Id>1676307694256</Id> + <Name>RESIDENTIAL</Name> + </Option> + </OptionList> + <OptionList> + <Id>1667742453792</Id> + <Name>OL_UNUSED3</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + </OptionList> + <OptionList> + <Id>1675025163072</Id> + <Name>OL_UNUSED4</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + </OptionList> + <OptionList> + <Id>1709718356700</Id> + <Name>EnergyDemandTab</Name> + <Option> + <Id>1709718356702</Id> + <Name>MOBILITY</Name> + </Option> + <Option> + <Id>1709718356704</Id> + <Name>ELECTRICITY</Name> + </Option> + <Option> + <Id>1709718356706</Id> + <Name>HEAT</Name> + </Option> + <Option> + <Id>1714324722851</Id> + <Name>HUB</Name> + </Option> + <Option> + <Id>1721039647716</Id> + <Name>NFATO</Name> + </Option> + </OptionList> + <OptionList> + <Id>1726584216682</Id> + <Name>OL_SurveyType</Name> + <Option> + <Id>1726584216684</Id> + <Name>ZORM</Name> + </Option> + <Option> + <Id>1726584216686</Id> + <Name>EXCEL</Name> + </Option> + <Option> + <Id>1726584216688</Id> + <Name>NONE</Name> + </Option> + </OptionList> + <OptionList> + <Id>1753086929090</Id> + <Name>OL_MapOverlayTypes</Name> + <Option> + <Id>1753086938862</Id> + <Name>DEFAULT</Name> + </Option> + <Option> + <Id>1753086944014</Id> + <Name>ELECTRICITY_CONSUMPTION</Name> + </Option> + <Option> + <Id>1753086951601</Id> + <Name>PV_PRODUCTION</Name> + </Option> + <Option> + <Id>1753086958969</Id> + <Name>GRID_NEIGHBOURS</Name> + </Option> + <Option> + <Id>1753086978373</Id> + <Name>CONGESTION</Name> + </Option> + <Option> + <Id>1753108825070</Id> + <Name>ENERGY_LABEL</Name> + </Option> + <Option> + <Id>1754312700674</Id> + <Name>PARKING_TYPE</Name> + </Option> + </OptionList> + <OptionList> + <Id>1763646420469</Id> + <Name>OL_UserGCAccessType</Name> + <Option> + <Id>1763646670204</Id> + <Name>FULL</Name> + </Option> + <Option> + <Id>1763646670205</Id> + <Name>SPECIFIED</Name> + </Option> + <Option> + <Id>1763646670206</Id> + <Name>PUBLIC_ONLY</Name> + </Option> + </OptionList> + <OptionList> + <Id>1763648379983</Id> + <Name>OL_UserNBHAccessType</Name> + <Option> + <Id>1763648379984</Id> + <Name>FULL</Name> + </Option> + <Option> + <Id>1763648379985</Id> + <Name>SPECIFIED</Name> + </Option> + </OptionList> + </OptionLists> + <Folders> + <Folder> + <Id>1754045642067</Id> + <Name>Tabs</Name> + </Folder> + <Folder> + <Id>1754045666929</Id> + <Name>Dashboards</Name> + </Folder> + <Folder> + <Id>1754045711603</Id> + <Name>DatabasePackages</Name> + </Folder> + <Folder> + <Id>1761915047244</Id> + <Name>DataClasses</Name> + </Folder> + </Folders> + <ActiveObjectClasses> + <ActiveObjectClass> + <Id>1726584205528</Id> + <Name>AVGC_data</Name> + <Generic>false</Generic> + <GenericParameter> + <Id>1726584205523</Id> + <Name>1726584205523</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089981</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1710835200000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1726584205524</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1726584205534</CurrentLevel> + <ConnectionsId>1726584205728</ConnectionsId> + <Variables> + <Variable Class="PlainVariable"> + <Id>1726584205532</Id> + <Name>hourOfYearPerMonth</Name> + <Description>Hour of year per month (not leap year) --> Houdt dit rekening met zomer/winter tijd?</Description> + <X>1070</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int[]</Type> + <InitialValue Class="CodeValue"> + <Code>new int[] {0, 744, 1392, 2136, 2856, 3600, 4320, 5064, 5808, 6528, 7272, 7992}</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205579</Id> + <Name>p_avgHouseConnectionCapacity_kW</Name> + <Description>https://www.enexis.nl/aansluitingen/welke-aansluiting-heb-ik-nodig +3*25 A --> 3*25*230 = 17.25 kW</Description> + <X>50</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>17.25</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205577</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205582</Id> + <Name>p_avgHouseHeatingMethod</Name> + <X>50</X> + <Y>168.976</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>OL_GridConnectionHeatingType</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>OL_GridConnectionHeatingType.GAS_BURNER</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205580</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205585</Id> + <Name>p_avgUtilityConnectionCapacity_kW</Name> + <Description>https://www.enexis.nl/aansluitingen/welke-aansluiting-heb-ik-nodig +-> 17.25 -> set to 17, to prevent slider errors (stepsize cant be double, otherwise to small for user experience) + +--> 17.25 is way to small -> 3x80 is taken : 55 kW</Description> + <X>50</X> + <Y>330</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>55</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205583</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205588</Id> + <Name>p_avgUtilityHeatingMethod</Name> + <X>50</X> + <Y>310</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>OL_GridConnectionHeatingType</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>OL_GridConnectionHeatingType.GAS_BURNER</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205586</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205591</Id> + <Name>p_avgHouseElectricityConsumption_kWh_yr</Name> + <Description>- https://www.milieucentraal.nl/energie-besparen/inzicht-in-je-energierekening/gemiddeld-energieverbruik/ +- https://www.overstappen.nl/energie/gemiddeld-energieverbruik/ +--> 2479 kWh/yr is the average of NL +--> Overwrite if numbers are available in the project selection agent +</Description> + <X>50</X> + <Y>128.976</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>2479</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205589</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205594</Id> + <Name>p_avgHouseGasConsumption_m3_yr</Name> + <Description>- https://www.overstappen.nl/energie/gemiddeld-energieverbruik/ +- https://www.milieucentraal.nl/energie-besparen/inzicht-in-je-energierekening/gemiddeld-energieverbruik/ + --> 1169 m3 is the average of NL +--> Overwrite if numbers are available in the project selection agent +</Description> + <X>50</X> + <Y>108.976</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>1169</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205592</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205597</Id> + <Name>p_shareOfElectricVehicleOwnership</Name> + <Description>share of EVs in the netherlands. --> 5% (feb 2024). + +https://www.rvo.nl/onderwerpen/elektrisch-vervoer/stand-van-zaken </Description> + <X>50</X> + <Y>188.976</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.05</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205595</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205600</Id> + <Name>p_ratioHouseInstalledPV</Name> + <Description>How many houses have installed PV in The Netherlands: 25% (end of 2022) +https://solarmagazine.nl/nieuws-zonne-energie/i34591/de-harde-cijfers-drenthe-verstevigt-koppositie-38-procent-woningen-heeft-zonnepanelen</Description> + <X>50</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.25</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205598</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205603</Id> + <Name>p_avgHousePVInstallationPower_kWp</Name> + <Description>volgens gegevens van het CBS (Centraal Bureau voor de Statistiek) en RVO (Rijksdienst voor Ondernemend Nederland), was het gemiddelde geïnstalleerde piekvermogen van residentiële zonnepanelen in Nederland in 2020 ongeveer 4 kilowatt piek (kWp) per huishouden. --> 4kWp</Description> + <X>50</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>4</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205601</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205606</Id> + <Name>p_avgEVStorageCar_kWh</Name> + <Description>-https://www.eonenergy.com/electric-vehicle-charging/running-costs-and-benefits/battery-capacity-and-lifespan.html + +-https://www.edi.be/blog/laadstation-3/hoe-is-het-gesteld-met-de-autonomie-van-de-elektrische-auto-in-2023-12 + +40 kWh (kleine autos) + +50-80 kWh (middel grote autos) + +80-100 kWh (grote autos) + +Minimaal: 116 kWh minimum nodig, anders soms negatieve SOC.</Description> + <X>570</X> + <Y>220</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>116</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205604</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205609</Id> + <Name>p_avgEVMaxChargePowerCar_kW</Name> + <Description>Bron???</Description> + <X>570</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>11</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205607</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205612</Id> + <Name>p_avgEVStorageVan_kWh</Name> + <Description>????</Description> + <X>570</X> + <Y>240</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>200</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205610</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205615</Id> + <Name>p_avgEVStorageTruck_kWh</Name> + <Description>??</Description> + <X>570</X> + <Y>260</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>500</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205613</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205618</Id> + <Name>p_avgEVMaxChargePowerVan_kW</Name> + <Description>Bron???</Description> + <X>570</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>11</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205616</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205621</Id> + <Name>p_avgEVMaxChargePowerTruck_kW</Name> + <Description>Bron???</Description> + <X>570</X> + <Y>190</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>200</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205619</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205624</Id> + <Name>p_avgEVEnergyConsumptionCar_kWhpkm</Name> + <Description>https://ev-database.org/nl/auto/1555/Tesla-Model-3: 0.142 kWh/km + +https://www.vattenfall.nl/elektrische-auto/verbruik/ + +--> Tesla model 3: 15.1 kWh per 100 km --> 0.151 kWh/km +--> Kia niro: 17.1 kWh per 100 km --> 0.171 kWh/km +--> taking 0.16 kWh/km as the average</Description> + <X>570</X> + <Y>290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.16</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205622</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205627</Id> + <Name>p_avgEVEnergyConsumptionVan_kWhpkm</Name> + <Description>praktijkverbruik van 26,9 kWh per 100 kilometer: +https://www.debedrijfswagenadviseurs.nl/praktijkverbruik-elektrische-bedrijfswagen/ </Description> + <X>570</X> + <Y>310</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.269</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205625</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205630</Id> + <Name>p_avgEVEnergyConsumptionTruck_kWhpkm</Name> + <Description>https://www.elektrischevrachtwagen.nl/post/hoe-ver-kan-een-elektrische-vrachtwagen-rijden, https://topsectorlogistiek.nl/wp-content/uploads/2024/06/20240126_Stappenplan-ZE-vrachtwagens.pdf +0.9 - 1.7 kWh/km +--> pak gemiddelde: 1.3</Description> + <X>570</X> + <Y>330</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>1.3</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205628</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205633</Id> + <Name>p_gas_kWhpm3</Name> + <Description>- https://www.greenchoice.nl/stroom-en-gas/bosgecompenseerd-gas/hoeveel-is-1-kuub-gas/ +- https://econvice.nl/op-gas-of-elektra-verwarmen-wat-is-gunstig/ +- https://www.joostdevree.nl/shtmls/calorische_waarde.shtml</Description> + <X>1070</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>9.77</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205631</Id> + <Label>p_gas_kWh_per_m3</Label> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205636</Id> + <Name>p_hydrogenEnergyDensity_kWh_Nm3</Name> + <Description>https://www.enapter.com/kb_post/what-is-the-energy-content-of-hydrogen + +LHV = 3.00 kWh/Nm3 +HHV = 3.54 kWh/Nm3</Description> + <X>1590</X> + <Y>160</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>3.00</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205634</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205639</Id> + <Name>p_hydrogenDensity_kg_Nm3</Name> + <Description>https://keengas.com/gases/hydrogen/</Description> + <X>1590</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.08988</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205637</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205642</Id> + <Name>p_oxygenDensity_kg_Nm3</Name> + <Description>http://www.uigi.com/o2_conv.html</Description> + <X>1590</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>1.4291</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205640</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205645</Id> + <Name>p_oxygenProduction_kgO2pkgH2</Name> + <Description>H20 = 2H + O +MM H = 1.008 g/mol +MM O = 16 g/mol +--> 1.008*2/16 = 0.126. +0.126 g waterstof per g water conversie. +1-0.126 = 0.874 g zuurstof per gram water conversie. + +--> 1/0.126 =7.9365 gram zuurstof productie per gram waterstof productie.</Description> + <X>1590</X> + <Y>260</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>7.9365</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205643</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205648</Id> + <Name>p_hydrogenSpecificEnergy_kWh_kg</Name> + <Description>https://www.cenex.co.uk/app/uploads/2021/05/Intro-to-hydrogen-1.pdf --> 33.6</Description> + <X>1590</X> + <Y>180</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>33.6</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205646</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205651</Id> + <Name>p_diesel_kWhpl</Name> + <Description>https://www.joostdevree.nl/shtmls/calorische_waarde.shtml</Description> + <X>1070</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>10</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205649</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205654</Id> + <Name>p_avgDieselConsumptionCar_kmpl</Name> + <Description>https://www.unitedconsumers.com/blog/auto/zuinig-rijden.jsp</Description> + <X>570</X> + <Y>400</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>21</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205652</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205657</Id> + <Name>p_avgGasolineConsumptionCar_kmpl</Name> + <Description>https://www.unitedconsumers.com/blog/auto/zuinig-rijden.jsp</Description> + <X>570</X> + <Y>420</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>15</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205655</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205660</Id> + <Name>p_gasoline_kWhpl</Name> + <Description>https://www.joostdevree.nl/shtmls/calorische_waarde.shtml</Description> + <X>1070</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>8.8</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205658</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205663</Id> + <Name>p_avgDieselConsumptionCar_kWhpkm</Name> + <X>570</X> + <Y>450</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>p_diesel_kWhpl/p_avgDieselConsumptionCar_kmpl</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205661</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205666</Id> + <Name>p_avgGasolineConsumptionCar_kWhpkm</Name> + <X>570</X> + <Y>470</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>p_gasoline_kWhpl/p_avgGasolineConsumptionCar_kmpl</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205664</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205669</Id> + <Name>p_avgDieselConsumptionVan_kmpl</Name> + <Description>https://www.webfleet.com/nl_nl/webfleet/blog/hoeveel-diesel-verbruikt-een-vrachtwagen-per-kilometer/ + +11 liter per 100 km = 9.1 km per liter. +</Description> + <X>570</X> + <Y>510</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>9.1</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205667</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205672</Id> + <Name>p_avgDieselConsumptionVan_kWhpkm</Name> + <X>570</X> + <Y>530</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>p_diesel_kWhpl/p_avgDieselConsumptionVan_kmpl</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205670</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205675</Id> + <Name>p_avgDieselConsumptionTruck_kmpl</Name> + <Description>https://www.webfleet.com/nl_nl/webfleet/blog/hoeveel-diesel-verbruikt-een-vrachtwagen-per-kilometer/ + +--> 25 - 30 - 40 liter per 100 km. = 4 - 3.33 - 2.5 km per l +Heavely dependend on load, city/highway, etc. +For now: Picking 3.33 km per l</Description> + <X>570</X> + <Y>560</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>3.33</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205673</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205678</Id> + <Name>p_avgDieselConsumptionTruck_kWhpkm</Name> + <X>570</X> + <Y>580</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>p_diesel_kWhpl/p_avgDieselConsumptionTruck_kmpl</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205676</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205681</Id> + <Name>p_avgCOPHeatpump</Name> + <Description>https://www.vaillant.be/consumenten/ons-advies/blog/het-rendement-van-een-warmtepomp/ + +Gemiddelde COP is 4.</Description> + <X>70</X> + <Y>520</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>4</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205679</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205684</Id> + <Name>p_avgUtilityPVPower_kWp</Name> + <Description>FIND SOURCE!!! ????????</Description> + <X>50</X> + <Y>350</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>1</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205682</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205687</Id> + <Name>p_ratioElectricTrucks</Name> + <Description>Ratio of how many trucks are electric vs diesel. +??? +https://nos.nl/artikel/2483604-elektrische-vrachtwagens-blijven-achter-door-complexe-serie-aan-uitdagingen --> 'volgens cbs nog geen half procent.'</Description> + <X>50</X> + <Y>370</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.005</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205685</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205690</Id> + <Name>p_avgCompanyHeatingMethod</Name> + <Description>Source?? --> Should definatly be still the case in 2024</Description> + <X>50</X> + <Y>390</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>OL_GridConnectionHeatingType</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>OL_GridConnectionHeatingType.GAS_BURNER</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205688</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205693</Id> + <Name>p_avgPVPower_kWpm2</Name> + <Description>https://hallostroom.nl/zonnepanelen/opbrengst/per-m2/ --> 177 W/m2 +https://www.zonneplan.nl/kenniscentrum/zonnepanelen/vermogen --> 212 W/m2 +https://www.zonnepanelennoord.nl/vermogen-zonnepanelen/ --> 215 W/m2</Description> + <X>50</X> + <Y>1020</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.2</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205691</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205696</Id> + <Name>p_avgRatioBatteryCapacity_v_Power</Name> + <Description>Average ratio of battery capacity over battery power. +--> If battery capacity (in kWh) is twice the battery power (in kW) --> ratio = 2.</Description> + <X>50</X> + <Y>1120</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>2</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205694</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205699</Id> + <Name>p_avgHydrogenConsumptionCar_kWhpkm</Name> + <Description>https://magnuscmd.com/hydrogen-fuel-cell-vehicles-a-threat-to-the-electric-car/ + +--> avg: 29 kWh per 100 km --> 0.29 kWh/km +</Description> + <X>570</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.29</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205697</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205702</Id> + <Name>p_avgHydrogenConsumptionVan_kWhpkm</Name> + <Description>https://www.huiskes-kokkeler.nl/bedrijfswagens/volkswagen-bedrijfswagens/modellen/crafter-hymotion-concept +--> 1.4 kg Waterstof per 100 km = 0.014 kg/km +--> 0.014 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 0.47 kWh/kg</Description> + <X>570</X> + <Y>660</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.47</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205700</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205705</Id> + <Name>p_avgHydrogenConsumptionTruck_kWhpkm</Name> + <Description>https://transportenmilieu.nl/nieuwsarchief/item/hyundai-op-waterstof-voor-havi-zwitserland +--> 6.6 kg Waterstof per 100 km = 0.066 kg/km +--> 0.066 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 2.22 kWh/kg</Description> + <X>570</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>2.22</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205703</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205708</Id> + <Name>p_avgRatioRoofPotentialPV</Name> + <Description>value for the ratio of the avg Usable Roof Area For PV fr</Description> + <X>50</X> + <Y>1040</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.5</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205706</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205711</Id> + <Name>p_avgEfficiencyHeatpump_fr</Name> + <Description>Efficiency (eta_r) used to calculate the COP in the energy asset based on temperature differences. + +'0.5' comes from old code, no source found for it yet.</Description> + <X>70</X> + <Y>540</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.5</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205709</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205714</Id> + <Name>p_avgOutputTemperatureElectricHeatpump_degC</Name> + <Description>https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/?utm_source=chatgpt.com - max 45-55 +https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 graden afgifte bij -10 graden. + +-> Voor nu gemiddeld 40 genomen.</Description> + <X>70</X> + <Y>580</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>40</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205712</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205717</Id> + <Name>p_avgEfficiencyGasBurner_fr</Name> + <Description>Average heating efficiency of a gas burner. +https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas energy density of 8.8 kWh/m3 (lower heating value), we use higher heating value: 9.77 -> 8.8*1.04/9.77 = 0.94</Description> + <X>70</X> + <Y>650</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.94</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205715</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205720</Id> + <Name>p_avgOutputTemperatureGasBurner_degC</Name> + <Description>Average output temperature of a gas burner unit in degC. + +--> Source?</Description> + <X>70</X> + <Y>670</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>90</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205718</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205723</Id> + <Name>p_avgEfficiencyHydrogenBurner_fr</Name> + <Description>Average heating efficiency of a hydrogen burner. + +- https://h2sciencecoalition.com/blog/hydrogen-for-heating-a-comparison-with-heat-pumps-part-1/ + +- https://www.csrf.ac.uk/blog/hydrogen-for-heating/</Description> + <X>70</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.90</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205721</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584205726</Id> + <Name>p_avgOutputTemperatureHydrogenBurner_degC</Name> + <Description>Average output temperature of a hydrogen burner unit in degC. + +--> Source?</Description> + <X>70</X> + <Y>760</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>90</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726584205724</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726746753360</Id> + <Name>p_avgVehiclesPerChargePoint</Name> + <X>50</X> + <Y>1190</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>int</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>5</Code> + </DefaultValue> + <ParameterEditor> + <Id>1726746753358</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1728032263201</Id> + <Name>p_avgAnnualTravelDistanceVan_km</Name> + <Description>https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-bestelautos -> 4 jaar oude bestlbussen gemiddeld 22.2 duizend km in een jaar.</Description> + <X>570</X> + <Y>790</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>22200</Code> + </DefaultValue> + <ParameterEditor> + <Id>1728032263199</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1728032304301</Id> + <Name>p_avgAnnualTravelDistanceCompanyCar_km</Name> + <Description>https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-personenautos</Description> + <X>570</X> + <Y>770</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>20500</Code> + </DefaultValue> + <ParameterEditor> + <Id>1728032304299</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1728032305440</Id> + <Name>p_avgAnnualTravelDistanceTruck_km</Name> + <Description>https://www.cbs.nl/nl-nl/cijfers/detail/84651NED</Description> + <X>570</X> + <Y>810</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>54505</Code> + </DefaultValue> + <ParameterEditor> + <Id>1728032305438</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1728034204646</Id> + <Name>p_avgFullLoadHoursPV_hr</Name> + <Description>Parameter used to estimate the total solar production in a year in a function like: +p_avgFullLoadHoursPV_hr * kWp_of_PV_panels = XXX kWh pv production in a year.</Description> + <X>50</X> + <Y>1060</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>920</Code> + </DefaultValue> + <ParameterEditor> + <Id>1728034204644</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1728390983761</Id> + <Name>p_avgCompanyElectricityConsumption_kWhpm2</Name> + <Description>https://www.odyssee-mure.eu/publications/efficiency-by-sector/services/offices-specific-energy-and-electricity-consumption.html + +--> 188 kWh/m2 for offices in NL</Description> + <X>50</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>188</Code> + </DefaultValue> + <ParameterEditor> + <Id>1728390983759</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1728391035656</Id> + <Name>p_avgCompanyGasConsumption_m3pm2</Name> + <Description>https://publications.tno.nl/publication/34629408/3xJn98/e16056.pdf -> page 28 + +9 m3 p m2 for label A +12 m3 p m2 for label B +to 18 m3 p m2 for label G + +--> take 7 for now.</Description> + <X>50</X> + <Y>430</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>7</Code> + </DefaultValue> + <ParameterEditor> + <Id>1728391035654</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1728394646404</Id> + <Name>p_avgCompanyHeatConsumption_kWhpm2</Name> + <Description>https://www.wearepossible.org/parks-toolkit/5-investigating-heat-demand + +--> estimated benchmark 100 kWh/m2</Description> + <X>50</X> + <Y>450</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>100</Code> + </DefaultValue> + <ParameterEditor> + <Id>1728394646402</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1733155392379</Id> + <Name>p_avgSolarFieldPower_kWppha</Name> + <Description>1000</Description> + <X>50</X> + <Y>1080</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>1000</Code> + </DefaultValue> + <ParameterEditor> + <Id>1733155392377</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1745316053417</Id> + <Name>p_avgEfficiencyCHP_thermal_fr</Name> + <Description>50% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) +Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf</Description> + <X>70</X> + <Y>830</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.5</Code> + </DefaultValue> + <ParameterEditor> + <Id>1745316053415</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1745316110677</Id> + <Name>p_avgEfficiencyCHP_electric_fr</Name> + <Description>42% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) +Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf</Description> + <X>70</X> + <Y>850</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.42</Code> + </DefaultValue> + <ParameterEditor> + <Id>1745316110675</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1745326622582</Id> + <Name>p_avgOutputTemperatureCHP_degC</Name> + <Description>Average output temperature of a hydrogen burner unit in degC. + +--> Source?</Description> + <X>70</X> + <Y>870</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>90</Code> + </DefaultValue> + <ParameterEditor> + <Id>1745326622580</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1747314895126</Id> + <Name>p_avgEfficiencyDistrictHeatingDeliverySet_fr</Name> + <Description>Average heating efficiency of a district heating delivery set +Set as 0.8 to account for the losses of the heatgrid, as they are not yet part of our model. +https://www.grundfos.com/nl/learn/research-and-insights/pipe-heat-loss +https://www.klimaat030.nl/warmteverlies-van-stadsverwarming-gigantisch/</Description> + <X>70</X> + <Y>920</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.8</Code> + </DefaultValue> + <ParameterEditor> + <Id>1747314895124</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1747314895129</Id> + <Name>p_avgOutputTemperatureDistrictHeatingDeliverySet_degC</Name> + <Description>Average output temperature of a districtheating delivery set in degC. + +70 -> https://www.nplw.nl/warmtenet/warmtetechnieken/middentemperatuur-warmtenet</Description> + <X>70</X> + <Y>940</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>70</Code> + </DefaultValue> + <ParameterEditor> + <Id>1747314895127</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1749653366667</Id> + <Name>p_v2gProbability</Name> + <Description>SOURCE!?!?!?!</Description> + <X>570</X> + <Y>125</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.2</Code> + </DefaultValue> + <ParameterEditor> + <Id>1749653366665</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1750246849611</Id> + <Name>p_v1gProbability</Name> + <Description>SOURCE!?!?!?!</Description> + <X>570</X> + <Y>105</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.8</Code> + </DefaultValue> + <ParameterEditor> + <Id>1750246849609</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1750341289733</Id> + <Name>p_avgEVsPerPublicCharger</Name> + <Description>TODO: Determine this value</Description> + <X>570</X> + <Y>860</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>int</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>2</Code> + </DefaultValue> + <ParameterEditor> + <Id>1750341289731</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1751893521012</Id> + <Name>p_avgPTPower_kWpm2</Name> + <X>570</X> + <Y>930</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.5</Code> + </DefaultValue> + <ParameterEditor> + <Id>1751893521010</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1751893540583</Id> + <Name>p_avgHeatBufferWaterVolumePerHPPower_m3pkW</Name> + <Description>https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 25 liter per kW warmtepomp vermogen = 0.025 m3/kW</Description> + <X>570</X> + <Y>1080</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.025</Code> + </DefaultValue> + <ParameterEditor> + <Id>1751893540581</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1751893810778</Id> + <Name>p_avgHeatBufferWaterVolumePerPTSurface_m3pm2</Name> + <Description>https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 50 liter per m2 zonnecollector = 0.050 m3/m2</Description> + <X>570</X> + <Y>1060</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.05</Code> + </DefaultValue> + <ParameterEditor> + <Id>1751893810776</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1751896032002</Id> + <Name>p_waterHeatCapacity_JpkgK</Name> + <Description>https://www.engineeringtoolbox.com/water-thermal-properties-d_162.html -> 4185 J/kg K bij 20 *C + +-> Verschilt eigenlijk met temperatuur, weer net iets lager bij 40 graden (4180), weer 4185 bij 60*C en net iets hoger bij 80 graden. (4197 bij 80 *C). + +Voor nu gekozen voor 4185. +</Description> + <X>1070</X> + <Y>290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>4185</Code> + </DefaultValue> + <ParameterEditor> + <Id>1751896032000</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1751905820546</Id> + <Name>p_waterDensity_kgpm3</Name> + <Description>https://www.sigmaaldrich.com/NL/en/substance/densitystandard998kgm318027732185 --> 998 kg/m3</Description> + <X>1070</X> + <Y>310</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>998</Code> + </DefaultValue> + <ParameterEditor> + <Id>1751905820544</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1751906112800</Id> + <Name>p_avgMaxHeatBufferTemperature_degC</Name> + <Description>???</Description> + <X>570</X> + <Y>1010</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>85</Code> + </DefaultValue> + <ParameterEditor> + <Id>1751906112798</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1751906126857</Id> + <Name>p_avgMinHeatBufferTemperature_degC</Name> + <X>570</X> + <Y>1030</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>60</Code> + </DefaultValue> + <ParameterEditor> + <Id>1751906126855</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1753950741783</Id> + <Name>p_avgPTPanelSize_m2</Name> + <Description>https://www.econo.nl/m24hpcpc-400-h2-heatpipe-zonnecollector-prisma-pro-24-cpc -> +- 4 m2</Description> + <X>570</X> + <Y>950</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>4</Code> + </DefaultValue> + <ParameterEditor> + <Id>1753950741781</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1754309475986</Id> + <Name>p_avgRatioHouseBatteryStorageCapacity_v_PVPower</Name> + <Description>https://www.essent.nl/thuisbatterij/capaciteit-thuisbatterij : Essent: "Over het algemeen kun je ervan uitgaan dat een thuisbatterij zo'n 1 à 1,5 kWh capaciteit nodig heeft per kWp zonnepanelen vermogen. " </Description> + <X>50</X> + <Y>1140</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>1.25</Code> + </DefaultValue> + <ParameterEditor> + <Id>1754309475984</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1755767836354</Id> + <Name>p_avgNrOfCarsPerHouse</Name> + <Description>https://opendata.cbs.nl/#/CBS/nl/dataset/85039NED/table?searchKeywords=motorvoertuigen -> 1.1</Description> + <X>50</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>1.1</Code> + </DefaultValue> + <ParameterEditor> + <Id>1755767836352</Id> + <Label>p_avgHousePVInstallationPower_kWp1</Label> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1755873729807</Id> + <Name>p_avgAnnualTravelDistancePrivateCar_km</Name> + <Description>https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-personenautos</Description> + <X>570</X> + <Y>730</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>11200</Code> + </DefaultValue> + <ParameterEditor> + <Id>1755873729805</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1755874747343</Id> + <Name>p_avgAnnualTravelDistanceSecondVSFirstCar_fr</Name> + <Description>Scaling factor used to scale down the average annual travel distance of the additional cars for households that have multiple cars. SOURCE!???</Description> + <X>570</X> + <Y>750</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0.6</Code> + </DefaultValue> + <ParameterEditor> + <Id>1755874747341</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1759233211509</Id> + <Name>map_yearlySummerWinterTimeStartHour</Name> + <Description>Map that contains data, with key per year, and value a pair where pair.getFirst() == summertimeStartHour and pair.getSecond() == winterTimeStartHour.</Description> + <X>1070</X> + <Y>400</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>Map<Integer, Pair<Double, Double>></Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>Map.of( +2023, new Pair<>(2018.0, 7247.0), +2024, new Pair<>(2162.0, 7203.0), +2025, new Pair<>(2114.0, 7131.0) +)</Code> + </DefaultValue> + <ParameterEditor> + <Id>1759233211507</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1760435457613</Id> + <Name>p_minHeatpumpElectricCapacity_kW</Name> + <Description>https://comfortklimaat.nl/collectie/warmtepompen -> Thermisch vermogen is minimaal 4. +https://www.bluesolid.nl/warmtepomp-monoblock-9-kw-1ph.html -> Thermisch vermogen van minimaal 5. +https://www.dewarmte.nl/all-electric-warmtepomp/ -> thermisch vermogen van 2-8 kW. + +-> (4+5+2)/3 -> Gemiddeld ongeveer 3.6 thermisch-> 3.6/3 = 1.2 elektrisch</Description> + <X>70</X> + <Y>600</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>1.2</Code> + </DefaultValue> + <ParameterEditor> + <Id>1760435457611</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1760435475991</Id> + <Name>p_minGasBurnerOutputCapacity_kW</Name> + <Description>https://www.warmteservice.nl/Verwarming/CV-ketel/HR-Combiketel/c/163 -> Minimum ranged van 4 - 7.8 -> gekozen voor 6 </Description> + <X>70</X> + <Y>690</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>6</Code> + </DefaultValue> + <ParameterEditor> + <Id>1760435475989</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1760435486680</Id> + <Name>p_minHydrogenBurnerOutputCapacity_kW</Name> + <Description>Zelfde gekozen als gasbrander.</Description> + <X>70</X> + <Y>780</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>6</Code> + </DefaultValue> + <ParameterEditor> + <Id>1760435486678</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1760435497667</Id> + <Name>p_minDistrictHeatingDeliverySetOutputCapacity_kW</Name> + <Description>25 kw is a default set: https://www.acm.nl/nl/energie/warmte-en-koude/warmtetarieven/tarieven-warmte-en-koude</Description> + <X>70</X> + <Y>960</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>25</Code> + </DefaultValue> + <ParameterEditor> + <Id>1760435497665</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1763396237774</Id> + <Name>p_avgOutputTemperatureHybridHeatpump_degC</Name> + <Description>https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/?utm_source=chatgpt.com - max 45-55 +https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 graden afgifte bij -10 graden. + +-> Voor nu gemiddeld 40 genomen.</Description> + <X>70</X> + <Y>560</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>40</Code> + </DefaultValue> + <ParameterEditor> + <Id>1763396237772</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + </Variables> + <Functions> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205530</Id> + <Name>f_setAVGC_data</Name> + <X>30</X> + <Y>50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>J_AVGC_data dataAVGC = new J_AVGC_data(); +zero_Loader.energyModel.avgc_data = dataAVGC; + +dataAVGC.p_avgHouseGasConsumption_m3_yr = p_avgHouseGasConsumption_m3_yr; +dataAVGC.p_avgHouseElectricityConsumption_kWh_yr = p_avgHouseElectricityConsumption_kWh_yr; +dataAVGC.p_avgEVMaxChargePowerVan_kW = p_avgEVMaxChargePowerVan_kW; +dataAVGC.p_avgHouseConnectionCapacity_kW = p_avgHouseConnectionCapacity_kW; +dataAVGC.p_avgHouseHeatingMethod = p_avgHouseHeatingMethod; +dataAVGC.p_avgNrOfCarsPerHouse = p_avgNrOfCarsPerHouse; +dataAVGC.p_ratioEVHousePersonalCars = p_shareOfElectricVehicleOwnership; +dataAVGC.p_avgEVMaxChargePowerCar_kW = p_avgEVMaxChargePowerCar_kW; +dataAVGC.p_avgEVMaxChargePowerTruck_kW = p_avgEVMaxChargePowerTruck_kW; +dataAVGC.p_avgEVStorageCar_kWh = p_avgEVStorageCar_kWh; +dataAVGC.p_avgEVStorageVan_kWh = p_avgEVStorageVan_kWh; +dataAVGC.p_avgHousePVInstallationPower_kWp = p_avgHousePVInstallationPower_kWp; +dataAVGC.p_avgEVStorageTruck_kWh = p_avgEVStorageTruck_kWh; +dataAVGC.p_ratioHouseInstalledPV = p_ratioHouseInstalledPV; +dataAVGC.p_gas_kWhpm3 = p_gas_kWhpm3; +dataAVGC.p_diesel_kWhpl = p_diesel_kWhpl; +dataAVGC.p_gasoline_kWhpl = p_gasoline_kWhpl; +dataAVGC.p_waterHeatCapacity_JpkgK = p_waterHeatCapacity_JpkgK; +dataAVGC.p_waterDensity_kgpm3 = p_waterDensity_kgpm3; +dataAVGC.p_avgUtilityHeatingMethod = p_avgUtilityHeatingMethod; +dataAVGC.p_avgUtilityConnectionCapacity_kW = p_avgUtilityConnectionCapacity_kW; +dataAVGC.p_avgUtilityPVPower_kWp = p_avgUtilityPVPower_kWp; +dataAVGC.p_ratioElectricTrucks = p_ratioElectricTrucks; +dataAVGC.p_avgCompanyHeatingMethod = p_avgCompanyHeatingMethod; +dataAVGC.p_avgEVEnergyConsumptionCar_kWhpkm = p_avgEVEnergyConsumptionCar_kWhpkm; +dataAVGC.p_avgEVEnergyConsumptionVan_kWhpkm = p_avgEVEnergyConsumptionVan_kWhpkm; +dataAVGC.p_avgEVEnergyConsumptionTruck_kWhpkm = p_avgEVEnergyConsumptionTruck_kWhpkm; +dataAVGC.p_hydrogenEnergyDensity_kWh_Nm3 = p_hydrogenEnergyDensity_kWh_Nm3; +dataAVGC.p_avgDieselConsumptionCar_kmpl = p_avgDieselConsumptionCar_kmpl; +dataAVGC.p_avgGasolineConsumptionCar_kmpl = p_avgGasolineConsumptionCar_kmpl; +dataAVGC.p_hydrogenSpecificEnergy_kWh_kg = p_hydrogenSpecificEnergy_kWh_kg; +dataAVGC.p_hydrogenDensity_kg_Nm3 = p_hydrogenDensity_kg_Nm3; +dataAVGC.p_oxygenDensity_kg_Nm3 = p_oxygenDensity_kg_Nm3; +dataAVGC.p_avgCOPHeatpump = p_avgCOPHeatpump; +dataAVGC.p_avgEfficiencyHeatpump_fr = p_avgEfficiencyHeatpump_fr; +dataAVGC.p_avgDieselConsumptionCar_kWhpkm = p_avgDieselConsumptionCar_kWhpkm; +dataAVGC.p_oxygenProduction_kgO2pkgH2 = p_oxygenProduction_kgO2pkgH2; +dataAVGC.p_avgGasolineConsumptionCar_kWhpkm = p_avgGasolineConsumptionCar_kWhpkm; +dataAVGC.p_avgDieselConsumptionVan_kmpl = p_avgDieselConsumptionVan_kmpl; +dataAVGC.p_avgDieselConsumptionVan_kWhpkm = p_avgDieselConsumptionVan_kWhpkm; +dataAVGC.p_avgDieselConsumptionTruck_kmpl = p_avgDieselConsumptionTruck_kmpl; +dataAVGC.p_avgDieselConsumptionTruck_kWhpkm = p_avgDieselConsumptionTruck_kWhpkm; +dataAVGC.p_avgOutputTemperatureElectricHeatpump_degC = p_avgOutputTemperatureElectricHeatpump_degC; +dataAVGC.p_avgOutputTemperatureHybridHeatpump_degC = p_avgOutputTemperatureHybridHeatpump_degC; +dataAVGC.p_avgHydrogenConsumptionCar_kWhpkm = p_avgHydrogenConsumptionCar_kWhpkm; +dataAVGC.p_avgEfficiencyGasBurner_fr = p_avgEfficiencyGasBurner_fr; +dataAVGC.p_avgHydrogenConsumptionVan_kWhpkm = p_avgHydrogenConsumptionVan_kWhpkm; +dataAVGC.p_avgHydrogenConsumptionTruck_kWhpkm = p_avgHydrogenConsumptionTruck_kWhpkm; +dataAVGC.p_avgOutputTemperatureGasBurner_degC = p_avgOutputTemperatureGasBurner_degC; +dataAVGC.p_avgEfficiencyHydrogenBurner_fr = p_avgEfficiencyHydrogenBurner_fr; +dataAVGC.p_avgOutputTemperatureHydrogenBurner_degC = p_avgOutputTemperatureHydrogenBurner_degC; +dataAVGC.p_minHeatpumpElectricCapacity_kW = p_minHeatpumpElectricCapacity_kW; +dataAVGC.p_minGasBurnerOutputCapacity_kW = p_minGasBurnerOutputCapacity_kW; +dataAVGC.p_minHydrogenBurnerOutputCapacity_kW = p_minHydrogenBurnerOutputCapacity_kW; +dataAVGC.p_minDistrictHeatingDeliverySetOutputCapacity_kW = p_minDistrictHeatingDeliverySetOutputCapacity_kW; +dataAVGC.p_avgPVPower_kWpm2= p_avgPVPower_kWpm2; +dataAVGC.p_avgRatioRoofPotentialPV = p_avgRatioRoofPotentialPV; +dataAVGC.p_avgRatioBatteryCapacity_v_Power = p_avgRatioBatteryCapacity_v_Power; +dataAVGC.p_avgRatioHouseBatteryStorageCapacity_v_PVPower = p_avgRatioHouseBatteryStorageCapacity_v_PVPower; +dataAVGC.p_avgSolarFieldPower_kWppha = p_avgSolarFieldPower_kWppha; +dataAVGC.p_avgEfficiencyCHP_thermal_fr = p_avgEfficiencyCHP_thermal_fr; +dataAVGC.p_avgEfficiencyCHP_electric_fr = p_avgEfficiencyCHP_thermal_fr; +dataAVGC.p_avgOutputTemperatureCHP_degC = p_avgEfficiencyCHP_thermal_fr; +dataAVGC.p_avgEfficiencyDistrictHeatingDeliverySet_fr = p_avgEfficiencyDistrictHeatingDeliverySet_fr; +dataAVGC.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC = p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; +dataAVGC.p_v1gProbability = p_v1gProbability; +dataAVGC.p_v2gProbability = p_v2gProbability; +dataAVGC.p_avgEVsPerPublicCharger = p_avgEVsPerPublicCharger; +dataAVGC.p_avgPTPower_kWpm2 = p_avgPTPower_kWpm2; +dataAVGC.p_avgPTPanelSize_m2 = p_avgPTPanelSize_m2; +dataAVGC.p_avgMaxHeatBufferTemperature_degC = p_avgMaxHeatBufferTemperature_degC; +dataAVGC.p_avgMinHeatBufferTemperature_degC = p_avgMinHeatBufferTemperature_degC; +dataAVGC.p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 = p_avgHeatBufferWaterVolumePerPTSurface_m3pm2; +dataAVGC.p_avgHeatBufferWaterVolumePerHPPower_m3pkW = p_avgHeatBufferWaterVolumePerHPPower_m3pkW; +dataAVGC.p_avgAnnualTravelDistancePrivateCar_km = p_avgAnnualTravelDistancePrivateCar_km; +dataAVGC.p_avgAnnualTravelDistanceCompanyCar_km = p_avgAnnualTravelDistanceCompanyCar_km; +dataAVGC.p_avgAnnualTravelDistanceVan_km = p_avgAnnualTravelDistanceVan_km; +dataAVGC.p_avgAnnualTravelDistanceTruck_km = p_avgAnnualTravelDistanceTruck_km;</Body> + </Function> + </Functions> + <AgentLinks> + <AgentLink> + <Id>1726584205728</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <ContainerLinks> + <ContainerLink> + <Id>1726584830548</Id> + <Name>zero_Loader</Name> + <X>50</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>Zero_Loader</ClassName> + </ActiveObjectClass> + </ContainerLink> + </ContainerLinks> + <Presentation> + <Level> + <Id>1726584205534</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1726584205536</Id> + <Name>rect_constants</Name> + <X>1020</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>896.894</Width> + <Height>1400</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1726584205538</Id> + <Name>rect_avg</Name> + <X>0.737</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>1019.263</Width> + <Height>1400</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205540</Id> + <Name>txt_houses</Name> + <X>40</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Average values for houses</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205542</Id> + <Name>txt_avgCompanies</Name> + <X>40</X> + <Y>280</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Average values for companies/utilities</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205544</Id> + <Name>txt_avgEV</Name> + <X>560</X> + <Y>75</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Average values for Electric Vehicles</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205546</Id> + <Name>text3</Name> + <X>1440</X> + <Y>40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Constants</Text> + <Font> + <Name>SansSerif</Name> + <Size>24</Size> + <Style>1</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1726584205548</Id> + <Name>text4</Name> + <X>1060</X> + <Y>200</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Energy conversion constants</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205550</Id> + <Name>text5</Name> + <X>480</X> + <Y>40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Averages</Text> + <Font> + <Name>SansSerif</Name> + <Size>24</Size> + <Style>1</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Rectangle> + <Id>1726584205552</Id> + <Name>rect_hydrogenC</Name> + <X>1560</X> + <Y>100</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16711681</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>200</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205554</Id> + <Name>txt_hydrogenC</Name> + <X>1580</X> + <Y>120</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Hydrogen constants</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205556</Id> + <Name>txt_avgFossil</Name> + <X>560</X> + <Y>360</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Average values for Fossil fueled vehicles</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205558</Id> + <Name>txt_Heatassets</Name> + <X>40</X> + <Y>470</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Heat assets</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205560</Id> + <Name>txt_avgPV</Name> + <X>40</X> + <Y>990</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>PV panels</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205562</Id> + <Name>txt_avgBat</Name> + <X>40</X> + <Y>1095</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Batteries</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205564</Id> + <Name>txt_avgFCV</Name> + <X>560</X> + <Y>610</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Average values for Hydrogen vehicles</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205566</Id> + <Name>txt_heatpumps</Name> + <X>60</X> + <Y>490</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Heatpumps</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205568</Id> + <Name>txt_gasburners</Name> + <X>60</X> + <Y>620</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Gasburners</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205570</Id> + <Name>txt_hydrogenburners</Name> + <X>60</X> + <Y>710</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Hydrogenburners</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205572</Id> + <Name>rect_sendToEngine</Name> + <X>10</X> + <Y>10</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-65536</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>170</Width> + <Height>60</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205574</Id> + <Name>txt_valuesToEngine</Name> + <X>20</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Send values to Engine</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205576</Id> + <Name>txt_timeC</Name> + <X>1060</X> + <Y>120</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Time constants</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726743791200</Id> + <Name>text</Name> + <X>40</X> + <Y>1160</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Chargingcentres</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1728032240347</Id> + <Name>txt_avgTravelDistances</Name> + <X>560</X> + <Y>700</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Average travel distances per vehicle type</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1745316061345</Id> + <Name>txt_CHP</Name> + <X>60</X> + <Y>800</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>CHP</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1747314897311</Id> + <Name>txt_districtHeatingDeliverySet</Name> + <X>60</X> + <Y>890</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>District Heating delivery set</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1751906160194</Id> + <Name>txt_avgHeatBuffer</Name> + <X>560</X> + <Y>980</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Heat Buffer</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1751906173848</Id> + <Name>txt_avgPT</Name> + <X>560</X> + <Y>900</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>PT panels</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1759233222368</Id> + <Name>txt_timeConstants</Name> + <X>1060</X> + <Y>370</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Time constants</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Level> + </Presentation> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1709049506453</Id> + <Name>tabArea</Name> + <Folder>1754045642067</Folder> + <Generic>false</Generic> + <GenericParameter> + <Id>1709049506461</Id> + <Name>1709049506461</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089980</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1709107200000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1709049506456</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1709049506460</CurrentLevel> + <ConnectionsId>1709049506454</ConnectionsId> + <AgentLinks> + <AgentLink> + <Id>1709049506454</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <Presentation> + <Level> + <Id>1709049506460</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + </Level> + </Presentation> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1722253463895</Id> + <Name>tabEHub</Name> + <AdditionalClassCode>public ShapeGroup getGroupHubSliders() { + return this.gr_hubSliders; +} + +public ShapeButton getButton_remove_nfato() { + return this.button_remove_nfato; +} + +public ShapeButton getButton_createEnergyHub() { + return this.button_createEnergyHub; +}</AdditionalClassCode> + <Folder>1754045642067</Folder> + <ExtendsReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>tabArea</ClassName> + </ExtendsReference> + <Generic>false</Generic> + <GenericParameter> + <Id>1722253463901</Id> + <Name>1722253463901</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089979</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1722326400000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1722253463898</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1722253463902</CurrentLevel> + <ConnectionsId>1722253463896</ConnectionsId> + <Variables> + <Variable Class="PlainVariable"> + <Id>1722256365490</Id> + <Name>b_NFATOListener</Name> + <X>740</X> + <Y>915</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>boolean</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1722256365499</Id> + <Name>v_nfatoFirstGC</Name> + <X>740</X> + <Y>855</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>GridConnection</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1722256365507</Id> + <Name>v_nfatoSecondGC</Name> + <X>740</X> + <Y>875</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>GridConnection</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1722256365515</Id> + <Name>b_nfatoWeekendDistinction</Name> + <X>740</X> + <Y>895</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>boolean</Type> + <InitialValue Class="CodeValue"> + <Code>false</Code> + </InitialValue> + </Properties> + </Variable> + </Variables> + <Functions> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1722256365452</Id> + <Name>f_setNFATO</Name> + <Description>Sets the relevant parameters in the engine for the NFATO. The first selected GC will receive capacity from the second GC.</Description> + <X>740</X> + <Y>790</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>weekCapacities</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>weekendCapacities</Name> + <Type>double[]</Type> + </Parameter> + <Body>GridConnection gc1 = v_nfatoFirstGC; +GridConnection gc2 = v_nfatoSecondGC; + +// Reset the GC Capacities if they already had a NF-ATO +gc1.f_nfatoSetConnectionCapacity(true); +gc2.f_nfatoSetConnectionCapacity(true); + +switch (rb_deliveryOrFeedin.getValue()) { + case 0: // Delivery + // Set the variables of the GCs + for (int i = 0; i < 24; i++) { + gc1.v_nfatoWeekDeliveryCapacity_kW[i] += weekCapacities[i]; + gc2.v_nfatoWeekDeliveryCapacity_kW[i] += -weekCapacities[i]; + gc1.v_nfatoWeekendDeliveryCapacity_kW[i] += weekendCapacities[i]; + gc2.v_nfatoWeekendDeliveryCapacity_kW[i] += -weekendCapacities[i]; + } + break; + + case 1: // Feed In + // Set the variables of the GCs + for (int i = 0; i < 24; i++) { + gc1.v_nfatoWeekFeedinCapacity_kW[i] += weekCapacities[i]; + gc2.v_nfatoWeekFeedinCapacity_kW[i] += -weekCapacities[i]; + gc1.v_nfatoWeekendFeedinCapacity_kW[i] += weekendCapacities[i]; + gc2.v_nfatoWeekendFeedinCapacity_kW[i] += -weekendCapacities[i]; + } + break; + + case 2: // Both + // Set the variables of the GCs + for (int i = 0; i < 24; i++) { + gc1.v_nfatoWeekDeliveryCapacity_kW[i] += weekCapacities[i]; + gc2.v_nfatoWeekDeliveryCapacity_kW[i] += -weekCapacities[i]; + gc1.v_nfatoWeekendDeliveryCapacity_kW[i] += weekendCapacities[i]; + gc2.v_nfatoWeekendDeliveryCapacity_kW[i] += -weekendCapacities[i]; + + gc1.v_nfatoWeekFeedinCapacity_kW[i] += weekCapacities[i]; + gc2.v_nfatoWeekFeedinCapacity_kW[i] += -weekCapacities[i]; + gc1.v_nfatoWeekendFeedinCapacity_kW[i] += weekendCapacities[i]; + gc2.v_nfatoWeekendFeedinCapacity_kW[i] += -weekendCapacities[i]; + } + break; + + default: + throw new IllegalStateException("Invalid Setting in rb_deliveryOrFeedin"); +} + +// Update the Connection Capacity if it is needed at the current time +gc1.f_nfatoSetConnectionCapacity(false); +gc2.f_nfatoSetConnectionCapacity(false); + +gc1.v_enableNFato = true; +gc2.v_enableNFato = true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722256365459</Id> + <Name>f_checkGISRegion</Name> + <Description>When b_NFATOListener is true checks wether the selected coordinates are a valid GC for the NFATO. If so saves the GC and updates the text fields</Description> + <X>740</X> + <Y>700</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>clickx</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>clicky</Name> + <Type>double</Type> + </Parameter> + <Body>//Check if click was on Building +for ( GIS_Building b : zero_Interface.energyModel.pop_GIS_Buildings ){ + if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ + if (b.gisRegion.isVisible()) { + GridConnection GC = b.c_containedGridConnections.get(0); + if (GC != null && GC != v_nfatoFirstGC) { + // found a valid GC + // Check if it is the first GC + if (v_nfatoFirstGC == null) { + t_nfatoFirstBuilding.setText(GC.p_ownerID + " zal ontvangen"); + t_nfatoSecondBuilding.setText("Klik op een gebouw dat zijn capaciteit gaat afstaan"); + v_nfatoFirstGC = GC; + //for (GIS_Building b : GC.c_connectedBuildings) { + //b.gisRegion.setFillColor(v_selectionColorAddBuildings); + //} + } + else { + v_nfatoSecondGC = GC; + t_nfatoSecondBuilding.setText(GC.p_ownerID + " zal leveren"); + //for (GIS_Building b : GC.c_connectedBuildings) { + //b.gisRegion.setFillColor(v_selectionColorAddBuildings); + //} + // We found two buildings, return to the default clicking functionality + b_NFATOListener = false; + } + } + } + } +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1722256365466</Id> + <Name>f_checkNFATO</Name> + <Description>Checks if the current NFATO settings could generate a valid contract. Returns true if NFATO is possible.</Description> + <X>740</X> + <Y>760</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>weekCapacities</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>weekendCapacities</Name> + <Type>double[]</Type> + </Parameter> + <Body>GridConnection gc1 = v_nfatoFirstGC; +GridConnection gc2 = v_nfatoSecondGC; + +if (gc1 == null || gc2 == null || gc1 == gc2) { + throw new IllegalStateException("Invalid Non-Firm ATO Settings, Please select two gridconnections"); +} + +double[] weekTestDelivery = new double[24]; +double[] weekendTestDelivery = new double[24]; +double[] weekTestFeedin = new double[24]; +double[] weekendTestFeedin = new double[24]; + +double maxDeliveryCapacity_kW; +double maxFeedinCapacity_kW; + +switch (rb_deliveryOrFeedin.getValue()) { + case 0: // Delivery + for (int i = 0; i < 24; i++) { + weekTestDelivery[i] = weekCapacities[i] - gc2.v_nfatoWeekDeliveryCapacity_kW[i]; + weekendTestDelivery[i] = weekendCapacities[i] - gc2.v_nfatoWeekendDeliveryCapacity_kW[i]; + } + maxDeliveryCapacity_kW = max(max(weekTestDelivery), max(weekendTestDelivery)); + // Reset the GC Capacity in case they already had a NF-ATO + gc2.f_nfatoSetConnectionCapacity(true); + // Check if gc2 has enough capacity with the original connection capacity + if ( maxDeliveryCapacity_kW > gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); + } + else { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + return true; + } + + case 1: // Feed In + for (int i = 0; i < 24; i++) { + weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; + weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; + } + maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); + // Reset the GC Capacity in case they already had a NF-ATO + gc2.f_nfatoSetConnectionCapacity(true); + // Check if gc2 has enough capacity with the original connection capacity + if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); + } + else { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + return true; + } + + case 2: // Both + for (int i = 0; i < 24; i++) { + weekTestDelivery[i] = weekCapacities[i] - gc2.v_nfatoWeekDeliveryCapacity_kW[i]; + weekendTestDelivery[i] = weekendCapacities[i] - gc2.v_nfatoWeekendDeliveryCapacity_kW[i]; + } + for (int i = 0; i < 24; i++) { + weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; + weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; + } + + maxDeliveryCapacity_kW = max(max(weekTestDelivery), max(weekendTestDelivery)); + maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); + // Reset the GC Capacity in case they already had a NF-ATO + gc2.f_nfatoSetConnectionCapacity(true); + // Check if gc2 has enough capacity with the original connection capacity + if ( maxDeliveryCapacity_kW > gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); + } + else if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); + } + else { + // Restore previous NF-ATO + gc2.f_nfatoSetConnectionCapacity(false); + return true; + } + + default: + throw new IllegalStateException("Invalid Setting in rb_deliveryOrFeedin"); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double[][]</ReturnType> + <Id>1722256365474</Id> + <Name>f_constructNFATOArrays</Name> + <Description>Uses the NFATO slider values to construct two arrays of the change in capacity at every hour. One array for weekdays, one for weekends</Description> + <X>740</X> + <Y>730</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>// Construct arrays from slider values +// Week +int weekStart_h = (int) sl_nfatoWeekStartTime.getValue(); +int weekEnd_h = (int) sl_nfatoWeekEndTime.getValue(); +int weekCapacity_kW = (int) sl_nfatoWeekCapacity.getValue(); + +double[] weekCapacities = new double[24]; +double[] weekendCapacities = new double[24]; + +if (weekStart_h < weekEnd_h) { + for (int i = 0; i < weekStart_h; i++) { + weekCapacities[i] = 0; + } + for (int j = weekStart_h; j < weekEnd_h; j ++) { + weekCapacities[j] = weekCapacity_kW; + } + for (int k = weekEnd_h; k < 24; k ++) { + weekCapacities[k] = 0; + } +} +else { // If the start time is higher than the end time we share capacity at night + for (int i = 0; i < weekEnd_h; i++) { + weekCapacities[i] = weekCapacity_kW; + } + for (int j = weekEnd_h; j < weekStart_h ; j ++) { + weekCapacities[j] = 0; + } + for (int k = weekStart_h; k < 24; k ++) { + weekCapacities[k] = weekCapacity_kW; + } +} + +if (b_nfatoWeekendDistinction) { + // repeat above code for weekend + int weekendStart_h = (int) sl_nfatoWeekendStartTime.getValue(); + int weekendEnd_h = (int) sl_nfatoWeekendEndTime.getValue(); + int weekendCapacity_kW = (int) sl_nfatoWeekendCapacity.getValue(); + + + if (weekendStart_h < weekendEnd_h) { + for (int i = 0; i < weekendStart_h; i++) { + weekendCapacities[i] = 0; + } + for (int j = weekendStart_h; j < weekendEnd_h; j ++) { + weekendCapacities[j] = weekendCapacity_kW; + } + for (int k = weekendEnd_h; k < 24; k ++) { + weekendCapacities[k] = 0; + } + } + else { // If the start time is higher than the end time we share capacity at night + for (int i = 0; i < weekendEnd_h; i++) { + weekendCapacities[i] = weekendCapacity_kW; + } + for (int j = weekendEnd_h; j < weekendStart_h; j ++) { + weekendCapacities[j] = 0; + } + for (int k = weekendStart_h; k < 24; k ++) { + weekendCapacities[k] = weekendCapacity_kW; + } + } +} +else { + // no distinction means the settings are the same during the weekend + weekendCapacities = weekCapacities; +} + +double[][] arr = {weekCapacities, weekendCapacities}; +return arr;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722256365483</Id> + <Name>f_resetNFATOSettings</Name> + <Description>Resets the group of NFATO Settings after a contract is added or canceled.</Description> + <X>740</X> + <Y>820</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>t_nfatoFirstBuilding.setText("Klik op een gebouw dat capaciteit gaat ontvangen"); +t_nfatoSecondBuilding.setText(""); +v_nfatoFirstGC = null; +v_nfatoSecondGC = null; +b_NFATOListener = false;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722256998182</Id> + <Name>f_setTab</Name> + <Description>Function that ensures the correct tab is visible</Description> + <X>460</X> + <Y>710</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>selectedTabType</Name> + <Type>EnergyDemandTab</Type> + </Parameter> + <Body>if (selectedTabType == EnergyDemandTab.NFATO) { + gr_nfatoSettings.setVisible(true); + gr_hubSliders.setVisible(false); +} +else { + gr_nfatoSettings.setVisible(false); + gr_hubSliders.setVisible(true); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754923608234</Id> + <Name>f_updateSliders_EHub</Name> + <X>460</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Function that can be used to update sliders/buttons to the engine state +//--> empty for now</Body> + </Function> + </Functions> + <AgentLinks> + <AgentLink> + <Id>1722253463896</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <ContainerLinks> + <ContainerLink> + <Id>1722253479511</Id> + <Name>uI_Tabs</Name> + <X>50</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>UI_Tabs</ClassName> + </ActiveObjectClass> + </ContainerLink> + <ContainerLink> + <Id>1722253479513</Id> + <Name>zero_Interface</Name> + <X>150</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>Zero_Interface</ClassName> + </ActiveObjectClass> + </ContainerLink> + <ContainerLink> + <Id>1753694295449</Id> + <Name>uI_EnergyHub</Name> + <X>310</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>UI_EnergyHub</ClassName> + </ActiveObjectClass> + </ContainerLink> + </ContainerLinks> + <Presentation> + <Level> + <Id>1722253463902</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1722344806530</Id> + <Name>rect_generalFunctions</Name> + <X>430</X> + <Y>650</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>230</Width> + <Height>170</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1722344586686</Id> + <Name>rect_nfatoFunctions</Name> + <X>700</X> + <Y>650</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16711936</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>300</Width> + <Height>300</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Group> + <Id>1722253487925</Id> + <Name>gr_hubSliders</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1722253487927</Id> + <Name>rect_hubSliders</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-3736634</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253487949</Id> + <Name>button_add_nfato</Name> + <X>20</X> + <Y>45</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="160" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <VisibleCode>//!zero_Interface.settings.isPublicModel()</VisibleCode> + <Enabled>true</Enabled> + <EnableExpression>!zero_Interface.settings.isPublicModel()</EnableExpression> + <ActionCode>/* +if (v_NFATOListener) { + // This should not be reachable anymore + traceln("Quitting NF ATO settings"); + v_NFATOListener = false; + return; +} +*/ + +if (zero_Interface.v_clickedObjectType != null && zero_Interface.v_clickedObjectType == OL_GISObjectType.BUILDING && zero_Interface.c_selectedGridConnections.size() != 0) { + v_nfatoFirstGC = zero_Interface.c_selectedGridConnections.get(0); + t_nfatoFirstBuilding.setText(v_nfatoFirstGC.p_ownerID + " zal ontvangen"); + t_nfatoSecondBuilding.setText("Klik op een gebouw dat zijn capaciteit gaat afstaan"); +} + +// When this boolean is true clicking on the GIS Map will select another building for the NF ATO +b_NFATOListener = true; +f_setTab(NFATO); + + +if (b_nfatoWeekendDistinction) { + t_nfatoWeek.setVisible(true); + t_nfatoWeekend.setVisible(true); + sl_nfatoWeekendStartTime.setVisible(true); + sl_nfatoWeekendEndTime.setVisible(true); + sl_nfatoWeekendCapacity.setVisible(true); +} +else { + t_nfatoWeek.setVisible(false); + t_nfatoWeekend.setVisible(false); + sl_nfatoWeekendStartTime.setVisible(false); + sl_nfatoWeekendEndTime.setVisible(false); + sl_nfatoWeekendCapacity.setVisible(false); +} + + +// TODO: Color the companies on the GIS Map (e.g. according to grid topology)</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>Voeg Non-Firm ATO toe</LabelText> + </ExtendedProperties> + </Control> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253487951</Id> + <Name>button_remove_nfato</Name> + <X>190</X> + <Y>45</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="160" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <VisibleCode>!zero_Interface.settings.isPublicModel()</VisibleCode> + <Enabled>true</Enabled> + <ActionCode>for (GridConnection GC : zero_Interface.energyModel.f_getActiveGridConnections()) { + GC.f_nfatoSetConnectionCapacity(true); + GC.v_enableNFato = false; + GC.v_nfatoWeekDeliveryCapacity_kW = new double[24]; + GC.v_nfatoWeekendDeliveryCapacity_kW = new double[24]; + GC.v_nfatoWeekFeedinCapacity_kW = new double[24]; + GC.v_nfatoWeekendFeedinCapacity_kW = new double[24]; +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +button_remove_nfato.setEnabled(false); + +zero_Interface.f_resetSettings();</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>Verwijder alle NF ATOs</LabelText> + </ExtendedProperties> + </Control> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1753434467432</Id> + <Name>button_createEnergyHub</Name> + <X>40</X> + <Y>130</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="290" Height="70"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <EnableExpression>!zero_Interface.settings.isPublicModel()</EnableExpression> + <ActionCode>zero_Interface.f_startEnergyHubConfiguration();</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>Creeër je eigen Energie Hub</LabelText> + </ExtendedProperties> + </Control> + <Text> + <Id>1754990508102</Id> + <Name>txt_NonFirmAtoOptions</Name> + <X>185</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Non-Firm ATO opties</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1754990563477</Id> + <Name>txt_energyHubOptions</Name> + <X>185</X> + <Y>105</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Energie Hub</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1762248467148</Id> + <Name>button_loadScenario</Name> + <X>40</X> + <Y>260</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="290" Height="70"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <EnableExpression>!zero_Interface.settings.isPublicModel()</EnableExpression> + <ActionCode>// First check if there are any save files, if there are none we display an error screen + +zero_Interface.uI_EnergyHub.f_initializeUserSavedScenarios(zero_Interface.uI_EnergyHub.combobox_selectScenario); +if (zero_Interface.uI_EnergyHub.combobox_selectScenario.getItems().length == 0) { + zero_Interface.f_setErrorScreen("Er zijn nog geen scenario's opgeslagen.", 0, 0); + return; +} + +zero_Interface.f_setLoadingScreen(true, 0, 0); + +new Thread( () -> { + // Opens the filter menu on the main interface + zero_Interface.f_startEnergyHubConfiguration(); + + // Add a manual select to the filter with all (active) gridconnections + // We should follow the usual procedure of creating an E-Hub so that the user could cancel and reconfigure + zero_Interface.f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); + zero_Interface.c_selectedGridConnections = zero_Interface.energyModel.f_getActiveGridConnections(); + zero_Interface.f_applyFilter(OL_FilterOptionsGC.MANUAL_SELECTION, ""); + + zero_Interface.f_setLoadingScreen(false, 0, 0); + + // Create a coop with the selection + zero_Interface.f_finalizeEnergyHubConfiguration(); + + // Select load scenario in the E-Hub configurator + zero_Interface.uI_EnergyHub.button_loadScenario.action(); + +}).start(); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>Laad een opgeslagen scenario in</LabelText> + </ExtendedProperties> + </Control> + <Text> + <Id>1762248467153</Id> + <Name>txt_loadScenario</Name> + <X>180</X> + <Y>230</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Opgeslagen Scenario's</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1722253509588</Id> + <Name>gr_nfatoSettings</Name> + <X>0</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <XCode>0</XCode> + <YCode>0</YCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1722253509590</Id> + <Name>rect_nfatoSettings</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-3736634</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722253509592</Id> + <Name>t_nfatoFirstBuilding</Name> + <X>25</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Klik op een gebouw dat capaciteit gaat ontvangen</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253509594</Id> + <Name>t_nfatoSecondBuilding</Name> + <X>25</X> + <Y>50</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text/> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253509596</Id> + <Name>sl_nfatoWeekStartTime</Name> + <X>125</X> + <Y>180</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>8</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>24</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="CheckBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253509598</Id> + <Name>cb_nfatoWeekendDistinction</Name> + <X>25</X> + <Y>75</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="190" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>if (b_nfatoWeekendDistinction) { + t_nfatoWeek.setVisible(true); + t_nfatoWeekend.setVisible(true); + sl_nfatoWeekendStartTime.setVisible(true); + sl_nfatoWeekendEndTime.setVisible(true); + sl_nfatoWeekendCapacity.setVisible(true); +} +else { + t_nfatoWeek.setVisible(false); + t_nfatoWeekend.setVisible(false); + sl_nfatoWeekendStartTime.setVisible(false); + sl_nfatoWeekendEndTime.setVisible(false); + sl_nfatoWeekendCapacity.setVisible(false); +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="14" Style="0"/> + <LabelText>verschil week & weekend</LabelText> + <LinkTo>true</LinkTo> + <Link>b_nfatoWeekendDistinction</Link> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253509600</Id> + <Name>sl_nfatoWeekEndTime</Name> + <X>125</X> + <Y>210</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>20</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>24</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253509602</Id> + <Name>sl_nfatoWeekCapacity</Name> + <X>125</X> + <Y>245</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>100</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>2000</MaxValue> + <Step>10</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253509604</Id> + <Name>button_confirm_nfato</Name> + <X>45</X> + <Y>285</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="155" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>if (sl_nfatoWeekStartTime.getValue() == sl_nfatoWeekEndTime.getValue()) { + traceln("Week start time is the same as end time"); +} +else if (sl_nfatoWeekendStartTime.getValue() == sl_nfatoWeekendEndTime.getValue()) { + traceln("Weekend start time is the same as end time"); +} +else { + double[][] arr = f_constructNFATOArrays(); + //traceln("f_constructNFATOArraysFromSliders: " + Arrays.toString(arr[0])); + //traceln("f_constructNFATOArraysFromSliders: " + Arrays.toString(arr[1])); + + double[] weekCapacities = arr[0]; + double[] weekendCapacities = arr[1]; + + if (f_checkNFATO(weekCapacities, weekendCapacities)) { + f_setNFATO(weekCapacities, weekendCapacities); + f_setTab(HUB); + // reset the nfato settings + f_resetNFATOSettings(); + zero_Interface.f_resetSettings(); + + button_remove_nfato.setEnabled(true); + + //Update variable to change to custom scenario + if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); + } + } +} + +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>Voeg Non-Firm ATO toe</LabelText> + </ExtendedProperties> + </Control> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253509606</Id> + <Name>button_cancel_nfato</Name> + <X>275</X> + <Y>285</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="75" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>f_setTab(HUB); +f_resetNFATOSettings();</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>cancel</LabelText> + </ExtendedProperties> + </Control> + <Text> + <Id>1722253509608</Id> + <Name>t_nfatoWeekStartTime</Name> + <X>20</X> + <Y>185</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Start tijd (uur)</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253509610</Id> + <Name>t_nfatoWeekEndTime</Name> + <X>20</X> + <Y>215</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Eind tijd (uur)</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253509612</Id> + <Name>t_nfatoWeekStartTime2</Name> + <X>10</X> + <Y>250</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Capaciteit (kW)</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253509614</Id> + <Name>t_nfatoWeek</Name> + <X>155</X> + <Y>155</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Week +</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253509616</Id> + <Name>t_nfatoWeekend</Name> + <X>265</X> + <Y>155</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Weekend +</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253509618</Id> + <Name>sl_nfatoWeekendStartTime</Name> + <X>247</X> + <Y>180</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>8</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>24</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253509620</Id> + <Name>sl_nfatoWeekendEndTime</Name> + <X>247</X> + <Y>210</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>20</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>24</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253509622</Id> + <Name>sl_nfatoWeekendCapacity</Name> + <X>247</X> + <Y>245</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>100</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>2000</MaxValue> + <Step>10</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="RadioButtons"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1725970287541</Id> + <Name>rb_deliveryOrFeedin</Name> + <X>25</X> + <Y>105</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="70" Height="70"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <DefaultValueCode>2</DefaultValueCode> + <Orientation>VERTICAL</Orientation> + <Button>Delivery</Button> + <Button>Feed in</Button> + <Button>Both</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + </Presentation> + </Group> + <Text> + <Id>1722256365442</Id> + <Name>t_nfatoFunctionsDescription</Name> + <X>850</X> + <Y>655</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>NF ATO Functions</Text> + <Font> + <Name>Dialog</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722344870135</Id> + <Name>t_generalFunctionsDescription</Name> + <X>460</X> + <Y>660</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>General Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Level> + </Presentation> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1722247653561</Id> + <Name>tabElectricity</Name> + <AdditionalClassCode>// Default Sliders +public ShapeGroup getGroupElectricityDemandSliders() { + return this.gr_electricitySliders_default; +} + +public ShapeGroup getGroupElectricityDemandSliders_Businesspark() { + return this.gr_electricitySliders_businesspark; +} + +public ShapeGroup getGroupElectricityDemandSliders_ResidentialArea() { + return this.gr_electricitySliders_residential; +} +public ShapeSlider getSliderElectricityDemandReduction_pct() { + return this.sl_electricityDemandReduction_pct; +} + +public ShapeSlider getSliderRooftopPVCompanies_pct(){ + return this.sl_rooftopPVCompanies_pct; +} + +public ShapeSlider getSliderLargeScalePV_ha(){ + return this.sl_largeScalePV_ha; +} + +public ShapeSlider getSliderLargeScalePV_ha_Businesspark(){ + return this.sl_largeScalePV_ha_Businesspark; +} + +public ShapeSlider getSliderRooftopPVHouses_pct(){ + return this.sl_rooftopPVHouses_pct; +} + +public ShapeSlider getWindSlider(){ + return this.sl_largeScaleWind_MW; +} + +public ShapeSlider getSl_rooftopPVCompanies_pct_Businesspark(){ + return this.sl_rooftopPVCompanies_pct_Businesspark; +}</AdditionalClassCode> + <Folder>1754045642067</Folder> + <Import>import zeroPackage.ZeroMath;</Import> + <ExtendsReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>tabArea</ClassName> + </ExtendsReference> + <Generic>false</Generic> + <GenericParameter> + <Id>1722247653567</Id> + <Name>1722247653567</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089978</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1722326400000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1722247653564</Id> + <Name>scale</Name> + <X>0</X> + <Y>-240</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1722247653568</CurrentLevel> + <ConnectionsId>1722247653562</ConnectionsId> + <Variables> + <Variable Class="Parameter"> + <Id>1745483322704</Id> + <Name>p_currentPVOnLand_ha</Name> + <X>50</X> + <Y>1270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0</Code> + </DefaultValue> + <ParameterEditor> + <Id>1745483322702</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1745483371462</Id> + <Name>p_currentWindTurbines_MW</Name> + <X>50</X> + <Y>1290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0</Code> + </DefaultValue> + <ParameterEditor> + <Id>1745483371460</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1765276731422</Id> + <Name>p_currentTotalGridBatteryCapacity_MWh</Name> + <X>50</X> + <Y>1340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>double</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>0</Code> + </DefaultValue> + <ParameterEditor> + <Id>1765276731420</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1765206938406</Id> + <Name>c_electricityTabEASliderGCs</Name> + <X>-330</X> + <Y>50</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GridConnection</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + </Variables> + <Functions> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722256117103</Id> + <Name>f_setPVOnLand</Name> + <Description>Function that changes the electric capacity of the energy asset of the "Solar field". Takes an area size in hectares as a parameter and assumes that 1 MWp of solarpannels fits on 1 ha. The variables for amount of installed PV are updated automatically in the zero_engine. The function also modifies the connection capacity of the energy production site to match the new installed PV Power. Passing a list of gcs sets all gcs to the same input value.</Description> + <X>70</X> + <Y>840</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>hectare</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>gcListProduction</Name> + <Type>List<GCEnergyProduction></Type> + </Parameter> + <Body>// TODO: Change to work for multiple solar fields in one model. +// to do so it should probably first calculate the total installed pv in all solar fields +for ( GCEnergyProduction GCEP : gcListProduction) { + for(J_EAProduction j_ea : GCEP.c_productionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC) { + if (!GCEP.v_isActive) { + GCEP.f_setActive(true); + } + + double solarFieldPower = (double)roundToInt(hectare * zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha); + j_ea.setCapacityElectric_kW(solarFieldPower); + GCEP.v_liveConnectionMetaData.physicalCapacity_kW = solarFieldPower; + GCEP.v_liveConnectionMetaData.contractedFeedinCapacity_kW = solarFieldPower; + + if(hectare == 0){ + GCEP.f_setActive(false); + } + + break; + } + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722256142375</Id> + <Name>f_setPVSystemHouses</Name> + <Description>Function that adds or removes photovoltaic production assets to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a PV asset. If a new asset is created it takes as its electric capacity a random value between 3 and 6 kW. The variables for amount of installed PV are updated automatically in the zero_engine. +</Description> + <X>70</X> + <Y>810</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Parameter> + <Name>PV_pct</Name> + <Type>double</Type> + </Parameter> + <Body>ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedPVSystemsHouses.stream().filter(gcList::contains).toList()); +int nbHouses = houses.size(); +int nbHousesWithPV = count(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); +int nbHousesWithPVGoal = roundToInt(PV_pct / 100.0 * nbHouses); + +while ( nbHousesWithPVGoal < nbHousesWithPV ) { // remove excess PV systems + GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); + J_EA pvAsset = findFirst(house.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); + if (pvAsset != null) { + pvAsset.removeEnergyAsset(); + houses.remove(house); + zero_Interface.c_orderedPVSystemsHouses.remove(house); + zero_Interface.c_orderedPVSystemsHouses.add(0, house); + nbHousesWithPV --; + + if(house.p_batteryAsset != null ){ + house.p_batteryAsset.removeEnergyAsset(); + house.f_setBatteryManagement(null); + } + } + else { + traceln(" cant find PV asset in house that should have PV asset in f_setPVHouses (Interface)"); + } +} + +while ( nbHousesWithPVGoal > nbHousesWithPV ) { + GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) == false); + if (house == null){ + traceln("No gridconnection without PV panels found! Current PVsystems count: %s", nbHousesWithPV); + break; + } + else { + String assetName = "Rooftop PV"; + double capacityHeat_kW = 0.0; + double yearlyProductionHydrogen_kWh = 0.0; + double yearlyProductionMethane_kWh = 0.0; + double installedPVCapacity_kW = house.v_liveAssetsMetaData.PVPotential_kW;//roundToDecimal(uniform(3,6),2); + + //Compensate for pt if it is present + if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)){ + installedPVCapacity_kW = max(0, installedPVCapacity_kW-zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); //For now just 1 panel + } + J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOVOLTAIC, assetName, OL_EnergyCarriers.ELECTRICITY, installedPVCapacity_kW, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); + houses.remove(house); + zero_Interface.c_orderedPVSystemsHouses.remove(house); + zero_Interface.c_orderedPVSystemsHouses.add(0, house); + nbHousesWithPV ++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722256248965</Id> + <Name>f_setWindTurbines</Name> + <Description>Function that changes the electric capacity of the energy asset of the "Wind Farm". Takes an amount of MW as a parameter. The variables for amount of installed Wind are updated automatically in the zero_engine. The function also modifies the connection capacity of the energy production site to match the new installed Wind Power. Passing a list of gcs sets all gcs to the same input value.</Description> + <X>70</X> + <Y>870</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>AllocatedWindPower_MW</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>gcListProduction</Name> + <Type>List<GCEnergyProduction></Type> + </Parameter> + <Body>// TODO: Change to work for multiple wind farms in one model. +// to do so it should probably first calculate the total installed wind power in all wind farms + +for ( GCEnergyProduction GCEP : gcListProduction) { + for(J_EAProduction j_ea : GCEP.c_productionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL) { + if (!GCEP.v_isActive) { + GCEP.f_setActive(true); + } + j_ea.setCapacityElectric_kW(roundToInt(1000*AllocatedWindPower_MW)); + GCEP.v_liveConnectionMetaData.physicalCapacity_kW = (double)roundToInt(1000*AllocatedWindPower_MW); + GCEP.v_liveConnectionMetaData.contractedFeedinCapacity_kW = (double)roundToInt(1000*AllocatedWindPower_MW); + + if(AllocatedWindPower_MW == 0){ + GCEP.f_setActive(false); + } + break; + } + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722335253834</Id> + <Name>f_setDemandReduction</Name> + <Description>Function that reduces the electricity demand of all consumption assets. Takes as an argument a percentage to reduce by compared to the default value of the consumption assets.</Description> + <X>60</X> + <Y>590</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>demandReduction_pct</Name> + <Type>double</Type> + </Parameter> + <Body>double scalingFactor = 1 - demandReduction_pct/100; + +for (GridConnection gc : gcList) { + // Set Consumption Assets + for (J_EAConsumption j_ea : gc.c_consumptionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.ELECTRICITY_DEMAND) { + j_ea.setConsumptionScaling_fr( scalingFactor ); + } + } + // Set Profile Assets + for (J_EAProfile j_ea : gc.c_profileAssets) { + if (j_ea.energyCarrier == OL_EnergyCarriers.ELECTRICITY) { + j_ea.setProfileScaling_fr( scalingFactor ); + } + } +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1745483988251</Id> + <Name>f_getCurrentPVOnLandAndWindturbineValues</Name> + <X>30</X> + <Y>1250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>p_currentPVOnLand_ha = 0; +p_currentWindTurbines_MW = 0; +for(GCEnergyProduction GCProd : uI_Tabs.f_getAllSliderGridConnections_production()){ + if(!c_electricityTabEASliderGCs.contains(GCProd) && GCProd.v_isActive){ + for(J_EAProduction ea : GCProd.c_productionAssets){ + if(ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC){ + p_currentPVOnLand_ha += ea.getCapacityElectric_kW()/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha; + } + else if(ea.energyAssetType == OL_EnergyAssetType.WINDMILL){ + p_currentWindTurbines_MW += ea.getCapacityElectric_kW()/1000; + } + } + } +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>Pair<Double, Double></ReturnType> + <Id>1747294812333</Id> + <Name>f_getPVSystemPercentage</Name> + <Description>Calculates the amount of installed PV compared to the total potential based on roof surface area. Assumes that 50% of the roof surface is available for PV. If a GridConnection already has more than this installed it takes the installed capacity instead.</Description> + <X>90</X> + <Y>780</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>double installedPV_kWp = 0.0; +double PVPotential_kWp = 0.0; +double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; + +for (GridConnection gc : gcList ) { + double gcInstalledPV_kWp = 0.0; + if ( gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ) { + for ( J_EAProduction j_ea : gc.c_productionAssets ) { + if ( j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC ) { + gcInstalledPV_kWp += j_ea.getCapacityElectric_kW(); + } + } + } + installedPV_kWp += gcInstalledPV_kWp; + PVPotential_kWp += max( gcInstalledPV_kWp, max(0.1, gc.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2) ); +} + +return new Pair(installedPV_kWp, PVPotential_kWp);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747297871195</Id> + <Name>f_setPVSystemCompanies</Name> + <Description>Adds or removes photovoltaic production assets to GridConnections. Takes as arguments a list of Gridconnections and a target percentage. It runs untill that list of GCs has that percentage of PV installed, compared to the total potential PV. If a new asset is created it determines its electric capacity by the total roof area of all the buildings connected to the GC. The function also updates the PV slider in the company UI if the GC is a company. The variables in the engine that keep track of the amount of installed PV are updated automatically.</Description> + <X>70</X> + <Y>720</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GCUtility></Type> + </Parameter> + <Parameter> + <Name>target_pct</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>slider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>List<GCUtility> activeGCs = new ArrayList<GCUtility>(zero_Interface.c_orderedPVSystemsCompanies.stream().filter(x -> x.v_isActive).filter(gcList::contains).toList()); +Pair<Double, Double> pair = f_getPVSystemPercentage( new ArrayList<GridConnection>(activeGCs) ); +double remaining_kWp = target_pct / 100 * pair.getSecond() - pair.getFirst(); +double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; +if ( remaining_kWp > 0 ) { + // add more PV + for ( GCUtility company : new ArrayList<GCUtility>(activeGCs) ) { + double remainingPotential_kWp = min( remaining_kWp, company.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2 - company.v_liveAssetsMetaData.totalInstalledPVPower_kW ); + + if ( remainingPotential_kWp > 0 ) { + remaining_kWp -= remainingPotential_kWp; + f_addPVSystem( company, remainingPotential_kWp ); + } + + if ( remaining_kWp <= 0 ) { + // Update variable to change to custom scenario + if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); + } + zero_Interface.f_resetSettings(); + return; + } + } +} +else { + // remove pv + for ( GCUtility company : new ArrayList<GCUtility>(activeGCs) ) { + if ( company.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ) { + // find companyUI to check if the company already has PV on model startup + remaining_kWp += company.v_liveAssetsMetaData.totalInstalledPVPower_kW; + f_removePVSystem( company ); + double PVAtStartup_kWp = zero_Interface.c_scenarioMap_Current.get(company.p_uid).getCurrentPV_kW(); + if (PVAtStartup_kWp != 0) { + f_addPVSystem( company, PVAtStartup_kWp ); + remaining_kWp -= PVAtStartup_kWp; + } + } + if ( remaining_kWp >= 0 ) { + // removed slightly too much pv + f_addPVSystem( company, remaining_kWp ); + + // Update variable to change to custom scenario + if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); + } + + zero_Interface.f_resetSettings(); + return; + } + } + // All companies are at the starting PV amount. Set slider to corresponding value. + pair = f_getPVSystemPercentage( new ArrayList<GridConnection>( activeGCs ) ); + int installed_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); + slider.setValue(installed_pct, false); +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747306690517</Id> + <Name>f_addPVSystem</Name> + <Description>Takes as an argument a GridConnection and a capacity. If the GC already has a solar panel, it adds the capacity to the existing one. Otherwise it creates a new energy asset. If the GridConnection is a GCUtility it also updates the companyUI if it exists.</Description> + <X>90</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gc</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>capacity_kWp</Name> + <Type>double</Type> + </Parameter> + <Body>J_EAProduction pvAsset = findFirst(gc.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); +if (pvAsset != null) { + capacity_kWp += pvAsset.getCapacityElectric_kW(); + pvAsset.setCapacityElectric_kW( capacity_kWp ); +} +else { + // Create a new asset + OL_EnergyAssetType assetType = OL_EnergyAssetType.PHOTOVOLTAIC; + String assetName = "Rooftop PV"; + double capacityHeat_kW = 0.0; + double yearlyProductionMethane_kWh = 0.0; + double yearlyProductionHydrogen_kWh = 0.0; + double outputTemperature_degC = 0.0; + + J_EAProduction productionAsset = new J_EAProduction ( gc, assetType, assetName, OL_EnergyCarriers.ELECTRICITY, capacity_kWp, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); +} + +// Update the ordered collection +if ( gc instanceof GCHouse ) { + zero_Interface.c_orderedPVSystemsHouses.remove(gc); + zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); +} +else if ( gc instanceof GCUtility ) { + zero_Interface.c_orderedPVSystemsCompanies.remove(gc); + zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); +} +else { + throw new RuntimeException("Unknown GridConnection type passed to f_addPVSystem."); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747306699629</Id> + <Name>f_removePVSystem</Name> + <X>90</X> + <Y>760</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gc</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>J_EAProduction pvAsset = findFirst(gc.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); +if ( pvAsset != null ) { + pvAsset.removeEnergyAsset(); + + if ( gc instanceof GCHouse ) { + zero_Interface.c_orderedPVSystemsHouses.remove(gc); + zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); + } + else if ( gc instanceof GCUtility ) { + zero_Interface.c_orderedPVSystemsCompanies.remove(gc); + zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); + } +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1750063382310</Id> + <Name>f_setResidentialBatteries</Name> + <X>90</X> + <Y>1000</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>homeBatteries_pct</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>gcListHouses</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Body>// Setting houseBatteries +double nbHouseBatteries = count(gcListHouses, h -> h.p_batteryAsset != null); //f_getEnergyAssets(), p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC && p.getParentAgent() instanceof GCHouse); +double nbHousesWithPV = count(gcListHouses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); //count(energyModel.f_getGridConnections(), p->p instanceof GCHouse); +double nbHousesWithBatteryGoal = roundToInt(nbHousesWithPV * homeBatteries_pct / 100); + +if( nbHousesWithPV > 0 ){ + while ( nbHouseBatteries > nbHousesWithBatteryGoal ) { + GCHouse house = findFirst(gcListHouses, p -> p.p_batteryAsset != null ); + house.p_batteryAsset.removeEnergyAsset(); + house.f_setBatteryManagement(null); + nbHouseBatteries--; + } + while ( nbHouseBatteries < nbHousesWithBatteryGoal) { + GCHouse house = findFirst(gcListHouses, p -> p.p_batteryAsset == null && p.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); + + double batteryStorageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgRatioHouseBatteryStorageCapacity_v_PVPower*house.v_liveAssetsMetaData.totalInstalledPVPower_kW; + double batteryCapacity_kW = batteryStorageCapacity_kWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; + double batteryStateOfCharge = 0.5; + + new J_EAStorageElectric(house, batteryCapacity_kW, batteryStorageCapacity_kWh, batteryStateOfCharge, zero_Interface.energyModel.p_timeStep_h ); + house.f_setBatteryManagement(new J_BatteryManagementSelfConsumption( house )); + nbHouseBatteries++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1750063382312</Id> + <Name>f_setGridBatteries</Name> + <Description>Passing a list of gcs sets all gcs to the same input value.</Description> + <X>90</X> + <Y>980</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>storageCapacity_kWh</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>gcListGridBatteries</Name> + <Type>List<GCGridBattery></Type> + </Parameter> + <Body>for ( GCGridBattery battery : gcListGridBatteries) { + if(battery.p_batteryAsset == null){ + throw new RuntimeException("GCGridBattery found without p_batteryAsset"); + } + + J_EAStorageElectric batteryAsset = battery.p_batteryAsset; + if (!battery.v_isActive) { + battery.f_setActive(true); + } + + + double capacity_kW = storageCapacity_kWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; + if(batteryAsset.getCapacityElectric_kW() > 0 && batteryAsset.getStorageCapacity_kWh() > 0){ //If already existing power present: keep relation between power and storage capacity the same. + capacity_kW = storageCapacity_kWh * ( batteryAsset.getStorageCapacity_kWh() / batteryAsset.getCapacityElectric_kW()); + } + batteryAsset.setCapacityElectric_kW( capacity_kW ); + batteryAsset.setStorageCapacity_kWh( storageCapacity_kWh ); + battery.v_liveConnectionMetaData.physicalCapacity_kW = capacity_kW; + battery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = capacity_kW; + battery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = capacity_kW; + + if(storageCapacity_kWh == storageCapacity_kWh){ + battery.f_setActive(false); + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1750063382324</Id> + <Name>f_setElectricCooking</Name> + <X>60</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcListHouses</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Parameter> + <Name>electricCookingGoal_pct</Name> + <Type>double</Type> + </Parameter> + <Body>int nbHousesWithElectricCooking = findAll(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC).size(); +int nbHousesWithElectricCookingGoal = roundToInt(electricCookingGoal_pct / 100 * gcListHouses.size()); + + +while ( nbHousesWithElectricCooking > nbHousesWithElectricCookingGoal ) { // remove excess cooking systems + GCHouse house = randomWhere(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); + J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_HOB ); + if (cookingAsset != null) { + double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; + cookingAsset.removeEnergyAsset(); + + new J_EAConsumption(house, OL_EnergyAssetType.GAS_PIT, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.METHANE, zero_Interface.energyModel.p_timeStep_h, null); + house.p_cookingMethod = OL_HouseholdCookingMethod.GAS; + nbHousesWithElectricCooking --; + } + else { + throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); + } +} + +while ( nbHousesWithElectricCooking < nbHousesWithElectricCookingGoal) { + GCHouse house = randomWhere(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.GAS); + if (house == null){ + throw new RuntimeException("No gridconnection without GAS cooking asset found! Current electric cooking count: " + nbHousesWithElectricCooking); + } + else { + J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.GAS_PIT ); + if (cookingAsset != null) { + double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; + cookingAsset.removeEnergyAsset(); + + new J_EAConsumption(house, OL_EnergyAssetType.ELECTRIC_HOB, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.ELECTRICITY, zero_Interface.energyModel.p_timeStep_h, null); + house.p_cookingMethod = OL_HouseholdCookingMethod.ELECTRIC; + nbHousesWithElectricCooking ++; + } + else { + throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); + } + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1750326729005</Id> + <Name>f_setDemandIncrease</Name> + <X>60</X> + <Y>610</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>demandReduction_pct</Name> + <Type>double</Type> + </Parameter> + <Body>f_setDemandReduction(gcList, -demandReduction_pct);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754926103683</Id> + <Name>f_updateSliders_Electricity</Name> + <X>-350</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>if(gr_electricitySliders_default.isVisible()){ + f_updateElectricitySliders_default(); +} +else if(gr_electricitySliders_businesspark.isVisible()){ + f_updateElectricitySliders_businesspark(); +} +else if(gr_electricitySliders_residential.isVisible()){ + f_updateElectricitySliders_residential(); +} +else{ + f_updateElectricitySliders_custom(); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754926103685</Id> + <Name>f_updateElectricitySliders_default</Name> + <X>-330</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<GridConnection> allConsumerGridConnections = uI_Tabs.f_getActiveSliderGridConnections_consumption(); + + +//Savings +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GridConnection GC : allConsumerGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + } +} + +double electricitySavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; +sl_electricityDemandReduction_pct.setValue(roundToInt(electricitySavings_pct), false); + + +//Companies rooftop PV +List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); + +List<GridConnection> utilityGridConnections_GC = new ArrayList<>(utilityGridConnections); +Pair<Double, Double> pair = f_getPVSystemPercentage( utilityGridConnections_GC ); +int PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); +sl_rooftopPVCompanies_pct.setValue(PV_pct, false); + +//Houses rooftop PV +List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); + +List<GridConnection> houseGridConnections_GC = new ArrayList<>(utilityGridConnections); +pair = f_getPVSystemPercentage( houseGridConnections_GC ); +PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); +sl_rooftopPVHouses_pct.setValue(PV_pct, false); + +//Large scale EA production systems (PV on land And Wind) +f_getCurrentPVOnLandAndWindturbineValues(); // Used for slider minimum: non adjustable GCProductions + +double totalPVOnLand_kW = 0; // Of movable slider GC +double totalWind_kW = 0; // Of movable slider GC + +for(GridConnection productionGC : c_electricityTabEASliderGCs){ + if(productionGC instanceof GCEnergyProduction && productionGC.v_isActive){ + for(J_EAProduction productionEA : productionGC.c_productionAssets){ + if(productionEA.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC){ + totalPVOnLand_kW += productionEA.getCapacityElectric_kW(); + break; + } + else if(productionEA.getEAType() == OL_EnergyAssetType.WINDMILL){ + totalWind_kW += productionEA.getCapacityElectric_kW(); + break; + } + } + } +} +sl_largeScalePV_ha_Businesspark.setRange(0, 1000); // Needed to prevent anylogic range bug +sl_largeScalePV_ha.setValue((totalPVOnLand_kW/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha) + p_currentPVOnLand_ha, false); +sl_largeScaleWind_MW.setRange(0, 1000); // Needed to prevent anylogic range bug +sl_largeScaleWind_MW.setValue((totalWind_kW/1000) + p_currentWindTurbines_MW, false); + +//Curtailment +boolean curtailment = true; +for(GridConnection GC : allConsumerGridConnections){ + if(!GC.v_enableCurtailment){ + curtailment = false; + break; + } +} +cb_curtailment_default.setSelected(curtailment, false); + + +//Large scale battery systems +f_getCurrentGridBatterySize(); // Used for slider minimum: non adjustable GCGridBatteries + +double totalBatteryStorage_kWh = 0; +for(GridConnection batteryGC : c_electricityTabEASliderGCs){ + if(batteryGC instanceof GCGridBattery && batteryGC.v_isActive){ + totalBatteryStorage_kWh += batteryGC.p_batteryAsset.getStorageCapacity_kWh(); + } +} +sl_collectiveBattery_MWh_default.setRange(0, 1000); +sl_collectiveBattery_MWh_default.setValue((totalBatteryStorage_kWh/1000.0) + p_currentTotalGridBatteryCapacity_MWh, false); +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754926103687</Id> + <Name>f_updateElectricitySliders_residential</Name> + <X>-330</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); + +int nbHouses = houseGridConnections.size(); +int nbHousesWithPV = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); +double pv_pct = 100.0 * nbHousesWithPV / nbHouses; +sl_householdPVResidentialArea_pct.setValue(roundToInt(pv_pct), false); + +if ( nbHousesWithPV != 0 ) { + int nbHousesWithHomeBattery = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) && x.p_batteryAsset != null); + double battery_pct = 100.0 * nbHousesWithHomeBattery / nbHousesWithPV; + sl_householdBatteriesResidentialArea_pct.setValue(roundToInt(battery_pct), false); +} + +//Electric cooking +int nbHousesWithElectricCooking = count(houseGridConnections, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); +double cooking_pct = 100.0 * nbHousesWithElectricCooking / nbHouses; +sl_householdElectricCookingResidentialArea_pct.setValue(roundToInt(cooking_pct), false); + +//Consumption growth +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GCHouse GC : houseGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + } +} + +double electricityDemandIncrease_pct = totalBaseConsumption_kWh > 0 ? ( (- totalSavedConsumption_kWh)/totalBaseConsumption_kWh * 100) : 0; +sl_electricityDemandIncreaseResidentialArea_pct.setValue(roundToInt(electricityDemandIncrease_pct), false); + + +//Gridbatteries +List<GCGridBattery> sliderGridBatteryGridConnections = new ArrayList<>(); +for(GridConnection sliderGC : c_electricityTabEASliderGCs){ + if(sliderGC.v_isActive && sliderGC instanceof GCGridBattery sliderGridBattery){ + sliderGridBatteryGridConnections.add(sliderGridBattery); + } +} + +double averageNeighbourhoodBatterySize_kWh = 0; +for (GCGridBattery gc : sliderGridBatteryGridConnections) { + averageNeighbourhoodBatterySize_kWh += gc.p_batteryAsset.getStorageCapacity_kWh()/sliderGridBatteryGridConnections.size(); +} +sl_gridBatteriesResidentialArea_kWh.setValue(averageNeighbourhoodBatterySize_kWh, false); +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754926103689</Id> + <Name>f_updateElectricitySliders_businesspark</Name> + <X>-330</X> + <Y>130</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Get the utility connections +List<GridConnection> utilityGridConnections = new ArrayList<>(uI_Tabs.f_getActiveSliderGridConnections_utilities()); + + +//Savings +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GridConnection GC : utilityGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + } +} + +double electricitySavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; +sl_electricityDemandReduction_pct_Businesspark.setValue(roundToInt(electricitySavings_pct), false); + +// Rooftop PV SYSTEMS: +Pair<Double, Double> pair = f_getPVSystemPercentage( utilityGridConnections ); +int PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); +sl_rooftopPVCompanies_pct_Businesspark.setValue(PV_pct, false); + +//Large scale EA production systems (PV on land And Wind) +f_getCurrentPVOnLandAndWindturbineValues(); // Used for slider minimum: non adjustable GCProductions + +double totalPVOnLand_kW = 0; // Of movable slider GC +double totalWind_kW = 0; // Of movable slider GC + +for(GridConnection productionGC : c_electricityTabEASliderGCs){ + if(productionGC instanceof GCEnergyProduction && productionGC.v_isActive){ + for(J_EAProduction productionEA : productionGC.c_productionAssets){ + if(productionEA.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC){ + totalPVOnLand_kW += productionEA.getCapacityElectric_kW(); + break; + } + else if(productionEA.getEAType() == OL_EnergyAssetType.WINDMILL){ + totalWind_kW += productionEA.getCapacityElectric_kW(); + break; + } + } + } +} +sl_largeScalePV_ha_Businesspark.setRange(0, 1000); // Needed to prevent anylogic range bug +sl_largeScalePV_ha_Businesspark.setValue((totalPVOnLand_kW/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha) + p_currentPVOnLand_ha, false); +sl_largeScaleWind_MW_Businesspark.setRange(0, 1000); // Needed to prevent anylogic range bug +sl_largeScaleWind_MW_Businesspark.setValue((totalWind_kW/1000) + p_currentWindTurbines_MW, false); + +//Curtailment +boolean curtailment = true; +for(GridConnection GC : utilityGridConnections){ + if(!GC.v_enableCurtailment){ + curtailment = false; + break; + } +} +cb_curtailment_businesspark.setSelected(curtailment, false); + + +//Large scale battery systems +f_getCurrentGridBatterySize(); // Used for slider minimum: non adjustable GCGridBatteries + +double totalBatteryStorage_kWh = 0; +for(GridConnection batteryGC : c_electricityTabEASliderGCs){ + if(batteryGC instanceof GCGridBattery && batteryGC.v_isActive){ + totalBatteryStorage_kWh += batteryGC.p_batteryAsset.getStorageCapacity_kWh(); + } +} +sl_collectiveBattery_MWh_businesspark.setRange(0, 1000); // Needed to prevent anylogic range bug +sl_collectiveBattery_MWh_businesspark.setValue((totalBatteryStorage_kWh/1000.0) + p_currentTotalGridBatteryCapacity_MWh, false); + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754926103691</Id> + <Name>f_updateElectricitySliders_custom</Name> + <X>-330</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//If you have a custom tab, +//override this function to make it update automatically +traceln("Forgot to override the update custom electricity sliders functionality");</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754986167346</Id> + <Name>f_setCurtailment</Name> + <X>70</X> + <Y>900</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>activateCurtailment</Name> + <Type>boolean</Type> + </Parameter> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>for (GridConnection GC : gcList) { + GC.v_enableCurtailment = activateCurtailment; +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1756302457919</Id> + <Name>f_initializeTab_Electricity</Name> + <X>-350</X> + <Y>30</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>electricityTabEASliderGCs</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>c_electricityTabEASliderGCs.addAll(electricityTabEASliderGCs); + +f_getCurrentPVOnLandAndWindturbineValues(); +f_getCurrentGridBatterySize();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1765276703854</Id> + <Name>f_getCurrentGridBatterySize</Name> + <X>30</X> + <Y>1320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>p_currentTotalGridBatteryCapacity_MWh = 0; +for(GCGridBattery GCBat : uI_Tabs.f_getAllSliderGridConnections_gridBatteries()){ + if(!c_electricityTabEASliderGCs.contains(GCBat) && GCBat.v_isActive){ + p_currentTotalGridBatteryCapacity_MWh += (GCBat.p_batteryAsset.getStorageCapacity_kWh()/1000.0); + } +}</Body> + </Function> + </Functions> + <AgentLinks> + <AgentLink> + <Id>1722247653562</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <ContainerLinks> + <ContainerLink> + <Id>1744962391299</Id> + <Name>uI_Tabs</Name> + <X>50</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>UI_Tabs</ClassName> + </ActiveObjectClass> + </ContainerLink> + <ContainerLink> + <Id>1744962391306</Id> + <Name>zero_Interface</Name> + <X>150</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>Zero_Interface</ClassName> + </ActiveObjectClass> + </ContainerLink> + <ContainerLink> + <Id>1753694295451</Id> + <Name>uI_EnergyHub</Name> + <X>300</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>UI_EnergyHub</ClassName> + </ActiveObjectClass> + </ContainerLink> + </ContainerLinks> + <Presentation> + <Level> + <Id>1722247653568</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1722349953637</Id> + <Name>rect_genericFunctions</Name> + <X>10</X> + <Y>480</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-4144960</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>730</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Group> + <Id>1722328776701</Id> + <Name>gr_electricitySliders_default</Name> + <X>-10</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1722328776703</Id> + <Name>rect_electricityDemandSliders</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-32</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722328776711</Id> + <Name>t_electricityDemandReduction_pct</Name> + <X>240</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_electricityDemandReduction_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722328776713</Id> + <Name>sl_electricityDemandReduction_pct</Name> + <X>260</X> + <Y>15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricityDemandReduction_pct.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>-50</MinValue> + <MaxValue>50</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722328776715</Id> + <Name>t_electricityDemandReductionDescription</Name> + <X>10</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Besparing verbruik</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722328776717</Id> + <Name>txt_productionDescription</Name> + <X>15</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Opwek</Text> + <Font> + <Name>Calibri</Name> + <Size>18</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722328776719</Id> + <Name>t_rooftopPVCompanies_pct</Name> + <X>240</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_rooftopPVCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722328776721</Id> + <Name>sl_rooftopPVCompanies_pct</Name> + <X>260</X> + <Y>75</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setPVSystemCompanies( uI_Tabs.f_getActiveSliderGridConnections_utilities(), sl_rooftopPVCompanies_pct.getValue(), sl_rooftopPVCompanies_pct ); + +if(zero_Interface.rb_mapOverlay != null && zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722328776723</Id> + <Name>t_rooftopPVCompaniesDescription</Name> + <X>15</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Zon op dak bedrijven</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722328776725</Id> + <Name>t_largeScalePV_ha</Name> + <X>240</X> + <Y>145</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_largeScalePV_ha.getValue() + " ha"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722328776727</Id> + <Name>sl_largeScalePV_ha</Name> + <X>260</X> + <Y>140</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>List<GCEnergyProduction> sliderPVFarmGCList = new ArrayList<>(); +for(GridConnection gc : c_electricityTabEASliderGCs){ + if(gc instanceof GCEnergyProduction energyProductionSite){ + for(J_EAProduction j_ea : energyProductionSite.c_productionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC) { + sliderPVFarmGCList.add(energyProductionSite); + break; + } + } + } +} + +if(sliderPVFarmGCList.size() == 0){ + throw new IllegalStateException("Model does not contain any PVFarmSliderGC agent"); +} + + +f_setPVOnLand(sl_largeScalePV_ha.getValue() - p_currentPVOnLand_ha, sliderPVFarmGCList);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>p_currentPVOnLand_ha</MinValue> + <MaxValue>p_currentPVOnLand_ha + 50</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722328776729</Id> + <Name>t_largeScalePVDescription</Name> + <X>15</X> + <Y>145</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Zon op land</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722328776731</Id> + <Name>txt_batteryDescription_default</Name> + <X>15</X> + <Y>250</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Batterijen</Text> + <Font> + <Name>Calibri</Name> + <Size>18</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722328776737</Id> + <Name>sl_largeScaleWind_MW</Name> + <X>260</X> + <Y>170</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>List<GCEnergyProduction> sliderWindFarmGCList = new ArrayList<>(); +for(GridConnection gc : c_electricityTabEASliderGCs){ + if(gc instanceof GCEnergyProduction energyProductionSite){ + for(J_EAProduction j_ea : energyProductionSite.c_productionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL) { + sliderWindFarmGCList.add(energyProductionSite); + break; + } + } + } +} + +if(sliderWindFarmGCList.size() == 0){ + throw new IllegalStateException("Model does not contain any sliderWindFarmGC agent"); +} + +f_setWindTurbines( sl_largeScaleWind_MW.getValue() - p_currentWindTurbines_MW, sliderWindFarmGCList);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>p_currentWindTurbines_MW</MinValue> + <MaxValue>p_currentWindTurbines_MW + 10</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722328776739</Id> + <Name>t_largeScaleWindDescription</Name> + <X>15</X> + <Y>175</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Wind op land</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722328776741</Id> + <Name>t_largeScaleWind_MW</Name> + <X>240</X> + <Y>175</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_largeScaleWind_MW.getValue() + " MW"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Text> + <Id>1722329161559</Id> + <Name>t_rooftopPVHouses_pct</Name> + <X>240</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_rooftopPVHouses_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_rooftopPVHouses_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722329161561</Id> + <Name>sl_rooftopPVHouses_pct</Name> + <X>260</X> + <Y>105</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setPVSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_rooftopPVHouses_pct.getValue() ); + +if(zero_Interface.rb_mapOverlay != null && zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722329161563</Id> + <Name>t_rooftopPVHousesDescription</Name> + <X>15</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_rooftopPVHouses_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Zon op dak huizen</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Image> + <Id>1746091167061</Id> + <Name>i_householdPV</Name> + <X>160</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_rooftopPVHouses_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdPV, zero_Interface.v_infoText.householdRooftopPV, i_householdPV.getX() + uI_Tabs.v_presentationXOffset, i_householdPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746091167075</Id> + <Name>i_landPV</Name> + <X>160</X> + <Y>145</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_landPV, zero_Interface.v_infoText.landPV, i_landPV.getX() + uI_Tabs.v_presentationXOffset, i_landPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746091167087</Id> + <Name>i_companyPV</Name> + <X>160</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyPV, zero_Interface.v_infoText.companyRooftopPV, i_companyPV.getX() + uI_Tabs.v_presentationXOffset, i_companyPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746091167099</Id> + <Name>i_electricityReduction</Name> + <X>160</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_electricityReduction, zero_Interface.v_infoText.electricityDemandReduction, i_electricityReduction.getX() + uI_Tabs.v_presentationXOffset, i_electricityReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746091167111</Id> + <Name>i_landWind</Name> + <X>160</X> + <Y>175</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_landWind, zero_Interface.v_infoText.landWind, i_landWind.getX() + uI_Tabs.v_presentationXOffset, i_landWind.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Text> + <Id>1754984198964</Id> + <Name>t_collectiveBatteries_default</Name> + <X>240</X> + <Y>275</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_collectiveBattery_MWh_default.getIntValue() + " MWh"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1754984198968</Id> + <Name>sl_collectiveBattery_MWh_default</Name> + <X>260</X> + <Y>270</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>List<GCGridBattery> gcListGridBatteries = new ArrayList<>(); +for(GridConnection gc : c_electricityTabEASliderGCs){ + if(gc instanceof GCGridBattery gridbattery){ + gcListGridBatteries.add(gridbattery); + } +} + +if(gcListGridBatteries.size() == 0){ + throw new IllegalStateException("Model does not contain any GCGridBattery agent"); +} + +f_setGridBatteries(sl_collectiveBattery_MWh_default.getValue() * 1000, gcListGridBatteries);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>p_currentTotalGridBatteryCapacity_MWh</MinValue> + <MaxValue>p_currentTotalGridBatteryCapacity_MWh + 50</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1754984198970</Id> + <Name>txt_curtailmentDescription_default</Name> + <X>15</X> + <Y>210</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Curtailment opwek</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1754984198972</Id> + <Name>txt_collectiveBatteryDescription_default</Name> + <X>15</X> + <Y>275</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Collectieve batterijen</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="CheckBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1754984198974</Id> + <Name>cb_curtailment_default</Name> + <X>300</X> + <Y>202</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="40" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>f_setCurtailment(cb_curtailment_default.isSelected(), uI_Tabs.f_getActiveSliderGridConnections_consumption());</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText/> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Image> + <Id>1754984362078</Id> + <Name>i_curtailment_default</Name> + <X>160</X> + <Y>210</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_curtailment_default, zero_Interface.v_infoText.curtailment, i_curtailment_default.getX() + uI_Tabs.v_presentationXOffset, i_curtailment_default.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1754984365522</Id> + <Name>i_collectiveBatteries_default</Name> + <X>160</X> + <Y>275</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_collectiveBatteries_default, zero_Interface.v_infoText.gridBattery_default, i_collectiveBatteries_default.getX() + uI_Tabs.v_presentationXOffset, i_collectiveBatteries_default.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + </Presentation> + </Group> + <Rectangle> + <Id>1722334503404</Id> + <Name>rect_PVFunctions</Name> + <X>40</X> + <Y>670</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-10496</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>310</Width> + <Height>250</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722334611918</Id> + <Name>txt_ProductionFunctionsDescription</Name> + <X>190</X> + <Y>680</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Production Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Rectangle> + <Id>1722335253828</Id> + <Name>rect_demandFunctions</Name> + <X>40</X> + <Y>540</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-8355840</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>310</Width> + <Height>120</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722335253832</Id> + <Name>t_demandFunctionsDescription</Name> + <X>190</X> + <Y>550</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Demand Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722349990233</Id> + <Name>t_genericFunctions</Name> + <X>100</X> + <Y>500</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Generic Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>22</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1728384392418</Id> + <Name>gr_electricitySliders_businesspark</Name> + <X>400</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <XCode>0</XCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1728384392420</Id> + <Name>rect_electricityDemandSliders_Businesspark</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-32</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1728384392422</Id> + <Name>t_electricityDemandReduction_pct_Businesspark</Name> + <X>240</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_electricityDemandReduction_pct_Businesspark.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1728384392424</Id> + <Name>sl_electricityDemandReduction_pct_Businesspark</Name> + <X>260</X> + <Y>15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricityDemandReduction_pct_Businesspark.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>-50</MinValue> + <MaxValue>50</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1728384392426</Id> + <Name>txt_electricityDemandReductionDescription_Businesspark</Name> + <X>10</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Besparing verbruik</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1728384392428</Id> + <Name>txt_productionDescription_Businesspark</Name> + <X>15</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Opwek</Text> + <Font> + <Name>Calibri</Name> + <Size>18</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1728384392430</Id> + <Name>t_rooftopPVCompanies_pct_Businesspark</Name> + <X>240</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_rooftopPVCompanies_pct_Businesspark.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1728384392432</Id> + <Name>sl_rooftopPVCompanies_pct_Businesspark</Name> + <X>260</X> + <Y>75</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setPVSystemCompanies( uI_Tabs.f_getActiveSliderGridConnections_utilities(), sl_rooftopPVCompanies_pct_Businesspark.getValue(), sl_rooftopPVCompanies_pct_Businesspark ); + +//If on pv map overlay, adjust colouring +if(zero_Interface.rb_mapOverlay != null && zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1728384392434</Id> + <Name>txt_rooftopPVCompaniesDescription_Businesspark</Name> + <X>15</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Zon op dak bedrijven</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1728384392436</Id> + <Name>t_largeScalePV_ha_Businesspark</Name> + <X>240</X> + <Y>115</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_largeScalePV_ha_Businesspark.getIntValue() + " ha"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1728384392438</Id> + <Name>sl_largeScalePV_ha_Businesspark</Name> + <X>260</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>List<GCEnergyProduction> sliderPVFarmGCList = new ArrayList<>(); +for(GridConnection gc : c_electricityTabEASliderGCs){ + if(gc instanceof GCEnergyProduction energyProductionSite){ + for(J_EAProduction j_ea : energyProductionSite.c_productionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC) { + sliderPVFarmGCList.add(energyProductionSite); + break; + } + } + } +} + +if(sliderPVFarmGCList.size() == 0){ + throw new IllegalStateException("Model does not contain any PVFarmSliderGC agent"); +} + + +f_setPVOnLand(sl_largeScalePV_ha_Businesspark.getValue() - p_currentPVOnLand_ha, sliderPVFarmGCList);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>p_currentPVOnLand_ha</MinValue> + <MaxValue>p_currentPVOnLand_ha + 50</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1728384392440</Id> + <Name>txt_largeScalePVDescription_Businesspark</Name> + <X>15</X> + <Y>115</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Zon op land</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1728384392442</Id> + <Name>txt_batteryDescription_businesspark</Name> + <X>15</X> + <Y>230</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Batterijen</Text> + <Font> + <Name>Calibri</Name> + <Size>18</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1728384392444</Id> + <Name>sl_largeScaleWind_MW_Businesspark</Name> + <X>260</X> + <Y>145</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>List<GCEnergyProduction> sliderWindFarmGCList = new ArrayList<>(); +for(GridConnection gc : c_electricityTabEASliderGCs){ + if(gc instanceof GCEnergyProduction energyProductionSite){ + for(J_EAProduction j_ea : energyProductionSite.c_productionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL) { + sliderWindFarmGCList.add(energyProductionSite); + break; + } + } + } +} + +if(sliderWindFarmGCList.size() == 0){ + throw new IllegalStateException("Model does not contain any sliderWindFarmGC agent"); +} + +f_setWindTurbines( sl_largeScaleWind_MW_Businesspark.getValue() - p_currentWindTurbines_MW, sliderWindFarmGCList);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>p_currentWindTurbines_MW</MinValue> + <MaxValue>p_currentWindTurbines_MW + 10</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1728384392446</Id> + <Name>txt_largeScaleWindDescription_Businesspark</Name> + <X>15</X> + <Y>150</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Wind op land</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1728384392448</Id> + <Name>t_largeScaleWind_MW_Businesspark</Name> + <X>240</X> + <Y>150</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_largeScaleWind_MW_Businesspark.getIntValue() + " MW"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Image> + <Id>1746091438812</Id> + <Name>i_landPV_Businesspark</Name> + <X>160</X> + <Y>115</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_landPV_Businesspark, zero_Interface.v_infoText.landPV, i_landPV_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_landPV_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746091438857</Id> + <Name>i_companyPV_Businesspark</Name> + <X>160</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyPV_Businesspark, zero_Interface.v_infoText.companyRooftopPV, i_companyPV_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_companyPV_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746091438909</Id> + <Name>i_electricityReduction_Businesspark</Name> + <X>160</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_electricityReduction_Businesspark, zero_Interface.v_infoText.electricityDemandReduction, i_electricityReduction_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_electricityReduction_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746091438954</Id> + <Name>i_landWind_Businesspark</Name> + <X>160</X> + <Y>150</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_landWind_Businesspark, zero_Interface.v_infoText.landWind, i_landWind_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_landWind_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Text> + <Id>1754985531354</Id> + <Name>txt_curtailmentDescription_businesspark</Name> + <X>15</X> + <Y>185</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Curtailment opwek</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="CheckBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1754985531358</Id> + <Name>cb_curtailment_businesspark</Name> + <X>300</X> + <Y>177</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="40" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>f_setCurtailment(cb_curtailment_businesspark.isSelected(), new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()));</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText/> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Image> + <Id>1754985531361</Id> + <Name>i_curtailment_businesspark</Name> + <X>160</X> + <Y>185</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_curtailment_businesspark, zero_Interface.v_infoText.curtailment, i_curtailment_businesspark.getX() + uI_Tabs.v_presentationXOffset, i_curtailment_businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1754985653985</Id> + <Name>i_collectiveBatteries_businesspark</Name> + <X>160</X> + <Y>260</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_collectiveBatteries_businesspark, zero_Interface.v_infoText.gridBattery_default, i_collectiveBatteries_businesspark.getX() + uI_Tabs.v_presentationXOffset, i_collectiveBatteries_businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Text> + <Id>1754985653994</Id> + <Name>txt_collectiveBatteryDescription_businesspark</Name> + <X>15</X> + <Y>260</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Collectieve batterijen</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1754985653996</Id> + <Name>t_collectiveBatteries_businesspark</Name> + <X>240</X> + <Y>260</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_collectiveBattery_MWh_businesspark.getIntValue() + " MWh"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1754985653998</Id> + <Name>sl_collectiveBattery_MWh_businesspark</Name> + <X>260</X> + <Y>255</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>List<GCGridBattery> gcListGridBatteries = new ArrayList<>(); +for(GridConnection gc : c_electricityTabEASliderGCs){ + if(gc instanceof GCGridBattery gridbattery){ + gcListGridBatteries.add(gridbattery); + } +} + +if(gcListGridBatteries.size() == 0){ + throw new IllegalStateException("Model does not contain any GCGridBattery agent"); +} + +f_setGridBatteries(sl_collectiveBattery_MWh_businesspark.getValue() * 1000, gcListGridBatteries);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>p_currentTotalGridBatteryCapacity_MWh</MinValue> + <MaxValue>p_currentTotalGridBatteryCapacity_MWh + 50</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + </Presentation> + </Group> + <Group> + <Id>1750063382217</Id> + <Name>gr_electricitySliders_residential</Name> + <X>800</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <XCode>0</XCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1750063382219</Id> + <Name>rect_electricityDemandSlidersResidentialArea</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>5</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-32</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1750063382221</Id> + <Name>t_electricityDemandIncreaseResidentialArea_pct</Name> + <X>235</X> + <Y>165</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_electricityDemandIncreaseResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0%</Text> + <TextCode>sl_electricityDemandIncreaseResidentialArea_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1750063382223</Id> + <Name>t_householdPVResidentialArea_pct</Name> + <X>235</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdPVResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>10%</Text> + <TextCode>sl_householdPVResidentialArea_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382225</Id> + <Name>sl_householdPVResidentialArea_pct</Name> + <X>265</X> + <Y>50</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setPVSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdPVResidentialArea_pct.getValue() ); + +//If on pv map overlay, adjust colouring +if(zero_Interface.rb_mapOverlay != null && zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); +} + +// Also updates the home batteries +f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), uI_Tabs.f_getActiveSliderGridConnections_houses() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>5</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1750063382227</Id> + <Name>t_householdPVResidentialAreaDescription</Name> + <X>20</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdPVResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Share of houses with PV</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1750063382229</Id> + <Name>t_electricitDemandSlidersResidentialAreaDescription</Name> + <X>20</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Households</Text> + <Font> + <Name>Calibri</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1750063382237</Id> + <Name>t_householdBatteriesResidentialAreaDescription</Name> + <X>30</X> + <Y>85</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdBatteriesResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Of which with batteries</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382239</Id> + <Name>sl_householdBatteriesResidentialArea_pct</Name> + <X>265</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), uI_Tabs.f_getActiveSliderGridConnections_houses() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>5</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1750063382241</Id> + <Name>t_householdBatteriesResidentialArea_pct</Name> + <X>235</X> + <Y>85</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdBatteriesResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0%</Text> + <TextCode>sl_householdBatteriesResidentialArea_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382243</Id> + <Name>sl_gridBatteriesResidentialArea_kWh</Name> + <X>266</X> + <Y>220</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>List<GCGridBattery> gcListGridBatteries = new ArrayList<>(); +for(GridConnection gc : c_electricityTabEASliderGCs){ + if(gc instanceof GCGridBattery gridbattery){ + gcListGridBatteries.add(gridbattery); + } +} + +if(gcListGridBatteries.size() == 0){ + throw new IllegalStateException("Model does not contain any GCGridBattery agent"); +} + +f_setGridBatteries(sl_gridBatteriesResidentialArea_kWh.getValue(), gcListGridBatteries);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>1000</MaxValue> + <Step>10</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1750063382245</Id> + <Name>t_gridBatteriesResidentialAreaDescription</Name> + <X>20</X> + <Y>226</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_gridBatteriesResidentialArea_kWh.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Shared battery capacity</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1750063382247</Id> + <Name>t_gridBatteriesResidentialArea_kW</Name> + <X>236</X> + <Y>225</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_gridBatteriesResidentialArea_kWh.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_gridBatteriesResidentialArea_kWh.getIntValue() + " kWh"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1750063382251</Id> + <Name>t_electricityDemandIncreaseResidentialAreaDescription</Name> + <X>20</X> + <Y>165</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_electricityDemandIncreaseResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electricity consumption growth</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382253</Id> + <Name>sl_electricityDemandIncreaseResidentialArea_pct</Name> + <X>265</X> + <Y>160</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setDemandIncrease( new ArrayList<GridConnection>(findAll(zero_Interface.energyModel.Houses, x -> true)), sl_electricityDemandIncreaseResidentialArea_pct.getValue() ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>-50</MinValue> + <MaxValue>50</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1750063382255</Id> + <Name>t_householdElectricCookingResidentialAreaDescription</Name> + <X>20</X> + <Y>125</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdElectricCookingResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Perc. electric cooking</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382257</Id> + <Name>sl_householdElectricCookingResidentialArea_pct</Name> + <X>265</X> + <Y>120</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setElectricCooking(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdElectricCookingResidentialArea_pct.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>2</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1750063382259</Id> + <Name>t_householdElectricCookingResidentialArea_pct</Name> + <X>235</X> + <Y>125</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdElectricCookingResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0%</Text> + <TextCode>sl_householdElectricCookingResidentialArea_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382261</Id> + <Name>button_trafoReinforcement</Name> + <X>238</X> + <Y>0</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="130" Height="25"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <VisibleCode>false; // DOESNT WORK PROPERLY</VisibleCode> + <Enabled>true</Enabled> + <EnableExpression>zero_Interface.v_clickedGridNode != null</EnableExpression> + <ActionCode>//gr_electricityDemandSlidersResidentialAreaScale.setVisible(false); +gr_trafoReinforcement.setVisible(true); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>Trafo reinforcement</LabelText> + </ExtendedProperties> + </Control> + <Image> + <Id>1752232850349</Id> + <Name>i_householdRooftopPV</Name> + <X>190</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_householdPVResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdRooftopPV, zero_Interface.v_infoText.householdRooftopPV, i_householdRooftopPV.getX() + uI_Tabs.v_presentationXOffset, i_householdRooftopPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1752232850368</Id> + <Name>i_householdBatteries</Name> + <X>190</X> + <Y>85</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_householdBatteriesResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdBatteries, zero_Interface.v_infoText.householdBatteries, i_householdBatteries.getX() + uI_Tabs.v_presentationXOffset, i_householdBatteries.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1752232850385</Id> + <Name>i_householdElectricCooking</Name> + <X>190</X> + <Y>125</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_householdElectricCookingResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdElectricCooking, zero_Interface.v_infoText.householdElectricCooking, i_householdElectricCooking.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricCooking.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1752232850402</Id> + <Name>i_householdElectricityGrowth</Name> + <X>190</X> + <Y>165</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_electricityDemandIncreaseResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdElectricityGrowth, zero_Interface.v_infoText.householdElectricityConsumptionGrowth, i_householdElectricityGrowth.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricityGrowth.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1752232850473</Id> + <Name>i_householdNeighbourhoodBatteries</Name> + <X>190</X> + <Y>225</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_gridBatteriesResidentialArea_kWh.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdNeighbourhoodBatteries, zero_Interface.v_infoText.gridBattery_residential, i_householdNeighbourhoodBatteries.getX() + uI_Tabs.v_presentationXOffset, i_householdNeighbourhoodBatteries.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + </Presentation> + </Group> + <Group> + <Id>1750063382277</Id> + <Name>gr_trafoReinforcement</Name> + <X>1200</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <XCode>0</XCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1750063382279</Id> + <Name>rect_trafoReinforcement</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>1</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-32</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1750063382281</Id> + <Name>t_addTrafoDescription</Name> + <X>10</X> + <Y>70</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Trafostation uitbreiden/bijplaatsen</Text> + <Font> + <Name>SansSerif</Name> + <Size>11</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382283</Id> + <Name>sl_trafoReinforcement</Name> + <X>20</X> + <Y>90</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="150" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>1000</MaxValue> + <Step>50</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1750063382285</Id> + <Name>t_minTrafoReinforcement</Name> + <X>20</X> + <Y>120</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>min</Text> + <TextCode>sl_trafoReinforcement.getMin()</TextCode> + <Font> + <Name>SansSerif</Name> + <Size>10</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1750063382287</Id> + <Name>t_maxTrafoReinforcement</Name> + <X>170</X> + <Y>120</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>max</Text> + <TextCode>sl_trafoReinforcement.getMax()</TextCode> + <Font> + <Name>SansSerif</Name> + <Size>10</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Text> + <Id>1750063382289</Id> + <Name>t_trafoReinforcementValue</Name> + <X>95</X> + <Y>120</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>value</Text> + <TextCode>sl_trafoReinforcement.getIntValue() + " kVA"</TextCode> + <Font> + <Name>SansSerif</Name> + <Size>10</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382291</Id> + <Name>t_confirmTrafoReinforcement</Name> + <X>210</X> + <Y>94</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="142" Height="32"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>zero_Interface.v_clickedGridNode.p_capacity_kW += sl_trafoReinforcement.getValue(); + +zero_Interface.f_setTrafoText();</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>Voer netuitbreiding uit</LabelText> + </ExtendedProperties> + </Control> + <Text> + <Id>1750063382293</Id> + <Name>t_currentTrafoReinforcement</Name> + <X>200</X> + <Y>70</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Huidige LS-capaciteit: 300 kVA</Text> + <TextCode>"Huidige LS-capaciteit: " + roundToInt(zero_Interface.v_clickedGridNode.p_capacity_kW) + " kVA"</TextCode> + <Font> + <Name>SansSerif</Name> + <Size>11</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382295</Id> + <Name>t_resetTrafoReinforcement</Name> + <X>215</X> + <Y>300</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="140" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>for (GridNode GN : zero_Interface.energyModel.f_getGridNodesNotTopLevel() ){ + GN.p_capacity_kW = GN.p_originalCapacity_kW; +} +for (GridNode GN : zero_Interface.energyModel.f_getGridNodesTopLevel() ){ + GN.p_capacity_kW = GN.p_originalCapacity_kW; +} +zero_Interface.f_setTrafoText(); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>Reset trafostations</LabelText> + </ExtendedProperties> + </Control> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1750063382297</Id> + <Name>t_closeTrafoReinforcement</Name> + <X>350</X> + <Y>2</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="18" Height="18"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>gr_trafoReinforcement.setVisible(false);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="8" Style="0"/> + <LabelText/> + </ExtendedProperties> + </Control> + <Line> + <Id>1750063382299</Id> + <Name>line_closeTrafoReinforcement1</Name> + <X>353</X> + <Y>17</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>1</LineWidth> + <LineColor>-2894893</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <BeginArrowSize>1</BeginArrowSize> + <BeginArrowStyle>0</BeginArrowStyle> + <EndArrowSize>1</EndArrowSize> + <EndArrowStyle>0</EndArrowStyle> + <Dx>12</Dx> + <Dy>-12</Dy> + <Dz>0</Dz> + </Line> + <Line> + <Id>1750063382301</Id> + <Name>line_closeTrafoReinforcement2</Name> + <X>365</X> + <Y>17</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>1</LineWidth> + <LineColor>-2894893</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <BeginArrowSize>1</BeginArrowSize> + <BeginArrowStyle>0</BeginArrowStyle> + <EndArrowSize>1</EndArrowSize> + <EndArrowStyle>0</EndArrowStyle> + <Dx>-12</Dx> + <Dy>-12</Dy> + <Dz>0</Dz> + </Line> + <Text> + <Id>1750063382303</Id> + <Name>t_titleTrafoReinforcement</Name> + <X>20</X> + <Y>21</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Trafostation reinforcement</Text> + <Font> + <Name>Calibri</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Rectangle> + <Id>1754985710083</Id> + <Name>rect_batteryFunctions</Name> + <X>39</X> + <Y>931</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16744320</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>311</Width> + <Height>109</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1754985710085</Id> + <Name>t_batteryFunctionsDescription</Name> + <X>189</X> + <Y>936</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Battery Functions</Text> + <Font> + <Name>Dialog</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + </Presentation> + </Level> + </Presentation> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1722253108625</Id> + <Name>tabHeating</Name> + <AdditionalClassCode>// Default Sliders +public ShapeGroup getGroupHeatDemandSliders() { + return this.gr_heatingSliders_default; +} + +public ShapeSlider getSliderHeatDemandReductionCompanies_pct() { + return this.sl_heatDemandReductionCompanies_pct; +} + +public ShapeSlider getSliderGasBurnerCompanies_pct() { + return this.sl_gasBurnerCompanies_pct; +} + +public ShapeSlider getSliderElectricHeatPumpCompanies_pct() { + return this.sl_electricHeatPumpCompanies_pct; +} + +public ShapeSlider getSliderHeatDemandReductionHouseholds_pct() { + return this.sl_heatDemandReductionHouseholds_pct; +} + +public ShapeSlider getSliderGasBurnerHouseholds_pct() { + return this.sl_gasBurnerHouseholds_pct; +} + +public ShapeSlider getSliderElectricHeatPumpHouseholds_pct() { + return this.sl_electricHeatPumpHouseholds_pct; +} + +// Residential Tab Sliders +public ShapeGroup getGroupHeatDemandSlidersResidentialArea() { + return this.gr_heatingSliders_residential; +} + +public ShapeSlider getSliderHeatDemandSlidersResidentialAreaHouseholdsGasBurner_pct() { + return this.sl_householdGasBurnerResidentialArea_pct; +} +public ShapeSlider getSl_householdHybridHeatpumpResidentialArea() { + return this.sl_householdHybridHeatpumpResidentialArea; +} + +public ShapeSlider getSliderHeatDemandSlidersResidentialAreaHouseholdsElectricHeatPump_pct() { + return this.sl_householdElectricHeatPumpResidentialArea_pct; +} + +// Company Tab Sliders +public ShapeGroup getGroupHeatDemandSlidersCompanies() { + return this.gr_heatingSliders_businesspark; +} + +public ShapeSlider getSliderHeatDemandSlidersCompaniesHeatDemandReductionCompanies_pct() { + return this.sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct; +} + +public ShapeSlider getSliderHeatDemandSlidersCompaniesGasBurnerCompanies_pct() { + return this.sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct; +} + +public ShapeSlider getSliderHeatDemandSlidersCompaniesElectricHeatPumpCompanies_pct() { + return this.sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct; +} + +public ShapeSlider getSl_heatingTypeSlidersCompaniesCustom_pct(){ + return this.sl_heatingTypeSlidersCompaniesCustom_pct; +} + +public ShapeSlider getSl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct(){ + return this.sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct; +} + +public ShapeSlider getSl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct(){ + return this.sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct; +}</AdditionalClassCode> + <Folder>1754045642067</Folder> + <Import>import zeroPackage.ZeroMath;</Import> + <ExtendsReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>tabArea</ClassName> + </ExtendsReference> + <Generic>false</Generic> + <GenericParameter> + <Id>1722253108631</Id> + <Name>1722253108631</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089977</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1722326400000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1722253108628</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1722253108632</CurrentLevel> + <ConnectionsId>1722253108626</ConnectionsId> + <Functions> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>int</ReturnType> + <Id>1722256102007</Id> + <Name>f_setHeatingSystemsCompanies</Name> + <Description>Function that adds or removes heatpumps to utility connections. Takes a percentage as a parameter and runs untill that percentage of all the utility connections has a heatpump. If a new heatpump is created it determines its heat demand on a heat_demand consumption asset if it exists, else it looks for a heat profile asset. The function also updates the radio button in the company UI.</Description> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>100</X> + <Y>1190</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GCUtility></Type> + </Parameter> + <Parameter> + <Name>sliderGasburner</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHeatpump</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHybridHeatPump</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderDistrictHeating</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderCustomHeating</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>double targetHeatPump_pct = sliderHeatpump.getValue(); + +//Set the sliders if companyUI is present using the companyUI functions, if not: do it the normal way +if(zero_Interface.c_companyUIs.size()>0){ + f_setHeatingSystemsWithCompanyUI(gcList, targetHeatPump_pct, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); +} +else{ + ArrayList<GCUtility> companies = new ArrayList<GCUtility>(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).toList()); + double nbHeatPumps = count(gcList, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); + + while ( targetHeatPumpAmount < nbHeatPumps) { // remove excess heatpumps, replace with gasburners. + GCUtility company = findFirst(companies, x->x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + if (company != null) { + company.c_heatingAssets.get(0).removeEnergyAsset(); + nbHeatPumps--; + companies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); + double heatOutputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minGasBurnerOutputCapacity_kW, peakHeatDemand_kW); + new J_EAConversionGasBurner(company, heatOutputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); + company.f_addHeatManagementToGC(company, OL_GridConnectionHeatingType.GAS_BURNER, false); + } + else { + throw new RuntimeException("Can't find Heatpump in company that should have heatpump in f_setHeatingSystemsCompanies."); + } + } + + while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. + GCUtility company = findFirst(companies, x -> x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); + if (company != null) { + company.c_heatingAssets.get(0).removeEnergyAsset(); + nbHeatPumps++; + companies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); + double electricInputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minHeatpumpElectricCapacity_kW, peakHeatDemand_kW); + new J_EAConversionHeatPump(company, electricInputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC, zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), 0, 1, OL_AmbientTempType.AMBIENT_AIR); + company.f_addHeatManagementToGC(company, OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false); + } + else { + throw new RuntimeException("Can't find Gasburner in company that should have gasburner in f_setHeatingSystemsCompanies."); + } + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.b_changeToCustomScenario = true; +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722256221655</Id> + <Name>f_setHeatingSystemsHouseholds</Name> + <Description>Function that adds or removes heatpumps to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a heatpump. If a new heatpump is created it determines its heat demand on a heat_demand consumption asset if it exists, else it looks for a heat profile asset.</Description> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>100</X> + <Y>1230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Parameter> + <Name>targetHeatPump_pct</Name> + <Type>double</Type> + </Parameter> + <Body>ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedHeatingSystemsHouses.stream().filter(gcList::contains).toList()); +double nbHeatPumps = count(gcList, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); +int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); + +while ( nbHeatPumps > targetHeatPumpAmount) { // remove excess heatpumps, replace with gasburners. + GCHouse house = findFirst(houses, x->x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + if (house != null) { + house.c_heatingAssets.get(0).removeEnergyAsset(); + nbHeatPumps--; + houses.remove(house); + zero_Interface.c_orderedHeatingSystemsHouses.remove(house); + zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house) * 2;//Just make it always twice as high, to be able to support savings/additional consumption slider settings. + double heatOutputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minGasBurnerOutputCapacity_kW, peakHeatDemand_kW); + new J_EAConversionGasBurner(house, heatOutputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); + house.f_addHeatManagementToGC(house, OL_GridConnectionHeatingType.GAS_BURNER, false); + } + else { + throw new RuntimeException("Can't find Heatpump in house that should have heatpump in f_setHeatingSystemsHouseholds."); + } +} + +while ( nbHeatPumps < targetHeatPumpAmount) { // remove gasburners, add heatpumps. + GCHouse house = findFirst(houses, x -> x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); + if (house != null) { + house.c_heatingAssets.get(0).removeEnergyAsset(); + nbHeatPumps++; + houses.remove(house); + zero_Interface.c_orderedHeatingSystemsHouses.remove(house); + zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house) * 2;//Just make it always twice as high, to be able to support savings/additional consumption slider settings. + double electricInputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minHeatpumpElectricCapacity_kW, peakHeatDemand_kW); + new J_EAConversionHeatPump(house, electricInputPower_kW, 0.5, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC, zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), 0, 1, OL_AmbientTempType.AMBIENT_AIR); + house.f_addHeatManagementToGC(house, OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false); + } + else { + throw new RuntimeException("Can't find Gasburner in house that should have gasburner in f_setHeatingSystemsHouseholds."); + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.b_changeToCustomScenario = true; +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722335783993</Id> + <Name>f_setDemandReductionHeating</Name> + <Description>Function that reduces the heat demand of all profile and consumption assets. Takes as arguments a list of GridConnections to effect and a percentage to reduce by compared to the default value of the assets. Does not effect heating demand from gridconnection that have a thermal building model. </Description> + <X>70</X> + <Y>560</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>demandReduction_pct</Name> + <Type>double</Type> + </Parameter> + <Body>double scalingFactor = 1 - demandReduction_pct/100; + +for (GridConnection gc : gcList) { + // Set Consumption Assets + for (J_EAConsumption j_ea : gc.c_consumptionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.HEAT_DEMAND) { + j_ea.setConsumptionScaling_fr( scalingFactor ); + } + } + // Set Profile Assets + for (J_EAProfile j_ea : gc.c_profileAssets) { + if (j_ea.energyCarrier == OL_EnergyCarriers.HEAT) { + j_ea.setProfileScaling_fr( scalingFactor ); + } + } + + if(gc.p_BuildingThermalAsset != null){ + gc.p_BuildingThermalAsset.setLossScalingFactor_fr(scalingFactor); + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>int</ReturnType> + <Id>1729259449060</Id> + <Name>f_setHeatingSystemsWithCompanyUI</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>120</X> + <Y>1210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GCUtility></Type> + </Parameter> + <Parameter> + <Name>targetHeatPump_pct</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>sliderGasburner</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHeatpump</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHybridHeatPump</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderDistrictHeating</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderCustomHeating</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>ArrayList<GCUtility> companies = new ArrayList<GCUtility>(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).filter(x -> x.v_isActive).toList()); +int nbActiveCompanies = companies.size() + v_totalNumberOfCustomHeatingSystems; +int nbHeatPumps = count(companies, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); +int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * nbActiveCompanies); + + +while ( targetHeatPumpAmount < nbHeatPumps){ // remove excess heatpumps of companies that didnt start with a heatpump, replace with gasburners. + GCUtility company = findFirst(companies, gc -> gc.p_heatingManagement != null && !(gc.p_heatingManagement instanceof J_HeatingManagementGhost) && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + if (company != null) { + UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); + + companyUI.b_runningMainInterfaceSlider = true; + if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ + int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); + companyUI.GCnr_selection.setValue(i, true); + } + // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! + boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); + companyUI.rb_heatingTypePrivateUI.setEnabled(true); + companyUI.rb_heatingTypePrivateUI.setValue(0, true); // First option is gasburner + companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); + companyUI.rb_scenariosPrivateUI.setValue(2, false); + companyUI.b_runningMainInterfaceSlider = false; + + //Reorder c_orderedHeatingSystems + zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); + companies.remove(company); + nbHeatPumps--; + } + else { //No more heating assets to adjust: this is the minimum: set slider to minimum and do nothing else + int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); + sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); + f_setHeatingSliders(1, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); + return; + } +} + +while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. + + GCUtility company = findFirst(companies, gc -> gc.p_heatingManagement != null && !(gc.p_heatingManagement instanceof J_HeatingManagementGhost) && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); + if (company != null) { + UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); + companyUI.b_runningMainInterfaceSlider = true; + if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ + int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); + companyUI.GCnr_selection.setValue(i, true); + } + + // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! + boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); + companyUI.rb_heatingTypePrivateUI.setEnabled(true); + companyUI.rb_heatingTypePrivateUI.setValue(2, true); // Third option (index 2) is electric heatpump + companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); + companyUI.rb_scenariosPrivateUI.setValue(2, false); + companyUI.b_runningMainInterfaceSlider = false; + + //Reorder c_orderedHeatingSystems + zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); + zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); + companies.remove(company); + nbHeatPumps++; + } + else { //No more gas burner assets to adjust: this is the minimum: set slider to minimum and do nothing else + int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); + int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); + sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); + f_setHeatingSliders(1, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); + return; + } +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749116448649</Id> + <Name>f_calculatePeakHeatDemand_kW</Name> + <X>60</X> + <Y>1070</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gc</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>double peakHeatDemand_kW = 0.0; +for (J_EAConsumption j_ea : gc.c_consumptionAssets) { + if (j_ea.getEAType() == OL_EnergyAssetType.HEAT_DEMAND || j_ea.getEAType() == OL_EnergyAssetType.HOT_WATER_CONSUMPTION) { + double[] profile = j_ea.getProfilePointer().getAllValues(); + double maxFactor = Arrays.stream(profile).max().getAsDouble(); + peakHeatDemand_kW += maxFactor * j_ea.yearlyDemand_kWh * j_ea.getConsumptionScaling_fr(); + } +} +for (J_EAProfile j_ea : gc.c_profileAssets) { + if (j_ea.energyCarrier == OL_EnergyCarriers.HEAT) { + double maxValue = j_ea.getProfileScaling_fr() * Arrays.stream(j_ea.a_energyProfile_kWh).max().getAsDouble(); + peakHeatDemand_kW += maxValue / zero_Interface.energyModel.p_timeStep_h * j_ea.getProfileScaling_fr(); + } +} +if (gc.p_BuildingThermalAsset != null) { + double maximalTemperatureDifference_K = 30.0; // Approximation + peakHeatDemand_kW += gc.p_BuildingThermalAsset.getLossFactor_WpK() * maximalTemperatureDifference_K / 1000; +} +return peakHeatDemand_kW;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749739532180</Id> + <Name>f_addDistrictHeatingToAllHouses</Name> + <X>70</X> + <Y>900</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>housesGCList</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Body>for (GCHouse house: housesGCList ) { + // Remove the existing heating assets + house.f_removeAllHeatingAssets(); + + // Add a heat node + house.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + // Create a heat node if it does not exist yet + if(house.p_parentNodeHeat == null){ + GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); + zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); + GN_heat.p_gridNodeID = "Heatgrid"; + + // Check wether transformer capacity is known or estimated + GN_heat.p_capacity_kW = 1000000; + GN_heat.p_realCapacityAvailable = false; + + // Basic GN information + GN_heat.p_description = "Warmtenet"; + + //Define node type + GN_heat.p_nodeType = OL_GridNodeType.HT; + GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + + //Define GN location + GN_heat.p_latitude = 0; + GN_heat.p_longitude = 0; + GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + + //Connect + house.p_parentNodeHeat = GN_heat; + + //Show warning that heat grid is not a simple solution + zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); + } + house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; + + double outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); + double efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; + + new J_EAConversionHeatDeliverySet(house, peakHeatDemand_kW, efficiency, zero_Interface.energyModel.p_timeStep_h, outputTemperature_degC); + + house.f_addHeatManagement(OL_GridConnectionHeatingType.DISTRICTHEAT, false); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749739532202</Id> + <Name>f_removeDistrictHeatingFromAllHouses</Name> + <X>70</X> + <Y>920</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>housesGCList</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Body>for (GCHouse house: housesGCList ) { + house.f_removeAllHeatingAssets(); + house.p_parentNodeHeat = null; + house.p_parentNodeHeatID = null; + + //add gasburner + J_EAConsumption heatDemandAsset = findFirst(house.c_consumptionAssets, j_ea -> j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); + J_EAConversionGasBurner gasBurner; + //if house has follows the general heat deamnd profile + if (heatDemandAsset != null) { + gasBurner = new J_EAConversionGasBurner(house, heatDemandAsset.yearlyDemand_kWh/8760*10, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); + } + //if house has a thermalBuildingAsset + else if (house.p_BuildingThermalAsset != null){ + double gasBurnerCapacity_kW = 10; + gasBurner = new J_EAConversionGasBurner(house, gasBurnerCapacity_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); + } + // Else house has a customprofiel + else { + J_EAProfile heatDemandProfile = (J_EAProfile)findFirst(house.c_profileAssets, x->x instanceof J_EAProfile && x.energyCarrier == OL_EnergyCarriers.HEAT); + double peakHeatDemand_kW = heatDemandProfile.getProfileScaling_fr() * Arrays.stream(heatDemandProfile.a_energyProfile_kWh).max().orElseThrow(() -> new RuntimeException("Unable to find the maximum of the heat demand profile")); + gasBurner = new J_EAConversionGasBurner(house, peakHeatDemand_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); + } + house.f_addHeatManagement(OL_GridConnectionHeatingType.GAS_BURNER, false); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749739532217</Id> + <Name>f_setAircos</Name> + <X>70</X> + <Y>610</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcListHouses</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Parameter> + <Name>desiredShare</Name> + <Type>double</Type> + </Parameter> + <Body>double nbHousesWithAirco = count(gcListHouses, x -> x.p_airco != null); +double nbHouses = gcListHouses.size(); + +while ( roundToInt(nbHouses * desiredShare) > nbHousesWithAirco ) { + GCHouse house = randomWhere(gcListHouses, x -> x.p_airco == null); + double aircoPower_kW = roundToDecimal(uniform(3,6),1); + new J_EAAirco(house, aircoPower_kW, zero_Interface.energyModel.p_timeStep_h); + nbHousesWithAirco ++; +} +while ( roundToInt(nbHouses * desiredShare) < nbHousesWithAirco ) { + GCHouse house = randomWhere(gcListHouses, x -> x.p_airco != null); + house.p_airco.removeEnergyAsset(); + nbHousesWithAirco --; +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749739532231</Id> + <Name>f_addLTDH</Name> + <X>70</X> + <Y>850</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>housesGCList</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Body>for (GCHouse house: housesGCList ) { + house.f_removeAllHeatingAssets(); + + // Add a heat node + house.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + // Create a heat node if it does not exist yet + if(house.p_parentNodeHeat == null){ + GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); + zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); + GN_heat.p_gridNodeID = "Heatgrid"; + + // Check wether transformer capacity is known or estimated + GN_heat.p_capacity_kW = 1000000; + GN_heat.p_realCapacityAvailable = false; + + // Basic GN information + GN_heat.p_description = "Warmtenet"; + + //Define node type + GN_heat.p_nodeType = OL_GridNodeType.HT; + GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + + //Define GN location + GN_heat.p_latitude = 0; + GN_heat.p_longitude = 0; + GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + + //Connect + house.p_parentNodeHeat = GN_heat; + + //Show warning that heat grid is not a simple solution + zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); + } + house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); + double heatpumpElectricCapacity_kW = min(peakHeatDemand_kW / 3, 1.0); + double efficiency_fr = 0.5; + double inputTemperature_degC = 15.0; // TODO: Look at these temperatures! + double outputTemperature_degC = 50.0; + double sourceAssetHeatPower_kW = 0.0; + double belowZeroHeatpumpEtaReductionFactor = 1.0; + J_EAConversionHeatPump heatpump = new J_EAConversionHeatPump(house, + heatpumpElectricCapacity_kW, + efficiency_fr, + zero_Interface.energyModel.p_timeStep_h, + outputTemperature_degC, + zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), + sourceAssetHeatPower_kW, + belowZeroHeatpumpEtaReductionFactor, + OL_AmbientTempType.HEAT_GRID + ); + heatpump.updateParameters(inputTemperature_degC, outputTemperature_degC); + house.f_addHeatManagement(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, false); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749739532244</Id> + <Name>f_removeLTDH</Name> + <X>70</X> + <Y>870</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>housesGCList</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Body>for (GCHouse house: housesGCList ) { + // Disconnect from GridNode Heat + house.p_parentNodeHeat = null; + house.p_parentNodeHeatID = null; + + // Remove Heatpump and replace with gasburner + house.f_removeAllHeatingAssets(); + double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); + new J_EAConversionGasBurner(house, peakHeatDemand_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); + house.f_addHeatManagement(OL_GridConnectionHeatingType.GAS_BURNER, false); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1752227724432</Id> + <Name>f_householdInsulation</Name> + <X>70</X> + <Y>580</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>housesGCList</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Parameter> + <Name>houses_pct</Name> + <Type>double</Type> + </Parameter> + <Body>int nbHouses = count(housesGCList, x -> x.p_energyLabel != OL_GridConnectionIsolationLabel.A); +int nbHousesWithImprovedInsulation = count(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); +int targetNbHousesWithImprovedInsulation = roundToInt(houses_pct / 100.0 * nbHouses); + +while (nbHousesWithImprovedInsulation < targetNbHousesWithImprovedInsulation) { + GCHouse house = findFirst(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() >= 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); + if (house != null) { + house.p_BuildingThermalAsset.setLossScalingFactor_fr( 0.7 ); + nbHousesWithImprovedInsulation++; + } + else { + throw new RuntimeException("Unable to find house that does not yet have additional insulation"); + } +} +while (nbHousesWithImprovedInsulation > targetNbHousesWithImprovedInsulation) { + GCHouse house = findFirst(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); + if (house != null) { + house.p_BuildingThermalAsset.setLossScalingFactor_fr( 1 ); + nbHousesWithImprovedInsulation--; + } + else { + throw new RuntimeException("Unable to find house that has additional insulation"); + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753950993262</Id> + <Name>f_setPTSystemHouses</Name> + <Description>Function that adds or removes photovoltaic production assets to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a PV asset. If a new asset is created it takes as its electric capacity a random value between 3 and 6 kW. The variables for amount of installed PV are updated automatically in the zero_engine. +</Description> + <X>70</X> + <Y>1010</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Parameter> + <Name>PT_pct</Name> + <Type>double</Type> + </Parameter> + <Body>ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedPTSystemsHouses.stream().filter(gcList::contains).toList()); +int nbHouses = houses.size(); +int nbHousesWithPT = count(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); +int nbHousesWithPTGoal = roundToInt(PT_pct / 100.0 * nbHouses); + +while ( nbHousesWithPTGoal < nbHousesWithPT ) { // remove excess PV systems + GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); + J_EA ptAsset = findFirst(house.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOTHERMAL ); + + if (ptAsset != null) { + ptAsset.removeEnergyAsset(); + houses.remove(house); + zero_Interface.c_orderedPTSystemsHouses.remove(house); + zero_Interface.c_orderedPTSystemsHouses.add(0, house); + + if(house.p_heatBuffer != null){ + house.p_heatBuffer.removeEnergyAsset(); + } + if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + J_EAProduction pvAsset = findFirst(house.c_productionAssets, ea -> ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); + if(pvAsset != null){ + double newInstalledPVCapacity = min(house.v_liveAssetsMetaData.PVPotential_kW, pvAsset.getCapacityElectric_kW() + zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); + pvAsset.setCapacityElectric_kW(newInstalledPVCapacity); + } + } + nbHousesWithPT --; + } + else { + traceln(" cant find PV asset in house that should have PV asset in f_setPVHouses (Interface)"); + } +} + +while ( nbHousesWithPTGoal > nbHousesWithPT ) { + GCHouse house = findFirst(houses, x -> !x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); + if (house == null){ + traceln("No gridconnection without PT panels found! Current PVsystems count: %s", nbHousesWithPT); + break; + } + else { + String assetName = "Rooftop PT"; + double installedPTCapacity_kW = zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPTPower_kWpm2;//roundToDecimal(uniform(3,6),2); + + //Compensate for pt if it is present + if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + J_EAProduction pvAsset = findFirst(house.c_productionAssets, ea -> ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); + if(pvAsset != null){ + double newInstalledPVCapacity = max(0, pvAsset.getCapacityElectric_kW() - zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); + pvAsset.setCapacityElectric_kW(newInstalledPVCapacity); + } + } + J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOTHERMAL, assetName, OL_EnergyCarriers.HEAT, installedPTCapacity_kW, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); + + //Get parameters for the heatbuffer + double lossFactor_WpK = 0;// For now no loss factor + double minTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgMinHeatBufferTemperature_degC; + double maxTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgMaxHeatBufferTemperature_degC; + double initialTemperature_degC = (minTemperature_degC + maxTemperature_degC)/2; + double setTemperature_degC = initialTemperature_degC; + double heatBufferStorageCapacity_m3 = zero_Interface.energyModel.avgc_data.p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 * installedPTCapacity_kW/zero_Interface.energyModel.avgc_data.p_avgPTPower_kWpm2; + double heatCapacity_JpK = zero_Interface.energyModel.avgc_data.p_waterHeatCapacity_JpkgK*(heatBufferStorageCapacity_m3*zero_Interface.energyModel.avgc_data.p_waterDensity_kgpm3); + + //Add heatbuffer + J_EAStorageHeat heatbufferAsset = new J_EAStorageHeat ( house, OL_EnergyAssetType.STORAGE_HEAT, installedPTCapacity_kW, lossFactor_WpK, zero_Interface.energyModel.p_timeStep_h, initialTemperature_degC, minTemperature_degC, maxTemperature_degC, setTemperature_degC, heatCapacity_JpK, OL_AmbientTempType.FIXED); + + houses.remove(house); + zero_Interface.c_orderedPTSystemsHouses.remove(house); + zero_Interface.c_orderedPTSystemsHouses.add(0, house); + nbHousesWithPT ++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754391096443</Id> + <Name>f_setHeatingSliders</Name> + <Description>Function that calculates all the values of the other sliders and sets them without calling an action. Takes as parameters the index of the slider which should not be touched as well as all the sliders. HybridHeatPump and DistrictHeating sliders are optional and an argument of null can be passed. </Description> + <X>70</X> + <Y>690</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>orderedHeatingSystemGCList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>changedSliderHeatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Parameter> + <Name>gasBurnerSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>hybridHeatPumpSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>heatPumpSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>HTdistrictHeatingSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>LTdistrictHeatingSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>customHeatingSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>////Determine the changed slider index used in the distribution for loop +int changedSliderIndex = 0; +switch(changedSliderHeatingType){ + case GAS_BURNER: + changedSliderIndex = 0; + break; + case HYBRID_HEATPUMP: + changedSliderIndex = 1; + break; + case ELECTRIC_HEATPUMP: + changedSliderIndex = 2; + break; + case DISTRICTHEAT: + changedSliderIndex = 3; + break; + case LT_DISTRICTHEAT: + case CUSTOM: + throw new RuntimeException("Changed a heating type slider with a currently unsupported type!"); +} + +//// Get current pct values (after slider change, but before correction; In other words total_pct != 100) +double pct_naturalGasBurner = gasBurnerSlider.getValue(); +double pct_hybridHeatPump = hybridHeatPumpSlider != null ? hybridHeatPumpSlider.getValue() : 0; +double pct_electricHeatPump = heatPumpSlider != null ? heatPumpSlider.getValue() : 0; +double pct_HTdistrictHeating = HTdistrictHeatingSlider != null ? HTdistrictHeatingSlider.getValue() : 0; +double pct_LTdistrictHeating = LTdistrictHeatingSlider != null ? LTdistrictHeatingSlider.getValue() : 0; +double pct_customHeatingSlider = customHeatingSlider != null ? customHeatingSlider.getValue() : 0; + +//Set array with pct values +double pctArray[] = { + pct_naturalGasBurner, + pct_hybridHeatPump, + pct_electricHeatPump, + pct_HTdistrictHeating, + pct_LTdistrictHeating, + pct_customHeatingSlider +}; + +//// Create a ghost asset array, and fill it. This is used to find minimums of certain sliders. Also get the total amount of GC with heating systems. +int ghostAssetTotalArray[] = new int[pctArray.length]; +int totalGCWithHeating = 0; +for(GridConnection GC : gcList){ + if(GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE && GC.v_isActive){ + totalGCWithHeating++; + + if(GC.f_getHeatingTypeIsGhost()){ + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + ghostAssetTotalArray[0]++; + break; + case HYBRID_HEATPUMP: + ghostAssetTotalArray[1]++; + break; + case ELECTRIC_HEATPUMP: + ghostAssetTotalArray[2]++; + break; + case DISTRICTHEAT: + ghostAssetTotalArray[3]++; + break; + case LT_DISTRICTHEAT: + ghostAssetTotalArray[4]++; + break; + case CUSTOM: + ghostAssetTotalArray[5]++; + break; + } + } + } +} + +//// Correct the slider change trough to the other sliders. But don't move the custom slider or set sliders lower than their unchangable ghost assets. +int customSliderIndex = 5; +double pctExcess = Arrays.stream(pctArray).sum() - 100; + +for (int i = 0; i < pctArray.length && pctExcess != 0 ; i++) { + if (i != changedSliderIndex && i != customSliderIndex) { + double ghostMin_pct = ((double) 100.0 * ghostAssetTotalArray[i]) / totalGCWithHeating; + double maxDown_pct = pctArray[i] - ghostMin_pct; + double maxUp_pct = 100 - pctArray[i]; + + // Determine the slider delta, positive delta -> slider increases, negative -> slider decreases + double deltaSlider_pct = 0; + if(pctExcess > 0){ + deltaSlider_pct = -min(maxDown_pct, pctExcess); + } + else{ + deltaSlider_pct = min(maxUp_pct, -pctExcess); + } + + pctArray[i] += deltaSlider_pct; + pctExcess = Arrays.stream(pctArray).sum() - 100; + } +} + +//If still not 0, then adjust the changedSlider back to solve it. +if (pctExcess != 0){ + pctArray[changedSliderIndex] = max(0, pctArray[changedSliderIndex] - pctExcess); +} + +//// Set refound values to the sliders again +gasBurnerSlider.setValue(roundToInt(pctArray[0]), false); +if(hybridHeatPumpSlider != null){ + hybridHeatPumpSlider.setValue(roundToInt(pctArray[1]), false); +} +if(heatPumpSlider != null){ + heatPumpSlider.setValue(roundToInt(pctArray[2]), false); +} +if(HTdistrictHeatingSlider != null){ + HTdistrictHeatingSlider.setValue(roundToInt(pctArray[3]), false); +} +if(LTdistrictHeatingSlider != null){ + LTdistrictHeatingSlider.setValue(roundToInt(pctArray[4]), false); +} +if(customHeatingSlider != null){ + customHeatingSlider.setValue(roundToInt(pctArray[5]), false); +} + + +//Set the heating systems in the engine to the correct setting +f_setHeatingSystems(gcList, orderedHeatingSystemGCList, changedSliderHeatingType, pctArray[changedSliderIndex]);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754923748794</Id> + <Name>f_updateSliders_Heating</Name> + <X>-380</X> + <Y>30</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>if(gr_heatingSliders_default.isVisible()){ + f_updateHeatingSliders_default(); +} +else if(gr_heatingSliders_businesspark.isVisible()){ + f_updateHeatingSliders_businesspark(); +} +else if(gr_heatingSliders_residential.isVisible()){ + f_updateHeatingSliders_residential(); +} +else{ + f_updateHeatingSliders_custom(); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754924509667</Id> + <Name>f_updateHeatingSliders_default</Name> + <X>-360</X> + <Y>50</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>////Companies +List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); + +//Savings (IN PROGRESS, WHAT ABOUT THERMAL BUILDINGS?????) +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GridConnection GC : utilityGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.getActiveEnergyCarriers().contains(OL_EnergyCarriers.HEAT)); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + + if(GC.p_BuildingThermalAsset != null){ + traceln("WARNING: SLIDER SAVINGS UPDATE FUNCTION IS NOT FUNCTIONAL YET FOR COMPANIES WITH THERMAL BUILDING ASSETS"); + } + } +} + +double heatSavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; +sl_heatDemandReductionCompanies_pct.setValue(roundToInt(heatSavings_pct), false); + + +//Heating assets +//Heating type +int totalCompaniesWithHeating = 0; +int nbOfCompaniesWithGasBurners = 0; +int nbOfCompaniesWithHybridHeatpumps = 0; +int nbOfCompaniesWithElectricHeatpumps = 0; +int nbOfCompaniesOnHTHeatGrid = 0; +int nbOfCompaniesOnLTHeatGrid = 0; + +for(GCUtility GC : utilityGridConnections){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalCompaniesWithHeating++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbOfCompaniesWithGasBurners++; + break; + case HYBRID_HEATPUMP: + nbOfCompaniesWithHybridHeatpumps++; + break; + case ELECTRIC_HEATPUMP: + nbOfCompaniesWithElectricHeatpumps++; + break; + case DISTRICTHEAT: + nbOfCompaniesOnHTHeatGrid++; + break; + case LT_DISTRICTHEAT: + nbOfCompaniesOnLTHeatGrid++; + break; + } + } +} + +int companiesWithGasBurners_pct = roundToInt(100.0 * nbOfCompaniesWithGasBurners / totalCompaniesWithHeating); +int companiesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithHybridHeatpumps / totalCompaniesWithHeating); +int companiesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithElectricHeatpumps / totalCompaniesWithHeating); +int companiesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnHTHeatGrid / totalCompaniesWithHeating); + +sl_gasBurnerCompanies_pct.setValue(companiesWithGasBurners_pct, false); +sl_hybridHeatPumpCompanies_pct.setValue(companiesWithHybridHeatpump_pct, false); +sl_electricHeatPumpCompanies_pct.setValue(companiesWithElectricHeatpump_pct, false); +sl_districtHeatingCompanies_pct.setValue(companiesWithHTDistrictHeat_pct, false); + + +////Houses +List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); + +//Savings +double averageScalingFactor = 0; +double totalScalingFactors = 0; +for(GCHouse GC : houseGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.getActiveEnergyCarriers().contains(OL_EnergyCarriers.HEAT)); + for(J_EAProfile profileEA : profileEAs){ + double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; + double newTotalScalingFactorValue = totalScalingFactorValue + profileEA.getProfileScaling_fr(); + totalScalingFactors++; + averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; + double newTotalScalingFactorValue = totalScalingFactorValue + consumptionEA.getConsumptionScaling_fr(); + totalScalingFactors++; + averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; + } + + if(GC.p_BuildingThermalAsset != null){ + double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; + double newTotalScalingFactorValue = totalScalingFactorValue + GC.p_BuildingThermalAsset.getLossScalingFactor_fr(); + totalScalingFactors++; + averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; + } + } +} +double averageSavingsFactor_pct = (1-averageScalingFactor)*100.0; +sl_heatDemandReductionHouseholds_pct.setValue(roundToInt(averageSavingsFactor_pct), false); + + +//Heating type +int totalHousesWithHeating = 0; +int nbOfHousesWithGasBurners = 0; +int nbOfHousesWithHybridHeatpumps = 0; +int nbOfHousesWithElectricHeatpumps = 0; +int nbOfHousesOnHTHeatGrid = 0; +int nbOfHousesOnLTHeatGrid = 0; + +for(GCHouse GC : houseGridConnections){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalHousesWithHeating++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbOfHousesWithGasBurners++; + break; + case HYBRID_HEATPUMP: + nbOfHousesWithHybridHeatpumps++; + break; + case ELECTRIC_HEATPUMP: + nbOfHousesWithElectricHeatpumps++; + break; + case DISTRICTHEAT: + nbOfHousesOnHTHeatGrid++; + break; + case LT_DISTRICTHEAT: + nbOfHousesOnLTHeatGrid++; + break; + } + } +} + +int housesWithGasBurners_pct = roundToInt(100.0 * nbOfHousesWithGasBurners / totalHousesWithHeating); +int housesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfHousesWithHybridHeatpumps / totalHousesWithHeating); +int housesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfHousesWithElectricHeatpumps / totalHousesWithHeating); +int housesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfHousesOnHTHeatGrid / totalHousesWithHeating); + +sl_gasBurnerHouseholds_pct.setValue(housesWithGasBurners_pct, false); +sl_hybridHeatPumpHouseholds_pct.setValue(housesWithHybridHeatpump_pct, false); +sl_electricHeatPumpHouseholds_pct.setValue(housesWithElectricHeatpump_pct, false); +sl_districtHeatingHouseholds_pct.setValue(housesWithHTDistrictHeat_pct, false); +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754924542535</Id> + <Name>f_updateHeatingSliders_residential</Name> + <X>-360</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); + + +//Heating type +int totalHousesWithHeating = 0; +int nbOfHousesWithGasBurners = 0; +int nbOfHousesWithHybridHeatpumps = 0; +int nbOfHousesWithElectricHeatpumps = 0; +int nbOfHousesOnHTHeatGrid = 0; +int nbOfHousesOnLTHeatGrid = 0; + +for(GCHouse GC : houseGridConnections){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalHousesWithHeating++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbOfHousesWithGasBurners++; + break; + case HYBRID_HEATPUMP: + nbOfHousesWithHybridHeatpumps++; + break; + case ELECTRIC_HEATPUMP: + nbOfHousesWithElectricHeatpumps++; + break; + case DISTRICTHEAT: + nbOfHousesOnHTHeatGrid++; + break; + case LT_DISTRICTHEAT: + nbOfHousesOnLTHeatGrid++; + break; + } + } +} + +int housesWithGasBurners_pct = roundToInt(100.0 * nbOfHousesWithGasBurners / totalHousesWithHeating); +int housesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfHousesWithHybridHeatpumps / totalHousesWithHeating); +int housesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfHousesWithElectricHeatpumps / totalHousesWithHeating); + +sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, false); +sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, false); +sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, false); +cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); +cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + +if(nbOfHousesOnHTHeatGrid == totalHousesWithHeating){ + cb_householdHTDistrictHeatingResidentialArea.setSelected(true, false); +} +if(nbOfHousesOnLTHeatGrid == totalHousesWithHeating){ + cb_householdLTDistrictHeatingResidentialArea.setSelected(true, false); +} + +//Houses with Airco +double nbHouses = houseGridConnections.size(); +double nbHousesWithAirco = count(houseGridConnections, x -> x.p_airco != null); +double pctOfHousesWithAirco = (nbHousesWithAirco*100.0)/nbHouses; +sl_householdAircoResidentialArea_pct.setValue(pctOfHousesWithAirco, false); + + +//Houses with better isolation +int nbHousesThatCanGetImprovedIsolation = count(houseGridConnections, x -> x.p_energyLabel != OL_GridConnectionIsolationLabel.A); +int nbHousesWithImprovedInsulation = count(houseGridConnections, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); +double pctOfHousesWithImprovedInsulation = 100.0 * ((double)nbHousesWithImprovedInsulation)/nbHousesThatCanGetImprovedIsolation; +sl_householdHeatDemandReductionResidentialArea_pct.setValue(roundToInt(pctOfHousesWithImprovedInsulation), false); + + +//PT +int nbHousesWithPT = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); + +sl_rooftopPTHouses_pct.setValue(roundToInt((nbHousesWithPT*100.0)/nbHouses), false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754924544023</Id> + <Name>f_updateHeatingSliders_businesspark</Name> + <X>-360</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); + +//Savings (IN PROGRESS, WHAT ABOUT THERMAL BUILDINGS?????) +double totalBaseConsumption_kWh = 0; +double totalSavedConsumption_kWh = 0; +for(GridConnection GC : utilityGridConnections){ + if(GC.v_isActive){ + List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); // FIX FOR HOT WATER/PT IN LONG RUN + List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); + for(J_EAProfile profileEA : profileEAs){ + double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); + totalBaseConsumption_kWh += baseConsumption_kWh; + totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; + } + for(J_EAConsumption consumptionEA : consumptionEAs){ + totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; + totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; + } + + if(GC.p_BuildingThermalAsset != null){ + traceln("WARNING: SLIDER SAVINGS UPDATE FUNCTION IS NOT FUNCTIONAL YET FOR COMPANIES WITH THERMAL BUILDING ASSETS"); + } + } +} + +double heatSavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; +sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.setValue(roundToInt(heatSavings_pct), false); + + +//Heating type +int totalCompaniesWithHeating = 0; +int nbOfCompaniesWithGasBurners = 0; +int nbOfCompaniesWithHybridHeatpumps = 0; +int nbOfCompaniesWithElectricHeatpumps = 0; +int nbOfCompaniesOnHTHeatGrid = 0; +int nbOfCompaniesOnLTHeatGrid = 0; +int nbOfCompaniesWithCustomHeating = 0; + +for(GCUtility GC : utilityGridConnections){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalCompaniesWithHeating++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbOfCompaniesWithGasBurners++; + break; + case HYBRID_HEATPUMP: + nbOfCompaniesWithHybridHeatpumps++; + break; + case ELECTRIC_HEATPUMP: + nbOfCompaniesWithElectricHeatpumps++; + break; + case DISTRICTHEAT: + nbOfCompaniesOnHTHeatGrid++; + break; + case LT_DISTRICTHEAT: + nbOfCompaniesOnLTHeatGrid++; + break; + case CUSTOM: + nbOfCompaniesWithCustomHeating++; + break; + } + } +} + +int companiesWithGasBurners_pct = roundToInt(100.0 * nbOfCompaniesWithGasBurners / totalCompaniesWithHeating); +int companiesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithHybridHeatpumps / totalCompaniesWithHeating); +int companiesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithElectricHeatpumps / totalCompaniesWithHeating); +int companiesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnHTHeatGrid / totalCompaniesWithHeating); +int companiesWithLTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnLTHeatGrid / totalCompaniesWithHeating); +int companiesWithCustomHeating_pct = roundToInt(100.0 * nbOfCompaniesWithCustomHeating / totalCompaniesWithHeating); + + +sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct.setValue(companiesWithGasBurners_pct, false); +sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.setValue(companiesWithHybridHeatpump_pct, false); +sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct.setValue(companiesWithElectricHeatpump_pct, false); +sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.setValue(companiesWithHTDistrictHeat_pct, false); +//sl_heatDemandSlidersCompaniesLTDistrictHeatingCompanies_pct.setValue(companiesWithLTDistrictHeat_pct, false); Doesnt exist (yet) for companies +sl_heatingTypeSlidersCompaniesCustom_pct.setValue(companiesWithCustomHeating_pct, false); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754924574713</Id> + <Name>f_updateHeatingSliders_custom</Name> + <X>-360</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//If you have a custom tab, +//override this function to make it update automatically +traceln("Forgot to override the update custom heating sliders functionality");</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1760350664957</Id> + <Name>f_setHeatingSystems</Name> + <X>90</X> + <Y>711</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>orderedHeatingSystemGCList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>changedSliderHeatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Parameter> + <Name>sliderGoal_pct</Name> + <Type>double</Type> + </Parameter> + <Body>int totalNrOfHeatingSystems = 0; +int nbGasBurners = 0; +int nbHybridHeatpumps = 0; +int nbElectricHeatpumps = 0; +int nbHTHeatGrid = 0; +int nbLTHeatGrid = 0; +int nbCustomHeating = 0; +List<GridConnection> gasBurnerGCs = new ArrayList<>(); +List<GridConnection> hybridHeatpumpGCs = new ArrayList<>(); +List<GridConnection> electricHeatpumpGCs = new ArrayList<>(); +List<GridConnection> HTHeatGridGCs = new ArrayList<>(); +List<GridConnection> LTHeatGridGCs = new ArrayList<>(); + +for(GridConnection GC : gcList){ + if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ + totalNrOfHeatingSystems++; + switch(GC.f_getCurrentHeatingType()){ + case GAS_BURNER: + nbGasBurners++; + if(!GC.f_getHeatingTypeIsGhost()){ + gasBurnerGCs.add(GC); + } + break; + case HYBRID_HEATPUMP: + nbHybridHeatpumps++; + if(!GC.f_getHeatingTypeIsGhost()){ + hybridHeatpumpGCs.add(GC); + } + break; + case ELECTRIC_HEATPUMP: + nbElectricHeatpumps++; + if(!GC.f_getHeatingTypeIsGhost()){ + electricHeatpumpGCs.add(GC); + } + break; + case DISTRICTHEAT: + nbHTHeatGrid++; + if(!GC.f_getHeatingTypeIsGhost()){ + HTHeatGridGCs.add(GC); + } + break; + case LT_DISTRICTHEAT: + nbLTHeatGrid++; + if(!GC.f_getHeatingTypeIsGhost()){ + LTHeatGridGCs.add(GC); + } + break; + case CUSTOM: + nbCustomHeating++; + if(!GC.f_getHeatingTypeIsGhost()){ + //No collection, as ghost cant be changed anyway + } + break; + } + } +} + +int nbChangedHeatingTypeGoal = roundToInt(totalNrOfHeatingSystems*sliderGoal_pct/100.0); + +int currentNumberOfChangedHeatingType = 0; + +switch(changedSliderHeatingType){ + case GAS_BURNER: + currentNumberOfChangedHeatingType = nbGasBurners; + break; + case HYBRID_HEATPUMP: + currentNumberOfChangedHeatingType = nbHybridHeatpumps; + break; + case ELECTRIC_HEATPUMP: + currentNumberOfChangedHeatingType = nbElectricHeatpumps; + break; + case DISTRICTHEAT: + currentNumberOfChangedHeatingType = nbHTHeatGrid; + break; + case LT_DISTRICTHEAT: + currentNumberOfChangedHeatingType = nbLTHeatGrid; + break; +} + + + +if (currentNumberOfChangedHeatingType < nbChangedHeatingTypeGoal) { + while ( currentNumberOfChangedHeatingType < nbChangedHeatingTypeGoal ) { + + GridConnection changingGC = null; + if(changedSliderHeatingType != OL_GridConnectionHeatingType.GAS_BURNER && gasBurnerGCs.size() > 0){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> gasBurnerGCs.contains(gc)); + gasBurnerGCs.remove(changingGC); + } + else if(changedSliderHeatingType != OL_GridConnectionHeatingType.HYBRID_HEATPUMP && hybridHeatpumpGCs.size() > 0){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> hybridHeatpumpGCs.contains(gc)); + hybridHeatpumpGCs.remove(changingGC); + } + else if (changedSliderHeatingType != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP && electricHeatpumpGCs.size() > 0 ) { + changingGC = findFirst(orderedHeatingSystemGCList, gc -> electricHeatpumpGCs.contains(gc)); + electricHeatpumpGCs.remove(changingGC); + } + else if (changedSliderHeatingType != OL_GridConnectionHeatingType.DISTRICTHEAT && HTHeatGridGCs.size() > 0 ) { + changingGC = findFirst(orderedHeatingSystemGCList, gc -> HTHeatGridGCs.contains(gc)); + HTHeatGridGCs.remove(changingGC); + } + else if (changedSliderHeatingType != OL_GridConnectionHeatingType.LT_DISTRICTHEAT && LTHeatGridGCs.size() > 0 ) { + changingGC = findFirst(orderedHeatingSystemGCList, gc -> LTHeatGridGCs.contains(gc)); + LTHeatGridGCs.remove(changingGC); + } + else{ + throw new RuntimeException("No more GC left to change into raised slider type!" ); + } + + if(changingGC == null){ + throw new RuntimeException("orderedHeatingSystemGClist does not contain a GC found by this function! This should not be possible!" ); + } + + //Change the current heating type to the new one + changingGC.f_removeAllHeatingAssets(); + f_addHeatAsset(changingGC, changedSliderHeatingType, f_calculatePeakHeatDemand_kW(changingGC)); + changingGC.f_addHeatManagement(changedSliderHeatingType, false); + currentNumberOfChangedHeatingType ++; + } +} +else { + // Remove Gas burners Trucks + while ( currentNumberOfChangedHeatingType > nbChangedHeatingTypeGoal ) { + // replace a gasburner with a hybrid heatpump + GridConnection changingGC = null; + OL_GridConnectionHeatingType newHeatingType = OL_GridConnectionHeatingType.GAS_BURNER; // Always change into gasburner system. + if(changedSliderHeatingType == OL_GridConnectionHeatingType.GAS_BURNER){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> gasBurnerGCs.contains(gc)); + gasBurnerGCs.remove(changingGC); + newHeatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; // If removing gasburner, change into hybrid system. + } + else if(changedSliderHeatingType == OL_GridConnectionHeatingType.HYBRID_HEATPUMP){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> hybridHeatpumpGCs.contains(gc)); + hybridHeatpumpGCs.remove(changingGC); + } + else if(changedSliderHeatingType == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> electricHeatpumpGCs.contains(gc)); + electricHeatpumpGCs.remove(changingGC); + } + else if(changedSliderHeatingType == OL_GridConnectionHeatingType.DISTRICTHEAT){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> HTHeatGridGCs.contains(gc)); + HTHeatGridGCs.remove(changingGC); + } + else if(changedSliderHeatingType == OL_GridConnectionHeatingType.LT_DISTRICTHEAT){ + changingGC = findFirst(orderedHeatingSystemGCList, gc -> LTHeatGridGCs.contains(gc)); + LTHeatGridGCs.remove(changingGC); + } + changingGC.f_removeAllHeatingAssets(); + f_addHeatAsset(changingGC, newHeatingType, f_calculatePeakHeatDemand_kW(changingGC)); + changingGC.f_addHeatManagement(newHeatingType, false); + currentNumberOfChangedHeatingType--; + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1760368810352</Id> + <Name>f_addHeatAsset</Name> + <X>110</X> + <Y>731</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatAssetType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Parameter> + <Name>maxHeatOutputPower_kW</Name> + <Type>double</Type> + </Parameter> + <Body>//Initialize parameters +double heatOutputCapacityGasBurner_kW; +double inputCapacityElectric_kW; +double efficiency; +double baseTemperature_degC; +double outputTemperature_degC; +OL_AmbientTempType ambientTempType; +double sourceAssetHeatPower_kW; +double belowZeroHeatpumpEtaReductionFactor; +maxHeatOutputPower_kW = maxHeatOutputPower_kW*2; // Make the asset capacity twice as high, to make sure it can handle the load in other scenarios with more heat consumption. +J_AVGC_data avgc_data = zero_Interface.energyModel.avgc_data; +double timeStep_h = zero_Interface.energyModel.p_timeStep_h; + +switch (heatAssetType){ // There is always only one heatingType, If there are many assets the type is CUSTOM + + case GAS_BURNER: + heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); + J_EAConversionGasBurner gasBurner = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW , avgc_data.p_avgEfficiencyGasBurner_fr, timeStep_h, 90); + break; + + case HYBRID_HEATPUMP: + + //Add primary heating asset (heatpump) (if its not part of the basic profile already + inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW / 3); //-- /3, kan nog kleiner want is hybride zodat gasbrander ook bij springt, dus kleiner MOETEN aanname voor hoe klein onderzoeken + + efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; + baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType); + + zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); + + //Add secondary heating asset (gasburner) + heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); + efficiency = avgc_data.p_avgEfficiencyGasBurner_fr; + outputTemperature_degC = avgc_data.p_avgOutputTemperatureGasBurner_degC; + + J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW, efficiency, timeStep_h, outputTemperature_degC); + break; + + case ELECTRIC_HEATPUMP: + //Add primary heating asset (heatpump) + inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW); // Could be smaller due to high cop + efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; + baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); + break; + + case GAS_CHP: + + double outputCapacityElectric_kW = (maxHeatOutputPower_kW/avgc_data.p_avgEfficiencyCHP_thermal_fr) * avgc_data.p_avgEfficiencyCHP_electric_fr; + outputTemperature_degC = avgc_data.p_avgOutputTemperatureCHP_degC; + efficiency = avgc_data.p_avgEfficiencyCHP_thermal_fr + avgc_data.p_avgEfficiencyCHP_electric_fr; + + new J_EAConversionGasCHP(parentGC, outputCapacityElectric_kW, maxHeatOutputPower_kW, efficiency, timeStep_h, outputTemperature_degC ); + break; + + case DISTRICTHEAT: + double heatOutputCapacityDeliverySet_kW = max(avgc_data.p_minDistrictHeatingDeliverySetOutputCapacity_kW, maxHeatOutputPower_kW); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; + efficiency = avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; + + new J_EAConversionHeatDeliverySet(parentGC, heatOutputCapacityDeliverySet_kW, efficiency, timeStep_h, outputTemperature_degC); + + //Add GC to heat grid + GridNode heatgrid = findFirst(zero_Interface.energyModel.pop_gridNodes, node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + if(heatgrid == null){ + heatgrid = f_createNewHeatGrid(); + } + //Connect + parentGC.p_parentNodeHeatID = heatgrid.p_gridNodeID; + parentGC.p_parentNodeHeat = heatgrid; + break; +} +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>GridNode</ReturnType> + <Id>1760370085949</Id> + <Name>f_createNewHeatGrid</Name> + <X>130</X> + <Y>751</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); +zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); +GN_heat.p_gridNodeID = "Heatgrid"; + +// Check wether transformer capacity is known or estimated +GN_heat.p_capacity_kW = 1000000; +GN_heat.p_realCapacityAvailable = false; + +// Basic GN information +GN_heat.p_description = "Custom toegevoegde Warmtenet"; + +//Define node type +GN_heat.p_nodeType = OL_GridNodeType.HT; +GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + +//Define GN location +GN_heat.p_latitude = 0; +GN_heat.p_longitude = 0; +GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + +//Show warning that heat grid is not a simple solution +zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); + +return GN_heat;</Body> + </Function> + </Functions> + <AgentLinks> + <AgentLink> + <Id>1722253108626</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <ContainerLinks> + <ContainerLink> + <Id>1722253115477</Id> + <Name>uI_Tabs</Name> + <X>40</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>UI_Tabs</ClassName> + </ActiveObjectClass> + </ContainerLink> + <ContainerLink> + <Id>1722253115479</Id> + <Name>zero_Interface</Name> + <X>160</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>Zero_Interface</ClassName> + </ActiveObjectClass> + </ContainerLink> + <ContainerLink> + <Id>1753694295453</Id> + <Name>uI_EnergyHub</Name> + <X>310</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>UI_EnergyHub</ClassName> + </ActiveObjectClass> + </ContainerLink> + </ContainerLinks> + <Presentation> + <Level> + <Id>1722253108632</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1722350093699</Id> + <Name>rect_genericFunctions</Name> + <X>10</X> + <Y>460</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-4144960</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>450</Width> + <Height>580</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722350093702</Id> + <Name>t_genericFunctions</Name> + <X>140</X> + <Y>480</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Generic Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>22</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1722253128676</Id> + <Name>gr_heatingSliders_default</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1722253128678</Id> + <Name>rect_heatDemandSliders</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-6943</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722253128680</Id> + <Name>t_gasBurnerHouseholdsDescription</Name> + <X>30</X> + <Y>240</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>HR ketel aardgas</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128682</Id> + <Name>t_hybridHeatPumpHouseholdsDescription</Name> + <X>30</X> + <Y>265</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Hybride warmtepomp</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128684</Id> + <Name>t_electricHeatPumpHouseholdsDescription</Name> + <X>30</X> + <Y>290</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Elek. warmtepomp</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128686</Id> + <Name>t_districtHeatingHouseholdsDescription</Name> + <X>30</X> + <Y>315</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Warmtenet</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128688</Id> + <Name>t_electricHeatPumpHouseholds_pct</Name> + <X>235</X> + <Y>290</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_electricHeatPumpHouseholds_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722253128690</Id> + <Name>t_gasBurnerHouseholds_pct</Name> + <X>235</X> + <Y>240</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_gasBurnerHouseholds_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722253128692</Id> + <Name>t_districtHeatingHouseholds_pct</Name> + <X>235</X> + <Y>315</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_districtHeatingHouseholds_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722253128694</Id> + <Name>t_hybridHeatPumpHouseholds_pct</Name> + <X>235</X> + <Y>265</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_hybridHeatPumpHouseholds_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128696</Id> + <Name>sl_districtHeatingHouseholds_pct</Name> + <X>265</X> + <Y>310</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <VisibleCode>false</VisibleCode> + <Enabled>false</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128698</Id> + <Name>sl_gasBurnerHouseholds_pct</Name> + <X>265</X> + <Y>235</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.GAS_BURNER, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128700</Id> + <Name>sl_hybridHeatPumpHouseholds_pct</Name> + <X>265</X> + <Y>260</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <VisibleCode>false</VisibleCode> + <Enabled>false</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128702</Id> + <Name>sl_electricHeatPumpHouseholds_pct</Name> + <X>265</X> + <Y>285</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128704</Id> + <Name>sl_heatDemandReductionHouseholds_pct</Name> + <X>265</X> + <Y>200</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), sl_heatDemandReductionHouseholds_pct.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>-50</MinValue> + <MaxValue>50</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722253128706</Id> + <Name>t_heatDemandReductionHouseholds_pct</Name> + <X>235</X> + <Y>205</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_heatDemandReductionHouseholds_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722253128708</Id> + <Name>t_heatDemandReductionHouseholdsDescription</Name> + <X>30</X> + <Y>205</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Besparing warmte</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128710</Id> + <Name>t_householdsDescription</Name> + <X>20</X> + <Y>180</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Huishoudens</Text> + <Font> + <Name>Calibri</Name> + <Size>18</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128712</Id> + <Name>sl_heatDemandReductionCompanies_pct</Name> + <X>265</X> + <Y>35</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), sl_heatDemandReductionCompanies_pct.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>-50</MinValue> + <MaxValue>50</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722253128714</Id> + <Name>t_heatDemandReductionCompaniesDescription</Name> + <X>25</X> + <Y>40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Besparing warmte</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128716</Id> + <Name>t_heatDemandReductionCompanies_pct</Name> + <X>235</X> + <Y>40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_heatDemandReductionCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722253128718</Id> + <Name>t_gasBurnerCompaniesDescription</Name> + <X>25</X> + <Y>75</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>HR ketel aardgas</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128720</Id> + <Name>t_hybridHeatPumpCompaniesDescription</Name> + <X>25</X> + <Y>100</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Hybride warmtepomp</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128722</Id> + <Name>t_electricHeatPumpCompaniesDescription</Name> + <X>25</X> + <Y>125</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Elek. warmtepomp</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128724</Id> + <Name>t_districtHeatingCompaniesDescription</Name> + <X>25</X> + <Y>150</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Warmtenet</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722253128726</Id> + <Name>t_electricHeatPumpCompanies_pct</Name> + <X>235</X> + <Y>125</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_electricHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722253128728</Id> + <Name>t_gasBurnerCompanies_pct</Name> + <X>235</X> + <Y>75</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_gasBurnerCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722253128730</Id> + <Name>t_districtHeatingCompanies_pct</Name> + <X>235</X> + <Y>150</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_districtHeatingCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722253128732</Id> + <Name>t_hybridHeatPumpCompanies_pct</Name> + <X>235</X> + <Y>100</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_hybridHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128734</Id> + <Name>sl_districtHeatingCompanies_pct</Name> + <X>265</X> + <Y>145</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <VisibleCode>false</VisibleCode> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128736</Id> + <Name>sl_gasBurnerCompanies_pct</Name> + <X>265</X> + <Y>70</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.GAS_BURNER, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128738</Id> + <Name>sl_hybridHeatPumpCompanies_pct</Name> + <X>265</X> + <Y>95</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <VisibleCode>false</VisibleCode> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722253128740</Id> + <Name>sl_electricHeatPumpCompanies_pct</Name> + <X>265</X> + <Y>120</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722254471242</Id> + <Name>t_companiesDescription</Name> + <X>20</X> + <Y>15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Bedrijven</Text> + <Font> + <Name>Calibri</Name> + <Size>18</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Image> + <Id>1746091940464</Id> + <Name>i_companyReduction</Name> + <X>170</X> + <Y>40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyReduction, zero_Interface.v_infoText.companyHeatDemandReduction, i_companyReduction.getX() + uI_Tabs.v_presentationXOffset, i_companyReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746092829752</Id> + <Name>i_companyGasBoiler</Name> + <X>170</X> + <Y>75</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyGasBoiler, zero_Interface.v_infoText.companyGasBoiler, i_companyGasBoiler.getX() + uI_Tabs.v_presentationXOffset, i_companyGasBoiler.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746092829788</Id> + <Name>i_companyElectricHeatpump</Name> + <X>170</X> + <Y>125</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyElectricHeatpump, zero_Interface.v_infoText.companyElectricHeatpump, i_companyElectricHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_companyElectricHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746092829826</Id> + <Name>i_companyHybridHeatpump</Name> + <X>170</X> + <Y>100</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyHybridHeatpump, zero_Interface.v_infoText.companyHybridHeatpump, i_companyHybridHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_companyHybridHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746092829863</Id> + <Name>i_companyHeatGrid</Name> + <X>170</X> + <Y>150</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyHeatGrid, zero_Interface.v_infoText.companyHeatGrid, i_companyHeatGrid.getX() + uI_Tabs.v_presentationXOffset, i_companyHeatGrid.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746092829905</Id> + <Name>i_householdElectricHeatpump</Name> + <X>170</X> + <Y>290</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdElectricHeatpump, zero_Interface.v_infoText.householdElectricHeatpump, i_householdElectricHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746092829948</Id> + <Name>i_householdReduction</Name> + <X>170</X> + <Y>205</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdReduction, zero_Interface.v_infoText.householdHeatDemandReduction, i_householdReduction.getX() + uI_Tabs.v_presentationXOffset, i_householdReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746092829986</Id> + <Name>i_householdGasBoiler</Name> + <X>170</X> + <Y>240</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdGasBoiler, zero_Interface.v_infoText.householdGasBoiler, i_householdGasBoiler.getX() + uI_Tabs.v_presentationXOffset, i_householdGasBoiler.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746092830024</Id> + <Name>i_householdHeatGrid</Name> + <X>170</X> + <Y>315</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdHeatGrid, zero_Interface.v_infoText.householdHeatGrid, i_householdHeatGrid.getX() + uI_Tabs.v_presentationXOffset, i_householdHeatGrid.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746092830063</Id> + <Name>i_householdHybridHeatpump</Name> + <X>170</X> + <Y>265</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdHybridHeatpump, zero_Interface.v_infoText.householdHybridHeatpump, i_householdHybridHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_householdHybridHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + </Presentation> + </Group> + <Group> + <Id>1722326800106</Id> + <Name>gr_heatingSliders_businesspark</Name> + <X>800</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <XCode>0</XCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1722326800108</Id> + <Name>rect_heatDemandSliders1</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-6943</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722326800142</Id> + <Name>sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct</Name> + <X>255</X> + <Y>50</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.getValue());</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>-50</MinValue> + <MaxValue>50</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722326800144</Id> + <Name>t_heatDemandReductionCompaniesDescription1</Name> + <X>15</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Besparing warmte</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722326800146</Id> + <Name>t_heatDemandReductionCompanies_pct1</Name> + <X>225</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722326800148</Id> + <Name>t_gasBurnerCompaniesDescription1</Name> + <X>15</X> + <Y>90</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>HR ketel aardgas</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722326800150</Id> + <Name>t_hybridHeatPumpCompaniesDescription1</Name> + <X>15</X> + <Y>115</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Hybride warmtepomp</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722326800152</Id> + <Name>t_electricHeatPumpCompaniesDescription1</Name> + <X>15</X> + <Y>140</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Elek. warmtepomp</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722326800154</Id> + <Name>t_districtHeatingCompaniesDescription1</Name> + <X>15</X> + <Y>165</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Warmtenet</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722326800156</Id> + <Name>t_electricHeatPumpCompanies_pct1</Name> + <X>225</X> + <Y>140</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722326800158</Id> + <Name>t_gasBurnerCompanies_pct1</Name> + <X>225</X> + <Y>90</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722326800160</Id> + <Name>t_districtHeatingCompanies_pct1</Name> + <X>225</X> + <Y>165</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722326800162</Id> + <Name>t_hybridHeatPumpCompanies_pct1</Name> + <X>225</X> + <Y>115</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722326800164</Id> + <Name>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct</Name> + <X>255</X> + <Y>160</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722326800166</Id> + <Name>sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct</Name> + <X>255</X> + <Y>85</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.GAS_BURNER, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722326800168</Id> + <Name>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct</Name> + <X>255</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722326800170</Id> + <Name>sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct</Name> + <X>255</X> + <Y>135</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722326800172</Id> + <Name>t_companiesDescription1</Name> + <X>10</X> + <Y>30</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Bedrijven</Text> + <Font> + <Name>Calibri</Name> + <Size>18</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1734371025574</Id> + <Name>t_eBoilerCompanies_pct</Name> + <X>225</X> + <Y>190</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_heatDemandSlidersCompaniesEBoiler_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1734371025600</Id> + <Name>sl_heatDemandSlidersCompaniesEBoiler_pct</Name> + <X>255</X> + <Y>185</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isEnabled()</VisibleCode> + <Enabled>false</Enabled> + <ActionCode>traceln("Slider doet nog niets!!");//f_setHeatingSlidersCompanies(3); +//f_resetNeighborhoodHeatingSystems(4);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1734371025534</Id> + <Name>t_eBoilerCompaniesDescription</Name> + <X>15</X> + <Y>190</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>E-boiler</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Image> + <Id>1746093187570</Id> + <Name>i_companyReduction_Company</Name> + <X>160</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyReduction_Company, zero_Interface.v_infoText.companyHeatDemandReduction, i_companyReduction_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyReduction_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746093187613</Id> + <Name>i_companyGasBoiler_Company</Name> + <X>160</X> + <Y>90</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyGasBoiler_Company, zero_Interface.v_infoText.companyGasBoiler, i_companyGasBoiler_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyGasBoiler_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746093187656</Id> + <Name>i_companyElectricHeatpump_Company</Name> + <X>160</X> + <Y>140</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyElectricHeatpump_Company, zero_Interface.v_infoText.companyElectricHeatpump, i_companyElectricHeatpump_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyElectricHeatpump_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746093187698</Id> + <Name>i_companyHybridHeatpump_Company</Name> + <X>160</X> + <Y>115</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyHybridHeatpump_Company, zero_Interface.v_infoText.companyHybridHeatpump, i_companyHybridHeatpump_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyHybridHeatpump_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746093187741</Id> + <Name>i_companyHeatGrid_Company</Name> + <X>160</X> + <Y>165</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyHeatGrid_Company, zero_Interface.v_infoText.companyHeatGrid, i_companyHeatGrid_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyHeatGrid_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746093187784</Id> + <Name>i_companyEBoiler_Company</Name> + <X>160</X> + <Y>190</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyEBoiler_Company, zero_Interface.v_infoText.companyElectricBoiler, i_companyEBoiler_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyEBoiler_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Text> + <Id>1754382990780</Id> + <Name>t_customHeatingTypeCompanies_pct</Name> + <X>225</X> + <Y>225</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_heatingTypeSlidersCompaniesCustom_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_heatingTypeSlidersCompaniesCustom_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1754382990782</Id> + <Name>sl_heatingTypeSlidersCompaniesCustom_pct</Name> + <X>255</X> + <Y>220</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>false</Enabled> + <ActionCode>new RuntimeException("This slider action should not be called, this slider is purely for visualisation of the amount of custom heating types for companies");</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1754382990784</Id> + <Name>txt_customHeatingDemandCompaniesDescription</Name> + <X>15</X> + <Y>225</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_heatingTypeSlidersCompaniesCustom_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Custom systeem</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Image> + <Id>1754382990787</Id> + <Name>i_companyCustomHeatingType_Company</Name> + <X>160</X> + <Y>225</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_heatingTypeSlidersCompaniesCustom_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_companyCustomHeatingType_Company, zero_Interface.v_infoText.companyCustomHeating, i_companyCustomHeatingType_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyCustomHeatingType_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + </Presentation> + </Group> + <Rectangle> + <Id>1722335783989</Id> + <Name>rect_demandFunctions</Name> + <X>40</X> + <Y>510</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-8355840</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>390</Width> + <Height>120</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722335783991</Id> + <Name>txt_demandFunctionsDescription</Name> + <X>240</X> + <Y>520</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Demand Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Rectangle> + <Id>1722338183031</Id> + <Name>rect_heatingFunctions</Name> + <X>40</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-5952982</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>390</Width> + <Height>150</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722338183033</Id> + <Name>txt_heatingFunctionsDescription</Name> + <X>130</X> + <Y>650</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Heating Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Group> + <Id>1749738869813</Id> + <Name>gr_heatingSliders_residential</Name> + <X>400</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <XCode>0</XCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1749738869815</Id> + <Name>rect_heatDeandSlidersResidentialArea</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-6943</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1749738869817</Id> + <Name>t_householdGasBurnerDescriptionResidentialArea</Name> + <X>20</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdGasBurnerResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Gas brander</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1749738869821</Id> + <Name>t_householdElectricHeatPumpDescriptionResidentialArea</Name> + <X>20</X> + <Y>105</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdElectricHeatPumpResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Elec. warmtepomp</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1749738869823</Id> + <Name>t_householdElectricHeatPumpResidentialArea_pct</Name> + <X>230</X> + <Y>105</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdElectricHeatPumpResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_householdElectricHeatPumpResidentialArea_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1749738869825</Id> + <Name>t_householdGasBurnerResidentialArea_pct</Name> + <X>230</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdGasBurnerResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_householdGasBurnerResidentialArea_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1749738869829</Id> + <Name>sl_householdGasBurnerResidentialArea_pct</Name> + <X>260</X> + <Y>50</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} + +f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.GAS_BURNER, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>100</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1749738869833</Id> + <Name>sl_householdElectricHeatPumpResidentialArea_pct</Name> + <X>260</X> + <Y>100</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} + +f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1749738869835</Id> + <Name>sl_householdHeatDemandReductionResidentialArea_pct</Name> + <X>260</X> + <Y>245</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_householdInsulation( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdHeatDemandReductionResidentialArea_pct.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1749738869837</Id> + <Name>t_householdHeatDemandReductionResidentialArea_pct</Name> + <X>230</X> + <Y>250</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdHeatDemandReductionResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_householdHeatDemandReductionResidentialArea_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1749738869839</Id> + <Name>t_householdHeatDemandReductionDescriptionResidentialArea</Name> + <X>20</X> + <Y>250</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdHeatDemandReductionResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Huizen met betere isolatie</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1749738869841</Id> + <Name>t_householdHeatingTypeDescriptionResidentialArea</Name> + <X>20</X> + <Y>30</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Heating & Cooling</Text> + <Font> + <Name>Calibri</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1749738869843</Id> + <Name>sl_householdAircoResidentialArea_pct</Name> + <X>260</X> + <Y>216</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setAircos(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdAircoResidentialArea_pct.getValue() / 100.0);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>5</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1749738869845</Id> + <Name>t_householdAircoDescriptionResidentialArea</Name> + <X>20</X> + <Y>220</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdAircoResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Huizen met Airco</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1749738869847</Id> + <Name>t_householdAircoResidentialArea_pct</Name> + <X>230</X> + <Y>220</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdAircoResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_householdAircoResidentialArea_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="CheckBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1749738869849</Id> + <Name>cb_householdHTDistrictHeatingResidentialArea</Name> + <X>20</X> + <Y>130</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="135" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>if ( cb_householdHTDistrictHeatingResidentialArea.isSelected() ){ + sl_householdGasBurnerResidentialArea_pct.setValue(0, false); + sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_addDistrictHeatingToAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +else{ + sl_householdGasBurnerResidentialArea_pct.setValue(100, false); + sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="12" Style="0"/> + <LabelText>HT-Warmtenet</LabelText> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="CheckBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1749738869851</Id> + <Name>cb_householdLTDistrictHeatingResidentialArea</Name> + <X>20</X> + <Y>165</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="185" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>if ( cb_householdLTDistrictHeatingResidentialArea.isSelected() ){ + sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); + sl_householdGasBurnerResidentialArea_pct.setValue(0, false); + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_addLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +else{ + sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); + sl_householdGasBurnerResidentialArea_pct.setValue(100, false); + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="12" Style="0"/> + <LabelText>LT-Warmtenet</LabelText> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Image> + <Id>1752231559962</Id> + <Name>i_householdGasBurner</Name> + <X>180</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_householdGasBurnerResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdGasBurner, zero_Interface.v_infoText.householdGasBoiler, i_householdGasBurner.getX() + uI_Tabs.v_presentationXOffset, i_householdGasBurner.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1752231559982</Id> + <Name>i_householdHeatPump</Name> + <X>180</X> + <Y>105</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_householdElectricHeatPumpResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdHeatPump, zero_Interface.v_infoText.householdElectricHeatpump, i_householdHeatPump.getX() + uI_Tabs.v_presentationXOffset, i_householdHeatPump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1752231560000</Id> + <Name>i_householdHTDistrictHeating</Name> + <X>220</X> + <Y>135</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>cb_householdHTDistrictHeatingResidentialArea.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdHTDistrictHeating, zero_Interface.v_infoText.householdHTDistrictHeating, i_householdHTDistrictHeating.getX() + uI_Tabs.v_presentationXOffset, i_householdHTDistrictHeating.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1752231560019</Id> + <Name>i_householdLTDistrictHeating</Name> + <X>220</X> + <Y>170</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>cb_householdLTDistrictHeatingResidentialArea.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdLTDistrictHeating, zero_Interface.v_infoText.householdElectricHeatpump, i_householdLTDistrictHeating.getX() + uI_Tabs.v_presentationXOffset, i_householdLTDistrictHeating.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1752231560038</Id> + <Name>i_householdAirconditioning</Name> + <X>180</X> + <Y>220</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_householdAircoResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdAirconditioning, zero_Interface.v_infoText.householdAirconditioning, i_householdAirconditioning.getX() + uI_Tabs.v_presentationXOffset, i_householdAirconditioning.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1752231560056</Id> + <Name>i_householdAdditionalInsulation</Name> + <X>180</X> + <Y>250</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_householdHeatDemandReductionResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdAdditionalInsulation, zero_Interface.v_infoText.householdAdditionalInsulation, i_householdAdditionalInsulation.getX() + uI_Tabs.v_presentationXOffset, i_householdAdditionalInsulation.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Group> + <Id>1753951517102</Id> + <Name>gr_ptSlidersHouses</Name> + <X>200</X> + <Y>320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + </Group> + <Text> + <Id>1753949405477</Id> + <Name>t_rooftopPTHouses_pct</Name> + <X>230</X> + <Y>299</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_rooftopPTHouses_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_rooftopPTHouses_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1753949405484</Id> + <Name>sl_rooftopPTHouses_pct</Name> + <X>260</X> + <Y>294</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setPTSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_rooftopPTHouses_pct.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1753949405489</Id> + <Name>txt_rooftopPTHousesDescription</Name> + <X>20</X> + <Y>300</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_rooftopPTHouses_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Huizen met PT</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Image> + <Id>1753949405492</Id> + <Name>i_householdPT</Name> + <X>180</X> + <Y>298</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_rooftopPTHouses_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdPT, zero_Interface.v_infoText.householdRooftopPT, i_householdPT.getX() + uI_Tabs.v_presentationXOffset, i_householdPT.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Text> + <Id>1760349016791</Id> + <Name>txt_householdHybridHeatpumpDescriptionResidentialArea</Name> + <X>20</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdHybridHeatpumpResidentialArea.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Hybride warmtepomp</Text> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1760349016817</Id> + <Name>sl_householdHybridHeatpumpResidentialArea</Name> + <X>260</X> + <Y>75</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { + cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} +if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { + cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); + f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); +} + +f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Image> + <Id>1760349016828</Id> + <Name>i_householdHybridHeatPump</Name> + <X>180</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_householdHybridHeatpumpResidentialArea.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdHybridHeatPump, zero_Interface.v_infoText.householdHybridHeatpump, i_householdHybridHeatPump.getX() + uI_Tabs.v_presentationXOffset, i_householdHybridHeatPump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Text> + <Id>1760349443892</Id> + <Name>t_householdElectricHeatPumpResidentialArea_pct1</Name> + <X>230</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_householdHybridHeatpumpResidentialArea.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_householdHybridHeatpumpResidentialArea.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + </Presentation> + </Group> + <Rectangle> + <Id>1755004749570</Id> + <Name>rect_districtHeatingFunctions</Name> + <X>40</X> + <Y>800</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-65536</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>390</Width> + <Height>150</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1755004766095</Id> + <Name>txt_districtheatingFunctionsDescription</Name> + <X>160</X> + <Y>810</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>District Heating Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Rectangle> + <Id>1755004809972</Id> + <Name>rect_heatingProductionFunctions</Name> + <X>40</X> + <Y>960</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16711936</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>390</Width> + <Height>70</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1755004834735</Id> + <Name>txt_heatingProductionFunctionsDescription</Name> + <X>160</X> + <Y>970</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>District Heating Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + </Presentation> + </Level> + </Presentation> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1722245324895</Id> + <Name>tabMobility</Name> + <AdditionalClassCode>// Default Sliders +public ShapeGroup getGr_mobilitySliders_default() { + return this.gr_mobilitySliders_default; +} + +//Residential sliders +public ShapeGroup getGr_mobilitySliders_residential() { + return this.gr_mobilitySliders_residential; +} + +public ShapeSlider getSliderMobilityDemandReduction_pct () { + return this.sl_mobilityDemandReduction_pct; +} + +public ShapeSlider getSliderElectricTrucks_pct() { + return this.sl_electricTrucks_pct; +} + +public ShapeSlider getSliderHydrogenTrucks_pct() { + return this.sl_hydrogenTrucks_pct; +} + +public ShapeSlider getSliderFossilFuelTrucks_pct() { + return this.sl_fossilFuelTrucks_pct; +} + +public ShapeSlider getSliderElectricVans_pct() { + return this.sl_electricVans_pct; +} + +public ShapeSlider getSliderFossilFuelVans_pct() { + return this.sl_fossilFuelVans_pct; +} + +public ShapeSlider getSliderElectricCars_pct() { + return this.sl_electricCars_pct; +} + +public ShapeSlider getSliderFossilFuelCars_pct() { + return this.sl_fossilFuelCars_pct; +} + +public ShapeSlider getSl_privateEVsResidentialArea_pct(){ + return this.sl_privateEVsResidentialArea_pct; +} + +public ShapeSlider getSl_publicChargersResidentialArea_pct(){ + return this.sl_publicChargersResidentialArea_pct; +} +</AdditionalClassCode> + <Folder>1754045642067</Folder> + <Import>import org.apache.commons.lang3.tuple.Triple; +import java.util.stream.Collectors;</Import> + <ExtendsReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>tabArea</ClassName> + </ExtendsReference> + <Generic>false</Generic> + <GenericParameter> + <Id>1722245324901</Id> + <Name>1722245324901</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089976</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1722326400000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1722245324898</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1722245324902</CurrentLevel> + <ConnectionsId>1722245324896</ConnectionsId> + <Variables> + <Variable Class="PlainVariable"> + <Id>1729167973194</Id> + <Name>v_totalNumberOfGhostVehicle_Trucks</Name> + <X>40</X> + <Y>1140</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1729168015819</Id> + <Name>v_totalNumberOfGhostVehicle_Vans</Name> + <X>40</X> + <Y>1120</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1729168016768</Id> + <Name>v_totalNumberOfGhostVehicle_Cars</Name> + <X>40</X> + <Y>1100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + </Variables> + <Functions> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722256088443</Id> + <Name>f_setVehicleSliders</Name> + <Description>Function that calculates the values of the other sliders and sets them without calling an action. Takes as parameters the index of the slider which should not be touched as well as all the slider objects. HydrogenVehicle slider is optional and an argument of null can be passed. </Description> + <X>70</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>sliderIndex</Name> + <Type>int</Type> + </Parameter> + <Parameter> + <Name>electricSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>hydrogenSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>fossilFuelSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>double pct_electric = electricSlider.getValue(); +double pct_hydrogen = 0; +double pct_fossilFuel = fossilFuelSlider.getValue(); +if (hydrogenSlider != null) { + pct_hydrogen = hydrogenSlider.getValue(); +} + + +//Set array with pct values +double pctArray[]={pct_electric, pct_hydrogen, pct_fossilFuel}; +double pctExcess = Arrays.stream(pctArray).sum() - 100; +for (int i = 0; i<pctArray.length; i++){ + if (!(i==(int)sliderIndex)) { + pctArray[i] = max(0,pctArray[i] - pctExcess); + pctExcess = Arrays.stream(pctArray).sum() - 100; + } +} +if (pctExcess != 0) { + traceln("Sliders don't add up to 100%!"); +} + +//Set Sliders +electricSlider.setValue(pctArray[0], false); +if (hydrogenSlider != null) { + hydrogenSlider.setValue(pctArray[1], false); +} +fossilFuelSlider.setValue(pctArray[2], false); + +/* +double pct_fossilFuel = fossilFuelSlider.getValue(); +double pct_electric = electricSlider.getValue(); +double pct_hydrogen = 0; +if (hydrogenSlider != null) { + pct_hydrogen = hydrogenSlider.getValue(); +} + + +//Set array with pct values +double pctArray[]={pct_fossilFuel, pct_electric, pct_hydrogen}; +double pctExcess = Arrays.stream(pctArray).sum() - 100; +for (int i = 0; i<pctArray.length; i++){ + if (!(i==(int)sliderIndex)) { + pctArray[i] = max(0,pctArray[i] - pctExcess); + pctExcess = Arrays.stream(pctArray).sum() - 100; + } +} +if (pctExcess != 0) { + traceln("Sliders don't add up to 100%!"); +} + +//Set Sliders +fossilFuelSlider.setValue(pctArray[0], false); +electricSlider.setValue(pctArray[1], false); +if (hydrogenSlider != null) { + hydrogenSlider.setValue(pctArray[2], false); +} +*/</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1722342449665</Id> + <Name>f_setDemandReduction</Name> + <Description>Function that reduces the distance of all triptrackers of vehicles. Takes as arguments a list of GridConnections to effect and a percentage to reduce by compared to the default distance value of the triptrackers.</Description> + <X>70</X> + <Y>600</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>demandReduction_pct</Name> + <Type>double</Type> + </Parameter> + <Body>// TODO: when new triptrackers are created, for example in the company ui sliders, +// make sure they have this distance scaling fraction! + +double scalingFactor = 1 - demandReduction_pct/100; + +for (GridConnection gc : gcList) { + for (J_EAVehicle j_ea : gc.c_vehicleAssets) { + j_ea.getTripTracker().distanceScaling_fr = scalingFactor; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>Triple<Integer, Integer, Integer></ReturnType> + <Id>1729168033110</Id> + <Name>f_calculateNumberOfGhostVehicles</Name> + <X>20</X> + <Y>1080</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>Integer numberOfGhostVehicle_Cars = 0; +Integer numberOfGhostVehicle_Vans = 0; +Integer numberOfGhostVehicle_Trucks = 0; + +for (GridConnection gc : gcList ) { + if(gc.v_hasQuarterHourlyValues && gc.v_isActive){ + numberOfGhostVehicle_Cars += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVCars(); + numberOfGhostVehicle_Vans += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVVans(); + numberOfGhostVehicle_Trucks += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVTrucks(); + } +} + + +return Triple.of(numberOfGhostVehicle_Cars, numberOfGhostVehicle_Vans, numberOfGhostVehicle_Trucks);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1746008458894</Id> + <Name>f_setDieselTrucks</Name> + <X>70</X> + <Y>770</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHydrogenTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>double pctDieselTrucksGoal = sliderFossilFuelTrucks.getValue(); + +int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); + +int nbEtruckCurrent = triple.getLeft(); +int nbHydrogentrucksCurrent = triple.getMiddle(); +int nbDieseltrucksCurrent = triple.getRight(); +int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; + +int nbDieselTrucksGoal = roundToInt(total_vehicles*pctDieselTrucksGoal/100.0); +boolean finishedLookingThroughElectricTrucks = false; + +if (nbDieseltrucksCurrent < nbDieselTrucksGoal) { + // Add Diesel Trucks + while ( nbDieseltrucksCurrent < nbDieselTrucksGoal ) { + if ( nbEtruckCurrent > numberOfGhostVehicle_Trucks && !finishedLookingThroughElectricTrucks ) { + // replace electric truck with a diesel truck + if (!f_electricToDieselTruck(gcList)) { + finishedLookingThroughElectricTrucks = true; + } + else { + nbDieseltrucksCurrent++; + nbEtruckCurrent--; + } + } + else{// ( nbHydrogentrucksCurrent > 0 ) { + // replace hydrogen truck with diesel truck + if (!f_hydrogenToDieselTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbDieseltrucksCurrent++; + nbHydrogentrucksCurrent--; + } + /* + else { + throw new RuntimeException("Can not add another diesel vehicle as there are no other vehicles to replace."); + } + */ + } +} +else { + // Remove Diesel Trucks + while ( nbDieseltrucksCurrent > nbDieselTrucksGoal ) { + // replace a diesel truck with an electric truck + if (!f_dieselToElectricTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbDieseltrucksCurrent--; + nbEtruckCurrent++; + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1746008458907</Id> + <Name>f_setHydrogenTrucks</Name> + <X>70</X> + <Y>790</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHydrogenTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>double pctHydrogenTrucksGoal = sliderHydrogenTrucks.getValue(); + +int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); + +int nbEtruckCurrent = triple.getLeft(); +int nbHydrogentrucksCurrent = triple.getMiddle(); +int nbDieseltrucksCurrent = triple.getRight(); +int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; + +int nbHydrogenTrucksGoal = roundToInt(total_vehicles*pctHydrogenTrucksGoal/100.0); +boolean finishedLookingThroughDieselTrucks = false; + +if (nbHydrogentrucksCurrent < nbHydrogenTrucksGoal) { + // Add Hydrogen Trucks + while ( nbHydrogentrucksCurrent < nbHydrogenTrucksGoal && !finishedLookingThroughDieselTrucks ) { + if ( nbDieseltrucksCurrent > 0 ) { + // replace a diesel truck with a hydrogen truck + if (!f_dieselToHydrogenTruck(gcList)) { + finishedLookingThroughDieselTrucks = true; + } + else { + nbHydrogentrucksCurrent++; + nbDieseltrucksCurrent--; + } + } + else{// ( nbEtruckCurrent > v_totalNumberOfGhostVehicle_Trucks ) { + // replace an electric truck with a hydrogen truck + if (!f_electricToHydrogenTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbHydrogentrucksCurrent++; + nbEtruckCurrent--; + } + /*else { + throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); + }*/ + } +} +else { + // Remove Hydrogen Trucks + while ( nbHydrogentrucksCurrent > nbHydrogenTrucksGoal ) { + // replace a hydrogen truck with a diesel truck + if (!f_hydrogenToDieselTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbHydrogentrucksCurrent--; + nbDieseltrucksCurrent++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1746008458917</Id> + <Name>f_setElectricTrucks</Name> + <X>70</X> + <Y>810</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHydrogenTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>double pctElectricTrucksGoal = sliderElectricTrucks.getValue(); + +int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); + +int nbEtruckCurrent = triple.getLeft(); +int nbHydrogentrucksCurrent = triple.getMiddle(); +int nbDieseltrucksCurrent = triple.getRight(); +int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; + +int nbElectricTrucksGoal = roundToInt(total_vehicles*pctElectricTrucksGoal/100.0); +boolean finishedLookingThroughDieselTrucks = false; + +if (nbEtruckCurrent < nbElectricTrucksGoal) { + // Add Electric Trucks + while ( nbEtruckCurrent < nbElectricTrucksGoal && !finishedLookingThroughDieselTrucks ) { + if ( nbDieseltrucksCurrent > 0 ) { + // replace a diesel truck with an electric truck + if (!f_dieselToElectricTruck(gcList)) { + finishedLookingThroughDieselTrucks = true; + } + else { + nbEtruckCurrent++; + nbDieseltrucksCurrent--; + } + } + else{// if ( nbHydrogentrucksCurrent > 0 ) { + // replace a hydrogen truck with an electric truck + if (!f_hydrogenToElectricTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbEtruckCurrent++; + nbHydrogentrucksCurrent--; + } + /*else { + throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); + } + */ + } +} +else { + // Remove Electric Trucks + while ( nbEtruckCurrent > nbElectricTrucksGoal ) { + // replace an electric truck with a diesel truck + if (!f_electricToDieselTruck(gcList)) { + f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); + return; + } + nbEtruckCurrent--; + nbDieseltrucksCurrent++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1746008458938</Id> + <Name>f_dieselToElectricTruck</Name> + <X>360</X> + <Y>720</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EADieselVehicle dieselTruck = null; +boolean foundAdditionalVehicle = false; + +// find the diesel truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); + if ( dieselTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (dieselTruck!=null) { + GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; + boolean available = dieselTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselTruck); + dieselTruck.removeEnergyAsset(); + + // Re-add Electric vehicle + double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; + double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; + double initialStateOfCharge_fr = 1.0; + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; + double vehicleScalingElectric = 1.0; + J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); + electricTruck.available = available; + + zero_Interface.c_orderedVehicles.add(0, electricTruck); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricTruck); + } +} + +else { + return false; + //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1746008458950</Id> + <Name>f_hydrogenToElectricTruck</Name> + <X>360</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EAHydrogenVehicle hydrogenTruck = null; +boolean foundAdditionalVehicle = false; + +// find the hydrogen truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); + if ( hydrogenTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (hydrogenTruck!=null) { + GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; + boolean available = true; + available = hydrogenTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenTruck); + hydrogenTruck.removeEnergyAsset(); + + + // Re-add Electric vehicle + double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; + double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; + double initialStateOfCharge_fr = 1.0; + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; + double vehicleScalingElectric = 1.0; + J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); + electricTruck.available = available; + + zero_Interface.c_orderedVehicles.add(0, electricTruck); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricTruck); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1746008458960</Id> + <Name>f_electricToHydrogenTruck</Name> + <X>360</X> + <Y>780</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EAEV electricTruck = null; +boolean foundAdditionalVehicle = false; + +// find the electric truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + electricTruck = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); + if ( electricTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicle +if (!foundAdditionalVehicle) { + electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (electricTruck!=null) { + GridConnection gc = (GridConnection)electricTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; + boolean available = true; + available = electricTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(electricTruck); + electricTruck.removeEnergyAsset(); + + // Re-add hydrogen vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); + hydrogenVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(hydrogenVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1746008458968</Id> + <Name>f_dieselToHydrogenTruck</Name> + <X>360</X> + <Y>800</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EADieselVehicle dieselTruck = null; +boolean foundAdditionalVehicle = false; + +// find the diesel truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); + if ( dieselTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (dieselTruck!=null) { + GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; + boolean available = true; + available = dieselTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselTruck); + dieselTruck.removeEnergyAsset(); + + // Re-add hydrogen vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); + hydrogenVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(hydrogenVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1746008458977</Id> + <Name>f_electricToDieselTruck</Name> + <X>360</X> + <Y>840</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EAEV electricTruck = null; +boolean foundAdditionalVehicle = false; + +// find the electric truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + electricTruck = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); + if ( electricTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if ( electricTruck != null ) { + GridConnection gc = (GridConnection)electricTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; + boolean available = true; + available = electricTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(electricTruck); + electricTruck.removeEnergyAsset(); + + // Re-add diesel vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); + dieselVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1746008458987</Id> + <Name>f_hydrogenToDieselTruck</Name> + <X>360</X> + <Y>860</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EAHydrogenVehicle hydrogenTruck = null; +boolean foundAdditionalVehicle = false; + +// find the hydrogen truck to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); + if ( hydrogenTruck != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if ( hydrogenTruck != null ) { + GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; + boolean available = true; + available = hydrogenTruck.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenTruck); + hydrogenTruck.removeEnergyAsset(); + + // Re-add diesel vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); + dieselVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1746018501114</Id> + <Name>f_setTruckSlidersToCurrentEngineState</Name> + <X>360</X> + <Y>1040</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHydrogenTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelTrucks</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); +for (GridConnection gc : gcList) { + if (gc.v_isActive) { + vehicles.addAll(gc.c_vehicleAssets); + } +} + +int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); + +int nbElectricTrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Trucks; +int nbDieseltrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); +int nbHydrogentrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); + +int totalVehicles = nbElectricTrucksCurrent + nbDieseltrucksCurrent + nbHydrogentrucksCurrent; + + + +int pct_electricTruckSlider = roundToInt(100.0*nbElectricTrucksCurrent/totalVehicles); +int pct_hydrogenTruckSlider = roundToInt(100.0*nbHydrogentrucksCurrent/totalVehicles); +int pct_dieselTruckSlider = roundToInt(100.0*nbDieseltrucksCurrent/totalVehicles); + +sliderElectricTrucks.setValue(pct_electricTruckSlider, false); +if ( sliderHydrogenTrucks != null ) { + sliderHydrogenTrucks.setValue(pct_hydrogenTruckSlider, false); +} +else if ( sliderHydrogenTrucks == null && pct_hydrogenTruckSlider != 0 ) { + throw new RuntimeException("Hydrogen trucks found but no hydrogen slider passed to f_setTruckSlidersToCurrentEngineState"); +}sliderFossilFuelTrucks.setValue(pct_dieselTruckSlider, false); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>Triple<Integer, Integer, Integer></ReturnType> + <Id>1749134655530</Id> + <Name>f_calculateCurrentNumberOfTrucks</Name> + <X>20</X> + <Y>1040</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>numberOfGhostVehicle_Trucks</Name> + <Type>Integer</Type> + </Parameter> + <Body>if (numberOfGhostVehicle_Trucks == null) { + numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); +} + +int nbEtruckCurrent = numberOfGhostVehicle_Trucks; +int nbHydrogenTrucksCurrent = 0; +int nbDieselTrucksCurrent = 0; +for ( GridConnection gc : gcList ) { + nbEtruckCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(gc instanceof GCPublicCharger) && gc.v_isActive); + nbHydrogenTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && gc.v_isActive); + nbDieselTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && gc.v_isActive); +} + +return Triple.of(nbEtruckCurrent, nbHydrogenTrucksCurrent, nbDieselTrucksCurrent);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1749645625091</Id> + <Name>f_dieselToElectricVan</Name> + <X>590</X> + <Y>720</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EADieselVehicle dieselVan = null; +boolean foundAdditionalVehicle = false; + +// find the diesel van to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + dieselVan = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); + if ( dieselVan != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + dieselVan = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (dieselVan!=null) { + GridConnection gc = (GridConnection)dieselVan.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = dieselVan.tripTracker; + boolean available = dieselVan.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselVan); + dieselVan.removeEnergyAsset(); + + // Re-add Electric vehicle + double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerVan_kW; + double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageVan_kWh; + double initialStateOfCharge_fr = 1.0; + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; + double vehicleScalingElectric = 1.0; + J_EAEV electricVan = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VAN, tripTracker); + electricVan.available = available; + + zero_Interface.c_orderedVehicles.add(0, electricVan); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricVan); + } +} + +else { + return false; + //throw new RuntimeException("Numbers suggest there is a diesel van left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1749645629101</Id> + <Name>f_electricToDieselVan</Name> + <X>590</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EAEV electricVan = null; +boolean foundAdditionalVehicle = false; + +// find the electric van to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + electricVan = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN); + if ( electricVan != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + electricVan = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if ( electricVan != null ) { + GridConnection gc = (GridConnection)electricVan.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = electricVan.tripTracker; + boolean available = true; + available = electricVan.getAvailability(); + zero_Interface.c_orderedVehicles.remove(electricVan); + electricVan.removeEnergyAsset(); + + // Re-add diesel vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VAN, tripTracker); + dieselVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is an electric van left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1749646233660</Id> + <Name>f_dieselToElectricCar</Name> + <X>590</X> + <Y>780</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EADieselVehicle dieselCar = null; +boolean foundAdditionalVehicle = false; + +// find the diesel car to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + dieselCar = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); + if ( dieselCar != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + dieselCar = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if (dieselCar!=null) { + GridConnection gc = (GridConnection)dieselCar.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = dieselCar.tripTracker; + boolean available = dieselCar.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselCar); + dieselCar.removeEnergyAsset(); + + // Re-add Electric vehicle + double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerCar_kW; + double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageCar_kWh; + double initialStateOfCharge_fr = 1.0; + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; + double vehicleScalingElectric = 1.0; + J_EAEV electricCar = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VEHICLE, tripTracker); + electricCar.available = available; + + zero_Interface.c_orderedVehicles.add(0, electricCar); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricCar); + } +} + +else { + return false; + //throw new RuntimeException("Numbers suggest there is a diesel car left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1749646235580</Id> + <Name>f_electricToDieselCar</Name> + <X>590</X> + <Y>800</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>J_EAEV electricCar = null; +boolean foundAdditionalVehicle = false; + +// find the electric car to remove, search through additional vehicles first +for (GridConnection gc : gcList ) { + if(gc instanceof GCUtility && gc.v_isActive){ + electricCar = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); + if ( electricCar != null ) { + foundAdditionalVehicle = true; + break; + } + } +} + +// if no additional vehicle was found, search through the regular ordering of vehicles +if (!foundAdditionalVehicle) { + electricCar = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); +} +if ( electricCar != null ) { + GridConnection gc = (GridConnection)electricCar.getParentAgent(); + + J_ActivityTrackerTrips tripTracker = electricCar.tripTracker; + boolean available = true; + available = electricCar.getAvailability(); + zero_Interface.c_orderedVehicles.remove(electricCar); + electricCar.removeEnergyAsset(); + + // Re-add diesel vehicle + double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + double vehicleScaling = 1.0; + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VEHICLE, tripTracker); + dieselVehicle.available = available; + + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + + //check if was additional vehicle in companyUI, if so: add to collection + if(foundAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); + } +} +else { + return false; + //throw new RuntimeException("Numbers suggest there is an electric car left, but could not find it."); +} + +return true;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>Triple<Integer, Integer, Integer></ReturnType> + <Id>1749655535164</Id> + <Name>f_calculateCurrentNumberOfVans</Name> + <X>20</X> + <Y>1020</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>numberOfGhostVehicle_Vans</Name> + <Type>Integer</Type> + </Parameter> + <Body>if (numberOfGhostVehicle_Vans == null) { + numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +} + +int nbEVansCurrent = numberOfGhostVehicle_Vans; +int nbHydrogenVansCurrent = 0; +int nbDieselVansCurrent = 0; +for ( GridConnection gc : gcList ) { + nbEVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(gc instanceof GCPublicCharger) && gc.v_isActive); + nbHydrogenVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN && gc.v_isActive); + nbDieselVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && gc.v_isActive); +} + +return Triple.of(nbEVansCurrent, nbHydrogenVansCurrent, nbDieselVansCurrent);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>Triple<Integer, Integer, Integer></ReturnType> + <Id>1749655667960</Id> + <Name>f_calculateCurrentNumberOfCars</Name> + <X>20</X> + <Y>1000</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>numberOfGhostVehicle_Cars</Name> + <Type>Integer</Type> + </Parameter> + <Body>if (numberOfGhostVehicle_Cars == null) { + numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +} + +int nbEVsCurrent = numberOfGhostVehicle_Cars; +int nbHydrogenCarsCurrent = 0; +int nbDieselCarsCurrent = 0; +for ( GridConnection gc : gcList ) { + nbEVsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(gc instanceof GCPublicCharger) && gc.v_isActive); + nbHydrogenCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE && gc.v_isActive); + nbDieselCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && gc.v_isActive); +} + +return Triple.of(nbEVsCurrent, nbHydrogenCarsCurrent, nbDieselCarsCurrent);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749655752858</Id> + <Name>f_setDieselVans</Name> + <X>70</X> + <Y>840</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricVans</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelVans</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>double pctDieselVansGoal = sliderFossilFuelVans.getValue(); + +int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); + +int nbEvanCurrent = triple.getLeft(); +int nbDieselvansCurrent = triple.getRight(); + +int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; + +int nbDieselVansGoal = roundToInt(total_vehicles*pctDieselVansGoal/100.0); + +if (nbDieselvansCurrent < nbDieselVansGoal) { + // Add Diesel Vans + while ( nbDieselvansCurrent < nbDieselVansGoal ) { + if ( nbEvanCurrent > numberOfGhostVehicle_Vans ) { + // replace electric van with a diesel van + if (!f_electricToDieselVan(gcList)) { + f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); + return; + } + else { + nbDieselvansCurrent++; + nbEvanCurrent--; + } + } + } +} +else { + // Remove Diesel Vans + while ( nbDieselvansCurrent > nbDieselVansGoal ) { + // replace a diesel van with an electric van + if (!f_dieselToElectricVan(gcList)) { + f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); + return; + } + nbDieselvansCurrent--; + nbEvanCurrent++; + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749656346356</Id> + <Name>f_setElectricVans</Name> + <X>70</X> + <Y>860</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricVans</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelVans</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>double pctElectricVansGoal = sliderElectricVans.getValue(); + +int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); + +int nbEvanCurrent = triple.getLeft(); +int nbDieselvansCurrent = triple.getRight(); + +int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; + +int nbElectricVansGoal = roundToInt(total_vehicles*pctElectricVansGoal/100.0); + +if (nbEvanCurrent < nbElectricVansGoal) { + // Add Electric Vans + while ( nbEvanCurrent < nbElectricVansGoal ) { + if ( nbDieselvansCurrent > 0 ) { + // replace a diesel van with an electric van + if (!f_dieselToElectricVan(gcList)) { + f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); + return; + } + else { + nbEvanCurrent++; + nbDieselvansCurrent--; + } + } + } +} +else { + // Remove Electric Vans + while ( nbEvanCurrent > nbElectricVansGoal ) { + // replace an electric van with a diesel van + if (!f_electricToDieselVan(gcList)) { + f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); + return; + } + nbEvanCurrent--; + nbDieselvansCurrent++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749717776391</Id> + <Name>f_setDieselCars</Name> + <X>70</X> + <Y>890</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricCars</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelCars</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>double pctDieselCarsGoal = sliderFossilFuelCars.getValue(); + +int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); + +int nbEcarCurrent = triple.getLeft(); +int nbDieselcarsCurrent = triple.getRight(); + +int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; + +int nbDieselCarsGoal = roundToInt(total_vehicles*pctDieselCarsGoal/100.0); + +if (nbDieselcarsCurrent < nbDieselCarsGoal) { + // Add Diesel Cars + while ( nbDieselcarsCurrent < nbDieselCarsGoal ) { + if ( nbEcarCurrent > numberOfGhostVehicle_Cars ) { + // replace electric car with a diesel car + if (!f_electricToDieselCar(gcList)) { + f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); + return; + } + else { + nbDieselcarsCurrent++; + nbEcarCurrent--; + } + } + } +} +else { + // Remove Diesel Cars + while ( nbDieselcarsCurrent > nbDieselCarsGoal ) { + // replace a diesel car with an electric car + if (!f_dieselToElectricCar(gcList)) { + f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); + return; + } + nbDieselcarsCurrent--; + nbEcarCurrent++; + } +} + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749717779317</Id> + <Name>f_setElectricCars</Name> + <X>70</X> + <Y>910</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricCars</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelCars</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>double pctElectricCarsGoal = sliderElectricCars.getValue(); + +int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); +Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); + +int nbEcarCurrent = triple.getLeft(); +int nbDieselcarsCurrent = triple.getRight(); + +int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; + +int nbElectricCarsGoal = roundToInt(total_vehicles*pctElectricCarsGoal/100.0); + +if (nbEcarCurrent < nbElectricCarsGoal) { + // Add Electric Cars + while ( nbEcarCurrent < nbElectricCarsGoal ) { + if ( nbDieselcarsCurrent > 0 ) { + // replace a diesel car with an electric car + if (!f_dieselToElectricCar(gcList)) { + f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); + return; + } + else { + nbEcarCurrent++; + nbDieselcarsCurrent--; + } + } + } +} +else { + // Remove Electric Cars + while ( nbEcarCurrent > nbElectricCarsGoal ) { + // replace an electric car with a diesel car + if (!f_electricToDieselCar(gcList)) { + f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); + return; + } + nbEcarCurrent--; + nbDieselcarsCurrent++; + } +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749717909708</Id> + <Name>f_setVanSlidersToCurrentEngineState</Name> + <X>360</X> + <Y>1020</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricVans</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHydrogenVans</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelVans</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); +for (GridConnection gc : gcList) { + if (gc.v_isActive) { + vehicles.addAll(gc.c_vehicleAssets); + } +} + +int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getRight(); + +int nbElectricVansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Vans; +int nbDieselvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); +int nbHydrogenvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); + +int totalVehicles = nbElectricVansCurrent + nbDieselvansCurrent + nbHydrogenvansCurrent; + + + +int pct_electricVanSlider = roundToInt(100.0*nbElectricVansCurrent/totalVehicles); +int pct_hydrogenVanSlider = roundToInt(100.0*nbHydrogenvansCurrent/totalVehicles); +int pct_dieselVanSlider = roundToInt(100.0*nbDieselvansCurrent/totalVehicles); + +sliderElectricVans.setValue(pct_electricVanSlider, false); +if ( sliderHydrogenVans != null ) { + sliderHydrogenVans.setValue(pct_hydrogenVanSlider, false); +} +else if ( sliderHydrogenVans == null && pct_hydrogenVanSlider != 0 ) { + throw new RuntimeException("Hydrogen vans found but no hydrogen slider passed to f_setVanSlidersToCurrentEngineState"); +} +sliderFossilFuelVans.setValue(pct_dieselVanSlider, false); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749717987139</Id> + <Name>f_setCarSlidersToCurrentEngineState</Name> + <X>360</X> + <Y>1000</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>sliderElectricCars</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderHydrogenCars</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>sliderFossilFuelCars</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); +for (GridConnection gc : gcList) { + if (gc.v_isActive) { + vehicles.addAll(gc.c_vehicleAssets); + } +} + +int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getRight(); + +int nbElectricCarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Cars; +int nbDieselcarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); +int nbHydrogencarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); + +int totalVehicles = nbElectricCarsCurrent + nbDieselcarsCurrent + nbHydrogencarsCurrent; + + + +int pct_electricCarSlider = roundToInt(100.0*nbElectricCarsCurrent/totalVehicles); +int pct_hydrogenCarSlider = roundToInt(100.0*nbHydrogencarsCurrent/totalVehicles); +int pct_dieselCarSlider = roundToInt(100.0*nbDieselcarsCurrent/totalVehicles); + +sliderElectricCars.setValue(pct_electricCarSlider, false); +if ( sliderHydrogenCars != null ) { + sliderHydrogenCars.setValue(pct_hydrogenCarSlider, false); +} +else if ( sliderHydrogenCars == null && pct_hydrogenCarSlider != 0 ) { + throw new RuntimeException("Hydrogen cars found but no hydrogen slider passed to f_setCarSlidersToCurrentEngineState"); +} +sliderFossilFuelCars.setValue(pct_dieselCarSlider, false); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754928402690</Id> + <Name>f_updateSliders_Mobility</Name> + <X>-350</X> + <Y>40</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>Triple<Integer, Integer, Integer> triple = f_calculateNumberOfGhostVehicles( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()) ); +v_totalNumberOfGhostVehicle_Cars = triple.getLeft(); +v_totalNumberOfGhostVehicle_Vans = triple.getMiddle(); +v_totalNumberOfGhostVehicle_Trucks = triple.getRight(); + + +if(gr_mobilitySliders_default.isVisible()){ + f_updateMobilitySliders_default(); +} +else if(gr_mobilitySliders_residential.isVisible()){ + f_updateMobilitySliders_residential(); +} +else{ + f_updateMobilitySliders_custom(); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754928402694</Id> + <Name>f_updateMobilitySliders_default</Name> + <X>-330</X> + <Y>60</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<GridConnection> allConsumerGridConnections = uI_Tabs.f_getActiveSliderGridConnections_consumption(); + +////Savings +double totalBaseTravelDistance_km = 0; +double totalSavedTravelDistance_km = 0; +for(GridConnection GC : allConsumerGridConnections){ + if(GC.v_isActive){ + for(J_ActivityTrackerTrips tripTracker : GC.c_tripTrackers){ + totalBaseTravelDistance_km += tripTracker.getAnnualDistance_km(); + totalSavedTravelDistance_km += (1-tripTracker.getDistanceScaling_fr())*tripTracker.getAnnualDistance_km(); + } + } +} + +double mobilitySavings_pct = totalBaseTravelDistance_km > 0 ? (totalSavedTravelDistance_km/totalBaseTravelDistance_km * 100) : 0; +sl_mobilityDemandReduction_pct.setValue(roundToInt(mobilitySavings_pct), false); + + +//Smart charging +boolean smartCharging = false; +for(GridConnection GC : allConsumerGridConnections){ + if(GC.c_electricVehicles.size() > 0 && GC.f_getCurrentChargingType() != OL_ChargingAttitude.SIMPLE){ + smartCharging = true; + break; + } +} +cb_spreadChargingEVs.setSelected(smartCharging, false); + + +////Vehicles +// Initialize the vehicle counters +int DieselCars = 0; +int ElectricCars = v_totalNumberOfGhostVehicle_Cars; +int HydrogenCars = 0; + +int DieselVans = 0; +int ElectricVans = v_totalNumberOfGhostVehicle_Vans; +int HydrogenVans = 0; + +int DieselTrucks = 0; +int ElectricTrucks = v_totalNumberOfGhostVehicle_Trucks; +int HydrogenTrucks = 0; + +//Count the amount of vehicles for each type +for (GridConnection gc : allConsumerGridConnections) { + if(gc.v_isActive){ + for (J_EAVehicle vehicle : gc.c_vehicleAssets) { + if (vehicle instanceof J_EADieselVehicle){ + switch(vehicle.getEAType()){ + case DIESEL_VEHICLE: + DieselCars += 1; + break; + case DIESEL_VAN: + DieselVans += 1; + break; + case DIESEL_TRUCK: + DieselTrucks += 1; + break; + } + } + else if (vehicle instanceof J_EAEV){ + switch(vehicle.getEAType()){ + case ELECTRIC_VEHICLE: + ElectricCars += 1; + break; + case ELECTRIC_VAN: + ElectricVans += 1; + break; + case ELECTRIC_TRUCK: + ElectricTrucks += 1; + break; + } + } + else if (vehicle instanceof J_EAHydrogenVehicle){ + switch(vehicle.getEAType()){ + case HYDROGEN_VEHICLE: + HydrogenCars += 1; + break; + case HYDROGEN_VAN: + HydrogenVans += 1; + break; + case HYDROGEN_TRUCK: + HydrogenTrucks += 1; + break; + } + } + } + } +} + + +//Set CAR sliders +int totalCars = DieselCars + ElectricCars + HydrogenCars; +int DieselCars_pct = 0; +int ElectricCars_pct = 0; +int HydrogenCars_pct = 0; +if (totalCars != 0) { + DieselCars_pct = roundToInt((100.0 * DieselCars) / totalCars); + ElectricCars_pct = roundToInt((100.0 * ElectricCars) / totalCars); + HydrogenCars_pct = roundToInt((100.0 * HydrogenCars) / totalCars); +} +else{ + sl_fossilFuelCars_pct.setEnabled(false); + sl_electricCars_pct.setEnabled(false); +} +sl_fossilFuelCars_pct.setValue(DieselCars_pct, false); +sl_electricCars_pct.setValue(ElectricCars_pct, false); + + +//Set VAN sliders +int totalVans = DieselVans + ElectricVans + HydrogenVans; +int DieselVans_pct = 0; +int ElectricVans_pct = 0; +int HydrogenVans_pct = 0; +if (totalVans != 0) { + DieselVans_pct = roundToInt(100.0 * DieselVans / totalVans); + ElectricVans_pct = roundToInt(100.0 * ElectricVans / totalVans); + HydrogenVans_pct = roundToInt(100.0 * HydrogenVans / totalVans); +} +else{ + sl_fossilFuelVans_pct.setEnabled(false); + sl_electricVans_pct.setEnabled(false); +} +sl_fossilFuelVans_pct.setValue(DieselVans_pct, false); +sl_electricVans_pct.setValue(ElectricVans_pct, false); + + +//Set TRUCK sliders +int totalTrucks = DieselTrucks + ElectricTrucks + HydrogenTrucks; +int DieselTrucks_pct = 0; +int ElectricTrucks_pct = 0; +int HydrogenTrucks_pct = 0; +if (totalTrucks != 0) { + DieselTrucks_pct = roundToInt(100.0 * DieselTrucks / totalTrucks); + ElectricTrucks_pct = roundToInt(100.0 * ElectricTrucks / totalTrucks); + HydrogenTrucks_pct = roundToInt(100.0 * HydrogenTrucks / totalTrucks); +} +else{ + sl_fossilFuelTrucks_pct.setEnabled(false); + sl_electricTrucks_pct.setEnabled(false); + sl_hydrogenTrucks_pct.setEnabled(false); +} +sl_fossilFuelTrucks_pct.setValue(DieselTrucks_pct, false); +sl_electricTrucks_pct.setValue(ElectricTrucks_pct, false); +sl_hydrogenTrucks_pct.setValue(HydrogenTrucks_pct, false);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754928402700</Id> + <Name>f_updateMobilitySliders_custom</Name> + <X>-330</X> + <Y>100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//If you have a custom tab, +//override this function to make it update automatically +traceln("Forgot to override the update custom electricity sliders functionality");</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754990674760</Id> + <Name>f_setChargingAttitude</Name> + <X>65</X> + <Y>655</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>selectedChargingAttitude</Name> + <Type>OL_ChargingAttitude</Type> + </Parameter> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Body>gcList.forEach(x -> x.f_addChargingManagement(selectedChargingAttitude)); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1758183013077</Id> + <Name>f_updateMobilitySliders_residential</Name> + <X>-330</X> + <Y>80</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>////Private EV +gr_activateV2GPrivateParkedCars.setVisible(false); +cb_activateV2GPrivateParkedCars.setSelected(false, false); +gr_settingsV2G_privateParkedCars.setVisible(false); + +List<GCHouse> houseGridConnectionsWithPrivateParking = findAll(uI_Tabs.f_getActiveSliderGridConnections_houses(), house -> house.p_eigenOprit); +List<J_EAVehicle> privateParkedCars = new ArrayList<J_EAVehicle>(); +houseGridConnectionsWithPrivateParking.forEach(gc -> privateParkedCars.addAll(gc.c_vehicleAssets)); + +if (privateParkedCars.size() > 0) { + int nbPrivateEVs = count(privateParkedCars, x -> x instanceof J_EAEV); + int nbPrivateEVsThatSupportV2G = count(privateParkedCars, x -> x instanceof J_EAEV && ((J_EAEV)x).getV2GCapable()); + double privateEVs_pct = 100.0 * nbPrivateEVs / privateParkedCars.size(); + double privateEVsThatSupportV2G_pct = 100.0 * nbPrivateEVsThatSupportV2G / nbPrivateEVs; + sl_privateEVsResidentialArea_pct.setValue(roundToInt(privateEVs_pct), false); + sl_EVsThatSupportV2G_pct.setValue(roundToInt(privateEVsThatSupportV2G_pct), false); + + //Selected charging mode + GCHouse GCWithPrivateParkedEV = findFirst(houseGridConnectionsWithPrivateParking, gc -> gc.c_electricVehicles.size() > 0); + OL_ChargingAttitude currentChargingAttitude = (GCWithPrivateParkedEV != null) ? GCWithPrivateParkedEV.f_getCurrentChargingType() : OL_ChargingAttitude.SIMPLE; + boolean V2GActive = (GCWithPrivateParkedEV != null) ? GCWithPrivateParkedEV.f_getV2GActive() : false; + for(GridConnection GC : houseGridConnectionsWithPrivateParking){ + if(GC.c_electricVehicles.size() > 0 ){ + if(currentChargingAttitude != OL_ChargingAttitude.CUSTOM && GC.f_getCurrentChargingType() != currentChargingAttitude){ + currentChargingAttitude = OL_ChargingAttitude.CUSTOM; // Here used as varied: in other words: custom setting + } + if(V2GActive && !GC.f_getV2GActive()){ + V2GActive = false; + } + } + + if(currentChargingAttitude == OL_ChargingAttitude.CUSTOM && !V2GActive){ + break; + } + + } + + String selectedChargingAttitudeString = ""; + switch(currentChargingAttitude){ + case SIMPLE: + selectedChargingAttitudeString = "Niet slim laden"; + break; + case PRICE: + selectedChargingAttitudeString = "Slim laden: Prijs gestuurd"; + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + case BALANCE_LOCAL: + selectedChargingAttitudeString = "Slim laden: Netbewust"; + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + case CUSTOM: + selectedChargingAttitudeString = "Gevarieerd"; + break; + } + + cb_chargingAttitudePrivateParkedCars.setValue(selectedChargingAttitudeString, false); + cb_activateV2GPrivateParkedCars.setSelected(V2GActive, false); + + if(gr_activateV2GPrivateParkedCars.isVisible() && V2GActive){ + gr_settingsV2G_privateParkedCars.setVisible(true); + } +} +else{ + sl_privateEVsResidentialArea_pct.setEnabled(false); +} + +////Chargers +OL_ChargingAttitude selectedChargingAttitude = null; +gr_activateV2GPublicChargers.setVisible(false); +cb_activateV2GPublicChargers.setSelected(false, false); +gr_settingsV1G_publicChargers.setVisible(false); +gr_settingsV2G_publicChargers.setVisible(false); + +List<GCPublicCharger> activeChargerGridConnections = uI_Tabs.f_getSliderGridConnections_chargers(); +List<GCPublicCharger> pausedChargerGridConnections = uI_Tabs.f_getPausedSliderGridConnections_chargers(); +List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); +activeChargerGridConnections.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); + + +int nbPublicChargerGC = activeChargerGridConnections.size() + pausedChargerGridConnections.size(); + +if(nbPublicChargerGC > 0 ){ + int nbActivePublicChargersGC = activeChargerGridConnections.size(); + double activePublicChargers_pct = 100.0 * nbActivePublicChargersGC / nbPublicChargerGC; + sl_publicChargersResidentialArea_pct.setValue(roundToInt(activePublicChargers_pct), false); + + int nbV1GChargers = count(activeChargersEA, x -> x.getV1GCapable()); + int nbV2GChargers =count(activeChargersEA, x -> x.getV2GCapable()); + int nbPublicChargers = activeChargersEA.size(); + + double V1G_pct = 100.0 * nbV1GChargers / nbPublicChargers; + double V2G_pct = 100.0 * nbV2GChargers / nbPublicChargers; + sl_chargersThatSupportV1G_pct.setValue(roundToInt(V1G_pct), false); + sl_chargersThatSupportV2G_pct.setValue(roundToInt(V2G_pct), false); + + //Selected charging mode + OL_ChargingAttitude currentChargingAttitude = activeChargersEA.size() > 0 ? activeChargersEA.get(0).getChargingAttitude(): OL_ChargingAttitude.SIMPLE; + boolean V2GActive = activeChargersEA.size() > 0 ? activeChargersEA.get(0).getV2GActive(): false; + for(J_EAChargePoint charger : activeChargersEA){ + if(currentChargingAttitude != OL_ChargingAttitude.CUSTOM && charger.getChargingAttitude() != currentChargingAttitude){ + currentChargingAttitude = OL_ChargingAttitude.CUSTOM; // Here used as varied: in other words: custom setting + } + if(V2GActive && !charger.getV2GActive()){ + V2GActive = false; + } + + if(currentChargingAttitude == OL_ChargingAttitude.CUSTOM && !V2GActive){ + break; + } + } + + String selectedChargingAttitudeString = ""; + switch(currentChargingAttitude){ + case SIMPLE: + selectedChargingAttitudeString = "Niet slim laden"; + break; + case PRICE: + selectedChargingAttitudeString = "Slim laden: Prijs gestuurd"; + gr_settingsV1G_publicChargers.setVisible(true); + gr_activateV2GPublicChargers.setVisible(true); + break; + case BALANCE_GRID: + selectedChargingAttitudeString = "Slim laden: Netbewust"; + gr_settingsV1G_publicChargers.setVisible(true); + gr_activateV2GPublicChargers.setVisible(true); + break; + case CUSTOM: + selectedChargingAttitudeString = "Gevarieerd"; + break; + } + + cb_chargingAttitudePrivatePublicChargers.setValue(selectedChargingAttitudeString, false); + cb_activateV2GPublicChargers.setSelected(V2GActive, false); + + if(gr_activateV2GPublicChargers.isVisible() && V2GActive){ + gr_settingsV2G_publicChargers.setVisible(true); + } +} +else{ + sl_publicChargersResidentialArea_pct.setEnabled(false); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1758183975214</Id> + <Name>f_setPublicChargingStations</Name> + <X>480</X> + <Y>605</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcListChargers</Name> + <Type>List<GCPublicCharger></Type> + </Parameter> + <Parameter> + <Name>publicChargers_pct</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>V1GCapableChargerSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Parameter> + <Name>V2GCapableChargerSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>int totalNbChargers = gcListChargers.size(); +int currentNbChargers = count(gcListChargers, x -> x.v_isActive); +int nbChargersGoal = roundToInt(publicChargers_pct / 100 * totalNbChargers) ; + +while ( currentNbChargers > nbChargersGoal ) { + GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> x.v_isActive); + if (gc != null) { + gc.f_setActive(false); + zero_Interface.c_orderedPublicChargers.remove(gc); + zero_Interface.c_orderedPublicChargers.add(0, gc); + currentNbChargers--; + + for (J_EADieselVehicle car : zero_Interface.c_mappingOfVehiclesPerCharger.get(gc.p_uid)) { + car.reRegisterEnergyAsset(); + } + } + else { + throw new RuntimeException("Charger slider error: there are not sufficient chargers to remove"); + } +} +while ( currentNbChargers < nbChargersGoal){ + GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> !x.v_isActive); + if (gc != null) { + gc.f_setActive(true); + zero_Interface.c_orderedPublicChargers.remove(gc); + zero_Interface.c_orderedPublicChargers.add(0, gc); + currentNbChargers++; + + for (J_EADieselVehicle car : zero_Interface.c_mappingOfVehiclesPerCharger.get(gc.p_uid)) { + J_ActivityTrackerTrips tripTracker = car.getTripTracker(); //Needed, as triptracker is removed when removeEnergyAsset is called. + car.removeEnergyAsset(); + car.setTripTracker(tripTracker);//Re-set the triptracker again, for storing. + } + } + else { + throw new RuntimeException("Charger slider error: there are no more chargers to add"); + } +} + +//Update the V1G and V2G capable vehicle slider accordingly to the change in vehicle dynamics +int totalActiveChargers = 0; +int totalCapableV1GChargers = 0; +int totalCapableV2GChargers = 0; + +for(GCPublicCharger GC : gcListChargers){ + if(GC.v_isActive){ + for(J_EAChargePoint charger : GC.c_chargers){ + totalActiveChargers++; + if(charger.getV1GCapable()){ + totalCapableV1GChargers++; + } + if(charger.getV2GCapable()){ + totalCapableV2GChargers++; + } + } + + } +} +V1GCapableChargerSlider.setValue(roundToInt(100.0 * totalCapableV1GChargers/totalActiveChargers)); +V2GCapableChargerSlider.setValue(roundToInt(100.0 * totalCapableV2GChargers/totalActiveChargers)); + + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings(); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1758183975221</Id> + <Name>f_setV1GChargerCapabilities</Name> + <X>480</X> + <Y>545</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcListChargers</Name> + <Type>List<GCPublicCharger></Type> + </Parameter> + <Parameter> + <Name>goal_pct</Name> + <Type>double</Type> + </Parameter> + <Body>List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); +gcListChargers.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); + +int totalNbChargers = activeChargersEA.size(); +int currentNbChargers = count(activeChargersEA, x -> x.getV1GCapable()); +int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); + +while (currentNbChargers < nbChargersGoal) { + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> activeChargersEA.contains(x) && !x.getV1GCapable()); + j_ea.setV1GCapability(true); + currentNbChargers++; + zero_Interface.c_orderedV1GChargers.remove(j_ea); + zero_Interface.c_orderedV1GChargers.add(0, j_ea); + +} +while (currentNbChargers > nbChargersGoal) { + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> activeChargersEA.contains(x) && x.getV1GCapable()); + j_ea.setV1GCapability(false); + currentNbChargers--; + zero_Interface.c_orderedV1GChargers.remove(j_ea); + zero_Interface.c_orderedV1GChargers.add(0, j_ea); +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1758183975227</Id> + <Name>f_setV2GChargerCapabilities</Name> + <X>480</X> + <Y>565</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcListChargers</Name> + <Type>List<GCPublicCharger></Type> + </Parameter> + <Parameter> + <Name>goal_pct</Name> + <Type>double</Type> + </Parameter> + <Body>List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); +gcListChargers.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); + +int totalNbChargers = activeChargersEA.size(); +int currentNbChargers = count(activeChargersEA, x -> x.getV2GCapable()); +int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); + +while (currentNbChargers < nbChargersGoal) { + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> activeChargersEA.contains(x) && !x.getV2GCapable()); + j_ea.setV2GCapability(true); + currentNbChargers++; + zero_Interface.c_orderedV2GChargers.remove(j_ea); + zero_Interface.c_orderedV2GChargers.add(0, j_ea); + +} +while (currentNbChargers > nbChargersGoal) { + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> activeChargersEA.contains(x) && x.getV2GCapable()); + j_ea.setV2GCapability(false); + currentNbChargers--; + zero_Interface.c_orderedV2GChargers.remove(j_ea); + zero_Interface.c_orderedV2GChargers.add(0, j_ea); +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1758183975234</Id> + <Name>f_setVehiclesPrivateParking</Name> + <X>480</X> + <Y>650</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcListHouses</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Parameter> + <Name>privateParkingEV_pct</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>V2GCapableVehicleSlider</Name> + <Type>ShapeSlider</Type> + </Parameter> + <Body>//Voor nu zo opgelost, echter gaat dit niet goed werken met de volgorde. BEDENK EEN BETER MANIER!? +List<J_EAVehicle> gcListOrderedVehiclesPrivateParking = findAll( zero_Interface.c_orderedVehiclesPrivateParking, h -> gcListHouses.contains(h.getParentAgent())); + +int nbOfPrivateParkedEV = (int)sum(findAll(gcListHouses, gc -> gc.p_eigenOprit), x -> x.c_electricVehicles.size()); +int desiredNbOfPrivateParkedEV = roundToInt(privateParkingEV_pct / 100 * gcListOrderedVehiclesPrivateParking.size()); + + +// we scale the consumption instead of getting the diesel/EV parameter from avgc data to represent the 'size' of the car +double ratioEVToDieselConsumption = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm / zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionCar_kWhpkm; + +while ( nbOfPrivateParkedEV > desiredNbOfPrivateParkedEV){ + J_EAVehicle j_ea = findFirst( gcListOrderedVehiclesPrivateParking, h -> h instanceof J_EAEV); + if (j_ea.vehicleScaling != 1) { + throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); + } + J_ActivityTrackerTrips triptracker = j_ea.tripTracker; + double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() / ratioEVToDieselConsumption; + j_ea.removeEnergyAsset(); + gcListOrderedVehiclesPrivateParking.remove(j_ea); + zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); + J_EADieselVehicle dieselCar = new J_EADieselVehicle(j_ea.getParentAgent(), energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, 1, OL_EnergyAssetType.DIESEL_VEHICLE, triptracker); + gcListOrderedVehiclesPrivateParking.add(dieselCar); + zero_Interface.c_orderedVehiclesPrivateParking.add(dieselCar); + nbOfPrivateParkedEV --; +} +while ( nbOfPrivateParkedEV < desiredNbOfPrivateParkedEV){ + J_EAVehicle j_ea = findFirst( gcListOrderedVehiclesPrivateParking, h -> h instanceof J_EADieselVehicle); + if (j_ea.vehicleScaling != 1) { + throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); + } + J_ActivityTrackerTrips triptracker = j_ea.tripTracker; + double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() * ratioEVToDieselConsumption; + j_ea.removeEnergyAsset(); + gcListOrderedVehiclesPrivateParking.remove(j_ea); + zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); + double capacityElectricity_kW = randomTrue(0.6) ? randomTrue(0.4) ? 3.2 : 5.6 : 11.0; + double storageCapacity_kWh = uniform_discr(65,90); + J_EAEV ev = new J_EAEV(j_ea.getParentAgent(), capacityElectricity_kW, storageCapacity_kWh, 1, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, 1, OL_EnergyAssetType.ELECTRIC_VEHICLE, triptracker); + gcListOrderedVehiclesPrivateParking.add(ev); + zero_Interface.c_orderedVehiclesPrivateParking.add(ev); + nbOfPrivateParkedEV++; +} + + +//Update the V2G capable vehicle slider accordingly to the change in vehicle dynamics +int totalCapableV2GEVs = count(gcListOrderedVehiclesPrivateParking, vehicle -> vehicle instanceof J_EAEV && ((J_EAEV)vehicle).getV2GCapable()); +V2GCapableVehicleSlider.setValue(roundToInt(100.0*totalCapableV2GEVs/nbOfPrivateParkedEV)); + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1758275653317</Id> + <Name>f_setV2GEVCapabilities</Name> + <X>480</X> + <Y>585</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcListHouses</Name> + <Type>List<GCHouse></Type> + </Parameter> + <Parameter> + <Name>goal_pct</Name> + <Type>double</Type> + </Parameter> + <Body>//Voor nu zo werkend gemaakt met gclist als input, echter gaat dit niet goed werken mochten er minder gcs tussen zitten dan in de zero_interface ordered collectie staat en gaat de volgorde veranderen. +// -> BEDENK EEN BETER MANIER!? --> Bestaat er uberhaupt een manier voor? + +List<J_EAVehicle> gcListOrderedVehiclesPrivateParking_all = findAll( zero_Interface.c_orderedVehiclesPrivateParking, vehicle -> gcListHouses.contains(vehicle.getParentAgent()) && vehicle.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); + +List<J_EAEV> gcListOrderedVehiclesPrivateParking = gcListOrderedVehiclesPrivateParking_all.stream().map(v -> (J_EAEV) v).collect(Collectors.toList()); + +int totalNbEVs = gcListOrderedVehiclesPrivateParking.size(); +int currentNbEVsV2GCapable = count(gcListOrderedVehiclesPrivateParking, x -> x.getV2GCapable()); +int nbEVsV2GCapableGoal = roundToInt(goal_pct / 100.0 * totalNbEVs); + +while (currentNbEVsV2GCapable < nbEVsV2GCapableGoal) { + J_EAEV j_ea = findFirst(gcListOrderedVehiclesPrivateParking, x -> x.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !x.getV2GCapable()); + j_ea.setV2GCapable(true); + currentNbEVsV2GCapable++; + gcListOrderedVehiclesPrivateParking.remove(j_ea); + gcListOrderedVehiclesPrivateParking.add(0, j_ea); + +} +while (currentNbEVsV2GCapable > nbEVsV2GCapableGoal) { + J_EAEV j_ea = findFirst(gcListOrderedVehiclesPrivateParking, x -> x.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && x.getV2GCapable()); + j_ea.setV2GCapable(false); + currentNbEVsV2GCapable--; + gcListOrderedVehiclesPrivateParking.remove(j_ea); + gcListOrderedVehiclesPrivateParking.add(0, j_ea); +} + +// Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1758276936913</Id> + <Name>f_activateV2G</Name> + <X>65</X> + <Y>675</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gcList</Name> + <Type>List<GridConnection></Type> + </Parameter> + <Parameter> + <Name>activateV2G</Name> + <Type>boolean</Type> + </Parameter> + <Body>for(GridConnection GC : gcList){ + GC.f_activateV2GChargingMode(activateV2G); +} + +//Update variable to change to custom scenario +if(!zero_Interface.b_runningMainInterfaceScenarios){ + zero_Interface.f_setScenarioToCustom(); +} + +zero_Interface.f_resetSettings();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1764004906148</Id> + <Name>f_initializeTab_Mobility</Name> + <X>-350</X> + <Y>-50</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Use this function to initialize mobility tab settings at start of simulation</Body> + </Function> + </Functions> + <AgentLinks> + <AgentLink> + <Id>1722245324896</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <ContainerLinks> + <ContainerLink> + <Id>1722245483166</Id> + <Name>uI_Tabs</Name> + <X>50</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>UI_Tabs</ClassName> + </ActiveObjectClass> + </ContainerLink> + <ContainerLink> + <Id>1722252542608</Id> + <Name>zero_Interface</Name> + <X>150</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>Zero_Interface</ClassName> + </ActiveObjectClass> + </ContainerLink> + <ContainerLink> + <Id>1753694295455</Id> + <Name>uI_EnergyHub</Name> + <X>300</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>UI_EnergyHub</ClassName> + </ActiveObjectClass> + </ContainerLink> + </ContainerLinks> + <Presentation> + <Level> + <Id>1722245324902</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1722350199532</Id> + <Name>rect_genericFunctions</Name> + <X>10</X> + <Y>470</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-4144960</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>800</Width> + <Height>470</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722350199535</Id> + <Name>t_genericFunctions</Name> + <X>100</X> + <Y>490</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Generic Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>22</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1722247567090</Id> + <Name>gr_mobilitySliders_default</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1722247567092</Id> + <Name>rect_mobilityDemandSliders_default</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>1</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>DOTTED</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-2625550</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722247567094</Id> + <Name>sl_fossilFuelCars_pct</Name> + <X>260</X> + <Y>315</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>sl_electricCars_pct.setValue(100 - sl_fossilFuelCars_pct.getIntValue(), false); +f_setDieselCars( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricCars_pct, sl_fossilFuelCars_pct );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722247567096</Id> + <Name>sl_electricTrucks_pct</Name> + <X>260</X> + <Y>105</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setVehicleSliders( 0, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); +f_setElectricTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722247567098</Id> + <Name>t_fossilFuelCars_pct</Name> + <X>230</X> + <Y>320</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_fossilFuelCars_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722247567100</Id> + <Name>t_fossilFuelCarsDescription</Name> + <X>20</X> + <Y>320</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Fossiele brandstof</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722247567102</Id> + <Name>t_electricTrucksDescription</Name> + <X>15</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Elektrisch</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722247567104</Id> + <Name>t_electricTrucks_pct</Name> + <X>230</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_electricTrucks_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722247567106</Id> + <Name>t_mobilityDemandReductionDescription</Name> + <X>15</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Besparing transport</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722247567108</Id> + <Name>sl_mobilityDemandReduction_pct</Name> + <X>260</X> + <Y>15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_mobilityDemandReduction_pct.getValue() ); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>-50</MinValue> + <MaxValue>50</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722247567110</Id> + <Name>t_mobilityDemandReduction_pct</Name> + <X>230</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_mobilityDemandReduction_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722247567112</Id> + <Name>sl_hydrogenTrucks_pct</Name> + <X>260</X> + <Y>130</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setVehicleSliders( 1, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); +f_setHydrogenTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722247567114</Id> + <Name>t_hydrogenTrucksDescription</Name> + <X>15</X> + <Y>135</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Waterstof</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722247567116</Id> + <Name>t_hydrogenTrucks_pct</Name> + <X>230</X> + <Y>135</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_hydrogenTrucks_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722247567118</Id> + <Name>sl_fossilFuelTrucks_pct</Name> + <X>260</X> + <Y>155</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setVehicleSliders( 2, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); +f_setDieselTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722247567120</Id> + <Name>t_fossilFuelTrucksDescription</Name> + <X>15</X> + <Y>160</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Fossiele brandstof</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722247567122</Id> + <Name>t_fossilFuelTrucks_pct</Name> + <X>230</X> + <Y>160</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_fossilFuelTrucks_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722247567124</Id> + <Name>t_trucksDescription</Name> + <X>15</X> + <Y>85</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Vrachtwagens</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722247567126</Id> + <Name>sl_electricCars_pct</Name> + <X>260</X> + <Y>290</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>sl_fossilFuelCars_pct.setValue(100 - sl_electricCars_pct.getIntValue(), false); +f_setElectricCars( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricCars_pct, sl_fossilFuelCars_pct );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722247567128</Id> + <Name>t_electricCarsDescription</Name> + <X>20</X> + <Y>295</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Elektrisch</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722247567130</Id> + <Name>t_electricCars_pct</Name> + <X>230</X> + <Y>295</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_electricCars_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722247567132</Id> + <Name>t_carsDescription</Name> + <X>15</X> + <Y>270</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Auto's</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722247567134</Id> + <Name>sl_fossilFuelVans_pct</Name> + <X>260</X> + <Y>235</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>sl_electricVans_pct.setValue(100 - sl_fossilFuelVans_pct.getIntValue(), false); +f_setDieselVans( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricVans_pct, sl_fossilFuelVans_pct );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722247567136</Id> + <Name>t_fossilFuelVans_pct</Name> + <X>230</X> + <Y>240</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_fossilFuelVans_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722247567138</Id> + <Name>t_fossilFuelVansDescription</Name> + <X>15</X> + <Y>240</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Fossiele brandstof</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1722247567140</Id> + <Name>sl_electricVans_pct</Name> + <X>260</X> + <Y>210</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>sl_fossilFuelVans_pct.setValue(100 - sl_electricVans_pct.getIntValue(), false); +f_setElectricVans( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricVans_pct, sl_fossilFuelVans_pct );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1722247567142</Id> + <Name>t_electricVansDescription</Name> + <X>15</X> + <Y>215</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Elektrisch</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1722247567144</Id> + <Name>t_electricVans_pct</Name> + <X>230</X> + <Y>215</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>#</Text> + <TextCode>sl_electricVans_pct.getIntValue() + "%"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Text> + <Id>1722247567146</Id> + <Name>t_vansDescription</Name> + <X>15</X> + <Y>190</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Busjes</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Image> + <Id>1746096199769</Id> + <Name>i_mobilityReduction</Name> + <X>160</X> + <Y>20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_mobilityReduction, zero_Interface.v_infoText.mobilityDemandReduction, i_mobilityReduction.getX() + uI_Tabs.v_presentationXOffset, i_mobilityReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746096716217</Id> + <Name>i_electricTruck</Name> + <X>160</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_electricTruck, zero_Interface.v_infoText.electricTrucks, i_electricTruck.getX() + uI_Tabs.v_presentationXOffset, i_electricTruck.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746096716230</Id> + <Name>i_hydrogenTruck</Name> + <X>160</X> + <Y>135</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_hydrogenTruck, zero_Interface.v_infoText.hydrogenTrucks, i_hydrogenTruck.getX() + uI_Tabs.v_presentationXOffset, i_hydrogenTruck.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746096716242</Id> + <Name>i_fossilFuelTruck</Name> + <X>160</X> + <Y>160</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_fossilFuelTruck, zero_Interface.v_infoText.fossilTrucks, i_fossilFuelTruck.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelTruck.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746096716255</Id> + <Name>i_electricVans</Name> + <X>160</X> + <Y>215</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_electricVans, zero_Interface.v_infoText.electricVans, i_electricVans.getX() + uI_Tabs.v_presentationXOffset, i_electricVans.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746096716267</Id> + <Name>i_fossilFuelVans</Name> + <X>160</X> + <Y>240</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_fossilFuelVans, zero_Interface.v_infoText.fossilVans, i_fossilFuelVans.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelVans.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746096716280</Id> + <Name>i_electricCars</Name> + <X>160</X> + <Y>295</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_electricCars, zero_Interface.v_infoText.electricCars, i_electricCars.getX() + uI_Tabs.v_presentationXOffset, i_electricCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1746096716293</Id> + <Name>i_fossilFuelCars</Name> + <X>160</X> + <Y>320</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_fossilFuelCars, zero_Interface.v_infoText.fossilCars, i_fossilFuelCars.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Control Type="CheckBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1754990132964</Id> + <Name>cb_spreadChargingEVs</Name> + <X>260</X> + <Y>50</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="40" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>OL_ChargingAttitude selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; +if(cb_spreadChargingEVs.isSelected()){ + selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; +} + +f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getAllSliderGridConnections_all());</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText/> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1754990186800</Id> + <Name>t_spreadChargingEVsDescription1</Name> + <X>15</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Slim laden</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Rectangle> + <Id>1722342418259</Id> + <Name>rect_demandFunctions</Name> + <X>50</X> + <Y>550</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-8355840</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>300</Width> + <Height>70</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722342418261</Id> + <Name>t_demandFunctionsDescription</Name> + <X>200</X> + <Y>560</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Demand Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Rectangle> + <Id>1722342719680</Id> + <Name>rect_mobilityFunctions</Name> + <X>50</X> + <Y>690</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-5952982</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>720</Width> + <Height>230</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1722342719682</Id> + <Name>t_mobilityFunctionsDescription</Name> + <X>170</X> + <Y>700</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Mobility Functions (default)</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Control Type="ComboBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1754990738497</Id> + <Name>cb_setChargingAttitude</Name> + <X>265</X> + <Y>640</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="20"> + <EmbeddedIcon>false</EmbeddedIcon> + <FillColor>-1</FillColor> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>OL_ChargingAttitude selectedChargingAttitude = null; + +switch(cb_setChargingAttitude.getValue()){ + case "Standaard": + selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; + break; + case "Gelimiteerd vermogen": + selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; + break; + /*case "Slimme spreiding": + selectedChargingAttitude = OL_ChargingAttitude.MAX_SPREAD; + break;*/ + case "Prijsgestuurd": + selectedChargingAttitude = OL_ChargingAttitude.PRICE; + break; + case "Custom": + selectedChargingAttitude = null; + break; +} + +if(selectedChargingAttitude != null){ + f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getAllSliderGridConnections_all()); +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <Editable>false</Editable> + <Button>Standaard</Button> + <Button>Gelimiteerd vermogen</Button> + <Button>Prijsgestuurd</Button> + <Button>Custom</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Image> + <Id>1754991641604</Id> + <Name>i_mobilityChargingAttitude</Name> + <X>160</X> + <Y>55</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <OnClickCode>zero_Interface.f_setInfoText(i_mobilityChargingAttitude, zero_Interface.v_infoText.mobilitySmartCharging, i_mobilityChargingAttitude.getX() + uI_Tabs.v_presentationXOffset, i_mobilityChargingAttitude.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Group> + <Id>1758182984074</Id> + <Name>gr_mobilitySliders_residential</Name> + <X>400</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <XCode>0</XCode> + <YCode>0</YCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1758182947156</Id> + <Name>rect_mobilityDemandSliders_residential</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>1</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>DOTTED</LineStyle> + <Width>370</Width> + <Height>350</Height> + <Rotation>0.0</Rotation> + <FillColor>-2625550</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1758183089010</Id> + <Name>txt_privateParkedCars</Name> + <X>15</X> + <Y>10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Privé geparkeerde autos</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1758183152912</Id> + <Name>txt_publicChargePoints</Name> + <X>15</X> + <Y>165</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Publieke laadpalen</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1758183196756</Id> + <Name>sl_publicChargersResidentialArea_pct</Name> + <X>260</X> + <Y>190</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setPublicChargingStations(uI_Tabs.f_getAllSliderGridConnections_chargers(), sl_publicChargersResidentialArea_pct.getIntValue(), sl_chargersThatSupportV1G_pct, sl_chargersThatSupportV2G_pct);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1758183196774</Id> + <Name>t_publicEVsResidentialAreaDescription</Name> + <X>15</X> + <Y>195</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_publicChargersResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Actieve laadpalen in gebied</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1758183196782</Id> + <Name>t_publicEVsResidentialArea_pct</Name> + <X>245</X> + <Y>195</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_publicChargersResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0%</Text> + <TextCode>sl_publicChargersResidentialArea_pct.getIntValue() + " %"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Text> + <Id>1758183196796</Id> + <Name>t_privateEVsResidentialAreaDescription</Name> + <X>15</X> + <Y>40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_privateEVsResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Aandeel Elektrisch</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1758183196803</Id> + <Name>sl_privateEVsResidentialArea_pct</Name> + <X>260</X> + <Y>34</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setVehiclesPrivateParking(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_privateEVsResidentialArea_pct.getValue(), sl_EVsThatSupportV2G_pct);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1758183196811</Id> + <Name>t_privateEVsResidentialArea_pct</Name> + <X>244</X> + <Y>40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_privateEVsResidentialArea_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0%</Text> + <TextCode>sl_privateEVsResidentialArea_pct.getIntValue() + " %"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Group> + <Id>1758183196871</Id> + <Name>gr_settingsV2G_publicChargers</Name> + <X>9</X> + <Y>311</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1758183196873</Id> + <Name>sl_chargersThatSupportV2G_pct</Name> + <X>251</X> + <Y>4</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setV2GChargerCapabilities( uI_Tabs.f_getSliderGridConnections_chargers(), sl_chargersThatSupportV2G_pct.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1758183196875</Id> + <Name>t_chargersThatSupportV2GDescription</Name> + <X>5</X> + <Y>10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_chargersThatSupportV2G_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Laadpalen met V2G</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1758183196877</Id> + <Name>t_chargersThatSupportV2G_pct</Name> + <X>226</X> + <Y>11</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_chargersThatSupportV2G_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0%</Text> + <TextCode>sl_chargersThatSupportV2G_pct.getIntValue() + " %"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Image> + <Id>1758183196879</Id> + <Name>i_householdPublicChargersV2G</Name> + <X>181</X> + <Y>10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_chargersThatSupportV2G_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdPublicChargersV2G, zero_Interface.v_infoText.householdPublicParkingV2G, i_householdPublicChargersV2G.getX() + gr_settingsV2G_publicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargersV2G.getY() + gr_settingsV2G_publicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + </Presentation> + </Group> + <Image> + <Id>1758183196924</Id> + <Name>i_householdPrivateEV</Name> + <X>190</X> + <Y>39</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_privateEVsResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdPrivateEV, zero_Interface.v_infoText.householdPrivateParking, i_householdPrivateEV.getX() + uI_Tabs.v_presentationXOffset, i_householdPrivateEV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Image> + <Id>1758183196939</Id> + <Name>i_householdPublicChargers</Name> + <X>190</X> + <Y>193</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_publicChargersResidentialArea_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdPublicChargers, zero_Interface.v_infoText.householdPublicParking, i_householdPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Group> + <Id>1758183196817</Id> + <Name>gr_settingsV1G_publicChargers</Name> + <X>5</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1758183196819</Id> + <Name>sl_chargersThatSupportV1G_pct</Name> + <X>255</X> + <Y>0</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setV1GChargerCapabilities( uI_Tabs.f_getSliderGridConnections_chargers(), sl_chargersThatSupportV1G_pct.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1758183196821</Id> + <Name>txt_chargersThatSupportV1GDescription</Name> + <X>10</X> + <Y>5</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_chargersThatSupportV1G_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Laadpalen met V1G</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1758183196823</Id> + <Name>t_chargersThatSupportV1G_pct</Name> + <X>240</X> + <Y>7</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_chargersThatSupportV1G_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0%</Text> + <TextCode>sl_chargersThatSupportV1G_pct.getIntValue() + " %"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + <Image> + <Id>1758183196825</Id> + <Name>i_householdPublicChargersV1G</Name> + <X>185</X> + <Y>5</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_chargersThatSupportV1G_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_householdPublicChargersV1G, zero_Interface.v_infoText.householdPublicParkingV1G, i_householdPublicChargersV1G.getX() + gr_settingsV1G_publicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargersV1G.getY() + gr_settingsV1G_publicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + </Presentation> + </Group> + <Group> + <Id>1758191125495</Id> + <Name>gr_activateV2GPrivateParkedCars</Name> + <X>170</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="CheckBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1758190979055</Id> + <Name>cb_activateV2GPrivateParkedCars</Name> + <X>135</X> + <Y>-16</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="20" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>f_activateV2G(new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), cb_activateV2GPrivateParkedCars.isSelected()); +gr_settingsV2G_privateParkedCars.setVisible(cb_activateV2GPrivateParkedCars.isSelected());</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText/> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Image> + <Id>1758191012105</Id> + <Name>i_activateV2GPrivateParkedCars</Name> + <X>20</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>cb_activateV2GPrivateParkedCars.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_activateV2GPrivateParkedCars, zero_Interface.v_infoText.activateV2GPrivateParkedCars, i_activateV2GPrivateParkedCars.getX() + gr_activateV2GPrivateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_activateV2GPrivateParkedCars.getY() + gr_activateV2GPrivateParkedCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Text> + <Id>1758191030984</Id> + <Name>txt_activateV2GPrivateParkedCars</Name> + <X>-155</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>cb_activateV2GPrivateParkedCars.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Activeer V2G</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1758189201608</Id> + <Name>txt_chargingStrategyPrivateParkedCars</Name> + <X>15</X> + <Y>70</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>cb_chargingAttitudePrivateParkedCars.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Laad strategie</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="ComboBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1758189233415</Id> + <Name>cb_chargingAttitudePrivateParkedCars</Name> + <X>221</X> + <Y>70</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="140" Height="20"> + <EmbeddedIcon>false</EmbeddedIcon> + <FillColor>-1</FillColor> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <EnableExpression>sl_privateEVsResidentialArea_pct.isEnabled()</EnableExpression> + <ActionCode>OL_ChargingAttitude selectedChargingAttitude = null; +gr_activateV2GPrivateParkedCars.setVisible(false); +cb_activateV2GPrivateParkedCars.setSelected(false, false); +gr_settingsV2G_privateParkedCars.setVisible(false); + +switch(cb_chargingAttitudePrivateParkedCars.getValue()){ + case "Niet slim laden": + selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; + break; + case "Slim laden: Prijs gestuurd": + selectedChargingAttitude = OL_ChargingAttitude.PRICE; + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + case "Slim laden: Netbewust": + selectedChargingAttitude = OL_ChargingAttitude.BALANCE_LOCAL; // For now Balance_Local + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + /* + case "Slim laden: Locale balans": + selectedChargingAttitude = OL_ChargingAttitude.BALANCE_LOCAL; + gr_activateV2GPrivateParkedCars.setVisible(true); + break; + */ + case "Gevarieerd": + zero_Interface.f_setErrorScreen("De geselecteerde laad strategie is er alleen ter visualisatie in het geval niet elk huis dezelfde laad strategie heeft. Dit is dus niet een strategie die je handmatig aan kunt zetten. Voor nu is 'Niet slim laden' weer geselecteerd.", 0, 0); + selectedChargingAttitude = null; + break; +} + +if(selectedChargingAttitude != null){ + f_setChargingAttitude(selectedChargingAttitude, new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses())); +} +else{ + cb_chargingAttitudePrivateParkedCars.setValue("Niet slim laden", true); +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <Editable>false</Editable> + <Button>Niet slim laden</Button> + <Button>Slim laden: Prijs gestuurd</Button> + <Button>Slim laden: Netbewust</Button> + <Button>Gevarieerd</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Image> + <Id>1758189262812</Id> + <Name>i_chargingAttitudePrivateParkedCars</Name> + <X>190</X> + <Y>70</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>cb_chargingAttitudePrivateParkedCars.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_chargingAttitudePrivateParkedCars, zero_Interface.v_infoText.chargingAttitudePrivateParkedCars, i_chargingAttitudePrivateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_chargingAttitudePrivateParkedCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Text> + <Id>1758192054421</Id> + <Name>txt_chargingStrategyPublicChargers</Name> + <X>15</X> + <Y>225</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>cb_chargingAttitudePrivatePublicChargers.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Laad strategie</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="ComboBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1758192054440</Id> + <Name>cb_chargingAttitudePrivatePublicChargers</Name> + <X>221</X> + <Y>225</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="140" Height="20"> + <EmbeddedIcon>false</EmbeddedIcon> + <FillColor>-1</FillColor> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <EnableExpression>sl_publicChargersResidentialArea_pct.isEnabled()</EnableExpression> + <ActionCode>OL_ChargingAttitude selectedChargingAttitude = null; +gr_activateV2GPublicChargers.setVisible(false); +cb_activateV2GPublicChargers.setSelected(false, true); // True call for now needed for chargepoints only +gr_settingsV1G_publicChargers.setVisible(false); +gr_settingsV2G_publicChargers.setVisible(false); + +switch(cb_chargingAttitudePrivatePublicChargers.getValue()){ + case "Niet slim laden": + selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; + break; + case "Slim laden: Prijs gestuurd": + selectedChargingAttitude = OL_ChargingAttitude.PRICE; + gr_activateV2GPublicChargers.setVisible(true); + gr_settingsV1G_publicChargers.setVisible(true); + break; + case "Slim laden: Netbewust": + selectedChargingAttitude = OL_ChargingAttitude.BALANCE_GRID; + gr_activateV2GPublicChargers.setVisible(true); + gr_settingsV1G_publicChargers.setVisible(true); + break; + case "Gevarieerd": + zero_Interface.f_setErrorScreen("De geselecteerde laad strategie is er alleen ter visualisatie in het geval niet elk huis dezelfde laad strategie heeft. Dit is dus niet een strategie die je handmatig aan kunt zetten. Voor nu is 'Niet slim laden' weer geselecteerd.", 0, 0); + selectedChargingAttitude = null; + break; +} + +if(selectedChargingAttitude != null){ + List<GridConnection> allChargersInModel = new ArrayList<GridConnection>(uI_Tabs.f_getSliderGridConnections_chargers()); + allChargersInModel.addAll(uI_Tabs.f_getPausedSliderGridConnections_chargers()); + f_setChargingAttitude(selectedChargingAttitude, allChargersInModel); +} +else{ + cb_chargingAttitudePrivatePublicChargers.setValue("Niet slim laden", true); +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <Editable>false</Editable> + <Button>Niet slim laden</Button> + <Button>Slim laden: Prijs gestuurd</Button> + <Button>Slim laden: Netbewust</Button> + <Button>Gevarieerd</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Image> + <Id>1758192054460</Id> + <Name>i_chargingStrategyPublicChargers</Name> + <X>190</X> + <Y>225</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>cb_chargingAttitudePrivatePublicChargers.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_chargingStrategyPublicChargers, zero_Interface.v_infoText.chargingStrategyPublicChargers, i_chargingStrategyPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_chargingStrategyPublicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Group> + <Id>1758192011387</Id> + <Name>gr_activateV2GPublicChargers</Name> + <X>170</X> + <Y>300</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="CheckBox"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1758192011389</Id> + <Name>cb_activateV2GPublicChargers</Name> + <X>135</X> + <Y>-16</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="20" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>f_activateV2G(new ArrayList<GridConnection>(uI_Tabs.f_getAllSliderGridConnections_chargers()), cb_activateV2GPublicChargers.isSelected()); +gr_settingsV2G_publicChargers.setVisible(cb_activateV2GPublicChargers.isSelected());</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText/> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Image> + <Id>1758192011391</Id> + <Name>i_activateV2GPrivatePublicChargers</Name> + <X>20</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>cb_activateV2GPublicChargers.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_activateV2GPrivatePublicChargers, zero_Interface.v_infoText.activateV2GPrivatePublicChargers, i_activateV2GPrivatePublicChargers.getX() + gr_activateV2GPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_activateV2GPrivatePublicChargers.getY() + gr_activateV2GPublicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + <Text> + <Id>1758192011393</Id> + <Name>txt_activateV2GPrivatePublicChargers</Name> + <X>-155</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>cb_activateV2GPublicChargers.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Activeer V2G</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1758274187930</Id> + <Name>gr_settingsV2G_privateParkedCars</Name> + <X>9</X> + <Y>121</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1758274187932</Id> + <Name>sl_EVsThatSupportV2G_pct</Name> + <X>251</X> + <Y>4</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>f_setV2GEVCapabilities( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_EVsThatSupportV2G_pct.getValue() );</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1758274187934</Id> + <Name>txt_EVsThatSupportV2GDescription</Name> + <X>5</X> + <Y>10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_EVsThatSupportV2G_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>EVs die V2G ondersteunen</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1758274187936</Id> + <Name>txt_EVsThatSupportV2G_pct</Name> + <X>226</X> + <Y>10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <VisibleCode>sl_EVsThatSupportV2G_pct.isVisible()</VisibleCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0%</Text> + <TextCode>sl_EVsThatSupportV2G_pct.getIntValue() + " %"</TextCode> + <Font> + <Name>Dialog</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Image> + <Id>1758274187938</Id> + <Name>i_EVsThatSupportV2G</Name> + <X>181</X> + <Y>8</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <VisibleCode>sl_EVsThatSupportV2G_pct.isVisible()</VisibleCode> + <OnClickCode>zero_Interface.f_setInfoText(i_EVsThatSupportV2G, zero_Interface.v_infoText.EVsThatSupportV2G, i_EVsThatSupportV2G.getX() + gr_settingsV2G_privateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_EVsThatSupportV2G.getY() + gr_settingsV2G_privateParkedCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Width>20</Width> + <Height>20</Height> + <Rotation>0.0</Rotation> + <ImageFiles> + <ImageResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>icon_i.png</ClassName> + </ImageResourceReference> + </ImageFiles> + <OriginalSize>false</OriginalSize> + </Image> + </Presentation> + </Group> + </Presentation> + </Group> + <Text> + <Id>1758183975194</Id> + <Name>txt_mobilityFunctionsDescription</Name> + <X>590</X> + <Y>510</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Mobility Functions</Text> + <Font> + <Name>Dialog</Name> + <Size>18</Size> + <Style>0</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + <Rectangle> + <Id>1758183975205</Id> + <Name>rect_mobilityFunctions1</Name> + <X>440</X> + <Y>500</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16711936</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>310</Width> + <Height>170</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1758184003102</Id> + <Name>t_mobilityFunctionsDescription1</Name> + <X>590</X> + <Y>510</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Mobility Functions (residential)</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>CENTER</Alignment> + </Text> + </Presentation> + </Level> + </Presentation> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1709049456135</Id> + <Name>UI_Battery</Name> + <Folder>1754045666929</Folder> + <Generic>false</Generic> + <GenericParameter> + <Id>1709049456141</Id> + <Name>1709049456141</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089975</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1709107200000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1709049456138</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1709049456142</CurrentLevel> + <ConnectionsId>1709049456136</ConnectionsId> + <Variables> + <Variable Class="PlainVariable"> + <Id>1715597286082</Id> + <Name>v_colorBattery_lines</Name> + <X>-740</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Color</Type> + <InitialValue Class="CodeValue"> + <Code>new Color(158, 201, 158)</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1715597307038</Id> + <Name>v_colorBattery_background</Name> + <X>-740</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Color</Type> + <InitialValue Class="CodeValue"> + <Code>new Color(198, 251, 198)</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1715597314638</Id> + <Name>v_colorBatter_3</Name> + <X>-740</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Color</Type> + <InitialValue Class="CodeValue"> + <Code>white</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1715602425848</Id> + <Name>v_sliderStartValue_priceLimit</Name> + <X>-730</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1715607530949</Id> + <Name>v_sliderMinValue_balanceLimit</Name> + <X>-730</X> + <Y>290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1715607536716</Id> + <Name>v_sliderMaxValue_balanceLimit</Name> + <X>-730</X> + <Y>310</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1715607544383</Id> + <Name>v_sliderStartValue_balanceLimit</Name> + <X>-730</X> + <Y>330</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1715630743924</Id> + <Name>v_sliderStartValue_BatteryP_MW</Name> + <X>-730</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724947743379</Id> + <Name>v_currentSelectedBattery</Name> + <X>-310</X> + <Y>570</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1724947743386</Id> + <Name>p_amountOfGISObjects</Name> + <X>-310</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>int</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1724947743384</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1724947743389</Id> + <Name>p_amountOfGC</Name> + <X>-310</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>int</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1724947743387</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724947743355</Id> + <Name>c_GISObjects_Battery</Name> + <X>-310</X> + <Y>140</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GIS_Object</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724947743357</Id> + <Name>c_gridConnections_Battery</Name> + <X>-310</X> + <Y>160</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GridConnection</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724947743359</Id> + <Name>c_connectedGridNodes</Name> + <X>-310</X> + <Y>180</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Object</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724947743361</Id> + <Name>c_connectionOwners_Battery</Name> + <X>-310</X> + <Y>120</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>ConnectionOwner</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724947743365</Id> + <Name>c_gridBatteries</Name> + <X>-310</X> + <Y>300</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>J_EAStorageElectric</ElementClass> + <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> + </Properties> + </Variable> + </Variables> + <Functions> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1709553910991</Id> + <Name>f_styleBatteryUI</Name> + <X>-760</X> + <Y>50</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1715591908888</Id> + <Name>f_initializeUIBattery</Name> + <X>-760</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>COC</Name> + <Type>ConnectionOwner</Type> + </Parameter> + <Body>//Instantiate new sliders +f_instantiateSlidersBattery(COC);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1715591980366</Id> + <Name>f_instantiateSlidersBattery</Name> + <X>-740</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>COC</Name> + <Type>ConnectionOwner</Type> + </Parameter> + <Body>// Electrolyser Power start value +v_sliderStartValue_BatteryP_MW = ((J_EAConversionElectrolyser)COC.f_getOwnedGridConnections().get(0).c_conversionAssets.get(0)).getInputCapacity_kW()/1000; +sl_batteryPower.setValue(v_sliderStartValue_BatteryP_MW, false); +t_powerBattery.setText(v_sliderStartValue_BatteryP_MW + " MW"); + + +// Price limit start value +v_sliderStartValue_priceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_electricityPriceMaxForProfit_eurpkWh; +sl_batteryElectricityPriceLimit.setValue(v_sliderStartValue_priceLimit, false); +t_electricityPriceLimit.setText("€" + v_sliderStartValue_priceLimit); + + +//Balance limit start value +v_sliderStartValue_balanceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_gridNodeCongestionLimit_kW; +sl_batteryElectricityBalanceLimit.setValue(v_sliderStartValue_balanceLimit, false); +t_electricityBalanceLimit.setText(v_sliderStartValue_balanceLimit + " MW"); + + +//Radio button balance or price mode +int rb_value = 0; +switch (((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).p_electrolyserOperationMode){ + + case PRICE: + + rb_value = 0; + //Set visibility of price slider true and balance slider false + gr_electricityPriceSliderBattery.setVisible(true); + gr_electricityBalanceSliderBattery.setVisible(false); + break; + + case BALANCE: + rb_value = 1; + + //Set visibility of balance slider true and price slider false + gr_electricityBalanceSliderBattery.setVisible(true); + gr_electricityPriceSliderBattery.setVisible(false); + break; +} +rb_batteryMode.setValue(rb_value, false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724947743369</Id> + <Name>f_setScenarioFuture</Name> + <X>-290</X> + <Y>490</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>//Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +//Scenario code here + + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(1, false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724947743373</Id> + <Name>f_setScenario</Name> + <X>-310</X> + <Y>450</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>scenario_nr</Name> + <Type>int</Type> + </Parameter> + <Body>switch (scenario_nr){ + + case 0: // Current + + break; + + case 1: // Future + + break; + + case 2: // Hydrogen + traceln("Selected scenario: Hydrogen : DOES NOTHING YET"); + break; + + case 3: // Custom + + if(rb_scenariosPrivateUI.getValue() == 2){ + return; + } + rb_scenariosPrivateUI.setValue(2, false); + traceln("Selected scenario: Custom"); + break; + + default: + +} + +//Set 'results up to date' to false +zero_Interface.b_resultsUpToDate = false;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724947743375</Id> + <Name>f_setScenarioCurrent</Name> + <X>-290</X> + <Y>470</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>//Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +//Scenario code here + + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(0, false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724947743377</Id> + <Name>f_setSelectedGC</Name> + <Description>Function that sets the sliders to match the currently present settings of the energy assets owned by the selected GC. Used when a connection owner has multiple grid connections, and wants to set the sliders of a different GC. </Description> + <X>-310</X> + <Y>400</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Initialize slider presets to selected GC (min, max, etc.) +//f_setSliderPresets(); + +</Body> + </Function> + </Functions> + <AgentLinks> + <AgentLink> + <Id>1709049456136</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <ContainerLinks> + <ContainerLink> + <Id>1709049456197</Id> + <Name>zero_Interface</Name> + <X>50</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>Zero_Interface</ClassName> + </ActiveObjectClass> + </ContainerLink> + </ContainerLinks> + <Presentation> + <Level> + <Id>1709049456142</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1725002991039</Id> + <Name>rect_canvas</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>1920</Width> + <Height>980</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1725002921481</Id> + <Name>rect_scenarios</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineColorCode>v_colorBattery_background</LineColorCode> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>170</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillColorCode>v_colorBattery_lines</FillColorCode> + <FillMaterial>null</FillMaterial> + </Rectangle> + <TimePlot> + <Id>1709582023151</Id> + <Name>plot</Name> + <X>400</X> + <Y>280</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <AutoUpdate>true</AutoUpdate> + <RecurrenceProperties> + <Id>1751013532165</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1709625600000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </RecurrenceProperties> + <EmbeddedIcon>false</EmbeddedIcon> + <Width>540</Width> + <Height>400</Height> + <BackgroundColor/> + <BorderColor/> + <ChartArea> + <XOffset>50</XOffset> + <YOffset>30</YOffset> + <Width>460</Width> + <Height>310</Height> + <BackgroundColor>-1</BackgroundColor> + <BorderColor>-16777216</BorderColor> + <GridColor>-12566464</GridColor> + </ChartArea> + <Legend> + <Place>SOUTH</Place> + <TextColor>-16777216</TextColor> + <Size>30</Size> + </Legend> + <Labels> + <HorLabelsPosition>DEFAULT</HorLabelsPosition> + <VerLabelsPosition>DEFAULT</VerLabelsPosition> + <TextColor>-12566464</TextColor> + </Labels> + <ShowLegend>true</ShowLegend> + <TimeWindowsMovementType>MOVEMENT_WITH_TIME</TimeWindowsMovementType> + <TimeWindowUnits>MODEL_TIME_UNIT</TimeWindowUnits> + <VerScaleFromExpression>0</VerScaleFromExpression> + <VerScaleToExpression>1</VerScaleToExpression> + <VerScaleType>AUTO</VerScaleType> + <DrawLine>true</DrawLine> + <Interpolation>LINEAR</Interpolation> + <SamplesToKeep>100</SamplesToKeep> + <TimeWindowExpression>100</TimeWindowExpression> + <FillAreaUnderLine>false</FillAreaUnderLine> + <LabelFormat>MODEL_TIME_UNITS</LabelFormat> + </TimePlot> + <Rectangle> + <Id>1715589407937</Id> + <Name>slider_blocker</Name> + <X>0</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineColorCode>v_colorBattery_lines</LineColorCode> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>810</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillColorCode>v_colorBatter_3</FillColorCode> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1715596728186</Id> + <Name>t_batterySliders</Name> + <X>70</X> + <Y>200</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Battery</Text> + <Font> + <Name>Calibri</Name> + <Size>22</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1715597165299</Id> + <Name>gr_buttonBattery</Name> + <X>41</X> + <Y>211</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Oval> + <Id>1715596934178</Id> + <Name>ovalBatteryButton</Name> + <X>-1</X> + <Y>-1</Y> + <Label> + <X>0</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <RadiusX>20</RadiusX> + <RadiusY>40</RadiusY> + <Rotation>0.0</Rotation> + <FillColor>-6632142</FillColor> + <FillColorCode>zero_Interface.v_batteryColor</FillColorCode> + <FillMaterial>null</FillMaterial> + </Oval> + <Text> + <Id>1715596882276</Id> + <Name>t_battery</Name> + <X>-10</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-1</Color> + <Text>Bat</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1715606650390</Id> + <Name>gr_electricityPriceSliderBattery</Name> + <X>190</X> + <Y>450</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1715597606225</Id> + <Name>txt_electricityPriceLimit</Name> + <X>-170</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electriciteits prijs limiet</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1715597606227</Id> + <Name>sl_batteryElectricityPriceLimit</Name> + <X>62</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>//Adjust the maximum price of electricity used to produce hydrogen +((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_electricityPriceMaxForProfit_eurpkWh = sl_batteryElectricityPriceLimit.getValue(); + +//Set text accordingly +t_electricityPriceLimit.setText( "€" + sl_batteryElectricityPriceLimit.getValue()); + +//Set scenario to custom +f_setScenario(2);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>v_sliderStartValue_priceLimit</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>0.5</MaxValue> + <Step>0.01</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1715597606229</Id> + <Name>t_electricityPriceLimit</Name> + <X>40</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text> €0.00</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1715606688952</Id> + <Name>gr_batteryPowerSlider</Name> + <X>190</X> + <Y>280</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1715597606231</Id> + <Name>txt_powerBattery</Name> + <X>-170</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Vermogen</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1715597606233</Id> + <Name>sl_batteryPower</Name> + <X>62</X> + <Y>-20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>//Adjust the electric capacity +c_gridBatteries.get(v_currentSelectedBattery).setCapacityElectric_kW(sl_batteryPower.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW + +//Adjust grid connection capacity as well (if needed) +if(sl_batteryPower.getValue()*1000 > 2000){ + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryPower.getValue()*1000; + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryPower.getValue()*1000; + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryPower.getValue()*1000; +} + +//Set the text accordingly +t_powerBattery.setText(sl_batteryPower.getValue() + " MW"); + + +//Set scenario to custom +f_setScenario(2);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>10</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1715597606235</Id> + <Name>t_powerBattery</Name> + <X>35</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>1.0 MW</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1715606719124</Id> + <Name>gr_batteryMode</Name> + <X>100</X> + <Y>380</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="RadioButtons"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1715598832030</Id> + <Name>rb_batteryMode</Name> + <X>-80</X> + <Y>-20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="150" Height="50"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>/* +switch (rb_batteryMode.getValue()){ + + case 0: + c_ownedGridConnections.get(0).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.PRICE; + + //Set visibility of price slider true and balance slider false + gr_electricityPriceSlider.setVisible(true); + gr_electricityBalanceSlider.setVisible(false); + break; + + case 1: + c_ownedGridConnections.get(0).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.BALANCE; + + //Set visibility of balance slider true and price slider false + gr_electricityBalanceSlider.setVisible(true); + gr_electricityPriceSlider.setVisible(false); + break; +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>VERTICAL</Orientation> + <Button>Prijs</Button> + <Button>Balans</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1715598901188</Id> + <Name>txt_electrolyserMode</Name> + <X>-80</X> + <Y>-40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Batterij modus</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1715606808711</Id> + <Name>gr_electricityBalanceSliderBattery</Name> + <X>190</X> + <Y>490</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1715606808713</Id> + <Name>txt_electricityBalanceLimit</Name> + <X>-170</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electriciteits balans limiet</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1715606808715</Id> + <Name>sl_batteryElectricityBalanceLimit</Name> + <X>62</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>//Adjust the gridnode congestion while charging +((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_gridNodeCongestionLimit_kW = sl_batteryElectricityBalanceLimit.getValue()*1000; + +//Set text accordingly +t_electricityBalanceLimit.setText( sl_batteryElectricityBalanceLimit.getValue() + " MW" ); + +//Set scenario to custom +f_setScenario(2);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>v_sliderStartValue_balanceLimit</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>v_sliderMinValue_balanceLimit</MinValue> + <MaxValue>v_sliderMaxValue_balanceLimit</MaxValue> + <Step>0.01</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1715606808717</Id> + <Name>t_electricityBalanceLimit</Name> + <X>50</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0.0 MW</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1724859658263</Id> + <Name>gr_scenarioRB</Name> + <X>120</X> + <Y>100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="RadioButtons"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1724859658265</Id> + <Name>rb_scenariosPrivateUI</Name> + <X>-100</X> + <Y>-60</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="180" Height="120"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>f_setScenario(rb_scenariosPrivateUI.getValue());</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="14" Style="0"/> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>VERTICAL</Orientation> + <Button>Huidig - 2023</Button> + <Button>Toekomstplannen</Button> + <Button>Custom</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1724859658267</Id> + <Name>text187</Name> + <X>-100</X> + <Y>-80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Selecteer een scenario</Text> + <Font> + <Name>Calibri</Name> + <Size>20</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1724947743345</Id> + <Name>text</Name> + <X>-320</X> + <Y>540</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Current selected assets</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724947743347</Id> + <Name>txt_batteryAssets</Name> + <X>-320</X> + <Y>270</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Battery assets</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724947743349</Id> + <Name>txt_setSlidersToSelectedGC</Name> + <X>-320</X> + <Y>370</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Set Sliders to selected GC</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724947743351</Id> + <Name>text7</Name> + <X>-320</X> + <Y>420</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Set Sliders to Scenario</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724947743353</Id> + <Name>text5</Name> + <X>-320</X> + <Y>90</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Connections</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1724948168075</Id> + <Name>gr_batteryCapacitySlider</Name> + <X>190</X> + <Y>320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1724948168077</Id> + <Name>txt_powerBattery1</Name> + <X>-170</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Opslagcapaciteit</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1724948168079</Id> + <Name>sl_batteryCapacity</Name> + <X>62</X> + <Y>-20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>//Adjust the electric capacity +c_gridBatteries.get(v_currentSelectedBattery).setStorageCapacity_kWh(sl_batteryCapacity.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW + +//Adjust grid connection capacity as well (if needed) +if(sl_batteryCapacity.getValue()*1000 > 2000){ + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryCapacity.getValue()*1000; + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryCapacity.getValue()*1000; + ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryCapacity.getValue()*1000; +} + +//Set the text accordingly +t_capacityBattery.setText(sl_batteryCapacity.getValue() + " MWh"); + + +//Set scenario to custom +f_setScenario(2);</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>100</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1724948168081</Id> + <Name>t_capacityBattery</Name> + <X>35</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>1.0 MWh</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1725003063740</Id> + <Name>txt_batteryControlRoom</Name> + <X>760</X> + <Y>80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Batterij Controlroom</Text> + <Font> + <Name>Calibri</Name> + <Size>72</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Level> + </Presentation> + <Areas> + <Area> + <Id>1725002896440</Id> + <Name>va_batteryUI</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Title>Batter UI + 1920 + 980 + + + + + 1708522361862 + UI_company + +//Getters for shapes +public ShapeRadioButtonGroup getRb_scenariosPrivateUI() { + return this.rb_scenariosPrivateUI; +} + +public ShapeRadioButtonGroup getRb_heatingTypePrivateUI() { + return this.rb_heatingTypePrivateUI; +} + +public ShapeSlider getSl_batteryCompany(){ + return this.sl_batteryCompany; +} + +public ShapeSlider getSl_heatDemandCompanyReduction(){ + return this.sl_heatDemandCompanyReduction; +} + +public ShapeSlider getSl_electricityDemandCompanyReduction(){ + return this.sl_electricityDemandCompanyReduction; +} + +public ShapeSlider getSl_mobilityDemandCompanyReduction(){ + return this.sl_mobilityDemandCompanyReduction; +} + 1754045666929 + //import kotlinx.serialization.internal.ArrayListClassDesc; +import org.eclipse.jdt.internal.compiler.ast.ForeachStatement; + + //Initialize graph locations and visibility +f_setResultsUIPresets(); + +zero_Interface.c_UIResultsInstances.add(uI_Results); + false + + 1708522361868 + 1708522361868 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089974 + true + 1708588800000 + + 0 + HOUR + + + 1 + HOUR + + + + 1708522361865 + scale + 10 + -210 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1708522361869 + 1708522361863 + + + 1708611471928 + v_companyUIBackgroundColor + -430 + 50 + + false + true + true + + Color + + new Color( 204, 72, 118); + + + + + 1709554407054 + v_companyUILineColor + -430 + 90 + + false + true + true + + Color + + black + + + + + 1713957213075 + v_minPVSlider + -1060 + 430 + + false + true + true + + double + + 0 + + + + + 1713957229701 + v_maxPVSlider + -1060 + 450 + + false + true + true + + double + + 100 + + + + + 1713957233827 + v_defaultPVSlider + -1060 + 470 + + false + true + true + + double + + 0 + + + + + 1713971707023 + v_minBatSlider + -1060 + 510 + + false + true + true + + double + + 0 + + + + + 1713971707027 + v_maxBatSlider + -1060 + 530 + + false + true + true + + double + + 1000 + + + + + 1713971707029 + v_defaultBatSlider + -1060 + 550 + + false + true + true + + double + + 0 + + + + + 1714139274247 + v_nbEVCars + -1050 + 730 + + false + true + true + + int + + 0 + + + + + 1714139294087 + v_nbHydrogenCars + -1050 + 770 + + false + true + true + + int + + 0 + + + + + 1714139299844 + v_nbDieselCars + -1050 + 750 + + false + true + true + + int + + 0 + + + + + 1714139304156 + v_nbEVVans + -1050 + 930 + + false + true + true + + int + + 0 + + + + + 1714139320416 + v_nbEVTrucks + -1050 + 1130 + + false + true + true + + int + + 0 + + + + + 1714139381294 + v_nbDieselVans + -1050 + 950 + + false + true + true + + int + + 0 + + + + + 1714139385293 + v_nbDieselTrucks + -1050 + 1150 + + false + true + true + + int + + 0 + + + + + 1714139405729 + v_nbHydrogenVans + -1050 + 970 + + false + true + true + + int + + 0 + + + + + 1714139413565 + v_nbHydrogenTrucks + -1050 + 1170 + + false + true + true + + int + + 0 + + + + + 1714139966993 + v_minEVCarSlider + -1050 + 610 + + false + true + true + + int + + 0 + + + + + 1714139997786 + v_minHydrogenCarSlider + -1050 + 650 + + false + true + true + + int + + 0 + + + + + 1714140003906 + v_maxEVCarSlider + -1050 + 670 + + false + true + true + + int + + 20 + + + + + 1714140007855 + v_minDieselCarSlider + -1050 + 630 + + false + true + true + + int + + 0 + + + + + 1714140012482 + v_maxHydrogenCarSlider + -1050 + 710 + + false + true + true + + int + + 20 + + + + + 1714140056511 + v_maxDieselCarSlider + -1050 + 690 + + false + true + true + + int + + 20 + + + + + 1714141906262 + v_minEVVanSlider + -1050 + 810 + + false + true + true + + int + + 0 + + + + + 1714141906264 + v_minHydrogenVanSlider + -1050 + 850 + + false + true + true + + int + + 0 + + + + + 1714141906266 + v_maxEVVanSlider + -1050 + 870 + + false + true + true + + int + + 20 + + + + + 1714141906268 + v_minDieselVanSlider + -1050 + 830 + + false + true + true + + int + + 0 + + + + + 1714141906270 + v_maxHydrogenVanSlider + -1050 + 910 + + false + true + true + + int + + 20 + + + + + 1714141906272 + v_maxDieselVanSlider + -1050 + 890 + + false + true + true + + int + + 20 + + + + + 1714142030261 + v_minEVTruckSlider + -1050 + 1010 + + false + true + true + + int + + 0 + + + + + 1714142030263 + v_minHydrogenTruckSlider + -1050 + 1050 + + false + true + true + + int + + 0 + + + + + 1714142030265 + v_maxEVTruckSlider + -1050 + 1070 + + false + true + true + + int + + 20 + + + + + 1714142030267 + v_minDieselTruckSlider + -1050 + 1030 + + false + true + true + + int + + 0 + + + + + 1714142030269 + v_maxDieselTruckSlider + -1050 + 1090 + + false + true + true + + int + + 20 + + + + + 1714142035660 + v_maxHydrogenTruckSlider + -1050 + 1110 + + false + true + true + + int + + 20 + + + + + 1725364840518 + v_adressGC + -740 + 90 + + false + true + true + + String + + + + 1725373825534 + v_chartBackgroundColor + -430 + 130 + + false + true + true + + Color + + white + + + + + 1725381531538 + v_companyUILineWidth + -430 + 110 + + false + true + true + + double + + 2 + + + + + 1725381554846 + v_chartLineWidth + -430 + 150 + + false + true + true + + double + + 2 + + + + + 1725382988283 + v_companyUIBackgroundColorSliders + -430 + 70 + + false + true + true + + Color + + white + + + + + 1725609978738 + v_loadScreenColor + -430 + 180 + + false + true + true + + Color + + v_companyUIBackgroundColor + + + + + 1725614630564 + v_minGCCapacitySlider + -1060 + 270 + + false + true + true + + double + + 0 + + + + + 1725614630566 + v_maxGCCapacitySlider + -1060 + 290 + + false + true + true + + double + + 100 + + + + + 1725614630568 + v_defaultGCCapacitySlider + -1060 + 310 + + false + true + true + + double + + 0 + + + + + 1725625091022 + b_runningMainInterfaceScenarioSettings + -410 + 850 + + false + true + true + + boolean + + false + + + + + 1727798399505 + v_minGCCapacitySlider_Feedin + -1060 + 350 + + false + true + true + + double + + 0 + + + + + 1727798399507 + v_maxGCCapacitySlider_Feedin + -1060 + 370 + + false + true + true + + double + + 100 + + + + + 1727798399509 + v_defaultGCCapacitySlider_Feedin + -1060 + 390 + + false + true + true + + double + + 0 + + + + + 1727872520826 + v_physicalConnectionCapacity_kW + -1060 + 250 + + false + true + true + + double + + + + 1727883544535 + v_NFATO_kW_delivery + -430 + 745 + + false + true + true + + double + + + + 1727883574908 + v_NFATO_kW_feedin + -430 + 765 + + false + true + true + + double + + + + 1727941212434 + v_NFATO_active + -430 + 725 + + false + true + true + + boolean + + + + 1729686904963 + b_runningMainInterfaceSlider + -410 + 870 + + false + true + true + + boolean + + false + + + + + 1756376301806 + v_minSavingsSliders + -1050 + 1260 + + false + true + true + + double + + -50 + + + + + 1756376314706 + v_maxSavingsSliders + -1050 + 1280 + + false + true + true + + double + + 50 + + + + + 1708522385741 + p_companyName + -740 + 70 + + false + true + true + + String + NONE + false + + 1708522385739 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1715181661645 + p_maxAddedVehicles + Amount of vehicles that can additionally be added on the already existing ones + -1060 + 1190 + + false + true + true + + int + NONE + false + + 20 + + + 1715181661643 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760715449229 + p_scenarioSettings_Current + -740 + 140 + + false + true + true + + J_scenario_Current + NONE + false + + 1760715449227 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760715453384 + p_scenarioSettings_Future + -740 + 160 + + false + true + true + + J_scenario_Future + NONE + false + + 1760715453382 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760715588549 + p_gridConnection + -740 + 50 + + false + true + true + + GridConnection + NONE + false + + 1760715588547 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + + + VOID + double + 1713445281785 + f_setScenarioFuture + -410 + 410 + + false + true + true + //Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +////Heating + +//Heating savings +sl_heatDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedHeatSavings_pct(), true); + +//Heating type (aangenomen dat het hetzelfde blijft, want hebben geen vraag die dat stelt in het formulier) +int nr_currentHeatingType = 0; +switch (p_scenarioSettings_Future.getPlannedHeatingType()){ + case GAS_BURNER: + nr_currentHeatingType = 0; + break; + + case HYBRID_HEATPUMP: + nr_currentHeatingType = 1; + break; + + case ELECTRIC_HEATPUMP: + nr_currentHeatingType = 2; + break; + + //case HYDROGENBURNER: + case DISTRICTHEAT: + nr_currentHeatingType = 3; + break; + + case GAS_CHP: + nr_currentHeatingType = 4; + break; + + default: +} +rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, true); + + +////Electricity + +//Electricity savings +sl_electricityDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedElectricitySavings_pct(), true); + +//Connection capacity (Delivery) +sl_GCCapacityCompany.setValue(p_scenarioSettings_Future.getRequestedContractDeliveryCapacity_kW(), true); + +//Connection capacity (Feedin) +sl_GCCapacityCompany_Feedin.setValue(p_scenarioSettings_Future.getRequestedContractFeedinCapacity_kW(), true); + +//Connection capacity (Physical) +v_physicalConnectionCapacity_kW = p_scenarioSettings_Future.getRequestedPhysicalConnectionCapacity_kW(); +p_gridConnection.v_liveConnectionMetaData.physicalCapacity_kW = v_physicalConnectionCapacity_kW; + +//Solar panel power +sl_rooftopPVCompany.setValue(p_scenarioSettings_Future.getPlannedPV_kW(), true); + +//Battery capacity +sl_batteryCompany.setValue(p_scenarioSettings_Future.getPlannedBatteryCapacity_kWh(), true); + +//Curtailment setting +cb_curtailmentCompany.setSelected(p_scenarioSettings_Future.getPlannedCurtailment(), true); + +////Mobility + +//Mobility savings +sl_mobilityDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedTransportSavings_pct(), true); + +//Cars (VOLGORDE BELANGRIJK) +sl_hydrogenCarsCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenCars(), true); +sl_electricCarsCompany.setValue(p_scenarioSettings_Future.getPlannedEVCars(), true); +//sl_dieselCarsCompany.setValue(c_scenarioSettings_Future.getPlannedDieselCars(), true); + +//Vans (VOLGORDE BELANGRIJK) +sl_hydrogenVansCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenVans(), true); +sl_electricVansCompany.setValue(p_scenarioSettings_Future.getPlannedEVVans(), true); +//sl_dieselVansCompany.setValue(c_scenarioSettings_Future.getPlannedDieselVans(), true); + +//Trucks (VOLGORDE BELANGRIJK) +sl_hydrogenTrucksCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenTrucks(), true); +sl_electricTrucksCompany.setValue(p_scenarioSettings_Future.getPlannedEVTrucks(), true); +//sl_dieselTrucksCompany.setValue(c_scenarioSettings_Future.getPlannedDieselTrucks(), true); + +//set active if active in future +p_gridConnection.f_setActive(p_scenarioSettings_Future.getIsActiveInFuture()); + + +//Reset button to future, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(1, false); + + + VOID + double + 1713447383903 + f_setScenario + -430 + 370 + + false + true + true + + scenario_nr + int + + switch (scenario_nr){ + + case 0: // Current + f_setScenarioCurrent(); + + if(!b_runningMainInterfaceScenarioSettings){ + traceln("Selected scenario: Current"); + } + + break; + + case 1: // Future + f_setScenarioFuture(); + + if(!b_runningMainInterfaceScenarioSettings){ + traceln("Selected scenario: Future"); + } + break; + + case 2: // Custom + if(rb_scenariosPrivateUI.getValue() == 2){ + return; + } + rb_scenariosPrivateUI.setValue(2, false); + + if(!b_runningMainInterfaceSlider){ + traceln("Selected scenario: Custom"); + } + break; + + default: +} + +//Set 'results up to date' to false +zero_Interface.b_resultsUpToDate = false; + + + VOID + double + 1713447428490 + f_setScenarioCurrent + -410 + 390 + + false + true + true + //Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +////Heating + +//Heating savings +sl_heatDemandCompanyReduction.setValue(0, true); + +//Heating type +int nr_currentHeatingType = 0; +switch (p_scenarioSettings_Current.getCurrentHeatingType()){ + case GAS_BURNER: + nr_currentHeatingType = 0; + break; + + case HYBRID_HEATPUMP: + nr_currentHeatingType = 1; + break; + + case ELECTRIC_HEATPUMP: + nr_currentHeatingType = 2; + break; + + //case HYDROGENBURNER: + case DISTRICTHEAT: + nr_currentHeatingType = 3; + break; + + case GAS_CHP: + nr_currentHeatingType = 4; + break; + + default: +} +rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, true); + + +////Electricity + +//Electricity savings +sl_electricityDemandCompanyReduction.setValue(0, true); + +//Connection capacity (Delivery) +sl_GCCapacityCompany.setValue(p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW(), true); + +//Connection capacity (Feedin) +sl_GCCapacityCompany_Feedin.setValue(p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW(), true); + +//Connection capacity (Physical) +v_physicalConnectionCapacity_kW = p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW(); +p_gridConnection.v_liveConnectionMetaData.physicalCapacity_kW = v_physicalConnectionCapacity_kW; + +//Solar panel power +sl_rooftopPVCompany.setValue(v_minPVSlider, true); + +//Battery capacity +sl_batteryCompany.setValue(v_minBatSlider, true); + +//Curtailment setting +cb_curtailmentCompany.setSelected(false, false); + +////Mobility + +//Mobility savings +sl_mobilityDemandCompanyReduction.setValue(0, true); + +//Cars (VOLGORDE BELANGRIJK) +sl_hydrogenCarsCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenCars(), true); +sl_electricCarsCompany.setValue(p_scenarioSettings_Current.getCurrentEVCars(), true); +//sl_dieselCarsCompany.setValue(c_scenarioSettings_Current.getCurrentDieselCars(), true); + +//Vans (VOLGORDE BELANGRIJK) +sl_hydrogenVansCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenVans(), true); +sl_electricVansCompany.setValue(p_scenarioSettings_Current.getCurrentEVVans(), true); +//sl_dieselVansCompany.setValue(c_scenarioSettings_Current.getCurrentDieselVans(), true); + +//Trucks (VOLGORDE BELANGRIJK) +sl_hydrogenTrucksCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenTrucks(), true); +sl_electricTrucksCompany.setValue(p_scenarioSettings_Current.getCurrentEVTrucks(), true); +//sl_dieselTrucksCompany.setValue(c_scenarioSettings_Current.getCurrentDieselTrucks(), true); + +//set active if active in present +p_gridConnection.f_setActive(p_scenarioSettings_Current.getIsCurrentlyActive()); + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(0, false); + + + VOID + double + 1713537591106 + f_setHeatingType + -430 + 490 + + false + true + true + + GC + GridConnection + + + selectedHeatingType + OL_GridConnectionHeatingType + + //Check if selected is not the same as previous, if not: continue with the setting of new heating type +if (GC.f_getCurrentHeatingType() == selectedHeatingType){ + //traceln("Selected heating type is the same as previous heating type"); + return; +} + +//Remove from heat grid if it was connected to one. +GC.p_parentNodeHeat = null; +GC.p_parentNodeHeatID = null; + +//Remove primary heating asset +GC.f_removeAllHeatingAssets(); + +//Get needed cacacity +double capacityThermal_kW; + +//Select heat demand consumption asset +J_EAConsumption heatDemandAsset = findFirst(GC.c_consumptionAssets, j_ea->j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); + +//Check heating demand asset is null (shouldnt be possible) +if (heatDemandAsset != null){ + capacityThermal_kW = heatDemandAsset.yearlyDemand_kWh/8760*10; // --> average hourly consumption * 10 --> to always have enough capacity +} +else{ + //Select profile heat demand asset + J_EAProfile heatDemandAsset_Profile = findFirst(GC.c_profileAssets, j_ea->j_ea.energyCarrier == OL_EnergyCarriers.HEAT); + + if(heatDemandAsset_Profile != null){ + capacityThermal_kW = heatDemandAsset_Profile.getProfileScaling_fr() * max(heatDemandAsset_Profile.a_energyProfile_kWh)*4; + } + else{ + traceln("No heating demand asset found for GC:" + GC.p_gridConnectionID); + traceln("--> No heating asset created"); + return; + } + +} + +capacityThermal_kW = capacityThermal_kW * 2;//For now just make it always twice as high, to be able to support savings/additional consumption slider settings. + +//Algemeen +double timestep_h = zero_Interface.energyModel.p_timeStep_h; +double efficiency; +double outputTemperature_degC; + +//Heatpump specifieke parameters +double baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); +double capacityElectric_kW; +OL_AmbientTempType ambientTempType; +double sourceAssetHeatPower_kW; +double belowZeroHeatpumpEtaReductionFactor; + + + +//Create selected heating type +switch (selectedHeatingType){ + case GAS_BURNER: + + //Add primary heating asset (gasburner) + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; + + new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); + + break; + + case HYBRID_HEATPUMP: + + //Add primary heating asset (heatpump) + capacityElectric_kW = capacityThermal_kW / 3; //-- /3, want is hybride, dus kleiner + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); + zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); + + //Add secondary heating asset (gasburner) + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; + + J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); + //GC.p_secondaryHeatingAsset = gasBurnerHybrid; + + break; + + case ELECTRIC_HEATPUMP: + + //Add primary heating asset (heatpump) + capacityElectric_kW = capacityThermal_kW; + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); + + //Add secondary heating asset (if needed??) //E-boiler!!?? + break; + + case HYDROGENBURNER: + + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHydrogenBurner_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHydrogenBurner_degC; + + //Add primary heating asset (hydrogenburner) + new J_EAConversionHydrogenBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); + + break; + + case DISTRICTHEAT: + + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; + + new J_EAConversionHeatDeliverySet(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); + + //Add GC to heat grid if it exists, else create new one + GC.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + if(GC.p_parentNodeHeat == null){ + GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); + zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); + GN_heat.p_gridNodeID = "Heatgrid"; + + // Check wether transformer capacity is known or estimated + GN_heat.p_capacity_kW = 1000000; + GN_heat.p_realCapacityAvailable = false; + + // Basic GN information + GN_heat.p_description = "Warmtenet"; + + //Define node type + GN_heat.p_nodeType = OL_GridNodeType.HT; + GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + + //Define GN location + GN_heat.p_latitude = 0; + GN_heat.p_longitude = 0; + GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + + //Connect + GC.p_parentNodeHeat = GN_heat; + + //Show warning that heat grid is not a simple solution + f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import."); + } + GC.p_parentNodeHeatID = GC.p_parentNodeHeat.p_gridNodeID; + break; + + case GAS_CHP: + + efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr + zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; + outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureCHP_degC; + double outputCapacityElectric_kW = (capacityThermal_kW/zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr) * zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; + + new J_EAConversionGasCHP(GC, outputCapacityElectric_kW, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC ); + + break; +} + +// Add a management for the chosen heating type +GC.f_addHeatManagement(selectedHeatingType, false); + + + VOID + double + 1713537591117 + f_setGCCapacity + -430 + 510 + + false + true + true + + GC + GridConnection + + + setGridConnectionCapacity_kW + double + + + type + String + + GC.f_nfatoSetConnectionCapacity(true); + +switch(type){ + case "DELIVERY": + GC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = setGridConnectionCapacity_kW; + break; + case "FEEDIN": + GC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = setGridConnectionCapacity_kW; + break; + case "PHYSICAL": + GC.v_liveConnectionMetaData.physicalCapacity_kW = setGridConnectionCapacity_kW; + break; +} + +GC.f_nfatoSetConnectionCapacity(false); + + + VOID + double + 1713537591121 + f_setBattery + -430 + 570 + + false + true + true + + GC + GridConnection + + + setBatteryCapacity_kWh + double + + J_EAStorage batteryAsset = findFirst(GC.c_storageAssets, p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); + +if (setBatteryCapacity_kWh == 0) { + if (batteryAsset != null) { + batteryAsset.removeEnergyAsset(); + } +} +else { + double c_rate = 1.0 / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; + if (batteryAsset == null) { + batteryAsset = new J_EAStorageElectric(GC, setBatteryCapacity_kWh * c_rate, setBatteryCapacity_kWh, 0.5, zero_Interface.energyModel.p_timeStep_h); + } + else { + if (batteryAsset.getStorageCapacity_kWh() != 0) { + c_rate = ((J_EAStorageElectric)batteryAsset).getCapacityElectric_kW()/((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh(); + } + ((J_EAStorageElectric)batteryAsset).setStorageCapacity_kWh(setBatteryCapacity_kWh); + ((J_EAStorageElectric)batteryAsset).setCapacityElectric_kW(c_rate * setBatteryCapacity_kWh); + } +} + +//Add battery algorithm if it is not present +if(GC.f_getBatteryManagement() == null){ + GC.f_setBatteryManagement(new J_BatteryManagementSelfConsumption(GC)); +} + + + + VOID + double + 1713954180112 + f_setPVSystem + -430 + 530 + + false + true + true + + GC + GridConnection + + + v_rooftopPV_kWp + double + + if (GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + J_EAProduction pvAsset = findFirst(GC.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); + if (v_rooftopPV_kWp == 0) { + pvAsset.removeEnergyAsset(); + } + else { + pvAsset.setCapacityElectric_kW(v_rooftopPV_kWp); + } +} +else{ + if (v_rooftopPV_kWp != 0) { + f_addPVAsset(GC, OL_EnergyAssetType.PHOTOVOLTAIC, v_rooftopPV_kWp); + } +} + + + VOID + double + 1713956765904 + f_setSliderPresets + Set Slider presets (limits, start value, text) for private company sliders + -1090 + 190 + + false + true + true + //Heating radio button +f_setHeatingRB(); + +//Set grid capacity slider (delivery) +f_setGCCapacitySliderPresets(); + +//Set connection capacity slider (feedin) +f_setGCCapacitySliderPresets_Feedin(); + +//PV slider +f_setPVSliderPresets(); + +//Battery slider +f_setBatSliderPresets(); + +//Vehicles sliders +f_setVehicleSliderPresets(); + +//Demand Reduction sliders +f_setDemandReductionSliderPresets(); + + + VOID + double + 1713961813474 + f_setComboBoxOwnedGC + -1070 + 100 + + false + true + true + String currentSelectedGCString = ""; +int i = 1; +List<String> ownedGCs = new ArrayList<String>(); +for(GridConnection GC : p_gridConnection.p_owner.f_getOwnedGridConnections()){ + if(GC instanceof GCUtility){ + String GCDisplayName = "Aansluiting " + i + ": " + GC.p_address.getAddress(); + ownedGCs.add(GCDisplayName); + i++; + + if(GC == p_gridConnection){ + currentSelectedGCString = GCDisplayName; + } + } +} +String[] ownedGCsArray = new String[ownedGCs.size()]; +for(int j = 0; j < ownedGCsArray.length; j++){ + ownedGCsArray[j] = ownedGCs.get(j); +} + +cb_selectGC.setItems(ownedGCsArray, false); + +//Set cb to correct gc +cb_selectGC.setValue(currentSelectedGCString, false); + + + VOID + double + 1714139629738 + f_setPVSliderPresets + -1070 + 410 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_rooftopPVCompany.setRange(0, 2000000); + +//Set range specific for each company +v_minPVSlider = roundToInt(p_scenarioSettings_Current.getCurrentPV_kW()); +v_maxPVSlider = roundToInt(zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV* p_gridConnection.p_roofSurfaceArea_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); +if(v_maxPVSlider <= v_minPVSlider){ + v_maxPVSlider = v_minPVSlider + 1000; +} +v_defaultPVSlider = v_minPVSlider; + + + VOID + double + 1714139648227 + f_setBatSliderPresets + -1070 + 490 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_batteryCompany.setRange(0, 10000); + +double upperLimit = 1000 + 1000 * Math.ceil(p_scenarioSettings_Current.getCurrentPV_kW()/1000.0); +v_minBatSlider = roundToInt(p_scenarioSettings_Current.getCurrentBatteryCapacity_kWh()); +v_maxBatSlider = Math.max(v_minBatSlider*2, upperLimit); +v_defaultBatSlider = v_minBatSlider; + + + VOID + double + 1714139684603 + f_setVehicleSliderPresets + -1070 + 570 + + false + true + true + //Cars +f_setCarSliderPresets(); + +//Vans +f_setVanSliderPresets(); + +//Trucks +f_setTruckSliderPresets(); + + + VOID + double + 1714140108358 + f_setCarSliderPresets + -1060 + 590 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_electricCarsCompany.setRange(0, 500); +sl_dieselCarsCompany.setRange(0, 500); +sl_hydrogenCarsCompany.setRange(0, 500); + + +//Get default values +int default_nbEVCars = p_scenarioSettings_Current.getCurrentEVCars(); +int default_nbDieselCars = p_scenarioSettings_Current.getCurrentDieselCars(); +int default_nbHydrogenCars = p_scenarioSettings_Current.getCurrentHydrogenCars(); + +//Set minimum value +v_minEVCarSlider = default_nbEVCars; +v_minDieselCarSlider = 0; +v_minHydrogenCarSlider = 0; + +//Determine realistic max additional vehicles +int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVCars + default_nbDieselCars + default_nbHydrogenCars)*1, 20); + +//Set maximum +v_maxEVCarSlider = default_nbEVCars + default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. +v_maxDieselCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; +v_maxHydrogenCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; + +//Set default values +v_nbEVCars = default_nbEVCars; +v_nbDieselCars = default_nbDieselCars; +v_nbHydrogenCars = default_nbHydrogenCars; + +//Set slider knobs +sl_electricCarsCompany.setValue(v_nbEVCars, false); +sl_dieselCarsCompany.setValue(v_nbDieselCars, false); +sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); + + + + VOID + double + 1714140134819 + f_setVanSliderPresets + -1060 + 790 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_electricVansCompany.setRange(0, 500); +sl_dieselVansCompany.setRange(0, 500); +sl_hydrogenVansCompany.setRange(0, 500); + +//Get default values +int default_nbEVVans = p_scenarioSettings_Current.getCurrentEVVans(); +int default_nbDieselVans = p_scenarioSettings_Current.getCurrentDieselVans(); +int default_nbHydrogenVans = p_scenarioSettings_Current.getCurrentHydrogenVans(); + +//Set minimum value +v_minEVVanSlider = default_nbEVVans; +v_minDieselVanSlider = 0; +v_minHydrogenVanSlider = 0; + +//Determine realistic max additional vehicles +int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVVans + default_nbDieselVans + default_nbHydrogenVans)*2, 20); + +//Set maximum +v_maxEVVanSlider = default_nbEVVans + default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. +v_maxDieselVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; +v_maxHydrogenVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; + +//Set default values +v_nbEVVans = default_nbEVVans; +v_nbDieselVans = default_nbDieselVans; +v_nbHydrogenVans = default_nbHydrogenVans; + +//Set slider knob +sl_electricVansCompany.setValue(v_nbEVVans, false); +sl_dieselVansCompany.setValue(v_nbDieselVans, false); +sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); + + + + VOID + double + 1714140156233 + f_setTruckSliderPresets + -1060 + 990 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_electricTrucksCompany.setRange(0, 500); +sl_dieselTrucksCompany.setRange(0, 500); +sl_hydrogenTrucksCompany.setRange(0, 500); + +//Get default values +int default_nbEVTrucks = p_scenarioSettings_Current.getCurrentEVTrucks(); +int default_nbDieselTrucks = p_scenarioSettings_Current.getCurrentDieselTrucks(); +int default_nbHydrogenTrucks = p_scenarioSettings_Current.getCurrentHydrogenTrucks(); + +//Set minimum value +v_minEVTruckSlider = default_nbEVTrucks; +v_minDieselTruckSlider = 0; +v_minHydrogenTruckSlider = 0; + +//Determine realistic max additional vehicles +int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVTrucks + default_nbDieselTrucks + default_nbHydrogenTrucks)*2, 20); + +//Set maximum +v_maxEVTruckSlider = default_nbEVTrucks + default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. +v_maxDieselTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; +v_maxHydrogenTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; + +//Set default values +v_nbEVTrucks = default_nbEVTrucks; +v_nbDieselTrucks = default_nbDieselTrucks; +v_nbHydrogenTrucks = default_nbHydrogenTrucks; + +//Set slider knob +sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); +sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); +sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); + + + + VOID + double + 1714410040303 + f_createVehicle + -410 + 650 + + false + true + true + + parentGC + GridConnection + + + vehicleType + OL_EnergyAssetType + + + tripTracker + J_ActivityTrackerTrips + + + available + boolean + + + isAdditionalVehicle + boolean + + double energyConsumption_kWhpkm = 0; +double vehicleScaling = 1.0; +double timestep_h = zero_Interface.energyModel.p_timeStep_h; + +if (vehicleType == OL_EnergyAssetType.ELECTRIC_VEHICLE || vehicleType == OL_EnergyAssetType.ELECTRIC_VAN || vehicleType == OL_EnergyAssetType.ELECTRIC_TRUCK ){ // Create EVS + double storageCapacity_kWh = 0; + double capacityElectricity_kW = 0; + double stateOfCharge_fr = 1; // Initial state of charge + + switch(vehicleType){ + case ELECTRIC_VEHICLE: + capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVCarChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVCarChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerCar_kW; + storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageCar_kWh; + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; + break; + case ELECTRIC_VAN: + capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVVanChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVVanChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerVan_kW; + storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageVan_kWh; + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; + break; + case ELECTRIC_TRUCK: + capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVTruckChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVTruckChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; + storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; + break; + + } + + //Create EV and connect to GC and selected trip tracker + J_EAEV electricVehicle = new J_EAEV(parentGC, capacityElectricity_kW, storageCapacity_kWh, stateOfCharge_fr, timestep_h, energyConsumption_kWhpkm, vehicleScaling, vehicleType, tripTracker); + electricVehicle.available = available; + + + + if (isAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(electricVehicle); + } + else{ + zero_Interface.c_orderedVehicles.add(0, electricVehicle); + } +} + +else if (vehicleType == OL_EnergyAssetType.DIESEL_VEHICLE || vehicleType == OL_EnergyAssetType.DIESEL_VAN || vehicleType == OL_EnergyAssetType.DIESEL_TRUCK ){ // Create diesel vehicles + switch (vehicleType){ + + case DIESEL_VEHICLE: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionCar_kWhpkm; + break; + + case DIESEL_VAN: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionVan_kWhpkm; + break; + + case DIESEL_TRUCK: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + break; + } + + //Create Diesel vehicle and connect to GC and selected trip tracker + J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(parentGC, energyConsumption_kWhpkm, timestep_h, vehicleScaling, vehicleType, tripTracker); + dieselVehicle.available = available; + + + + if (isAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(dieselVehicle); + } + else{ + zero_Interface.c_orderedVehicles.add(0, dieselVehicle); + } +} + +else{ // (Hydrogen vehicles) + switch (vehicleType){ + case HYDROGEN_VEHICLE: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionCar_kWhpkm; + break; + case HYDROGEN_VAN: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionVan_kWhpkm; + break; + case HYDROGEN_TRUCK: + energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; + break; + + } + + //Create Hydrogen vehicle and connect to GC and selected trip tracker + J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(parentGC, energyConsumption_kWhpkm, timestep_h, vehicleScaling, vehicleType, tripTracker); + hydrogenVehicle.available = available; + + + + if (isAdditionalVehicle){ + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(hydrogenVehicle); + } + else{ + zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); + } +} + + + + + VOID + int + 1714411599586 + f_setElectricVehicleSliders + -430 + 590 + + false + true + true + + GC + GridConnection + + + vehicleType + OL_EnergyAssetType + + + setAmountOfVehicles + int + + int local_EV_nb; +int local_DieselV_nb; +int local_HydrogenV_nb; +int max_amount_diesel_vehicles; + +OL_EnergyAssetType vehicleType_diesel; +OL_EnergyAssetType vehicleType_hydrogen; + +switch (vehicleType){ + + case ELECTRIC_VEHICLE: + + vehicleType_diesel = OL_EnergyAssetType.DIESEL_VEHICLE; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VEHICLE; + + local_EV_nb = v_nbEVCars; + local_DieselV_nb = v_nbDieselCars; + local_HydrogenV_nb = v_nbHydrogenCars; + + max_amount_diesel_vehicles = v_maxDieselCarSlider; + + break; + + case ELECTRIC_VAN: + + vehicleType_diesel = OL_EnergyAssetType.DIESEL_VAN; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VAN; + + local_EV_nb = v_nbEVVans; + local_DieselV_nb = v_nbDieselVans; + local_HydrogenV_nb = v_nbHydrogenVans; + + max_amount_diesel_vehicles = v_maxDieselVanSlider; + + break; + + case ELECTRIC_TRUCK: + + vehicleType_diesel = OL_EnergyAssetType.DIESEL_TRUCK; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_TRUCK; + + local_EV_nb = v_nbEVTrucks; + local_DieselV_nb = v_nbDieselTrucks; + local_HydrogenV_nb = v_nbHydrogenTrucks; + + max_amount_diesel_vehicles = v_maxDieselTruckSlider; + + break; + + default: + traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); + return; +} + + +if (setAmountOfVehicles > local_EV_nb){ // Slider has increased the amount of selected vehicles + + //First convert all other existing additional vehicles + int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_hydrogen).size(); + while(setAmountOfVehicles > local_EV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ + + // Find an additional Diesel vehicle + J_EAVehicle dieselVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel); + + if(dieselVehicle != null){ + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + // Remove Diesel vehicle + boolean available = dieselVehicle.getAvailability(); + dieselVehicle.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + + //Create new additional EV + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_EV_nb++; + local_DieselV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + else{ + // Find an additional Hydrogen vehicle + J_EAVehicle hydrogenVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove Hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + hydrogenVehicle.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + + //Create new additional EV + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_EV_nb++; + local_HydrogenV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + } + + while ( setAmountOfVehicles > local_EV_nb && local_DieselV_nb > 0) { + + // Find a Diesel vehicle + J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + // Remove Diesel vehicle + boolean available = dieselVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + dieselVehicle.removeEnergyAsset(); + + //Create new EV + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_EV_nb++; + local_DieselV_nb--; + } + while (setAmountOfVehicles > local_EV_nb && local_HydrogenV_nb > 0){ + + // Find a Hydrogen vehicle + J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove Hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + hydrogenVehicle.removeEnergyAsset(); + + //Create new EV + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_EV_nb++; + local_HydrogenV_nb--; + } + while (setAmountOfVehicles > local_EV_nb){ //If still not enough EV: + + // Create additional vehicles + f_createVehicle(GC, vehicleType, null, true, true); + + //Update variables + local_EV_nb++; + } + +} +else if(setAmountOfVehicles < local_EV_nb){ // Slider has decreased the amount of selected vehicles + + ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); + while(setAmountOfVehicles < local_EV_nb && additionalVehicles.size() > 0){ //If there are additional EV, remove them first + + //Find additional created vehicle + J_EAEV ev = (J_EAEV)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added + + // Remove electric vehicle + additionalVehicles.remove(ev); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); + zero_Interface.c_orderedVehicles.remove(ev); + ev.removeEnergyAsset(); + + //Update variable + local_EV_nb--; + } + while ( setAmountOfVehicles < local_EV_nb && local_DieselV_nb < max_amount_diesel_vehicles) { + + //Find a to be removed EV + J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + //Remove EV + boolean available = ev.getAvailability(); + zero_Interface.c_orderedVehicles.remove(ev); + ev.removeEnergyAsset(); + + // Create diesel vehicle + f_createVehicle(GC, vehicleType_diesel, tripTracker, available, false); + + local_EV_nb--; + local_DieselV_nb++; + } +} + + + +//Update variables +switch (vehicleType){ + + case ELECTRIC_VEHICLE: + + v_nbEVCars = local_EV_nb; + v_nbDieselCars = local_DieselV_nb; + v_nbHydrogenCars = local_HydrogenV_nb; + + break; + + case ELECTRIC_VAN: + + v_nbEVVans = local_EV_nb; + v_nbDieselVans = local_DieselV_nb; + v_nbHydrogenVans = local_HydrogenV_nb; + + break; + + case ELECTRIC_TRUCK: + + v_nbEVTrucks = local_EV_nb; + v_nbDieselTrucks = local_DieselV_nb; + v_nbHydrogenTrucks = local_HydrogenV_nb; + + break; +} + + + VOID + int + 1714471183392 + f_setDieselVehicleSliders + -430 + 630 + + false + true + true + + GC + GridConnection + + + vehicleType + OL_EnergyAssetType + + + setAmountOfVehicles + int + + int local_EV_nb; +int local_DieselV_nb; +int local_HydrogenV_nb; + +int min_amount_EV; +int max_amount_EV; + +OL_EnergyAssetType vehicleType_electric; +OL_EnergyAssetType vehicleType_hydrogen; + +switch (vehicleType){ + + case DIESEL_VEHICLE: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VEHICLE; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VEHICLE; + + local_EV_nb = v_nbEVCars; + local_DieselV_nb = v_nbDieselCars; + local_HydrogenV_nb = v_nbHydrogenCars; + + min_amount_EV = v_minEVCarSlider; + max_amount_EV = v_maxEVCarSlider; + + break; + + case DIESEL_VAN: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VAN; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VAN; + + local_EV_nb = v_nbEVVans; + local_DieselV_nb = v_nbDieselVans; + local_HydrogenV_nb = v_nbHydrogenVans; + + min_amount_EV = v_minEVVanSlider; + max_amount_EV = v_maxEVVanSlider; + + break; + + case DIESEL_TRUCK: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_TRUCK; + vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_TRUCK; + + local_EV_nb = v_nbEVTrucks; + local_DieselV_nb = v_nbDieselTrucks; + local_HydrogenV_nb = v_nbHydrogenTrucks; + + min_amount_EV = v_minEVTruckSlider; + max_amount_EV = v_maxEVTruckSlider; + + break; + + default: + traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); + return; +} + + +if (setAmountOfVehicles > local_DieselV_nb){ // Slider has increased the amount of selected vehicles + //First convert all other existing additional vehicles + int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen || p.energyAssetType == vehicleType_electric).size(); + while(setAmountOfVehicles > local_DieselV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ + + // Find an additional EV vehicle + J_EAVehicle ev = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_electric); + + if(ev != null){ + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + // Remove EV + boolean available = ev.getAvailability(); + ev.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); + zero_Interface.c_orderedVehicles.remove(ev); + + //Create new additional Diesel vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_DieselV_nb++; + local_EV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + else{ + // Find an additional Hydrogen vehicle + J_EAVehicle hydrogenVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove Hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + hydrogenVehicle.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + + //Create new additional Diesel vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_DieselV_nb++; + local_HydrogenV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + } + while ( setAmountOfVehicles > local_DieselV_nb && local_EV_nb > min_amount_EV) { + + // Find an EV + J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + //Remove one EV + boolean available = ev.getAvailability(); + zero_Interface.c_orderedVehicles.remove(ev); + ev.removeEnergyAsset(); + + //Create new Diesel vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_DieselV_nb++; + local_EV_nb--; + } + while (setAmountOfVehicles > local_DieselV_nb && local_HydrogenV_nb > 0){ + + // Find a Hydrogen vehicle + J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + hydrogenVehicle.removeEnergyAsset(); + + //Create new Diesel vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_DieselV_nb++; + local_HydrogenV_nb--; + } + while (setAmountOfVehicles > local_DieselV_nb){ // Create additional vehicles + + f_createVehicle(GC, vehicleType, null, true, true); + + local_DieselV_nb++; + } +} +else if(setAmountOfVehicles < local_DieselV_nb){ // Slider has decreased the amount of selected vehicles + + ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); + while(setAmountOfVehicles < local_DieselV_nb && additionalVehicles.size() > 0){ //Remove additional Diesel vehicles first + + //Find additional created vehicle + J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added + + // Remove diesel vehicle + additionalVehicles.remove(dieselVehicle); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); + dieselVehicle.removeEnergyAsset(); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + + //Update variable + local_DieselV_nb--; + } + while ( setAmountOfVehicles < local_DieselV_nb && local_EV_nb < max_amount_EV) { + + // Find a to be removed Diesel vehicle + J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + // Remove diesel vehicle + boolean available = dieselVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + dieselVehicle.removeEnergyAsset(); + + //Create new EV + f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); + + //Update variables + local_DieselV_nb--; + local_EV_nb++; + } +} + + + +//Update variables +switch (vehicleType){ + + case DIESEL_VEHICLE: + v_nbEVCars = local_EV_nb; + v_nbDieselCars = local_DieselV_nb; + v_nbHydrogenCars = local_HydrogenV_nb; + break; + + case DIESEL_VAN: + v_nbEVVans = local_EV_nb; + v_nbDieselVans = local_DieselV_nb; + v_nbHydrogenVans = local_HydrogenV_nb; + break; + + case DIESEL_TRUCK: + v_nbEVTrucks = local_EV_nb; + v_nbDieselTrucks = local_DieselV_nb; + v_nbHydrogenTrucks = local_HydrogenV_nb; + break; +} + + + VOID + int + 1714474430338 + f_setHydrogenVehicleSliders + -430 + 610 + + false + true + true + + GC + GridConnection + + + vehicleType + OL_EnergyAssetType + + + setAmountOfVehicles + int + + int local_EV_nb; +int local_DieselV_nb; +int local_HydrogenV_nb; + +int min_amount_EV; +int max_amount_EV; + +OL_EnergyAssetType vehicleType_electric; +OL_EnergyAssetType vehicleType_diesel; + +switch (vehicleType){ + + case HYDROGEN_VEHICLE: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VEHICLE; + vehicleType_diesel = OL_EnergyAssetType.DIESEL_VEHICLE; + + local_EV_nb = v_nbEVCars; + local_DieselV_nb = v_nbDieselCars; + local_HydrogenV_nb = v_nbHydrogenCars; + + min_amount_EV = v_minEVCarSlider; + max_amount_EV = v_maxEVCarSlider; + + break; + + case HYDROGEN_VAN: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VAN; + vehicleType_diesel = OL_EnergyAssetType.DIESEL_VAN; + + local_EV_nb = v_nbEVVans; + local_DieselV_nb = v_nbDieselVans; + local_HydrogenV_nb = v_nbHydrogenVans; + + min_amount_EV = v_minEVVanSlider; + max_amount_EV = v_maxEVVanSlider; + + break; + + case HYDROGEN_TRUCK: + + vehicleType_electric = OL_EnergyAssetType.ELECTRIC_TRUCK; + vehicleType_diesel = OL_EnergyAssetType.DIESEL_TRUCK; + + local_EV_nb = v_nbEVTrucks; + local_DieselV_nb = v_nbDieselTrucks; + local_HydrogenV_nb = v_nbHydrogenTrucks; + + min_amount_EV = v_minEVTruckSlider; + max_amount_EV = v_maxEVTruckSlider; + + break; + + default: + traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); + return; +} + +if (setAmountOfVehicles > local_HydrogenV_nb){ // Slider has increased the amount of selected vehicles + + //First convert all other existing additional vehicles + int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_electric).size(); + while(setAmountOfVehicles > local_HydrogenV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ + + // Find an additional Diesel vehicle + J_EAVehicle dieselVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel); + + if(dieselVehicle != null){ + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + // Remove Diesel vehicle + boolean available = dieselVehicle.getAvailability(); + dieselVehicle.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + + //Create new additional Hydrogen vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_HydrogenV_nb++; + local_DieselV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + else{ + // Find an additional EV vehicle + J_EAVehicle ev = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_electric); + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + // Remove EV + boolean available = ev.getAvailability(); + ev.removeEnergyAsset(); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); + zero_Interface.c_orderedVehicles.remove(ev); + + //Create new additional Hydrogen vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, true); + + //Update local variables + local_HydrogenV_nb++; + local_EV_nb--; + nbOfOtherAdditionalVehiclesOfThisClass--; + } + } + while ( setAmountOfVehicles > local_HydrogenV_nb && local_DieselV_nb > 0) { + + // Find a to be removed Diesel vehicle + J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; + + //Remove diesel vehicle + boolean available = dieselVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(dieselVehicle); + dieselVehicle.removeEnergyAsset(); + + //Create new Hydrogen vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_HydrogenV_nb++; + local_DieselV_nb--; + + } + while (setAmountOfVehicles > local_HydrogenV_nb && local_EV_nb > min_amount_EV){ + + // Find a to be removed EV + J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = ev.tripTracker; + + // Remove EV + boolean available = ev.getAvailability(); + zero_Interface.c_orderedVehicles.remove(ev); + ev.removeEnergyAsset(); + + //Create new Hydrogen vehicle + f_createVehicle(GC, vehicleType, tripTracker, available, false); + + //Update variables + local_HydrogenV_nb++; + local_EV_nb--; + } + while (setAmountOfVehicles > local_HydrogenV_nb){ // Create additional vehicles + + f_createVehicle(GC, vehicleType, null, true, true); + local_HydrogenV_nb++; + } + + +} +else if(setAmountOfVehicles < local_HydrogenV_nb){ // Slider has decreased the amount of selected vehicles + + ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); + while(setAmountOfVehicles < local_HydrogenV_nb && additionalVehicles.size() > 0){//Remove additional Hydrogen vehicles first + + //Find additional created vehicle + J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added + + // Remove hydrogen vehicle + additionalVehicles.remove(hydrogenVehicle); + zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); + hydrogenVehicle.removeEnergyAsset(); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + + //Update variable + local_HydrogenV_nb--; + } + while ( setAmountOfVehicles < local_HydrogenV_nb && local_EV_nb < max_amount_EV) { + + // Find a to be removed Hydrogen vehicle + J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); + J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; + + // Remove hydrogen vehicle + boolean available = hydrogenVehicle.getAvailability(); + zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); + hydrogenVehicle.removeEnergyAsset(); + + //Create new EV vehicle + f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); + + //Update variables + local_HydrogenV_nb--; + local_EV_nb++; + } +} + +//Update variables +switch (vehicleType){ + + case HYDROGEN_VEHICLE: + + v_nbEVCars = local_EV_nb; + v_nbDieselCars = local_DieselV_nb; + v_nbHydrogenCars = local_HydrogenV_nb; + + break; + + case HYDROGEN_VAN: + + v_nbEVVans = local_EV_nb; + v_nbDieselVans = local_DieselV_nb; + v_nbHydrogenVans = local_HydrogenV_nb; + + break; + + case HYDROGEN_TRUCK: + + v_nbEVTrucks = local_EV_nb; + v_nbDieselTrucks = local_DieselV_nb; + v_nbHydrogenTrucks = local_HydrogenV_nb; + + break; +} + + + VOID + double + 1714654645264 + f_setResultsUIPresets + -1050 + 1350 + + false + true + true + //Set the order of the resultsUI to front but behind simulation screen group and load icon +presentation.remove(uI_Results_presentation); +presentation.insert(presentation.size()-1, uI_Results_presentation); +presentation.remove(gr_loadIcon); +presentation.insert(presentation.size()-1, gr_loadIcon); +presentation.remove(gr_simulateYearScreen); +presentation.insert(presentation.size()-1, gr_simulateYearScreen); +presentation.remove(gr_GCisPausedScreen); +presentation.insert(presentation.size()-1, gr_GCisPausedScreen); + + + +//Set the locations and visibilities of the ResultsUI agents +uI_Results.f_setChartProfiles_Presentation(0, 0, true); +uI_Results.f_setChartBalance_Presentation(530, 0, true); +uI_Results.f_setChartGridLoad_Presentation(1060, 0, false); +uI_Results.f_setChartSankey_Presentation(1060, 0, true); +uI_Results.f_setResultsUIHeader(null, null, false); + +//Disable KPIsummary button if KPIsummary is not selected +if(zero_Interface.settings.showKPISummary() == null || !zero_Interface.settings.showKPISummary()){ + uI_Results.getCheckbox_KPISummary().setVisible(false); +} +else{ + //uI_Results.f_setCB_KPISummary_Presentation(10, -30, true); +} + +//Set selected object display flase +uI_Results.b_isCompanyUIResultsUI = true; + +//Set the color of the charts +uI_Results.f_styleAllCharts(v_chartBackgroundColor, v_companyUILineColor, v_chartLineWidth, LINE_STYLE_SOLID); + + + VOID + double + 1714655282643 + f_setCompanyUI + -1090 + 40 + + false + true + true + + GC + GridConnection + + //Initialize parameters +p_gridConnection = GC; +p_companyName = GC.p_ownerID; +v_adressGC = GC.p_address.getAddress(); +p_scenarioSettings_Current = zero_Interface.c_scenarioMap_Current.get(GC.p_uid); +p_scenarioSettings_Future = zero_Interface.c_scenarioMap_Future.get(GC.p_uid); + +//Scale companyName to the box size +f_setNameTextSize(); + +//Set the sliders to the correct settings +f_setSelectedGCSliders(); + +//Set the new graphs/building selection +if(!b_runningMainInterfaceScenarioSettings && !b_runningMainInterfaceSlider && p_gridConnection.v_isActive){ + f_updateUIResultsCompanyUI(); + if(p_gridConnection.v_rapidRunData != null){ + uI_Results.f_setAllCharts(); + } +} + +//Set connected GC combobox +f_setComboBoxOwnedGC(); + +//Enable/disable all sliders (based on paused) +f_enableAllSliders(p_gridConnection.v_isActive); + + + + VOID + double + 1714656835269 + f_updateUIResultsCompanyUI + -1050 + 1370 + + false + true + true + uI_Results.f_updateResultsUI(p_gridConnection); +uI_Results.f_setChartProfiles_Presentation(null, null, true); +uI_Results.f_setChartBalance_Presentation(null, null, true); + +if(cb_showGridloadPlot.isSelected()) + uI_Results.f_setChartGridLoad_Presentation(null, null, true); +else{ + uI_Results.f_setChartSankey_Presentation(null, null, true); +} + + + VOID + double + 1715713362876 + f_setHeatingRB + -1070 + 210 + + false + true + true + int nr_currentHeatingType = 0; +String rbHeating_acces = "enabled"; + +switch (p_scenarioSettings_Current.getCurrentHeatingType()){ + case GAS_BURNER: + nr_currentHeatingType = 0; + break; + case HYBRID_HEATPUMP: + nr_currentHeatingType = 1; + rbHeating_acces = "disabled"; + break; + case ELECTRIC_HEATPUMP: + nr_currentHeatingType = 2; + rbHeating_acces = "disabled"; + break; + case DISTRICTHEAT: + nr_currentHeatingType = 3; + break; + case LT_DISTRICTHEAT: + nr_currentHeatingType = 3; + rbHeating_acces = "disabled"; + break; + case CUSTOM: + nr_currentHeatingType = 4; + rbHeating_acces = "disabled"; + break; + default: + rbHeating_acces = "invisible"; +} + +if (rbHeating_acces.equals("disabled") || rbHeating_acces.equals("invisible")){ + rb_heatingTypePrivateUI.setEnabled(false); + + if(p_gridConnection.v_hasQuarterHourlyValues){ + sl_heatDemandCompanyReduction.setEnabled(false); + } + + if (rbHeating_acces.equals("invisible")){ + rb_heatingTypePrivateUI.setVisible(false); + gr_heatDemandReductionSlider.setVisible(false); + } + else { + gr_heatDemandReductionSlider.setVisible(true); + } +} +else{ // if(rbHeating_acces.equals("enabled"){ + rb_heatingTypePrivateUI.setEnabled(true); + rb_heatingTypePrivateUI.setVisible(true); + sl_heatDemandCompanyReduction.setEnabled(true); + gr_heatDemandReductionSlider.setVisible(true); +} + + + + VOID + double + 1715952034311 + f_addPVAsset + -410 + 550 + + false + true + true + + parentGC + GridConnection + + + asset_type + OL_EnergyAssetType + + + installedPower_kW + double + + String asset_name = "Solar Panels"; +double capacityElectric_kW = installedPower_kW; +double capacityHeat_kW = 0; +double yearlyProductionMethane_kWh = 0; +double yearlyProductionHydrogen_kWh = 0; +double timestep_h = zero_Interface.energyModel.p_timeStep_h; +double outputTemperature_degC = 0; + +J_EAProduction production_asset = new J_EAProduction(parentGC, asset_type, asset_name, OL_EnergyCarriers.ELECTRICITY, capacityElectric_kW, timestep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr); +parentGC.v_liveAssetsMetaData.updateActiveAssetData(new ArrayList<GridConnection>(List.of(parentGC))); + + + + VOID + double + 1725439625846 + f_setSelectedGCSliders + -1070 + 80 + + false + true + true + //Reset GC capacities to without NFATO values +p_gridConnection.f_nfatoSetConnectionCapacity(true); + +//Initialize slider presets to selected GC (min, max, etc.) +f_setSliderPresets(); + +//If GC not active in current situation, disable scenario rb +rb_scenariosPrivateUI.setEnabled(p_scenarioSettings_Current.getIsCurrentlyActive()); + +//Find the current heating type +int nr_currentHeatingType = 0; +switch (p_gridConnection.f_getCurrentHeatingType()){ + case GAS_BURNER: + nr_currentHeatingType = 0; + break; + + case HYBRID_HEATPUMP: + nr_currentHeatingType = 1; + break; + + case ELECTRIC_HEATPUMP: + nr_currentHeatingType = 2; + break; + + case DISTRICTHEAT: + case LT_DISTRICTHEAT: + nr_currentHeatingType = 3; + break; + case CUSTOM: + nr_currentHeatingType = 4; + break; + default: + nr_currentHeatingType = 4; +} + +//Find the current heat saving percentage +int currentHeatSavings = 0; + +J_EAConsumption consumptionEAHEAT = findFirst(p_gridConnection.c_consumptionAssets, consumptionAsset -> consumptionAsset.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); +if (consumptionEAHEAT != null){ + currentHeatSavings = roundToInt((consumptionEAHEAT.getConsumptionScaling_fr() - 1)*-100); +} +else{ + J_EAProfile profileEAHEAT = findFirst(p_gridConnection.c_profileAssets, profileAsset -> profileAsset.energyCarrier == OL_EnergyCarriers.HEAT); + if (profileEAHEAT != null){ + currentHeatSavings = roundToInt((profileEAHEAT.getProfileScaling_fr() - 1)*-100); + } +} + +//Find the current electricity savings percentage +int currentElectricitySavings = 0; + +J_EAConsumption consumptionEAELECTRIC = findFirst(p_gridConnection.c_consumptionAssets, consumptionAsset -> consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND); +if (consumptionEAELECTRIC != null){ + currentElectricitySavings = roundToInt((consumptionEAELECTRIC.getConsumptionScaling_fr() - 1)*-100); +} +else{ + J_EAProfile profileEAELECTRIC = findFirst(p_gridConnection.c_profileAssets, profileAsset -> profileAsset.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); + if (profileEAELECTRIC != null){ + currentElectricitySavings = roundToInt((profileEAELECTRIC.getProfileScaling_fr() - 1)*-100); + } +} + +//Find the current Connection capacity (delivery) +int GCContractCapacityCurrent_Delivery = roundToInt(p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); + +//Find the current Connection capacity (feedin) +int GCContractCapacityCurrent_Feedin = roundToInt(p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacity_kW); + +//Set the nfato values +f_getNFATOValues(); + +//Find the current battery capacity +int BatteryCapacityCurrent = 0; +J_EAStorage batteryAsset = findFirst(p_gridConnection.c_storageAssets, p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); +if (batteryAsset != null){ + BatteryCapacityCurrent = roundToInt(((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh()); +} + +//Find the current PV capacity +int PVCapacityCurrent = 0; +if (p_gridConnection.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + J_EAProduction pvAsset = findFirst(p_gridConnection.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); + PVCapacityCurrent = roundToInt(pvAsset.getCapacityElectric_kW()); +} + +//Find the current curtailment setting +boolean currentCurtailmentSetting = p_gridConnection.v_enableCurtailment; + +//Find the current transport savings +int currentTransportSavings = 0; +if (p_gridConnection.c_tripTrackers.size() > 0){ + currentTransportSavings = - roundToInt(p_gridConnection.c_tripTrackers.get(0).getDistanceScaling_fr()*100) + 100; +} + + +//Find the current number of vehicles for each type +int nbEcarsCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); +int nbHydrogencarsCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); +int nbDieselcarsCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); + +int nbEvansCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN); +int nbHydrogenvansCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); +int nbDieselvansCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); + +int nbEtrucksCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); +int nbHydrogentrucksCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); +int nbDieseltrucksCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); + +//Check on electric cars, cause for companies that have quarterlyhour electricity data, the initial ea for EV (and other electric appliances) are not made. +if (p_gridConnection.v_hasQuarterHourlyValues){ + + nbEcarsCurrent += v_minEVCarSlider; + nbEvansCurrent += v_minEVVanSlider; + nbEtrucksCurrent += v_minEVTruckSlider; +} + + +////Set slider knobs at the currently (!) correct points + +//heating +rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, false); + +//Heat savings +sl_heatDemandCompanyReduction.setValue(currentHeatSavings, false); + +//Electricity savings +sl_electricityDemandCompanyReduction.setValue(currentElectricitySavings, false); + +//Contract connection capacity (delivery) +sl_GCCapacityCompany.setValue(GCContractCapacityCurrent_Delivery, false); +v_defaultGCCapacitySlider = GCContractCapacityCurrent_Delivery; + +//Contract connection capacity (feedin) +sl_GCCapacityCompany_Feedin.setValue(GCContractCapacityCurrent_Feedin, false); +v_defaultGCCapacitySlider_Feedin = GCContractCapacityCurrent_Feedin; + +//Battery capacity +sl_batteryCompany.setValue(BatteryCapacityCurrent, false); +v_defaultBatSlider = BatteryCapacityCurrent; + +//Solar panel power +sl_rooftopPVCompany.setValue(PVCapacityCurrent, false); +v_defaultPVSlider = PVCapacityCurrent; + +//Curtailment setting +cb_curtailmentCompany.setSelected(currentCurtailmentSetting, false); + + +//Mobility savings +sl_mobilityDemandCompanyReduction.setValue(currentTransportSavings, false); + +//Cars +sl_electricCarsCompany.setValue(nbEcarsCurrent, false); +sl_hydrogenCarsCompany.setValue(nbHydrogencarsCurrent, false); +sl_dieselCarsCompany.setValue(nbDieselcarsCurrent, false); + +v_nbEVCars = nbEcarsCurrent; +v_nbHydrogenCars = nbHydrogencarsCurrent; +v_nbDieselCars = nbDieselcarsCurrent; + + +//Vans +sl_electricVansCompany.setValue(nbEvansCurrent, false); +sl_hydrogenVansCompany.setValue(nbHydrogenvansCurrent, false); +sl_dieselVansCompany.setValue(nbDieselvansCurrent, false); + +v_nbEVVans = nbEvansCurrent; +v_nbHydrogenVans = nbHydrogenvansCurrent; +v_nbDieselVans = nbDieselvansCurrent; + + +//Trucks +sl_electricTrucksCompany.setValue(nbEtrucksCurrent, false); +sl_hydrogenTrucksCompany.setValue(nbHydrogentrucksCurrent, false); +sl_dieselTrucksCompany.setValue(nbDieseltrucksCurrent, false); + +v_nbEVTrucks = nbEtrucksCurrent; +v_nbHydrogenTrucks = nbHydrogentrucksCurrent; +v_nbDieselTrucks = nbDieseltrucksCurrent; + +//Add nfato again +p_gridConnection.f_nfatoSetConnectionCapacity(false); + + + VOID + double + 1725439635605 + f_selectGCOnMainInterface + -410 + 300 + + false + true + true + //Select the newly selected GC also on the main interface (if not paused) +zero_Interface.f_clearSelectionAndSelectEnergyModel(); + +if(p_gridConnection.v_isActive){ + zero_Interface.f_selectBuilding(p_gridConnection.c_connectedGISObjects.get(0), p_gridConnection.c_connectedGISObjects); +} + + + VOID + double + 1725607045331 + f_setSimulateYearScreen + -430 + 830 + + false + true + true + if(!b_runningMainInterfaceScenarioSettings && !b_runningMainInterfaceSlider){ + //Update main interface sliders according to the companyUI changes + zero_Interface.f_updateMainInterfaceSliders(); + + //Set it for main interface as well + zero_Interface.f_resetSettings(); + + //Update variable to change to custom scenario + zero_Interface.f_setScenarioToCustom(); +} + + + VOID + double + 1725614403909 + f_setGCCapacitySliderPresets + -1070 + 230 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_GCCapacityCompany.setRange(0, 100000); + +//Get current grid capacity +double defaultGCCapacitySlider = p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW(); + +//Get future grid capacity +double futureGCCapacity_delivery_kW = p_scenarioSettings_Future.getRequestedContractDeliveryCapacity_kW(); + +//Get current physical capacity +v_physicalConnectionCapacity_kW = p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW(); + +//Set range specific for specific intervals of capacity +v_minGCCapacitySlider = 0; + +if(futureGCCapacity_delivery_kW < 100 && defaultGCCapacitySlider < 100){ + v_maxGCCapacitySlider = 150; +} +else if(futureGCCapacity_delivery_kW < 1000 && defaultGCCapacitySlider < 1000){ + v_maxGCCapacitySlider = 2000; +} +else if(futureGCCapacity_delivery_kW < 8000 && defaultGCCapacitySlider < 8000){ + v_maxGCCapacitySlider = 10000; +} +else if(futureGCCapacity_delivery_kW < 15000 && defaultGCCapacitySlider < 15000){ + v_maxGCCapacitySlider = 20000; +} +else{ + v_maxGCCapacitySlider = max(futureGCCapacity_delivery_kW, defaultGCCapacitySlider); +} + +v_defaultGCCapacitySlider = roundToInt(defaultGCCapacitySlider); + +//Set slider knob +sl_GCCapacityCompany.setValue(v_defaultGCCapacitySlider, false); + + + VOID + double + 1727712593952 + f_setNameTextSize + -1070 + 60 + + false + true + true + if (p_companyName == null) { + return; +} + +int nameLength = p_companyName.length(); + +int i = 0; +if(nameLength > 24){ + while(24+i != nameLength){ + + t_companyName.setScale(0.9); + i++; + } +} +//Works for now: Possible to make it more accurate using getFontMetrics package and comparing width of text with the name text box width. +//--> Not done for now, as it feels unnecessary. + + + VOID + double + 1727798399503 + f_setGCCapacitySliderPresets_Feedin + -1070 + 330 + + false + true + true + //Set back end range (to prevent anylogic errors) +sl_GCCapacityCompany_Feedin.setRange(0, 100000); + +//Get current grid capacity +double defaultGCCapacitySlider_Feedin = p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW(); + +//Set range specific for specific intervals of capacity +v_minGCCapacitySlider_Feedin = 0; + +if(defaultGCCapacitySlider_Feedin < 100){ + v_maxGCCapacitySlider_Feedin = 150; +} +else if(defaultGCCapacitySlider_Feedin < 1000){ + v_maxGCCapacitySlider_Feedin = 2000; +} +else if(defaultGCCapacitySlider_Feedin < 8000){ + v_maxGCCapacitySlider_Feedin = 10000; +} +else if(defaultGCCapacitySlider_Feedin < 15000){ + v_maxGCCapacitySlider_Feedin = 20000; +} +else{ + v_maxGCCapacitySlider_Feedin = defaultGCCapacitySlider_Feedin; +} + +v_defaultGCCapacitySlider_Feedin = roundToInt(defaultGCCapacitySlider_Feedin); + +//Set slider knob +sl_GCCapacityCompany_Feedin.setValue(v_defaultGCCapacitySlider_Feedin, false); + + + VOID + double + 1727884380899 + f_getNFATOValues + -430 + 705 + + false + true + true + v_NFATO_active = p_gridConnection.v_enableNFato; +v_NFATO_kW_delivery = p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacity_kW - v_defaultGCCapacitySlider; +v_NFATO_kW_feedin = p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacity_kW- v_defaultGCCapacitySlider_Feedin; + +if(v_NFATO_kW_delivery > 0){ + t_GCCapacityCompany_delivery_nfato.setColor(green); +} +else if(v_NFATO_kW_delivery < 0){ + t_GCCapacityCompany_delivery_nfato.setColor(red); +} +else{ + t_GCCapacityCompany_delivery_nfato.setColor(black); +} + +if(v_NFATO_kW_feedin > 0){ + t_GCCapacityCompany_Feedin_nfato.setColor(green); +} +else if(v_NFATO_kW_feedin < 0){ + t_GCCapacityCompany_Feedin_nfato.setColor(red); +} +else{ + t_GCCapacityCompany_Feedin_nfato.setColor(black); +} + + + + VOID + double + 1729515671654 + f_enableAllSliders + -1070 + 120 + + false + true + true + + enable + boolean + + sl_heatDemandCompanyReduction.setEnabled(enable); +rb_heatingTypePrivateUI.setEnabled(enable); + +sl_electricityDemandCompanyReduction.setEnabled(enable); +sl_GCCapacityCompany.setEnabled(enable); +sl_GCCapacityCompany_Feedin.setEnabled(enable); +sl_batteryCompany.setEnabled(enable); +sl_rooftopPVCompany.setEnabled(enable); +cb_curtailmentCompany.setEnabled(enable); + +sl_mobilityDemandCompanyReduction.setEnabled(enable); + +sl_electricCarsCompany.setEnabled(enable); +sl_hydrogenCarsCompany.setEnabled(enable); +sl_dieselCarsCompany.setEnabled(enable); + +sl_electricVansCompany.setEnabled(enable); +sl_hydrogenVansCompany.setEnabled(enable); +sl_dieselVansCompany.setEnabled(enable); + +sl_electricTrucksCompany.setEnabled(enable); +sl_hydrogenTrucksCompany.setEnabled(enable); +sl_dieselTrucksCompany.setEnabled(enable); + +// Disabled / Invisible heating based on current scenario settings +if (enable) { + f_setHeatingRB(); +} + + + VOID + double + 1747316158336 + f_setErrorScreen + 5540 + 1110 + + false + true + true + + errorMessage + String + + //Reset location and height +button_errorOK.setY(50); +rect_errorMessage.setY(-120); +rect_errorMessage.setHeight(200); +t_errorMessage.setY(-70); + +//Set position above all other things +presentation.remove(gr_errorScreen); +presentation.insert(presentation.size(), gr_errorScreen); + +int width_numberOfCharacters = 44; + +// Set Text +Pair<String, Integer> p = zero_Interface.v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); +errorMessage = p.getFirst(); +int numberOfLines = p.getSecond(); +int additionalLines = max(0, numberOfLines - 3); + +// Set Size +rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); +rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); +//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); +t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); + +t_errorMessage.setText(errorMessage); +gr_errorScreen.setVisible(true); + + + VOID + double + 1756898097088 + f_setDemandReductionSliderPresets + -1060 + 1240 + + false + true + true + v_minSavingsSliders = -50; +v_maxSavingsSliders = 50; +sl_heatDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); +sl_electricityDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); +sl_mobilityDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); + + + VOID + double + 1760976810989 + f_selectDifferentOwnedGC + -430 + 280 + + false + true + true + + selectedOwnedGCIndex + int + + //Set companyUI to the new GC +f_setCompanyUI(p_gridConnection.p_owner.f_getOwnedGridConnections().get(selectedOwnedGCIndex)); + +//Select the gc on the main interface (map) aswell +f_selectGCOnMainInterface(); + + + + + + + 1708522361863 + connections + true + 20 + -160 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1708522362017 + zero_Interface + 20 + -120 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + + + 1714652079023 + uI_Results + -1050 + 1330 + + false + true + true + 1714652081119 + + digital_twin_results + UI_Results + + + + digital_twin_results + UI_Results + 1704197366556 + + + + + energyModel + + zero_Interface.energyModel + + + + p_cutOff_MWh + + + gr_infoText + + + gr_closeInfoText + + + t_infoTextDescription + + + rect_infoText + + + p_currentActiveInfoBubble + + + false + + 100 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089973 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + + + 1708522361869 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1708612468547 + rect_canvas + -1160 + -400 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 4560 + 1800 + 0.0 + -1 + null + + + 1708522459040 + rect_background + 0 + 0 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1920 + 980 + 0.0 + -1 + v_companyUIBackgroundColor + null + + + 1713446065829 + rect_sliders + 0 + 140 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 360 + 840 + 0.0 + -1 + v_companyUIBackgroundColorSliders + null + + + 1708611929678 + rect_scenarios + 0 + 0 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 360 + 140 + 0.0 + -1 + v_companyUIBackgroundColorSliders + null + + + 1708611713278 + text + -440 + 20 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Colors and Styling + + SansSerif + 12 + + + LEFT + + + 1708611755978 + text4 + -750 + 20 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Company parameters + + SansSerif + 12 + + + LEFT + + + 1709571615104 + txt_storedScenarios + -750 + 110 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Scenarios + + SansSerif + 12 + + + LEFT + + + false + 1711555257574 + button1 + 180 + -80 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + p_gridConnection.va_gridConnection.navigateTo(); + + + + Go to GC in engine + + + + 1713447348497 + gr_scenarioRB + 140 + 100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1713447230459 + rb_scenariosPrivateUI + -100 + -60 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if (p_scenarioSettings_Current != null && p_scenarioSettings_Future != null){ + f_setScenario(rb_scenariosPrivateUI.getValue()); +} + +// Simulate Year button on Interface +zero_Interface.f_resetSettings(); + + + + 0 + VERTICAL + + + + false + + + + 1713447252716 + txt_scenario + -100 + -80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer een scenario + + Calibri + 20 + + + LEFT + + + + + 1713537625797 + txt_scenarioSettings + -440 + 340 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Set Sliders to Scenario + + SansSerif + 12 + + + LEFT + + + 1713957149840 + txt_sliderPresetsAndLimits + -1100 + 160 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Slider limits and presets + + SansSerif + 12 + + + LEFT + + + 1713957196998 + txt_sliderFunctions + -440 + 460 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Slider functions + + SansSerif + 12 + + + LEFT + + + false + 1714641703973 + button2 + 360 + -80 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + ((GIS_Building)p_gridConnection.c_connectedGISObjects.get(0)).va_building.navigateTo(); + + + + Go to Building in engine + + + + false + 1714641782724 + button3 + 0 + -80 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + p_gridConnection.p_owner.va_ConnectionOwner.navigateTo(); + + + + Go to Owner in engine + + + + 1714655090415 + txt_initialization + -1100 + 10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Initialization + + SansSerif + 12 + + + LEFT + + + 1714660279044 + txt_uiResult + -1060 + 1300 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + UI_Result connection (graphs) + + SansSerif + 12 + + + LEFT + + + 1715626747942 + gr_companyUISliders + 310 + 445 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1713446221121 + txt_warmte + -240 + -270 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Warmte + + Calibri + 22 + + + LEFT + + + 1713446658919 + t_GCCapacityCompany + -85 + 6 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + sl_GCCapacityCompany.getIntValue() + " kW" + + Dialog + 14 + + + RIGHT + + + false + 1713446658921 + sl_GCCapacityCompany + -58 + 1 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setGCCapacity(p_gridConnection, sl_GCCapacityCompany.getValue(), "DELIVERY"); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_defaultGCCapacitySlider + HORIZONTAL + v_minGCCapacitySlider + v_maxGCCapacitySlider + 1 + false + + + + 1713446658933 + txt_GCCapacity + -290 + 6 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Contr. capaciteit (af.) + + Dialog + 14 + + + LEFT + + + 1713446065831 + gr_heatDemandReductionSlider + -120 + -106 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1713446065865 + sl_heatDemandCompanyReduction + 62 + -130 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + double newHeatDemandReduction_pct = sl_heatDemandCompanyReduction.getValue(); +double consumptionScaling_fr = 1 - newHeatDemandReduction_pct/100; + +for (J_EA j_ea : p_gridConnection.c_energyAssets){ + if (j_ea instanceof J_EAConsumption) { + if (j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND) { + ((J_EAConsumption)j_ea).setConsumptionScaling_fr(consumptionScaling_fr); + } + } + if (j_ea instanceof J_EAProfile) { + if (((J_EAProfile) j_ea).energyCarrier== OL_EnergyCarriers.HEAT) { + ((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr ); + } + } +} + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + 0 + HORIZONTAL + v_minSavingsSliders + v_maxSavingsSliders + 1 + false + + + + 1713446065869 + text195 + -170 + -125 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing warmte + + Dialog + 14 + + + LEFT + + + 1713446065871 + t_heatDemandReductionCompanies + 35 + -125 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0% + sl_heatDemandCompanyReduction.getIntValue() + "%" + + Dialog + 14 + + + RIGHT + + + + + 1713446065985 + txt_elektriciteit + -240 + -68 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektriciteit + + Calibri + 22 + + + LEFT + + + 1713446438059 + txt_mobiliteit + -240 + 166 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Transport + + Calibri + 22 + + + LEFT + + + 1713446065961 + t_electricityDemandReductionCompany + -85 + -24 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0% + sl_electricityDemandCompanyReduction.getIntValue() + "%" + + + Dialog + 14 + + + RIGHT + + + false + 1713446065963 + sl_electricityDemandCompanyReduction + -58 + -29 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + double newElectricityDemandReduction_pct = sl_electricityDemandCompanyReduction.getValue(); +double consumptionScaling_fr = 1 - newElectricityDemandReduction_pct/100; + +for (J_EA j_ea : p_gridConnection.c_energyAssets) { + if (j_ea instanceof J_EAConsumption) { + if (j_ea.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND) { + ((J_EAConsumption)j_ea).setConsumptionScaling_fr(consumptionScaling_fr); + } + } + if (j_ea instanceof J_EAProfile) { + if (((J_EAProfile) j_ea).energyCarrier == OL_EnergyCarriers.ELECTRICITY) { + ((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr ); + } + } +} + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + + 0 + HORIZONTAL + v_minSavingsSliders + v_maxSavingsSliders + 1 + false + + + + 1713446065965 + text279 + -290 + -24 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing elektriciteit + + Dialog + 14 + + + LEFT + + + 1713447888398 + gr_companyMobilitySliders + -120 + 360 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1713446839189 + sl_electricVansCompany + 62 + -3 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_VAN, (int)sl_electricVansCompany.getValue()); + +//Update the other two sliders aswell +sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); +sl_dieselVansCompany.setValue(v_nbDieselVans, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbEVVans + HORIZONTAL + v_minEVVanSlider + v_maxEVVanSlider + 1 + false + v_nbEVVans + + + + 1713446839191 + text266 + -170 + 0 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektrisch + + Dialog + 14 + + + LEFT + + + 1713446839193 + t_numberOfElectricVansCompany + 35 + 0 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_electricVansCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + false + 1713446839195 + sl_hydrogenVansCompany + 62 + 22 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_VAN, (int)sl_hydrogenVansCompany.getValue()); + +//Update the other two sliders aswell +sl_electricVansCompany.setValue(v_nbEVVans, false); +sl_dieselVansCompany.setValue(v_nbDieselVans, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbHydrogenVans + HORIZONTAL + v_minHydrogenVanSlider + v_maxHydrogenVanSlider + 1 + false + v_nbHydrogenVans + + + + 1713446839197 + text271 + -170 + 25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Waterstof + + Dialog + 14 + + + LEFT + + + 1713446839199 + t_numberOfHydrogenVansCompany + 35 + 25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_hydrogenVansCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + false + 1713446839201 + sl_dieselVansCompany + 62 + 47 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_VAN, (int)sl_dieselVansCompany.getValue()); + +//Update the other two sliders aswell +sl_electricVansCompany.setValue(v_nbEVVans, false); +sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbDieselVans + HORIZONTAL + v_minDieselVanSlider + v_maxDieselVanSlider + 1 + false + v_nbDieselVans + + + + 1713446839203 + text285 + -170 + 50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fossiele brandstof + + Dialog + 14 + + + LEFT + + + 1713446839205 + t_numberOfDieselVansCompany + 35 + 50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_dieselVansCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446839207 + text274 + -170 + -25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Busjes + + Dialog + 14 + + + LEFT + + + 1713446857516 + t_numberOfDieselTrucksCompany + 35 + 145 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_dieselTrucksCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446857518 + t_numberOfHydrogenTrucksCompany + 35 + 120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_hydrogenTrucksCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446857520 + text272 + -170 + 120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Waterstof + + Dialog + 14 + + + LEFT + + + 1713446857522 + text286 + -170 + 145 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fossiele brandstof + + Dialog + 14 + + + LEFT + + + 1713446857524 + text268 + -170 + 95 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektrisch + + Dialog + 14 + + + LEFT + + + 1713446857528 + text275 + -170 + 70 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trucks + + Dialog + 14 + + + LEFT + + + false + 1713446857530 + sl_hydrogenTrucksCompany + 62 + 117 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_TRUCK, (int)sl_hydrogenTrucksCompany.getValue()); + +//Update the other two sliders aswell +sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); +sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbHydrogenTrucks + HORIZONTAL + v_minHydrogenTruckSlider + v_maxHydrogenTruckSlider + 1 + false + v_nbHydrogenTrucks + + + + 1713446857532 + t_numberOfElectricTrucksCompany + 35 + 95 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_electricTrucksCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + false + 1713446857534 + sl_electricTrucksCompany + 62 + 92 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_TRUCK, (int)sl_electricTrucksCompany.getValue()); + +//Update the other two sliders aswell +sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); +sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbEVTrucks + HORIZONTAL + v_minEVTruckSlider + v_maxEVTruckSlider + 1 + false + v_nbEVTrucks + + + + false + 1713446857526 + sl_dieselTrucksCompany + 62 + 142 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_TRUCK, (int)sl_dieselTrucksCompany.getValue()); + +//Update the other two sliders aswell +sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); +sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbDieselTrucks + HORIZONTAL + v_minDieselTruckSlider + v_maxDieselTruckSlider + 1 + false + v_nbDieselTrucks + + + + false + 1713446065901 + sl_electricCarsCompany + 62 + -103 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_VEHICLE, (int)sl_electricCarsCompany.getValue()); + +//Update the other two sliders aswell +sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); +sl_dieselCarsCompany.setValue(v_nbDieselCars, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbEVCars + HORIZONTAL + v_minEVCarSlider + v_maxEVCarSlider + 1 + false + v_nbEVCars + + + + 1713446065907 + text265 + -170 + -100 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Elektrisch + + Dialog + 14 + + + LEFT + + + 1713446065909 + t_numberOfElectricCarsCompany + 35 + -100 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_electricCarsCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446065917 + text267 + -170 + -155 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Besparing transport + + Dialog + 14 + + + LEFT + + + false + 1713446065919 + sl_mobilityDemandCompanyReduction + 62 + -160 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + p_gridConnection.c_tripTrackers.forEach(tt -> tt.distanceScaling_fr = 1-sl_mobilityDemandCompanyReduction.getValue()/100); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + 0 + HORIZONTAL + v_minSavingsSliders + v_maxSavingsSliders + 1 + false + + + + 1713446065921 + t_mobilityDemandReductionCompany + 35 + -155 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0% + sl_mobilityDemandCompanyReduction.getIntValue() + "%" + + Dialog + 14 + + + RIGHT + + + false + 1713446065923 + sl_hydrogenCarsCompany + 62 + -78 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_VEHICLE, (int)sl_hydrogenCarsCompany.getValue()); + +//Update the other two sliders aswell +sl_electricCarsCompany.setValue(v_nbEVCars, false); +sl_dieselCarsCompany.setValue(v_nbDieselCars, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbHydrogenCars + HORIZONTAL + v_minHydrogenCarSlider + v_maxHydrogenCarSlider + 1 + false + v_nbHydrogenCars + + + + 1713446065925 + text270 + -170 + -75 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Waterstof + + Dialog + 14 + + + LEFT + + + 1713446065927 + t_numberOfHydrogenCarsCompany + 35 + -75 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_hydrogenCarsCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + false + 1713446065933 + sl_dieselCarsCompany + 62 + -54 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //Slider function +f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_VEHICLE, (int)sl_dieselCarsCompany.getValue()); + +//Update the other two sliders aswell +sl_electricCarsCompany.setValue(v_nbEVCars, false); +sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_nbDieselCars + HORIZONTAL + v_minDieselCarSlider + v_maxDieselCarSlider + 1 + false + v_nbDieselCars + + + + 1713446065935 + text284 + -170 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fossiele brandstof + + Dialog + 14 + + + LEFT + + + 1713446065937 + t_numberOfDieselCarsCompany + 35 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 + sl_dieselCarsCompany.getIntValue() + + Dialog + 14 + + + RIGHT + + + 1713446065939 + text273 + -170 + -125 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Autos + + Dialog + 14 + + + LEFT + + + + + 1713547081193 + gr_selectedGC + -60 + -290 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1713544148158 + cb_selectGC + -84 + -13 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + f_selectDifferentOwnedGC(cb_selectGC.getValueIndex()); + + + + false + + + false + + + + 1713547027389 + text9 + -240 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geselecteerde Aansluiting: + + SansSerif + 12 + + + LEFT + + + + + false + 1713963799790 + sl_batteryCompany + -58 + 61 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + //traceln("Slider werkt nog niet volledig!!, batterij sturing werkt nog niet goed"); +f_setBattery(p_gridConnection, sl_batteryCompany.getValue()); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_defaultBatSlider + HORIZONTAL + v_minBatSlider + v_maxBatSlider + 1 + false + + + + 1713963799825 + t_batteryCompany + -85 + 66 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kWh + sl_batteryCompany.getIntValue() + " kWh" + + Dialog + 14 + + + RIGHT + + + 1713963799827 + text283 + -290 + 66 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Batterij capaciteit + + Dialog + 14 + + + LEFT + + + 1715084970828 + g_energyDemandSettings + 280 + -100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715084970830 + gr_electricityButton1 + -560 + 42 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715084970832 + ovalElectricityButton1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -32 + null + + + 1715084970834 + image4 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-electricity-3408805.png + + + false + + + + + 1715084970836 + gr_heatButton1 + -560 + -160 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715084970838 + ovalHeatButton1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -6943 + null + + + 1715084970840 + image11 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-fire-2429630.png + + + false + + + + + 1715084970842 + gr_transportButton1 + -560 + 276 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1715084970844 + ovalTransportButton1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -2625550 + null + + + 1715084970846 + image16 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-car-1777731.png + + + false + + + + + + + false + 1715093089631 + rb_heatingTypePrivateUI + -290 + -206 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if (!rb_heatingTypePrivateUI.isEnabled()){// check if disabled, if so, skip when called + return; +} + +//Convert radiobutton integer to OL type +OL_GridConnectionHeatingType selectedHeatingType; +switch (rb_heatingTypePrivateUI.getValue()){ + case 0: + selectedHeatingType = OL_GridConnectionHeatingType.GAS_BURNER; + break; + case 1: + selectedHeatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; + break; + case 2: + selectedHeatingType = OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP; + break; + case 3: + selectedHeatingType = OL_GridConnectionHeatingType.DISTRICTHEAT; + break; + case 4: + selectedHeatingType = OL_GridConnectionHeatingType.CUSTOM; + f_setErrorScreen("De 'custom' verwarming optie wordt alleen gebruikt ter visualisatie voor bedrijven die starten met een 'custom' warmte systeem. In plaats van 'custom' is de knop nu gezet op 'HR ketel aardgas'."); + rb_heatingTypePrivateUI.setValue(0); + return; + default: + selectedHeatingType = OL_GridConnectionHeatingType.NONE; +} + + +//Radio button function +f_setHeatingType(p_gridConnection, selectedHeatingType); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + + 0 + VERTICAL + + + + + + false + + + + 1725618990626 + t_rooftopSolarCompany + -85 + 96 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + sl_rooftopPVCompany.getIntValue() + " kW" + + Dialog + 14 + + + RIGHT + + + false + 1725618990628 + sl_rooftopPVCompany + -58 + 91 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setPVSystem(p_gridConnection, sl_rooftopPVCompany.getValue()); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_defaultPVSlider + HORIZONTAL + v_minPVSlider + v_maxPVSlider + 1 + false + + + + 1725618990630 + txt_PVPower + -290 + 96 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + PV vermogen + + Dialog + 14 + + + LEFT + + + 1727796446739 + t_GCCapacityCompany_Feedin + -85 + 36 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + sl_GCCapacityCompany_Feedin.getIntValue() + " kW" + + Dialog + 14 + + + RIGHT + + + false + 1727796446741 + sl_GCCapacityCompany_Feedin + -58 + 31 + + true + true + false + SHAPE_DRAW_2D3D + + false + true + f_setGCCapacity(p_gridConnection, sl_GCCapacityCompany_Feedin.getValue(), "FEEDIN"); + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + v_defaultGCCapacitySlider_Feedin + HORIZONTAL + v_minGCCapacitySlider_Feedin + v_maxGCCapacitySlider_Feedin + 1 + false + + + + 1727796446743 + txt_GCCapacityCompany_Feedin + -290 + 36 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Contr. capaciteit (te.) + + Dialog + 14 + + + LEFT + + + + + false + 1708523022017 + button + 1670 + 20 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + zero_Interface.uI_Results.getCheckbox_KPISummary().setSelected(false, true); + +zero_Interface.va_Interface.navigateTo(); +zero_Interface.v_currentViewArea = zero_Interface.va_Interface; + + + + + Terug naar hoofdscherm + + + + 1725365029204 + gr_companyDetails + 1140 + 80 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725366551214 + roundRect_companyName + -298 + -59.512 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 596 + 119.024 + 0.0 + -1 + null + 10 + + + 1708611721668 + t_companyName + 0 + -46.34 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Company Name + p_companyName + + SansSerif + 48 + + + CENTER + + + 1708611716618 + t_GCadress + 0 + 23.17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Adress + v_adressGC + + SansSerif + 20 + + + CENTER + + + + + 1714652081119 + uI_Results_presentation + 380 + 220 + + false + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + 1725381132369 + mask_resultsUI1 + 370 + 60 + + false + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + null + SOLID + 470 + 110 + 0.0 + -1 + null + + + 1725381214835 + mask_resultsUI2 + 845 + 270 + + false + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + null + SOLID + 2495 + 700 + 0.0 + -1 + null + + + 1725382426671 + gr_chartNameLeft + 610 + 200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725381345763 + rect_chartNameLeft + -230 + -30 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth + -16777216 + v_companyUILineColor + null + SOLID + 460 + 50 + 0.0 + -1 + v_chartBackgroundColor + null + + + 1725382366046 + txt_chartNameLeft + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Profielen + + SansSerif + 24 + + + CENTER + + + + + 1725382459577 + gr_chartNameMiddle + 1140 + 200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725382459579 + rect_chartNameMiddle + -230 + -30 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth + -16777216 + v_companyUILineColor + null + SOLID + 460 + 50 + 0.0 + -1 + v_chartBackgroundColor + null + + + 1725382459581 + txt_chartNameMiddle + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Opwek/verbruik diagram + + SansSerif + 24 + + + CENTER + + + + + 1725382464651 + gr_chartNameRight + 1670 + 200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725382464653 + rect_chartNameRight + -230 + -30 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth + -16777216 + v_companyUILineColor + null + SOLID + 460 + 50 + 0.0 + -1 + v_chartBackgroundColor + null + + + 1725382464655 + txt_chartNameRight + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energiestromen + + SansSerif + 24 + + + CENTER + + + + + 1725606178083 + gr_simulateYearScreen + 1375 + 540 + + true + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725606178085 + rect_simulateYearScreen2 + -535 + -320 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -6943 + v_companyUIBackgroundColor + null + SOLID + 1060 + 750 + 0.0 + -1 + v_companyUIBackgroundColor + null + + + 1725606178087 + gr_simulateYearToCalculateKPIs + -35 + 40 + + true + true + false + SHAPE_DRAW_2D3D + //Set correct overlay +gr_simulateYearScreen.setVisible(false); +gr_loadIcon.setVisible(true); + + +//Run simulation +new Thread( () -> { + zero_Interface.energyModel.f_runRapidSimulation(); + zero_Interface.uI_Results.f_updateResultsUI(zero_Interface.energyModel); + f_updateUIResultsCompanyUI(); + gr_loadIcon.setVisible(false); + + //Update and show kpi summary chart after run + if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ + uI_Results.getCheckbox_KPISummary().setSelected(true, true); + } + + //Update results up to date boolean + uI_Results.f_enableNonLivePlotRadioButtons(true); + zero_Interface.b_resultsUpToDate = true; + zero_Interface.gr_simulateYear.setVisible(false); + zero_Interface.uI_Results.f_enableNonLivePlotRadioButtons(true); + +}).start(); + + + + + false + 0 + 0.0 + + + 1725606178089 + t_simulateYearToCalculateCostsSmall + -140 + -40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simuleer jaar voor KPI's + + SansSerif + 28 + + + CENTER + + + 1725606178091 + image_simulateYearToCalculateCostsSmall + -420 + -70 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 102.315 + 99.723 + 0.0 + + + zerointerfaceloader + icon_greater_than.png + + + false + + + + + + + 1725606178111 + gr_loadIcon + 2360 + 280 + + true + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725606178113 + rect_loadIcon + -1520 + -60.969 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -369756683 + v_loadScreenColor + null + SOLID + 1065 + 755.969 + 0.0 + -369756683 + v_loadScreenColor + null + + + 1729516584700 + rect_GCisPausedScreen3 + -1990 + -60 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -6943 + v_loadScreenColor + null + SOLID + 480 + 755 + 0.0 + -1 + v_loadScreenColor + null + + + 1725606744485 + gr_loadIconText + -1220 + 280 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1725606744487 + image_loadIconSmall + -27.610999999999876 + -5.4780000000000655 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 61.016 + 60.969 + 0.0 + + + zerointerfaceloader + icon_loading.gif + + + false + + + 1725606744489 + t_loadIconSmall + 2.8969999999999345 + -55.96199999999999 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Jaar wordt gesimuleerd + + SansSerif + 28 + + + CENTER + + + + + + + 1727797637172 + txt_curtailmentDescriptionCompany + 20 + 571 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Curtailment opwek + + Dialog + 14 + + + LEFT + + + false + 1727797637174 + cb_curtailmentCompany + 291 + 564 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if (cb_curtailmentCompany.isSelected()) { + p_gridConnection.v_enableCurtailment = true; +} +else { + p_gridConnection.v_enableCurtailment = false; +} + +//Set scenario to custom +f_setScenario(2); + +// Simulate Year screen +f_setSimulateYearScreen(); + + + + + false + + + + 1727883464770 + txt_nfatoValues + -440 + 680 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + NF ATO values + + SansSerif + 12 + + + LEFT + + + 1727939194812 + gr_TableConnectionCapacity + 565 + 80 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1727939194814 + rect_table_GridconnectionCapacaties + -185 + -60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 380 + 120 + 0.0 + -1 + null + + + 1727939194816 + txt_additionalGCCapacityInfo + -178 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Aansluitings capaciteit type + + SansSerif + 16 + + + LEFT + + + 1727939194818 + text1 + -175 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Fysieke capaciteit + + SansSerif + 14 + + + LEFT + + + 1727939194820 + text2 + -175 + 8 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Contract capaciteit afname + + SansSerif + 14 + + + LEFT + + + 1727939194822 + text3 + -175 + 33 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Contract capaciteit teruglevering + + SansSerif + 14 + + + LEFT + + + 1727939194824 + t_GCCapacityCompany_delivery2 + 152 + 8 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + t_GCCapacityCompany.getText() + + Dialog + 14 + + + CENTER + + + 1727939194826 + t_GCCapacityCompany_Feedin_2 + 152 + 33 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + t_GCCapacityCompany_Feedin.getText() + + Dialog + 14 + + + CENTER + + + 1727939194828 + t_GCCapacityCompany_physical + 152 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + roundToInt(v_physicalConnectionCapacity_kW) + " kW" + + Dialog + 14 + + + CENTER + + + 1727939194830 + line_table_ConnectionCapacityInfo_1 + 41 + -60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1 + 0 + 1 + 0 + 0 + 120 + 0 + + + 1727939194832 + txt_table_ConnectionCapacityInfo_owned + 152 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Capaciteit + + SansSerif + 16 + + + CENTER + + + 1727939194834 + line_table_ConnectionCapacityInfo_3 + -185 + -25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1 + 0 + 1 + 0 + 380 + 0 + 0 + + + 1727939206993 + gr_table_nfato + 225 + 0 + + true + true + false + SHAPE_DRAW_2D3D + v_NFATO_active + + + + + false + 0 + 0.0 + + + 1727939206995 + rect_Table_NFATO + -30 + -60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 65 + 120 + 0.0 + -1 + null + + + 1727939206997 + txt_table_ConnectionCapacityInfo_nfato + 3 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + NF ATO + + SansSerif + 16 + + + CENTER + + + 1727939206999 + t_GCCapacityCompany_delivery_nfato + 0.5 + 8 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + roundToInt(v_NFATO_kW_delivery) + " kW" + + Dialog + 14 + + + CENTER + + + 1727939207001 + t_GCCapacityCompany_Feedin_nfato + 0.5 + 33 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + 0 kW + roundToInt(v_NFATO_kW_feedin) + " kW" + + Dialog + 14 + + + CENTER + + + 1727939207003 + t_GCCapacityCompany_physical_nfato + 0.5 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + --- + + Dialog + 14 + + + CENTER + + + 1727939207005 + line_table_ConnectionCapacityInfo_NFATO + -30 + -25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1 + 0 + 1 + 0 + 65 + 0 + 0 + + + + + 1744645098225 + line_table_ConnectionCapacityInfo_2 + 109 + -60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_companyUILineWidth + -16777216 + v_companyUILineColor + null + SOLID + 1 + 0 + 1 + 0 + 0 + 120 + 0 + + + 1744645140831 + txt_table_ConnectionCapacityInfo_known + 75 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Status + + SansSerif + 16 + + + CENTER + + + 1744645285983 + t_GCCapacityCompany_delivery3 + 75 + 8 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Custom + p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW() != sl_GCCapacityCompany.getValue() ? "Custom" : +p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacityKnown ? "Bekend" : "Geschat" + + Dialog + 14 + + + CENTER + + + 1744645285985 + t_GCCapacityCompany_Feedin_3 + 75 + 33 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geschat + p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW() != sl_GCCapacityCompany_Feedin.getValue() ? "Custom" : +p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacityKnown ? "Bekend" : "Geschat" + + Dialog + 14 + + + CENTER + + + 1744645285987 + t_GCCapacityCompany_physical1 + 75 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Bekend + p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW() != v_physicalConnectionCapacity_kW ? "Custom" : +p_gridConnection.v_liveConnectionMetaData.physicalCapacityKnown ? "Bekend" : "Geschat" + + Dialog + 14 + + + CENTER + + + + + 1729511748859 + gr_GCisPausedScreen + 4480 + 920 + + true + false + false + true + SHAPE_DRAW_2D3D + 1375 + 540 + !p_gridConnection.v_isActive + false + 0 + 0.0 + + + 1729511748861 + rect_GCisPausedScreen + -1010 + -320 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -369756683 + v_loadScreenColor + null + SOLID + 545 + 760 + 0.0 + -369756683 + v_loadScreenColor + null + + + 1729511748863 + rect_GCisPausedScreen2 + -535 + -320 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + v_chartLineWidth+0.5 + -6943 + v_companyUIBackgroundColor + null + SOLID + 1075 + 760 + 0.0 + -1 + v_companyUIBackgroundColor + null + + + 1729511748865 + gr_GCisPausedScreenText + -35 + 40 + + true + true + false + SHAPE_DRAW_2D3D + //Set correct overlay +gr_simulateYearScreen.setVisible(false); +gr_loadIcon.setVisible(true); +rect_GCisPausedScreen3.setVisible(true); + +//Unpause gc +p_gridConnection.f_setActive(true); +zero_Interface.b_resultsUpToDate = false; +zero_Interface.f_setScenarioToCustom(); +f_enableAllSliders(true); + + +//Run simulation +new Thread( () -> { + + //Run rapid run in engine + zero_Interface.energyModel.f_runRapidSimulation(); + + //Update map selection and resultsUIs + f_selectGCOnMainInterface(); + f_updateUIResultsCompanyUI(); + + //Update and show kpi summary chart after run + if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ + uI_Results.getCheckbox_KPISummary().setSelected(true, true); + } + + //Remove all simulation screens + zero_Interface.f_removeAllSimulateYearScreens(); + rect_GCisPausedScreen3.setVisible(false); +}).start(); + + +//Update results up to date boolean +zero_Interface.b_resultsUpToDate = true; + + false + 0 + 0.0 + + + 1729511748867 + t_GCisPausedScreen + -140 + -80 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Onpauzeer aansluiting +en +simuleer jaar voor KPI's + + SansSerif + 28 + + + CENTER + + + 1729511748869 + image_simulateYearToCalculateCostsSmall1 + -420 + -70 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 102.315 + 99.723 + 0.0 + + + zerointerfaceloader + icon_greater_than.png + + + false + + + + + 1729511999717 + txt_GCisPaused + -235 + -230 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Aansluiting is gepauzeerd! + + SansSerif + 72 + + + CENTER + + + + + false + 1740047018374 + cb_showGridloadPlot + 1450 + 130 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + uI_Results.f_setChartGridLoad_Presentation(null, null, cb_showGridloadPlot.isSelected()); +uI_Results.f_setChartSankey_Presentation(null, null, !cb_showGridloadPlot.isSelected()); + +if(cb_showGridloadPlot.isSelected()){ + txt_chartNameRight.setText("Netbelasting"); +} +else{ + txt_chartNameRight.setText("Energiestromen"); +} + + + + Toon Netbelasting duurkromme + false + + + + 1747234551900 + gr_heatingOptionBlockerCHP + true + 140 + 1500 + + true + true + false + true + SHAPE_DRAW_2D3D + 150 + 350 + false + 0 + 0.0 + + + 1747234424173 + rect_heatingOptionClickBlockerCHP + -140 + -15 + + true + true + false + SHAPE_DRAW_2D3D + rb_heatingTypePrivateUI.isVisible() + ; + false + 0 + 10 + 1 + + null + SOLID + 280 + 30 + 0.0 + + null + + + 1747234398590 + rect_heatingOptionBlockerCHP + -140 + -15 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 280 + 30 + 0.0 + -65536 + v_companyUIBackgroundColorSliders + null + + + + + 1747316158314 + gr_errorScreen + 6480 + 600 + + true + false + false + SHAPE_DRAW_2D3D + 960 + 500 + false + 0 + 0.0 + + + 1747316158316 + rect_errorScreenGrayOut + -960 + -500 + + true + true + false + SHAPE_DRAW_2D3D + //traceln(); + false + 0 + 10 + 1 + -2049715245 + null + SOLID + 1920 + 980 + 0.0 + -2049715245 + null + + + 1747316158318 + rect_errorScreenClickBlocking + -960 + -500 + + true + true + false + SHAPE_DRAW_2D3D + double click_block = 0; + false + 0 + 10 + 1 + -2049715245 + null + null + SOLID + 1920 + 980 + 0.0 + -2049715245 + null + null + + + 1747326072959 + rect_errorMessage + -270 + -120 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 4 + -65536 + null + SOLID + 540 + 200 + 0.0 + -1 + null + 10 + + + 1747316158322 + t_errorMessage + 0 + -70 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + TYPE YOUR ERROR MESSAGE HERE + + SansSerif + 24 + + + CENTER + + + 1747316158324 + button_errorOK + 0 + 50 + + true + true + false + SHAPE_DRAW_2D3D + gr_errorScreen.setVisible(false); + false + 0 + 0.0 + + + 1747316158326 + rect_errorOK + -60 + -20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 120 + 40 + 0.0 + -1 + null + + + 1747316158328 + txt_errorOK + 0 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Ok + + SansSerif + 18 + + + CENTER + + + + + + + 1760974606250 + txt_setSimYearScreen + -440 + 800 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simulate year screen + + SansSerif + 12 + + + LEFT + + + 1760976852165 + txt_selectDifferentOwnedGC + -440 + 250 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Select different owned GC + + SansSerif + 12 + + + LEFT + + + + + + + 1708523262441 + va_companyUI + 0 + 0 + + false + true + false + company UI + 1920 + 980 + + + + + 1709049506453 + UI_EnergyHub + 1754045666929 + import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.annotation.JsonAutoDetect; + +import java.io.IOException; + +import energy.lux.uplux.*; +import java.util.UUID; +import java.util.function.Predicate; + zero_Interface.c_UIResultsInstances.add(uI_Results); + false + + 1709049506460 + 1709049506460 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089954 + true + 1709107200000 + + 0 + HOUR + + + 1 + HOUR + + + + 1709049506456 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1709049506460 + 1709049506454 + + + 1753435936823 + v_energyHubCoop + -370 + 290 + + false + true + true + + EnergyCoop + + + + 1756801110760 + v_scenarioName + -350 + 400 + + false + true + true + + String + + + + 1756806431965 + v_objectMapper + -710 + 350 + + false + true + true + + ObjectMapper + + + + 1753436054975 + p_energyHubBackGroundColor + -800 + 60 + + false + true + true + + Color + NONE + false + + new Color(198, 251, 198) + + + 1753436054973 + COLOR_PICKER + 0 + 100 + NO_DELIMETER + + + + + 1753436082357 + p_energyHubLineColor + -800 + 80 + + false + true + true + + Color + NONE + false + + new Color(118, 171, 118) + + + 1753436082355 + COLOR_PICKER + 0 + 100 + NO_DELIMETER + + + + + 1753705811916 + p_energyHubLineWidth + -800 + 100 + + false + true + true + + double + NONE + false + + 2.0 + + + 1753705811914 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1753705865456 + p_energyHubLineStyle + -800 + 120 + + false + true + true + + LineStyle + NONE + false + + LINE_STYLE_SOLID + + + 1753705865454 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1756388977317 + c_sliderEAGCs + -370 + 250 + + false + true + true + + ArrayList + GridConnection + String + + + + 1756806491891 + c_GISregions + -710 + 400 + + false + true + true + + LinkedHashMap + String + GISRegion + + + + + + VOID + double + 1753446461346 + f_initializeEnergyHubDashboard + -390 + 30 + + false + true + true + //Set map to correct layout +zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); +zero_Interface.b_updateLiveCongestionColors = false; + +// Zoom map to the selected EHub members +f_zoomMapToBuildings(); + +// Sets the names of the members below the map (call before adding sliders) +f_initializeEnergyHubMemberNames(); + +//Add slider GC Needs to happen before EnergyCoop creation in some way!!! +f_addSliderEAGridConnections(); + +//Initialize the ui_results +f_initializeEnergyHubResultsUI(); + +//Initialize the ui_tabs +f_initializeEnergyHubTabs(); + +//Initialize custom user saved scenarios +f_initializeUserSavedScenarios(combobox_selectScenario); + + +runSimulation(); + + + VOID + double + 1753694353046 + f_initializeEnergyHubResultsUI + -370 + 125 + + false + true + true + //Initialize the ui_results +uI_Results.energyModel = zero_Interface.energyModel; +uI_Results.v_interfaceViewAreaXOffset = zero_Interface.va_EHubDashboard.getX(); +uI_Results.v_interfaceViewAreaYOffset = zero_Interface.va_EHubDashboard.getY(); + +//Style resultsUI +f_styleEnergyHubResultsUI(); + +//Set ResultsUI radiobutton setup +uI_Results.v_selectedRadioButtonSetup = OL_RadioButtonSetup.DEFAULT_AND_GESPREKSLEIDRAADBEDRIJVEN_AND_GTO; + + +//Connect resultsUI +uI_Results.f_initializeResultsUI(); +uI_Results.f_updateResultsUI(v_energyHubCoop); + + + VOID + double + 1753694406870 + f_initializeEnergyHubTabs + -370 + 195 + + false + true + true + //Initialize the ui_tabs +uI_Tabs.add_pop_tabElectricity(); +uI_Tabs.add_pop_tabHeating(); +uI_Tabs.add_pop_tabMobility(); + +//Adjust location of buttons to account for missing e-hub tab +uI_Tabs.gr_energyDemandSettings.setX(zero_Interface.uI_Tabs.gr_energyDemandSettings.getX()+40); + +// Group visibilities +// When using an extension of a generic tab don't forget to typecast it! +if (zero_Interface.project_data.project_type() == OL_ProjectType.RESIDENTIAL) { + ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_ResidentialArea().setVisible(true); + ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersResidentialArea().setVisible(true); + ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_residential().setVisible(true); +} +else { + ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_Businesspark().setVisible(true); + ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersCompanies().setVisible(true); + ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_default().setVisible(true); +} + +//Initialize slider gcs and set sliders +uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), new ArrayList<>(), c_sliderEAGCs); + +uI_Tabs.v_presentationXOffset += zero_Interface.va_EHubDashboard.getX(); +uI_Tabs.v_presentationYOffset += zero_Interface.va_EHubDashboard.getY(); + + + VOID + double + 1753694556229 + f_styleEnergyHubResultsUI + -350 + 145 + + false + true + true + uI_Results.f_styleAllCharts(white, p_energyHubLineColor, p_energyHubLineWidth, p_energyHubLineStyle); +uI_Results.f_styleResultsUIHeader(p_energyHubLineColor, p_energyHubLineColor, p_energyHubLineWidth, p_energyHubLineStyle); + + + VOID + double + 1755014317038 + f_addSliderEAGridConnections + -370 + 100 + + false + true + true + //Check if a slider EA GC has been manually selected +GridConnection manualSelectedSliderGC_solarFarm = null; +GridConnection manualSelectedSliderGC_windFarm = null; +GridConnection manualSelectedSliderGC_gridBattery = null; +for (GridConnection GC : v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()) { + if(GC instanceof GCEnergyProduction){ + if (((GCEnergyProduction)GC).p_isSliderGC) { + if(manualSelectedSliderGC_solarFarm == null && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + manualSelectedSliderGC_solarFarm = GC; + } + else if(manualSelectedSliderGC_windFarm == null && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ + manualSelectedSliderGC_windFarm = GC; + } + } + } + if(manualSelectedSliderGC_gridBattery == null && GC instanceof GCGridBattery && ((GCGridBattery)GC).p_isSliderGC && GC.p_batteryAsset != null){ + manualSelectedSliderGC_gridBattery = GC; + } +} + +//If a slider EA GC has not been manually selected: +GridConnection sliderGC_solarFarm = null; +GridConnection sliderGC_windFarm = null; +GridConnection sliderGC_gridBattery = null; +if(manualSelectedSliderGC_solarFarm == null){ + sliderGC_solarFarm = findFirst(zero_Interface.energyModel.EnergyProductionSites, gc -> gc.p_gridConnectionID.equals(zero_Interface.p_defaultEnergyHubSliderGCName_solarfarm)); +} +if(manualSelectedSliderGC_windFarm == null){ + sliderGC_windFarm = findFirst(zero_Interface.energyModel.EnergyProductionSites, gc -> gc.p_gridConnectionID.equals(zero_Interface.p_defaultEnergyHubSliderGCName_windfarm)); +} +if(manualSelectedSliderGC_gridBattery == null){ + sliderGC_gridBattery = findFirst(zero_Interface.energyModel.GridBatteries, gc -> gc.p_gridConnectionID.equals(zero_Interface.p_defaultEnergyHubSliderGCName_battery)); +} + +//Add to coop and other collections +if(sliderGC_solarFarm != null){ + c_sliderEAGCs.add(sliderGC_solarFarm); +} +if(sliderGC_windFarm != null){ + c_sliderEAGCs.add(sliderGC_windFarm); +} +if(sliderGC_gridBattery != null){ + c_sliderEAGCs.add(sliderGC_gridBattery); +} + +v_energyHubCoop.f_addMemberGCs(c_sliderEAGCs); + + + VOID + double + 1756302765458 + f_initializeEnergyHubMemberNames + -370 + 55 + + false + true + true + t_energyHubMember1.setVisible(false); +t_energyHubMember2.setVisible(false); +t_energyHubMember3.setVisible(false); +t_energyHubMember4.setVisible(false); +t_energyHubMember5.setVisible(false); +t_energyHubMember6.setVisible(false); +t_energyHubMember7.setVisible(false); +t_energyHubMemberOthers.setVisible(false); + +int maxChars = 25; +String name = ""; + +// Filter out GCs without building that are sliderGCs +List<GridConnection> members = v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(); +Predicate<GridConnection> isGenericSliderGC = gc -> (gc instanceof GCGridBattery && ((GCGridBattery)gc).p_isSliderGC && gc.c_connectedGISObjects.size() == 0) || (gc instanceof GCEnergyProduction && ((GCEnergyProduction)gc).p_isSliderGC && gc.c_connectedGISObjects.size() == 0); +members.removeIf(isGenericSliderGC); + +try { + name = members.get(0).p_ownerID; + t_energyHubMember1.setText(f_formatName(name, maxChars)); + t_energyHubMember1.setVisible(true); + name = members.get(1).p_ownerID; + t_energyHubMember2.setText(f_formatName(name, maxChars)); + t_energyHubMember2.setVisible(true); + name = members.get(2).p_ownerID; + t_energyHubMember3.setText(f_formatName(name, maxChars)); + t_energyHubMember3.setVisible(true); + name = members.get(3).p_ownerID; + t_energyHubMember4.setText(f_formatName(name, maxChars)); + t_energyHubMember4.setVisible(true); + name = members.get(4).p_ownerID; + t_energyHubMember5.setText(f_formatName(name, maxChars)); + t_energyHubMember5.setVisible(true); + name = members.get(5).p_ownerID; + t_energyHubMember6.setText(f_formatName(name, maxChars)); + t_energyHubMember6.setVisible(true); + name = members.get(6).p_ownerID; + t_energyHubMember7.setText(f_formatName(name, maxChars)); + t_energyHubMember7.setVisible(true); + if (members.size() == 8) { + name = members.get(7).p_ownerID; + t_energyHubMemberOthers.setText(f_formatName(name, maxChars)); + t_energyHubMemberOthers.setVisible(true); + } + else if (members.size() > 8) { + int nbOthers = members.size() - 7; + t_energyHubMemberOthers.setText("En nog " + nbOthers + " andere leden"); + t_energyHubMemberOthers.setVisible(true); + } +} +catch (Exception exception) { + if (exception instanceof IndexOutOfBoundsException) { + traceln("Ignoring IndexOutOfBoundsException"); // do nothing + } + else { + exception.printStackTrace(); + } +} + + + VOID + double + 1756395572049 + f_initializeUserSavedScenarios + -370 + 340 + + false + true + true + + combo + ShapeComboBox + + if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { + return; +} + +var repository = UserScenarioRepository.builder() + .userId(UUID.fromString(zero_Interface.user.userIdToken())) + .modelName(zero_Interface.project_data.project_name()) + .build(); + +var scenarioList = repository.listUserScenarios(); +int nbScenarios = scenarioList.size(); +String[] scenarioNames = new String[nbScenarios]; +for (int i = 0; i < nbScenarios; i++) { + scenarioNames[i] = scenarioList.get(i).getName(); +} + +combo.setItems(scenarioNames); + + + VOID + double + 1756805429105 + f_loadScenario + -370 + 360 + + false + true + true + + index + int + + zero_Interface.f_setScenarioToCustom(); + +for (UI_Results ui_results : zero_Interface.c_UIResultsInstances) { + if (ui_results.f_getSelectedObjectData() != null) { + zero_Interface.f_enableLivePlotsOnly(ui_results); + } +} + + +if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { + zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's in te laden. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + return; +} +traceln("Loading modelSave..."); +//pauseSimulation(); + +// Collect GIS_Objects into hashmap, to link to new EnergyModel. +zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +pauseSimulation(); +try { + v_objectMapper = new ObjectMapper(); + f_addMixins(); + + var repository = UserScenarioRepository.builder() + .userId(UUID.fromString(zero_Interface.user.userIdToken())) + .modelName(zero_Interface.project_data.project_name()) + .build(); + + var scenarioList = repository.listUserScenarios(); + + // Deserialize the JSON into a new EnergyModel instance: + var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(index).getId()); + + J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); + EnergyModel deserializedEnergyModel = saveObject.energyModel; + + // Reconstruct all Agents + f_reconstructEnergyModel(deserializedEnergyModel); + f_reconstructGridConnections(deserializedEnergyModel); + f_reconstructActors(deserializedEnergyModel); + f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); + + f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); + + // Get profilePointer tableFunctions from 'original' energyModel + deserializedEnergyModel.c_profiles.forEach(x->{ + J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); + x.setTableFunction(origProfile.getTableFunction()); + }); + // get heatingTypeHashmap from 'old' energyModel. + deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; + + zero_Interface.zero_loader.energyModel = deserializedEnergyModel; + zero_Interface.energyModel = deserializedEnergyModel; + zero_Interface.uI_Results.energyModel = deserializedEnergyModel; + uI_Results.energyModel = deserializedEnergyModel; + + deserializedEnergyModel.f_startAfterDeserialisation(); + + f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); + + + // Putting back the ordered collections in the interface + f_reconstructOrderedCollections(saveObject); + + + //Get the correct coop for the E-Hub Dashboard + v_energyHubCoop = findFirst(zero_Interface.energyModel.pop_energyCoops,x->x.p_actorID.equals("eHubConfiguratorCoop")); + if (v_energyHubCoop == null){ + throw new RuntimeException("No energyCoop found with p_actorID = eHubConfiguratorCoop"); + } + zero_Interface.v_customEnergyCoop = v_energyHubCoop; + + //Get the slider gcs of the reloaded EnergyHub + c_sliderEAGCs = f_getEnergyHubsliderEAGCsLoadedScenario(v_energyHubCoop); + + // Update the E-Hub Dashboard with the loaded E-Hub from savefile + f_initializeEnergyHubMemberNames(); + uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null, c_sliderEAGCs); + gr_uI_Tabs_presentation.setVisible(false); + gr_uI_Tabs_presentation.setVisible(true); + uI_Results.f_updateResultsUI(v_energyHubCoop); + + // Update the main interface with the loaded E-Hub from savefile + zero_Interface.c_selectedGridConnections = new ArrayList<>(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()); + + // Update the main interface tabs with the GCs from the new engine + zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer(), zero_Interface.f_getMainInterfaceSliderEAGCs()); + + // Reset all colors on the GIS map + zero_Interface.energyModel.pop_GIS_Buildings.forEach(x -> zero_Interface.f_styleAreas(x)); + zero_Interface.energyModel.pop_GIS_Objects.forEach(x -> zero_Interface.f_styleAreas(x)); + zero_Interface.energyModel.pop_GIS_Parcels.forEach(x -> zero_Interface.f_styleAreas(x)); + + // Color all selected GC + for (GridConnection gc : zero_Interface.c_selectedGridConnections) { + gc.c_connectedGISObjects.forEach(x -> x.gisRegion.setFillColor(zero_Interface.v_selectionColor)); + } + + // Zoom GIS Map to selected buildings + f_zoomMapToBuildings(); + + // Simulate a year + gr_simulateYearEnergyHub.setVisible(false); + gr_loadIconYearSimulationEnergyHub.setVisible(true); + + + zero_Interface.f_simulateYearFromMainInterface(); + + traceln("ModelSave loaded succesfully!"); + +} catch (IOException e) { + e.printStackTrace(); +} + + + + + VOID + double + 1756805443177 + f_saveScenario + -370 + 380 + + false + true + true + + scenarioName + String + + if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { + zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's op te slaan. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + return; +} + +traceln("Starting model serialisation..."); +J_ModelSave saveObject = new J_ModelSave(); +saveObject.energyModel = zero_Interface.energyModel; + +zero_Interface.energyModel.pop_gridNodes.forEach(x->saveObject.c_gridNodes.add(x)); +zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); + +saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; +saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; +saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; +saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; +saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; +saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; +saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; +saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; +saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; +saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; +saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; +saveObject.c_scenarioMap_Current = zero_Interface.c_scenarioMap_Current; +saveObject.c_scenarioMap_Future = zero_Interface.c_scenarioMap_Future; + +List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps = new ArrayList<LinkedHashMap<String, List<J_EAVehicle>>>(); + +saveObject.c_additionalVehicleHashMaps = c_additionalVehicleHashMaps; + +v_objectMapper = new ObjectMapper(); +f_addMixins(); +v_objectMapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE); +traceln("Model serialisation has been completed."); + +traceln("Trying to save to file..."); +try { + + //v_objectMapper.writeValue(new File("energyModel.json"), energyModel); + + //v_objectMapper.writeValue(new File("ModelSave.json"), saveObject); + + var repository = UserScenarioRepository.builder() + .userId(UUID.fromString(zero_Interface.user.userIdToken())) + .modelName(zero_Interface.project_data.project_name()) + .build(); + + repository.saveUserScenario( + scenarioName, + v_objectMapper.writeValueAsBytes(saveObject) + ); + + traceln("Scenario saved to file."); + +} catch (IOException e) { + traceln("Saving to file has failed."); + e.printStackTrace(); +} + + + + VOID + double + 1756806431955 + f_addMixins + -710 + 370 + + false + true + true + v_objectMapper.addMixIn(Agent.class, AgentMixin.class); +//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); + +//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); +//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); + +//Ignore classes + +v_objectMapper.addMixIn(java.awt.Font.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(java.awt.Color.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(java.awt.Paint.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeLine.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeLineFill.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeText.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(DataSet.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(Level.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(TableFunction.class, IgnoreClassMixin.class); +//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeModelElementsGroup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeButton.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.analysis.TimePlot.class, IgnoreClassMixin.class); + + +// Weirdness regarding material handling toolbox +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); + + + + VOID + double + 1756806501010 + f_setEngineInputDataAfterDeserialisation + Functie van gillis voor inladen weer data! + -987 + 310 + + false + true + true + + deserializedEnergyModel + EnergyModel + + deserializedEnergyModel.p_truckTripsCsv = zero_Interface.energyModel.p_truckTripsCsv; +deserializedEnergyModel.p_householdTripsCsv = zero_Interface.energyModel.p_householdTripsCsv; +deserializedEnergyModel.p_cookingPatternCsv = zero_Interface.energyModel.p_cookingPatternCsv; + +//deserializedEnergyModel.avgc_data = zero_Interface.energyModel.avgc_data; +deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; + + + VOID + double + 1756806501019 + f_reconstructGridConnections + -986.667 + 352 + + false + true + true + + deserializedEnergyModel + EnergyModel + + ArrayList<GridConnection> allConnections = new ArrayList<>(); +allConnections.addAll(deserializedEnergyModel.c_gridConnections); +allConnections.addAll(deserializedEnergyModel.c_pausedGridConnections); + +for(GridConnection GC : allConnections){ + GC.energyModel = deserializedEnergyModel; + if (GC instanceof GCHouse){ + //toMove.add(GC); + f_reconstructAgent(GC, deserializedEnergyModel.Houses, deserializedEnergyModel); + } else if (GC instanceof GCEnergyProduction) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyProductionSites, deserializedEnergyModel); + } else if (GC instanceof GCEnergyConversion) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyConversionSites, deserializedEnergyModel); + } else if (GC instanceof GCGridBattery) { + f_reconstructAgent(GC, deserializedEnergyModel.GridBatteries, deserializedEnergyModel); + } else if (GC instanceof GCNeighborhood) { + f_reconstructAgent(GC, deserializedEnergyModel.Neighborhoods, deserializedEnergyModel); + } else if (GC instanceof GCPublicCharger) { + f_reconstructAgent(GC, deserializedEnergyModel.PublicChargers, deserializedEnergyModel); + } else if (GC instanceof GCUtility) { + f_reconstructAgent(GC, deserializedEnergyModel.UtilityConnections, deserializedEnergyModel); + } + //GC.f_startAfterDeserialisation(); +} + + + + + VOID + double + 1756806501029 + f_reconstructEnergyModel + -986.667 + 332 + + false + true + true + + energyModel + EnergyModel + + // Code Instead of Agent.goToPopulation() (which resets all parameters to default!) +/* +try{ // Reflection trick to get to Agent.owner private field + energyModel.forceSetOwner(energyModel, pop_energyModels); +} catch (Exception e) { + e.printStackTrace(); +} +*/ + +Agent root = zero_Interface.getRootAgent(); +traceln("root: " + root); +energyModel.restoreOwner(zero_Interface.zero_loader); + +energyModel.setEngine(getEngine()); +energyModel.instantiateBaseStructure_xjal(); +energyModel.setEnvironment(zero_Interface.zero_loader.getEnvironment()); + +traceln("EnergyModel owner: %s", energyModel.getOwner()); + +energyModel.create(); +//energyModel.start(); // Why is this needed? + + + VOID + double + 1756806501040 + f_reconstructAgent + -975 + 429 + + false + true + true + + agent + Agent + + + pop + AgentArrayList + + + energyModel + EnergyModel + + /* // Code Instead of Agent.goToPopulation() (which resets many variables to default!) +try{ // Reflection trick to get to Agent.owner private field + if (agent instanceof GridNode) { + ((GridNode)agent).forceSetOwner(agent,pop); + } else if (agent instanceof GridConnection) { + ((GridConnection)agent).forceSetOwner(agent,pop); + } else if (agent instanceof Actor) { + ((Actor)agent).forceSetOwner(agent,pop); + } else if (agent instanceof GIS_Object) { + ((GIS_Object)agent).forceSetOwner(agent,pop); + } +} catch (Exception e) { + e.printStackTrace(); +}*/ + +agent.restoreOwner(energyModel); // simply sets agent.d = root, should replace reflection hack +agent.restoreCollection_xjal(pop); // simple sets agent.j = pop, should replace reflection hack + +agent.setEngine(getEngine()); +agent.instantiateBaseStructure_xjal(); +agent.setEnvironment(pop.getEnvironment()); + +pop._add(agent); // Add to the population +//int popSize = pop.size(); +//pop.callCreate(agent, popSize); // Update population object +agent.create(); + + + VOID + double + 1756806501050 + f_reconstructActors + -987 + 372 + + false + true + true + + deserializedEnergyModel + EnergyModel + + for(Actor AC : deserializedEnergyModel.c_actors){ + + if (AC instanceof ConnectionOwner) { + ((ConnectionOwner)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_connectionOwners, deserializedEnergyModel); + } else if (AC instanceof EnergySupplier) { + ((EnergySupplier)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energySuppliers, deserializedEnergyModel); + } else if (AC instanceof EnergyCoop) { + ((EnergyCoop)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energyCoops, deserializedEnergyModel); + //((EnergyCoop)AC).f_startAfterDeserialisation(); + } else if (AC instanceof GridOperator) { + ((GridOperator)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_gridOperators, deserializedEnergyModel); + } + } + + + + VOID + double + 1756806501060 + f_reconstructGIS_Objects + -987 + 412 + + false + true + true + + deserializedEnergyModel + EnergyModel + + + c_GISObjects + ArrayList<GIS_Object> + + for(GIS_Object GO : c_GISObjects){ + GO.gisRegion = c_GISregions.get(GO.p_id); + + if (GO instanceof GIS_Building) { + ((GIS_Building)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Buildings, deserializedEnergyModel); + } else if (GO instanceof GIS_Parcel) { + ((GIS_Parcel)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Parcels, deserializedEnergyModel); + } else { + GO.energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Objects, deserializedEnergyModel); + //GO.f_startAfterDeserialisation(); + } + GO.f_resetStyle(); +} + + + VOID + double + 1756806501070 + f_reconstructGridNodes + -987 + 392 + + false + true + true + + deserializedEnergyModel + EnergyModel + + + c_gridNodes + ArrayList<GridNode> + + for(GridNode GN : c_gridNodes){ + GN.energyModel = deserializedEnergyModel; + f_reconstructAgent(GN, deserializedEnergyModel.pop_gridNodes, deserializedEnergyModel); +} + + + + VOID + double + 1756806501080 + f_reconstructOrderedCollections + -990 + 450 + + false + true + true + + saveObject + J_ModelSave + + zero_Interface.c_orderedPVSystemsCompanies = saveObject.c_orderedPVSystemsCompanies; +zero_Interface.c_orderedPVSystemsHouses = saveObject.c_orderedPVSystemsHouses; +zero_Interface.c_orderedVehicles = saveObject.c_orderedVehicles; +zero_Interface.c_orderedHeatingSystemsCompanies = saveObject.c_orderedHeatingSystemsCompanies; +zero_Interface.c_orderedHeatingSystemsHouses = saveObject.c_orderedHeatingSystemsHouses; +zero_Interface.c_orderedVehiclesPrivateParking = saveObject.c_orderedVehiclesPrivateParking; +zero_Interface.c_orderedParkingSpaces = saveObject.c_orderedParkingSpaces; +zero_Interface.c_orderedV1GChargers = saveObject.c_orderedV1GChargers; +zero_Interface.c_orderedV2GChargers = saveObject.c_orderedV2GChargers; +zero_Interface.c_orderedPublicChargers = saveObject.c_orderedPublicChargers; +zero_Interface.c_mappingOfVehiclesPerCharger = saveObject.c_mappingOfVehiclesPerCharger; +zero_Interface.c_scenarioMap_Current = saveObject.c_scenarioMap_Current; +zero_Interface.c_scenarioMap_Future = saveObject.c_scenarioMap_Future; + +/* +List<ConnectionOwner> c_COCompanies = findAll(zero_Interface.energyModel.pop_connectionOwners, p -> p.p_connectionOwnerType == OL_ConnectionOwnerType.COMPANY); + +int i = 0; +for (ConnectionOwner CO : c_COCompanies) { + UI_company companyUI = zero_Interface.c_companyUIs.get(CO.p_connectionOwnerIndexNr); + companyUI.p_company = CO; + companyUI.c_ownedGridConnections = companyUI.p_company.f_getOwnedGridConnections(); + companyUI.c_additionalVehicles = saveObject.c_additionalVehicleHashMaps.get(i); + companyUI.f_setSelectedGCSliders(); + i++; +} +*/ + + + + RETURNS_VALUE + String + 1762259840876 + f_formatName + -350 + 77 + + false + true + true + + fullName + String + + + maxChars + int + + if (fullName.length() <= maxChars) { + return fullName; +} +StringBuilder output = new StringBuilder(); +String[] subNames = fullName.split(" "); +int remainingChars = maxChars; +for (String subName : subNames) { + remainingChars -= subName.length() + 1; + if (remainingChars >= 0) { + output.append(subName); + output.append(" "); + } +} +// If the output is empty (because the first word is longer than maxChars) cut the first word off at maxChars +if (output.toString().length() == 0) { + output.append(fullName.substring(0, maxChars)); +} +output.append("..."); +return output.toString(); + + + VOID + double + 1762352238220 + f_zoomMapToBuildings + -370 + 470 + + false + true + true + List<GIS_Object> gisObjects = new ArrayList<>(); +for (GridConnection GC : v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()) { //Buildings that are grouped, select as well. + for (GIS_Object object : GC.c_connectedGISObjects) { //Buildings that are grouped, select as well. + gisObjects.add(object); + object.gisRegion.setFillColor(zero_Interface.v_selectionColorAddBuildings); + } +} +zero_Interface.f_setMapViewBounds(gisObjects); + + + VOID + double + 1762356123802 + f_loadScenarioButton + -380 + 580 + + false + true + true + // The function creates a new thread, otherwise visibilities are only updated after the entire button action is finished, which is not enough feedback for the user +gr_forceSaveLoadScenario.setVisible(false); +gr_loadScenario.setVisible(false); +zero_Interface.f_setLoadingScreen(true, zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + +new Thread( () -> { + f_loadScenario(combobox_selectScenario.getValueIndex()); + zero_Interface.f_setLoadingScreen(false, 0, 0); +}).start(); + + + VOID + double + 1762358078152 + f_saveScenarioButton + -380 + 600 + + false + true + true + // The function creates a new thread, otherwise visibilities are only updated after the entire button action is finished, which is not enough feedback for the user +gr_forceSaveLoadScenario.setVisible(false); +gr_saveScenario.setVisible(false); +zero_Interface.f_setLoadingScreen(true, zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + +new Thread( () -> { + f_saveScenario(v_scenarioName); + zero_Interface.f_setLoadingScreen(false, 0, 0); +}).start(); + + + + RETURNS_VALUE + ArrayList<GridConnection> + 1765208842919 + f_getEnergyHubsliderEAGCsLoadedScenario + -990 + 490 + + false + true + true + + energyHubCoop + EnergyCoop + + ArrayList<GridConnection> energyHubSliderEAGCs = new ArrayList<GridConnection>(); +for(GridConnection gc : energyHubCoop.f_getMemberGridConnectionsCollectionPointer()){ + if(gc instanceof GCGridBattery battery){ + if(battery.p_isSliderGC){ + energyHubSliderEAGCs.add(battery); + } + } + if(gc instanceof GCEnergyProduction productionSite){ + if(productionSite.p_isSliderGC){ + energyHubSliderEAGCs.add(productionSite); + } + } +} + +if(energyHubSliderEAGCs.size() != 3){ + throw new RuntimeException("energyHubsliderEAGCs.size() != 3 -> Should be exactly 3: 1 solarfarm, 1 windfarm and 1 battery"); +} + +return energyHubSliderEAGCs; + + + + + 1709049506454 + connections + 50 + -50 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1747229590464 + zero_Interface + 50 + -100 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + + + 1716193013122 + uI_Results + -350 + 165 + + false + true + true + 1753694648333 + + digital_twin_results + UI_Results + + + + digital_twin_results + UI_Results + 1704197366556 + + + + + energyModel + + + p_cutOff_MWh + + + gr_infoText + + zero_Interface.gr_infoText + + + + gr_closeInfoText + + zero_Interface.gr_closeInfoText + + + + t_infoTextDescription + + zero_Interface.t_infoTextDescription + + + + rect_infoText + + zero_Interface.rect_infoText + + + + p_currentActiveInfoBubble + + zero_Interface.p_currentActiveInfoBubble + + + + false + + 100 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 2658477089962 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722252541830 + uI_Tabs + -350 + 215 + + false + true + true + 1753694955483 + + zerointerfaceloader + UI_Tabs + + + + zerointerfaceloader + UI_Tabs + 1722245292191 + + + + false + + 100 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 2658477089960 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + + + 1709049506460 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1753702320529 + rect_backGround + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 1920 + 980 + 0.0 + -1 + p_energyHubBackGroundColor + null + + + 1747228615096 + rect_settings + 10 + 440 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + p_energyHubLineWidth + -16777216 + p_energyHubLineColor + null + SOLID + p_energyHubLineStyle + 380 + 530 + 0.0 + -1 + null + 10 + + + 1753702302932 + gr_uI_Tabs_presentation + 0 + -20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753694955483 + uI_Tabs_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1753706195332 + rect_uITabsModelBlocker + 400 + 10 + + false + false + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 0 + + null + SOLID + 1500 + 960 + 0.0 + -1 + null + + + 1747228569476 + rect_scenarios + 10 + 90 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + p_energyHubLineWidth + -16777216 + p_energyHubLineColor + null + SOLID + p_energyHubLineStyle + 380 + 300 + 0.0 + -1 + null + 10 + + + 1747228738085 + t_scenario + 200 + 100 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Scenario's + + SansSerif + 36 + + + CENTER + + + 1747228860030 + txt_settings + 200 + 460 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Instellingen + + SansSerif + 36 + + + CENTER + + + 1747231288371 + rect_map + 470 + 190 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + p_energyHubLineWidth + -16777216 + p_energyHubLineColor + null + SOLID + p_energyHubLineStyle + 870 + 550 + 0.0 + -1 + p_energyHubLineColor + null + 10 + + + 1753704667485 + gr_energyHubTitle + 910 + 80 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1747228628985 + rect_title + -440 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + p_energyHubLineWidth + -16777216 + p_energyHubLineColor + null + SOLID + p_energyHubLineStyle + 870 + 110 + 0.0 + -1 + null + 10 + + + 1747228659472 + txt_energyHubTitle + -25 + -25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + EnergyHub Configurator + + SansSerif + 48 + + + CENTER + + + 1753704116114 + gr_energyHubLogo + -350 + 5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753704116116 + ovalEnergyHubLogo + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 48.1235 + 40 + 0.0 + -3736634 + null + + + 1753704116118 + line + -24.062 + -16.844 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 47 + -6 + 0 + + + 1753704116120 + line1 + -14.437 + 14.437 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 37 + -38 + 0 + + + 1753704116122 + line2 + -24.062 + -9.625 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 42 + 35 + 0 + + + 1753704116124 + oval + -26.468 + -14.437 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 7.2185 + 40 + 0.0 + -657931 + null + + + 1753704116126 + oval1 + -19.25 + 19.25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 7.2185 + 40 + 0.0 + -657931 + null + + + 1753704116128 + line3 + 19.25 + 24.062 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + DOTTED + 1 + 0 + 1 + 0 + 1 + -42 + 0 + + + 1753704116130 + oval4 + 19.25 + 24.062 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 7.2185 + 40 + 0.0 + -657931 + null + + + 1753704116132 + oval3 + 24.062 + -21.656 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 7.2185 + 40 + 0.0 + -657931 + null + + + + + + + 1753694681879 + gr_uI_Results_presentation + 1420 + 200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753694648333 + uI_Results_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + false + 1753706469000 + button_reconfigureEnergyHub + 1100 + 760 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + pauseSimulation(); + +//Remove slider GCs from coop +v_energyHubCoop.f_removeMemberGCs(c_sliderEAGCs); + + +zero_Interface.f_getScenarioButtons().setPos( 19, 144); + +zero_Interface.map.setScale( 1.0, 1.0); +zero_Interface.map.setPos(410, 130); + +zero_Interface.va_Interface.navigateTo(); +zero_Interface.v_currentViewArea = zero_Interface.va_Interface; +//zero_Interface.c_selectedGridConnections = new ArrayList<GridConnection>(c_selectedEnergyHubGC); +//zero_Interface.v_customEnergyCoop = v_energyHubCoop; + +v_energyHubCoop = null; + +zero_Interface.b_inEnergyHubSelectionMode = true; + + + + Herconfigureer de EnergyHub + + + + 1753706641851 + gr_exitButton + 1245 + 85 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1747230291770 + rect_exit + -91.459 + -27.63 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 173.773 + 55.262 + 0.0 + -1 + null + 10 + + + false + 1747230286040 + button_exit + -86.886 + -23.025 + + true + true + false + SHAPE_DRAW_2D3D + + false + + true + //Remove slider GCs from coop +v_energyHubCoop.f_removeMemberGCs(c_sliderEAGCs); +c_sliderEAGCs.clear(); + +zero_Interface.f_getScenarioButtons().setPos( 19, 144); + +zero_Interface.map.setScale( 1.0, 1.0); +zero_Interface.map.setPos(410, 130); + + +zero_Interface.button_clearFilters.action(); +zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); +zero_Interface.cb_showFilterInterface.setSelected(false, true); +zero_Interface.f_updateMainInterfaceSliders(); + +zero_Interface.f_setStartView(); + +v_energyHubCoop = null; + +zero_Interface.b_inEnergyHubMode = false; + +runSimulation(); + + + + Terug naar hoofdscherm + + + + + + 1753883623020 + gr_simulateYearScreenEnergyHub + 1900 + 130 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753883623022 + gr_loadIconYearSimulationEnergyHub + -261 + -25 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753883623024 + rect_loadIconSmall + -219 + -50 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + p_energyHubLineColor + null + DASHED + 460 + 250 + 0.0 + -369756683 + null + + + 1753883623026 + image_loadIconSmall + -30 + 60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 60 + 60 + 0.0 + + + zerointerfaceloader + icon_loading.gif + + + false + + + 1753883623028 + t_loadIconSmall + 0 + 15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Jaar wordt gesimuleerd + + SansSerif + 22 + + + CENTER + + + + + 1753883623030 + gr_simulateYearEnergyHub + 270 + 20 + + true + false + false + SHAPE_DRAW_2D3D + -250 + 15 + false + 0 + 0.0 + + + 1753883623032 + rect_simulateYearScreenSmall + -230 + -90 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + DASHED + 460 + 180 + 0.0 + -1 + p_energyHubLineColor + null + + + 1753883623034 + gr_simulateYearButtonEnergyHub + 10 + 50 + + true + true + false + SHAPE_DRAW_2D3D + gr_simulateYearEnergyHub.setVisible(false); +gr_loadIconYearSimulationEnergyHub.setVisible(true); +zero_Interface.f_simulateYearFromMainInterface(); + false + 0 + 0.0 + + + 1753883623036 + t_simulateYearToCalculateCostsSmall + 10 + -60 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simuleer jaar voor KPI's + + SansSerif + 22 + + + CENTER + + + 1753883623038 + image_simulateYearToCalculateCostsSmall + -200 + -75 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 60 + 60 + 0.0 + + + zerointerfaceloader + icon_greater_than.png + + + false + + + + + + + + + 1756302313206 + rect_memberNames + 470 + 760 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 500 + 200 + 0.0 + -1 + null + 10 + + + 1756302430570 + t_energyHubMember1 + 500 + 820 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 1 + + SansSerif + 18 + + + LEFT + + + 1756302500322 + t_energyHubMembers + 720 + 765 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + E-Hub Members + + SansSerif + 36 + + + CENTER + + + 1756302556840 + t_energyHubMember3 + 500 + 850 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 3 + + SansSerif + 18 + + + LEFT + + + 1756302569681 + t_energyHubMember2 + 930 + 820 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 2 + + SansSerif + 18 + + + RIGHT + + + 1756302580797 + t_energyHubMember4 + 930 + 850 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 4 + + SansSerif + 18 + + + RIGHT + + + 1756302616239 + t_energyHubMember5 + 500 + 880 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 5 + + SansSerif + 18 + + + LEFT + + + 1756302630734 + t_energyHubMember7 + 500 + 910 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 7 + + SansSerif + 18 + + + LEFT + + + 1756302634233 + t_energyHubMemberOthers + 930 + 910 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Etc + + SansSerif + 18 + + + RIGHT + + + 1756302654947 + t_energyHubMember6 + 930 + 880 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + name 6 + + SansSerif + 18 + + + RIGHT + + + 1758546856343 + gr_forceSaveLoadScenario + 0 + -1500 + + true + false + false + SHAPE_DRAW_2D3D + 0 + false + 0 + 0.0 + + + 1758548705448 + rect_forceSaveLoadScenarioClickBlocker1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + ; + false + 0 + 10 + 1 + + null + SOLID + 10 + 980 + 0.0 + 16777215 + null + + + 1758548705454 + rect_forceSaveLoadScenarioClickBlocker2 + 10 + 0 + + true + true + false + SHAPE_DRAW_2D3D + ; + false + 0 + 10 + 1 + + null + SOLID + 380 + 275 + 0.0 + 16777215 + null + + + 1758548705462 + rect_forceSaveLoadScenarioClickBlocker3 + 10 + 390 + + true + true + false + SHAPE_DRAW_2D3D + ; + false + 0 + 10 + 1 + + null + SOLID + 380 + 590 + 0.0 + 16777215 + null + + + 1758548705469 + rect_forceSaveLoadScenarioClickBlocker4 + 390 + 0 + + true + true + false + SHAPE_DRAW_2D3D + ; + false + 0 + 10 + 1 + + null + SOLID + 1530 + 980 + 0.0 + 16777215 + null + + + 1758546863803 + rect_forceSaveLoadScenario1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 10 + 980 + 0.0 + -1765752640 + zero_Interface.v_forcedClickScreenColor + null + + + 1758546863807 + rect_forceSaveLoadScenario2 + 10 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 380 + 275 + 0.0 + -1765752640 + zero_Interface.v_forcedClickScreenColor + null + + + 1758546863812 + rect_forceSaveLoadScenario3 + 10 + 390 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 380 + 590 + 0.0 + -1765752640 + zero_Interface.v_forcedClickScreenColor + null + + + 1758546863816 + rect_forceSaveLoadScenario4 + 390 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1530 + 980 + 0.0 + -1765752640 + zero_Interface.v_forcedClickScreenColor + null + + + false + 1758548909849 + button_cancelSaveLoadScenario + 305 + 355 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + gr_saveScenario.setVisible(false); +gr_loadScenario.setVisible(false); +gr_forceSaveLoadScenario.setVisible(false); + + + + annuleren + + + + + + 1756800864903 + gr_saveAndLoadScenarios + 365 + -270 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1756805661168 + gr_saveScenario + -330 + 610 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1756805661170 + image_saveScenario + 225 + -5 + + true + true + false + SHAPE_DRAW_2D3D + f_saveScenarioButton(); + false + 0 + 32 + 32 + 0.0 + + + zerointerfaceloader + save_icon.png + + + false + + + false + 1756805661172 + eb_scenarioName + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + + + + true + v_scenarioName + + + + 1758545634906 + t_saveScenarioInstructions + 5 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geef je scenario een naam en klik rechts op het icoontje + + SansSerif + 10 + + + LEFT + + + + + 1756805661208 + gr_loadScenario + -330 + 665 + + true + false + false + SHAPE_DRAW_2D3D + 610 + false + 0 + 0.0 + + + 1756805661210 + image_loadScenario + 225 + -5 + + true + true + false + SHAPE_DRAW_2D3D + f_loadScenarioButton(); + false + 0 + 32 + 32 + 0.0 + + + zerointerfaceloader + load_icon.png + + + false + + + false + 1756805661212 + combobox_selectScenario + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + + + + false + + false + + + + 1758545638022 + t_loadScenarioInstructions + 5 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer een scenario in de keuzelijst en klik op het icoontje + + SansSerif + 10 + + + LEFT + + + + + false + 1758532628277 + button_saveScenario + -331 + 555 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + gr_loadScenario.setVisible(false); +gr_forceSaveLoadScenario.setVisible(true); +gr_saveScenario.setVisible(true); + + + + Bewaar een scenario + + + + false + 1758532628290 + button_loadScenario + -181 + 555 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_initializeUserSavedScenarios(combobox_selectScenario); +if (combobox_selectScenario.getItems().length == 0) { + zero_Interface.f_setErrorScreen("Er zijn nog geen scenario's opgeslagen.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + return; +} + +gr_saveScenario.setVisible(false); +gr_forceSaveLoadScenario.setVisible(true); +gr_loadScenario.setVisible(true); + + + + + + Laad een scenario in + + + + + + 1762252612468 + t_date + 490 + 160 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Datum + zero_Interface.energyModel.v_isRapidRun ? zero_Interface.f_getDateString() : zero_Interface.f_getDateAndTimeString() + + SansSerif + 16 + + + LEFT + + + + + + + 1747229800342 + va_main + 0 + 0 + + false + true + false + + <Width>1920</Width> + <Height>980</Height> + </Area> + </Areas> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1717506309790</Id> + <Name>UI_Hydrogen</Name> + <Folder>1754045666929</Folder> + <Generic>false</Generic> + <GenericParameter> + <Id>1717506309785</Id> + <Name>1717506309785</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089972</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1709107200000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1717506309786</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1717506309821</CurrentLevel> + <ConnectionsId>1717506309867</ConnectionsId> + <Variables> + <Variable Class="PlainVariable"> + <Id>1717506309811</Id> + <Name>v_sliderStartValue_priceLimit</Name> + <X>-930</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1717506309813</Id> + <Name>v_sliderMinValue_balanceLimit</Name> + <X>-930</X> + <Y>290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1717506309815</Id> + <Name>v_sliderMaxValue_balanceLimit</Name> + <X>-930</X> + <Y>310</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1717506309817</Id> + <Name>v_sliderStartValue_balanceLimit</Name> + <X>-930</X> + <Y>330</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1717506309819</Id> + <Name>v_sliderStartValue_ElectrolyserP_MW</Name> + <X>-930</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724859028571</Id> + <Name>v_colorH2_blue</Name> + <X>-940</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Color</Type> + <InitialValue Class="CodeValue"> + <Code>new Color(33, 164, 195)</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724859028735</Id> + <Name>v_colorH2_green</Name> + <X>-940</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Color</Type> + <InitialValue Class="CodeValue"> + <Code>new Color(104, 193, 103)</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724859028737</Id> + <Name>v_colorH2_white</Name> + <X>-940</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Color</Type> + <InitialValue Class="CodeValue"> + <Code>white</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724860189446</Id> + <Name>v_currentSelectedElectrolyser</Name> + <X>-360</X> + <Y>510</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724944015553</Id> + <Name>v_currentSelectedStorage</Name> + <X>-360</X> + <Y>530</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1724944025798</Id> + <Name>v_currentSelectedFuelCell</Name> + <X>-360</X> + <Y>550</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1724921941090</Id> + <Name>p_amountOfGISObjects</Name> + <X>-360</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>int</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1724921941088</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1724921946872</Id> + <Name>p_amountOfGC</Name> + <X>-360</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>int</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1724921946870</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724859404446</Id> + <Name>c_GISObjects_Hydrogen</Name> + <X>-360</X> + <Y>80</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GIS_Object</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724859404449</Id> + <Name>c_gridConnections_Hydrogen</Name> + <X>-360</X> + <Y>100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GridConnection</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724859404455</Id> + <Name>c_connectedGridNodes</Name> + <X>-360</X> + <Y>120</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Object</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724943470087</Id> + <Name>c_connectionOwners_Hydrogen</Name> + <X>-360</X> + <Y>60</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>ConnectionOwner</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724943620236</Id> + <Name>c_hydrogenStorages</Name> + <X>-360</X> + <Y>260</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>J_EAStorageGas</ElementClass> + <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724943636670</Id> + <Name>c_hydrogenElectrolysers</Name> + <X>-360</X> + <Y>240</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>J_EAConversionElectrolyser</ElementClass> + <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1724943685107</Id> + <Name>c_hydrogenFuelCells</Name> + <X>-360</X> + <Y>280</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>J_EAConversionFuelCell</ElementClass> + <ValueElementClass>J_EAStorageGas</ValueElementClass> + </Properties> + </Variable> + </Variables> + <Functions> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1717506309797</Id> + <Name>f_styleHydrogenUI</Name> + <X>-960</X> + <Y>50</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1717506309801</Id> + <Name>f_initializeUIElectrolyser</Name> + <X>-960</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>COC</Name> + <Type>ConnectionOwner</Type> + </Parameter> + <Body>//Instantiate sliders +f_instantiateSlidersElectrolyser(COC);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1717506309803</Id> + <Name>f_instantiateSlidersElectrolyser</Name> + <X>-940</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>COC</Name> + <Type>ConnectionOwner</Type> + </Parameter> + <Body>// Electrolyser Power start value +v_sliderStartValue_ElectrolyserP_MW = ((J_EAConversionElectrolyser)COC.f_getOwnedGridConnections().get(0).c_conversionAssets.get(0)).getInputCapacity_kW()/1000; +sl_electrolyserPower.setValue(v_sliderStartValue_ElectrolyserP_MW, false); +t_powerElectrolyser.setText(v_sliderStartValue_ElectrolyserP_MW + " MW"); + + +// Price limit start value +v_sliderStartValue_priceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_electricityPriceMaxForProfit_eurpkWh; +sl_electrolyserElectricityPriceLimit.setValue(v_sliderStartValue_priceLimit, false); +t_electricityPriceLimit.setText("€" + v_sliderStartValue_priceLimit); + + +//Balance limit start value +v_sliderStartValue_balanceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_gridNodeCongestionLimit_kW; +sl_electrolyserElectricityBalanceLimit.setValue(v_sliderStartValue_balanceLimit, false); +t_electricityBalanceLimit.setText(v_sliderStartValue_balanceLimit + " MW"); + + +//Radio button balance or price mode +int rb_value = 0; +switch (((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).p_electrolyserOperationMode){ + + case PRICE: + + rb_value = 0; + //Set visibility of price slider true and balance slider false + gr_electricityPriceSlider.setVisible(true); + gr_electricityBalanceSlider.setVisible(false); + break; + + case BALANCE: + rb_value = 1; + + //Set visibility of balance slider true and price slider false + gr_electricityBalanceSlider.setVisible(true); + gr_electricityPriceSlider.setVisible(false); + break; +} +rb_electrolyserMode.setValue(rb_value, false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724859526072</Id> + <Name>f_setScenarioFuture</Name> + <X>-340</X> + <Y>430</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>//Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +//Scenario code here + + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(1, false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724859526076</Id> + <Name>f_setScenario</Name> + <X>-360</X> + <Y>390</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>scenario_nr</Name> + <Type>int</Type> + </Parameter> + <Body>switch (scenario_nr){ + + case 0: // Current + + break; + + case 1: // Future + + break; + + case 2: // Hydrogen + traceln("Selected scenario: Hydrogen : DOES NOTHING YET"); + break; + + case 3: // Custom + + if(rb_scenariosPrivateUI.getValue() == 2){ + return; + } + rb_scenariosPrivateUI.setValue(2, false); + traceln("Selected scenario: Custom"); + break; + + default: + +} + +//Set 'results up to date' to false +zero_Interface.b_resultsUpToDate = false;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724859526078</Id> + <Name>f_setScenarioCurrent</Name> + <X>-340</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>//Set button to custom early on, so traceln will get ignored. +rb_scenariosPrivateUI.setValue(2, false); + + +//Scenario code here + + +//Reset button to current, due to sliders putting it on custom +rb_scenariosPrivateUI.setValue(0, false);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1724859526080</Id> + <Name>f_setSelectedGC</Name> + <Description>Function that sets the sliders to match the currently present settings of the energy assets owned by the selected GC. Used when a connection owner has multiple grid connections, and wants to set the sliders of a different GC. </Description> + <X>-360</X> + <Y>340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Initialize slider presets to selected GC (min, max, etc.) +//f_setSliderPresets(); + +</Body> + </Function> + </Functions> + <AgentLinks> + <AgentLink> + <Id>1717506309867</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <ContainerLinks> + <ContainerLink> + <Id>1717506328385</Id> + <Name>zero_Interface</Name> + <X>50</X> + <Y>-100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>Zero_Interface</ClassName> + </ActiveObjectClass> + </ContainerLink> + </ContainerLinks> + <Presentation> + <Level> + <Id>1717506309821</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1725003123558</Id> + <Name>rect_canvas</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineColorCode>v_colorH2_blue</LineColorCode> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>1920</Width> + <Height>980</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillColorCode>v_colorH2_white</FillColorCode> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1724944453528</Id> + <Name>rect_scenarios</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineColorCode>v_colorH2_blue</LineColorCode> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>170</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillColorCode>v_colorH2_white</FillColorCode> + <FillMaterial>null</FillMaterial> + </Rectangle> + <TimePlot> + <Id>1717506309825</Id> + <Name>plot</Name> + <X>400</X> + <Y>280</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <AutoUpdate>true</AutoUpdate> + <RecurrenceProperties> + <Id>1751013532514</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1709625600000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </RecurrenceProperties> + <EmbeddedIcon>false</EmbeddedIcon> + <Width>540</Width> + <Height>400</Height> + <BackgroundColor/> + <BorderColor/> + <ChartArea> + <XOffset>50</XOffset> + <YOffset>30</YOffset> + <Width>460</Width> + <Height>310</Height> + <BackgroundColor>-1</BackgroundColor> + <BorderColor>-16777216</BorderColor> + <GridColor>-12566464</GridColor> + </ChartArea> + <Legend> + <Place>SOUTH</Place> + <TextColor>-16777216</TextColor> + <Size>30</Size> + </Legend> + <Labels> + <HorLabelsPosition>DEFAULT</HorLabelsPosition> + <VerLabelsPosition>DEFAULT</VerLabelsPosition> + <TextColor>-12566464</TextColor> + </Labels> + <ShowLegend>true</ShowLegend> + <TimeWindowsMovementType>MOVEMENT_WITH_TIME</TimeWindowsMovementType> + <TimeWindowUnits>MODEL_TIME_UNIT</TimeWindowUnits> + <VerScaleFromExpression>0</VerScaleFromExpression> + <VerScaleToExpression>1</VerScaleToExpression> + <VerScaleType>AUTO</VerScaleType> + <DrawLine>true</DrawLine> + <Interpolation>LINEAR</Interpolation> + <SamplesToKeep>100</SamplesToKeep> + <TimeWindowExpression>100</TimeWindowExpression> + <FillAreaUnderLine>false</FillAreaUnderLine> + <LabelFormat>MODEL_TIME_UNITS</LabelFormat> + </TimePlot> + <Rectangle> + <Id>1717506309827</Id> + <Name>rect_sliders</Name> + <X>0</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16777216</LineColor> + <LineColorCode>v_colorH2_blue</LineColorCode> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>370</Width> + <Height>810</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillColorCode>v_colorH2_white</FillColorCode> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1717506309829</Id> + <Name>txt_electrolyserSliders</Name> + <X>70</X> + <Y>200</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electrolyser</Text> + <Font> + <Name>Calibri</Name> + <Size>22</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1717506309831</Id> + <Name>gr_buttonH2Electrolyser</Name> + <X>41</X> + <Y>211</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Oval> + <Id>1717506309833</Id> + <Name>ovalElectrolyserButton</Name> + <X>-1</X> + <Y>-1</Y> + <Label> + <X>0</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <RadiusX>20</RadiusX> + <RadiusY>40</RadiusY> + <Rotation>0.0</Rotation> + <FillColor>-14774017</FillColor> + <FillColorCode>v_colorH2_blue</FillColorCode> + <FillMaterial>null</FillMaterial> + </Oval> + <Text> + <Id>1717506309835</Id> + <Name>txt_h21</Name> + <X>-10</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-1</Color> + <Text>H2</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1717506309837</Id> + <Name>gr_electricityPriceSlider</Name> + <X>190</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1717506309839</Id> + <Name>txt_electricityPriceLimit</Name> + <X>-170</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electriciteits prijs limiet</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1717506309841</Id> + <Name>sl_electrolyserElectricityPriceLimit</Name> + <X>62</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>//Adjust the maximum price of electricity used to produce hydrogen +((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_electricityPriceMaxForProfit_eurpkWh = sl_electrolyserElectricityPriceLimit.getValue(); + +//Set text accordingly +t_electricityPriceLimit.setText( "€" + sl_electrolyserElectricityPriceLimit.getValue()); + + +//Set scenario to custom +f_setScenario(2); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>v_sliderStartValue_priceLimit</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>0.5</MaxValue> + <Step>0.01</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1717506309843</Id> + <Name>t_electricityPriceLimit</Name> + <X>40</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text> €0.00</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1717506309845</Id> + <Name>gr_electrolyserPowerSlider</Name> + <X>190</X> + <Y>280</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1717506309847</Id> + <Name>txt_powerElectrolyser</Name> + <X>-170</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Vermogen electrolyser</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1717506309849</Id> + <Name>sl_electrolyserPower</Name> + <X>62</X> + <Y>-20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode>//Adjust the electric capacity +c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).setInputCapacity_kW(sl_electrolyserPower.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW + +//Adjust grid connection capacity as well (if needed) +if(sl_electrolyserPower.getValue()*1000 > 2000){ + ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_electrolyserPower.getValue()*1000; + ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_electrolyserPower.getValue()*1000; + ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_electrolyserPower.getValue()*1000; +} + +//Set the text accordingly +t_powerElectrolyser.setText(sl_electrolyserPower.getValue() + " MW"); + + +//Set scenario to custom +f_setScenario(2); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>0</MinValue> + <MaxValue>10</MaxValue> + <Step>0.1</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1717506309851</Id> + <Name>t_powerElectrolyser</Name> + <X>35</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>1.0 MW</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1717506309853</Id> + <Name>gr_electrolyserMode</Name> + <X>100</X> + <Y>340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="RadioButtons"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1717506309855</Id> + <Name>rb_electrolyserMode</Name> + <X>-80</X> + <Y>-20</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="150" Height="50"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>switch (rb_electrolyserMode.getValue()){ + + case 0: + ((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.PRICE; + + //Set visibility of price slider true and balance slider false + gr_electricityPriceSlider.setVisible(true); + gr_electricityBalanceSlider.setVisible(false); + break; + + case 1: + ((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.BALANCE; + + //Set visibility of balance slider true and price slider false + gr_electricityBalanceSlider.setVisible(true); + gr_electricityPriceSlider.setVisible(false); + break; +}</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>VERTICAL</Orientation> + <Button>Prijs</Button> + <Button>Balans</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1717506309857</Id> + <Name>txt_electrolyserMode</Name> + <X>-80</X> + <Y>-40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electrolyser modus</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1717506309859</Id> + <Name>gr_electricityBalanceSlider</Name> + <X>190</X> + <Y>450</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Text> + <Id>1717506309861</Id> + <Name>txt_electricityBalanceLimit</Name> + <X>-170</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Electriciteits balans limiet</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Slider"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1717506309863</Id> + <Name>sl_electrolyserElectricityBalanceLimit</Name> + <X>62</X> + <Y>-15</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="100" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <Enabled>true</Enabled> + <ActionCode> +//Adjust the maximum price of electricity used to produce hydrogen +((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_gridNodeCongestionLimit_kW = sl_electrolyserElectricityBalanceLimit.getValue()*1000; + +//Set text accordingly +t_electricityBalanceLimit.setText( sl_electrolyserElectricityBalanceLimit.getValue() + " MW" ); + +//Set scenario to custom +f_setScenario(2); +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <DefaultValueCode>v_sliderStartValue_balanceLimit</DefaultValueCode> + <Orientation>HORIZONTAL</Orientation> + <MinValue>v_sliderMinValue_balanceLimit</MinValue> + <MaxValue>v_sliderMaxValue_balanceLimit</MaxValue> + <Step>0.01</Step> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1717506309865</Id> + <Name>t_electricityBalanceLimit</Name> + <X>50</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>0.0 MW</Text> + <Font> + <Name>Dialog</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>RIGHT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1724859404444</Id> + <Name>text5</Name> + <X>-370</X> + <Y>30</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Connections</Text> + <Font> + <Name>SansSerif</Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724859526068</Id> + <Name>text7</Name> + <X>-370</X> + <Y>360</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Set Sliders to Scenario</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724859526070</Id> + <Name>txt_setSlidersToSelectedGC</Name> + <X>-370</X> + <Y>310</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Set Sliders to selected GC</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1724859673741</Id> + <Name>gr_scenarioRB</Name> + <X>130</X> + <Y>100</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Control Type="RadioButtons"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1724859673743</Id> + <Name>rb_scenariosPrivateUI</Name> + <X>-100</X> + <Y>-60</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="180" Height="120"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>f_setScenario(rb_scenariosPrivateUI.getValue());</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="14" Style="0"/> + <DefaultValueCode>0</DefaultValueCode> + <Orientation>VERTICAL</Orientation> + <Button>Huidig - 2023</Button> + <Button>Toekomstplannen</Button> + <Button>Custom</Button> + <LinkTo>false</LinkTo> + </ExtendedProperties> + </Control> + <Text> + <Id>1724859673745</Id> + <Name>text187</Name> + <X>-100</X> + <Y>-80</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Selecteer een scenario</Text> + <Font> + <Name>Calibri</Name> + <Size>20</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1724943713523</Id> + <Name>txt_hydrogenAssets</Name> + <X>-370</X> + <Y>210</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Hydrogen assets</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1724944232372</Id> + <Name>txt_h2storageSliders</Name> + <X>72</X> + <Y>513</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Waterstof opslag</Text> + <Font> + <Name>Calibri</Name> + <Size>22</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1724944232376</Id> + <Name>gr_buttonH2Storage</Name> + <X>43</X> + <Y>524</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Oval> + <Id>1724944232378</Id> + <Name>ovalH2StorageButton</Name> + <X>-1</X> + <Y>-1</Y> + <Label> + <X>0</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <RadiusX>20</RadiusX> + <RadiusY>40</RadiusY> + <Rotation>0.0</Rotation> + <FillColor>-14774017</FillColor> + <FillColorCode>v_colorH2_blue</FillColorCode> + <FillMaterial>null</FillMaterial> + </Oval> + <Text> + <Id>1724944232380</Id> + <Name>txt_h22</Name> + <X>-10</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-1</Color> + <Text>H2</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1724944302875</Id> + <Name>txt_fuelCellSliders</Name> + <X>69</X> + <Y>739</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Fuelcell</Text> + <Font> + <Name>Calibri</Name> + <Size>22</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1724944302879</Id> + <Name>gr_buttonH2FuelCell</Name> + <X>40</X> + <Y>750</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Oval> + <Id>1724944302881</Id> + <Name>ovalH2StorageButton1</Name> + <X>-1</X> + <Y>-1</Y> + <Label> + <X>0</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor/> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <RadiusX>20</RadiusX> + <RadiusY>40</RadiusY> + <Rotation>0.0</Rotation> + <FillColor>-14774017</FillColor> + <FillColorCode>v_colorH2_blue</FillColorCode> + <FillMaterial>null</FillMaterial> + </Oval> + <Text> + <Id>1724944302883</Id> + <Name>txt_h23</Name> + <X>-10</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-1</Color> + <Text>H2</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1724947265014</Id> + <Name>text</Name> + <X>-370</X> + <Y>480</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Current selected assets</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1725003108502</Id> + <Name>txt_hydrogenControlRoom</Name> + <X>770</X> + <Y>70</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <ColorCode>v_colorH2_blue</ColorCode> + <Text>Hydrogen Controlroom</Text> + <Font> + <Name>Calibri</Name> + <Size>72</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Level> + </Presentation> + <Areas> + <Area> + <Id>1725002833718</Id> + <Name>va_hydrogenUI</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Title>Hydrogen UI + 1920 + 980 + + + + + 1722245292185 + UI_Tabs + /* +public ShapeGroup getGroupElectricityPresentation() { + return gr_tabElectricity_presentation; +} + +public ShapeEmbeddedObjectPresentation getElectricityPresentation() { + return pop_tabElectricity_presentation; +} +*/ + 1754045642067 + false + + 1722245292191 + 1722245292191 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + CONTINUOUS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + true + 1658477089971 + true + 1722326400000 + + 0 + HOUR + + + 1 + HOUR + + + + 1722245292188 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1722245292192 + 1722245292186 + + + 1722245555993 + v_selectedTabType + 270 + 40 + + false + true + true + + EnergyDemandTab + + ELECTRICITY + + + + + 1746099651858 + v_presentationXOffset + 270 + 130 + + false + true + true + + double + + 15 + + + + + 1746099651890 + v_presentationYOffset + 270 + 150 + + false + true + true + + double + + 630 + + + + + 1754908036761 + v_activeSliderGridConnections + 530 + 50 + + false + true + true + + List<GridConnection> + + + + 1755013554753 + v_pausedSliderGridConnections + 530 + 70 + + false + true + true + + List<GridConnection> + + + + 1753869985994 + c_utilityGridConnections + true + 1170 + 75 + + false + true + true + + ArrayList + GCUtility + String + + + + 1753869993825 + c_houseGridConnections + true + 1170 + 100 + + false + true + true + + ArrayList + GCHouse + String + + + + 1753870454474 + c_gridBatteryGridConnections + true + 1170 + 125 + + false + true + true + + ArrayList + GCGridBattery + String + + + + 1753870466643 + c_solarFarmGridConnections + true + 1170 + 150 + + false + true + true + + ArrayList + GCEnergyProduction + String + + + + 1753870491136 + c_windFarmGridConnections + true + 1170 + 175 + + false + true + true + + ArrayList + GCEnergyProduction + String + + + + 1753870502247 + c_chargerGridConnections + true + 1170 + 200 + + false + true + true + + ArrayList + GCPublicCharger + String + + + + + + VOID + double + 1722245473562 + f_showCorrectTab + 270 + 70 + + false + true + true + pop_tabElectricity_presentation.setVisible(false); +pop_tabHeating_presentation.setVisible(false); +pop_tabMobility_presentation.setVisible(false); +pop_tabEHub_presentation.setVisible(false); + +switch (v_selectedTabType) { + case ELECTRICITY: + pop_tabElectricity_presentation.setVisible(true); + break; + case HEAT: + pop_tabHeating_presentation.setVisible(true); + break; + case MOBILITY: + pop_tabMobility_presentation.setVisible(true); + break; + case HUB: + case NFATO: + pop_tabEHub_presentation.setVisible(true); + break; +} + + + + VOID + double + 1722259092945 + f_setTab + 270 + 100 + + false + true + true + + tab + EnergyDemandTab + + v_selectedTabType = tab; +f_showCorrectTab(); + + + + VOID + double + 1753881126492 + f_initializeSliderGridConnections + true + 1170 + 50 + + false + true + true + + gridConnections + List<GridConnection> + + c_utilityGridConnections.clear(); +c_houseGridConnections.clear(); +c_solarFarmGridConnections.clear(); +c_windFarmGridConnections.clear(); +c_gridBatteryGridConnections.clear(); +c_chargerGridConnections.clear(); + + +for(GridConnection GC : gridConnections){ + if(GC instanceof GCUtility){ + c_utilityGridConnections.add((GCUtility)GC); + } + else if(GC instanceof GCHouse){ + c_houseGridConnections.add((GCHouse)GC); + } + else if(GC instanceof GCEnergyProduction){ + if(GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + c_solarFarmGridConnections.add((GCEnergyProduction)GC); + } + if(GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ + c_windFarmGridConnections.add((GCEnergyProduction)GC); + } + } + else if(GC instanceof GCGridBattery){ + c_gridBatteryGridConnections.add((GCGridBattery)GC); + } + else if(GC instanceof GCPublicCharger){ + c_chargerGridConnections.add((GCPublicCharger)GC); + } +} + + + VOID + double + 1754908006859 + f_initializeSliderGCPointers + 530 + 30 + + false + true + true + + activeGridConnections + List<GridConnection> + + + pausedGridConnections + List<GridConnection> + + if(activeGridConnections != null){ + v_activeSliderGridConnections = activeGridConnections; +} +else{ + v_activeSliderGridConnections = new ArrayList<>(); + traceln("WARNING: UI_TABS HAS BEEN INITIALIZED WITH NO ACTIVE GC"); +} + +if(pausedGridConnections != null){ + v_pausedSliderGridConnections = pausedGridConnections; +} +else{ + v_pausedSliderGridConnections = new ArrayList<>(); +} + + + VOID + double + 1754908356478 + f_initializeUI_Tabs + 50 + 150 + + false + true + true + + activeGridConnections + List<GridConnection> + + + pausedGridConnections + List<GridConnection> + + + electricityTabEASliderGCs + List<GridConnection> + + //Initialize the GridConnections +f_initializeSliderGCPointers(activeGridConnections, pausedGridConnections); + +//Initialize the tabs +f_initializeActiveTabs(electricityTabEASliderGCs); + +//Set sliders to engine state of the gridconnections +f_updateSliders(); + +//Show correct tab +f_showCorrectTab(); + + + RETURNS_VALUE + List<GCHouse> + 1754919017244 + f_getActiveSliderGridConnections_houses + 560 + 260 + + false + true + true + List<GCHouse> houseGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCHouse){ + houseGridConnections.add((GCHouse)GC); + } +} + +return houseGridConnections; + + + RETURNS_VALUE + List<GCUtility> + 1754922545766 + f_getActiveSliderGridConnections_utilities + 560 + 240 + + false + true + true + List<GCUtility> utilityGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCUtility){ + utilityGridConnections.add((GCUtility)GC); + } +} + +return utilityGridConnections; + + + RETURNS_VALUE + List<GCGridBattery> + 1754922546986 + f_getAllSliderGridConnections_gridBatteries + 540 + 320 + + false + true + true + List<GCGridBattery> gridBatteryGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCGridBattery){ + gridBatteryGridConnections.add((GCGridBattery)GC); + } +} +if(v_pausedSliderGridConnections != null){ + for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCGridBattery){ + gridBatteryGridConnections.add((GCGridBattery)GC); + } + } +} +return gridBatteryGridConnections; + + + RETURNS_VALUE + List<GCPublicCharger> + 1754922547989 + f_getSliderGridConnections_chargers + 550 + 400 + + false + true + true + List<GCPublicCharger> chargerGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCPublicCharger){ + chargerGridConnections.add((GCPublicCharger)GC); + } +} + +return chargerGridConnections; + + + RETURNS_VALUE + List<GCEnergyProduction> + 1754922591622 + f_getAllSliderGridConnections_production + 540 + 350 + + false + true + true + List<GCEnergyProduction> productionGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCEnergyProduction){ + productionGridConnections.add((GCEnergyProduction)GC); + } +} +if(v_pausedSliderGridConnections != null){ + for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCEnergyProduction){ + productionGridConnections.add((GCEnergyProduction)GC); + } + } +} +return productionGridConnections; + + + VOID + double + 1754929564839 + f_updateSliders + 50 + 200 + + false + true + true + if(!pop_tabElectricity.isEmpty()){ + pop_tabElectricity.get(0).f_updateSliders_Electricity(); +} +if(!pop_tabHeating.isEmpty()){ + pop_tabHeating.get(0).f_updateSliders_Heating(); +} +if(!pop_tabMobility.isEmpty()){ + pop_tabMobility.get(0).f_updateSliders_Mobility(); +} +if(!pop_tabEHub.isEmpty()){ + pop_tabEHub.get(0).f_updateSliders_EHub(); +} + + + RETURNS_VALUE + List<GridConnection> + 1754986474226 + f_getActiveSliderGridConnections_consumption + 550 + 220 + + false + true + true + List<GridConnection> consumptionGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCUtility){ + consumptionGridConnections.add(GC); + } + else if(GC instanceof GCHouse){ + consumptionGridConnections.add(GC); + } +} + +return consumptionGridConnections; + + + RETURNS_VALUE + List<GridConnection> + 1754991155553 + f_getActiveSliderGridConnections_all + 550 + 150 + + false + true + true + List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); + +return gridConnections; + + + RETURNS_VALUE + List<GCPublicCharger> + 1755013777878 + f_getPausedSliderGridConnections_chargers + 550 + 420 + + false + true + true + List<GCPublicCharger> pausedChargerGridConnections = new ArrayList<>(); + +if(v_pausedSliderGridConnections != null){ + for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCPublicCharger){ + pausedChargerGridConnections.add((GCPublicCharger)GC); + } + } +} + +return pausedChargerGridConnections; + + + VOID + double + 1756302560139 + f_initializeActiveTabs + 70 + 170 + + false + true + true + + electricityTabEASliderGCs + List<GridConnection> + + if(!pop_tabElectricity.isEmpty()){ + pop_tabElectricity.get(0).f_initializeTab_Electricity(electricityTabEASliderGCs); +} +if(!pop_tabHeating.isEmpty()){ + //pop_tabHeating.get(0).f_initializeTab_Heating(); +} +if(!pop_tabMobility.isEmpty()){ + pop_tabMobility.get(0).f_initializeTab_Mobility(); +} +if(!pop_tabEHub.isEmpty()){ + //pop_tabEHub.get(0).f_initializeTab_EHub(); +} + + + RETURNS_VALUE + List<GCPublicCharger> + 1758278620331 + f_getAllSliderGridConnections_chargers + 540 + 380 + + false + true + true + List<GCPublicCharger> chargerGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCPublicCharger){ + chargerGridConnections.add((GCPublicCharger)GC); + } +} +if(v_pausedSliderGridConnections != null){ + for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCPublicCharger){ + chargerGridConnections.add((GCPublicCharger)GC); + } + } +} + +return chargerGridConnections; + + + RETURNS_VALUE + List<GridConnection> + 1761208715194 + f_getAllSliderGridConnections_consumption + 540 + 200 + + false + true + true + List<GridConnection> consumptionGridConnections = new ArrayList<>(); + +for(GridConnection GC : v_activeSliderGridConnections){ + if(GC instanceof GCUtility){ + consumptionGridConnections.add(GC); + } + else if(GC instanceof GCHouse){ + consumptionGridConnections.add(GC); + } +} + +for(GridConnection GC : v_pausedSliderGridConnections){ + if(GC instanceof GCUtility){ + consumptionGridConnections.add(GC); + } + else if(GC instanceof GCHouse){ + consumptionGridConnections.add(GC); + } +} + +return consumptionGridConnections; + + + RETURNS_VALUE + List<GridConnection> + 1761208797812 + f_getPausedSliderGridConnections_all + 550 + 170 + + false + true + true + List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); + +return gridConnections; + + + RETURNS_VALUE + List<GridConnection> + 1761208826669 + f_getAllSliderGridConnections_all + 530 + 130 + + false + true + true + List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); +gridConnections.addAll(v_pausedSliderGridConnections); + +return gridConnections; + + + + + 1722245292186 + connections + 50 + -40 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1722252542602 + zero_Interface + 50 + -100 + + false + true + true + + zerointerfaceloader + Zero_Interface + + + + 1753694295457 + uI_EnergyHub + 50 + -70 + + false + true + true + + zerointerfaceloader + UI_EnergyHub + + + + + + 1722245482640 + pop_tabMobility + 50 + 80 + + false + true + true + 1744964660761 + + zerointerfaceloader + tabMobility + + + + zerointerfaceloader + tabMobility + 1722245324901 + + + + true + + 0 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089970 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722245482641 + pop_tabElectricity + 50 + 40 + + false + true + true + 1744964655611 + + zerointerfaceloader + tabElectricity + + + + zerointerfaceloader + tabElectricity + 1722247653567 + + + + + p_currentPVOnLand_ha + + + p_currentWindTurbines_MW + + + p_currentTotalGridBatteryCapacity_MWh + + + true + + 0 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089969 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722253113248 + pop_tabHeating + 50 + 60 + + false + true + true + 1744964658364 + + zerointerfaceloader + tabHeating + + + + zerointerfaceloader + tabHeating + 1722253108631 + + + + true + + 0 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089968 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722253478328 + pop_tabEHub + 50 + 100 + + false + true + true + 1744964663750 + + zerointerfaceloader + tabEHub + + + + zerointerfaceloader + tabEHub + 1722253463901 + + + + true + + 0 + + ARRAY_LIST_BASED + true + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089967 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + + + 1722245292192 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1722248369298 + gr_energyDemandSettings + 200 + 580 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1722248369300 + gr_electricityButton + -125 + -25 + + true + true + false + SHAPE_DRAW_2D3D + !pop_tabElectricity.isEmpty() + v_selectedTabType = EnergyDemandTab.ELECTRICITY; +f_showCorrectTab(); + false + 0 + 0.0 + + + 1722248369302 + ovalElectricityButton + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -32 + null + + + 1722248369304 + image3 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-electricity-3408805.png + + + false + + + + + 1722248369306 + gr_heatButton + -40 + -25 + + true + true + false + SHAPE_DRAW_2D3D + !pop_tabHeating.isEmpty() + v_selectedTabType = EnergyDemandTab.HEAT; +f_showCorrectTab(); + false + 0 + 0.0 + + + 1722248369308 + ovalHeatButton + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -6943 + null + + + 1722248369310 + image10 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-fire-2429630.png + + + false + + + + + 1722248369312 + gr_mobilityButton + 45 + -25 + + true + true + false + SHAPE_DRAW_2D3D + !pop_tabMobility.isEmpty() + v_selectedTabType = EnergyDemandTab.MOBILITY; +f_showCorrectTab(); + false + 0 + 0.0 + + + 1722248369314 + ovalTransportButton + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -2625550 + null + + + 1722248369316 + image15 + -14 + -12 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 28 + 24 + 0.0 + + + zerointerfaceloader + noun-car-1777731.png + + + false + + + + + 1722248369318 + gr_eHubButton + 130 + -25 + + true + true + false + SHAPE_DRAW_2D3D + !pop_tabEHub.isEmpty() + v_selectedTabType = EnergyDemandTab.HUB; +f_showCorrectTab(); + false + 0 + 0.0 + + + 1722248369320 + ovalHubButton + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -657931 + null + SOLID + 20 + 40 + 0.0 + -3736634 + null + + + 1722248369322 + line + -10 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 20 + -2 + 0 + + + 1722248369324 + line1 + -6 + 6 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 16 + -15 + 0 + + + 1722248369326 + line2 + -10 + -4 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1.5 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 18 + 15 + 0 + + + 1722248369328 + oval + -11 + -6 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 3 + 40 + 0.0 + -657931 + null + + + 1722248369330 + oval1 + -8 + 8 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 3 + 40 + 0.0 + -657931 + null + + + 1722248369332 + line3 + 8 + 10 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + DOTTED + 1 + 0 + 1 + 0 + 1 + -17 + 0 + + + 1722248369334 + oval4 + 8 + 10 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 3 + 40 + 0.0 + -657931 + null + + + 1722248369336 + oval3 + 10 + -9 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 3 + 40 + 0.0 + -657931 + null + + + + + 1722248369338 + txt_electricityButtonDescription + -125 + 10 + + true + true + false + SHAPE_DRAW_2D + gr_electricityButton.isVisible() + false + 0 + 0.0 + -16777216 + Elektriciteit + + Calibri + 12 + + + CENTER + + + 1722248369340 + txt_heatButtonDescription + -40 + 10 + + true + true + false + SHAPE_DRAW_2D + gr_heatButton.isVisible() + false + 0 + 0.0 + -16777216 + Warmte + + Calibri + 12 + + + CENTER + + + 1722248369342 + txt_mobilityButtonDescription + 45 + 10 + + true + true + false + SHAPE_DRAW_2D + gr_mobilityButton.isVisible() + false + 0 + 0.0 + -16777216 + Transport + + Calibri + 12 + + + CENTER + + + 1722248369344 + txt_eHubButtonDescription + 130 + 10 + + true + true + false + SHAPE_DRAW_2D + gr_eHubButton.isVisible() + false + 0 + 0.0 + -16777216 + E-hub + + Calibri + 12 + + + CENTER + + + + + 1744964727616 + gr_tabElectricity_presentation + 15 + 630 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744964655611 + pop_tabElectricity_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1744964732289 + gr_tabHeating_presentation + 15 + 630 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744964658364 + pop_tabHeating_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1744964737688 + gr_tabEHub_presentation + 15 + 630 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744964663750 + pop_tabEHub_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1744964742286 + gr_tabMobility_presentation + 15 + 630 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744964660761 + pop_tabMobility_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 0.0 + 0.0 + + + + + 1753877322668 + txt_allGridConnectionsForTheseSliders + true + 1160 + 20 + + false + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + GridConnections displayed in slider + + SansSerif + 12 + + + LEFT + + + + + + + 1658477103140 + Zero_Interface + public ShapeButton getButton_goToUI() { + return this.button_goToUI; +} +public ShapeRadioButtonGroup getBuildingColorsRB(){ + return this.rb_mapOverlay; +} +public ShapeCheckBox getCb_showFilterInterface(){ + return this.cb_showFilterInterface; +} +public ShapeComboBox getCb_filterOptions(){ + return this.cb_filterOptions; +} + + import java.io.FileOutputStream; +import java.util.stream.Stream; +import java.util.Dictionary.*; +import java.util.Hashtable.*; +import java.util.*; +import java.util.stream.Collectors; + +import java.io.*; +import java.io.File; +import java.io.IOException; +import java.util.Date; +import java.time.LocalDate; +import java.time.DayOfWeek; +import java.text.SimpleDateFormat; +import com.fasterxml.jackson.databind.node.JsonNodeFactory; + +//Possibility to turn of traceln +import java.io.OutputStream; +import java.io.PrintStream; + +//Curves +import com.anylogic.engine.markup.AbstractCurve; +import com.anylogic.engine.markup.GISMarkupSegment; +import com.anylogic.engine.markup.GISPoint; +//import zero_engine.OL_EnergyCarriers; +//import zero_engine.OL_EnergyCarriers; +import com.querydsl.core.types.dsl.TimeExpression; +//import zero_engine.J_EAStorageElectric; +//import zero_engine.J_EAConsumption; +import org.apache.commons.lang3.tuple.Triple; +import javax.media.jai.widget.ViewportListener; + false + + 1658477103138 + 1658477103138 + + T extends Agent + + Generic parameter: + + ENTITY + 100 + false + 100 + true + + -4144960 + null + + true + true + false + + 10 + MPS + + + 1 + METER + + + 1 + METER + + + 1 + METER + + + + false + + 1.0 + SECOND + + GIS + 500 + 500 + 0 + 100 + 100 + MOORE + USER_DEF + USER_DEF + 2 + 50 + 0.95 + 10 + + + false + 1658477089966 + true + 1658563200000 + + 0 + HOUR + + + p_timeStep_h + HOUR + + + + 1658477103136 + scale + 0 + -150 + false + false + false + SHAPE_DRAW_2D3D + 100 + 0 + BASED_ON_LENGTH + 10 + METER + 10 + true + + 1658477103139 + 1658477103135 + + + 1696837759932 + v_LVGridColor + 395 + 1220 + + false + true + true + + Color + + purple + + + + + 1696837759935 + v_HVGridColor + 395 + 1180 + + false + true + true + + Color + + red + + + + + 1696837759938 + v_gasGridColor + 395 + 1240 + + false + true + true + + Color + + brown + + + + + 1696837759945 + v_energyLabelAColor + 395 + 1325 + + false + true + true + + Color + + darkGreen + + + + + 1696837759948 + v_energyLabelBColor + 395 + 1345 + + false + true + true + + Color + + green + + + + + 1696837759950 + v_energyLabelCColor + 395 + 1365 + + false + true + true + + Color + + yellowGreen + + + + + 1696837759953 + v_energyLabelDColor + 395 + 1385 + + false + true + true + + Color + + gold + + + + + 1696837759955 + v_energyLabelEColor + 395 + 1405 + + false + true + true + + Color + + orange + + + + + 1696837759958 + v_energyLabelFColor + 395 + 1425 + + false + true + true + + Color + + orangeRed + + + + + 1696837759961 + v_energyLabelUnknownColor + 395 + 1465 + + false + true + true + + Color + + gray + + + + + 1696837759963 + v_energyLabelGColor + 395 + 1445 + + false + true + true + + Color + + red + + + + + 1696837759966 + v_MVGridColor + 395 + 1200 + + false + true + true + + Color + + steelBlue + + + + + 1696863329269 + v_gridConnectionInBuildingIndex + 50 + 1560 + + false + true + true + + int + + 0 + + + + + 1701164360663 + b_resultsUpToDate + -240 + 940 + + false + true + true + + boolean + + + + 1701879001472 + v_clickedObjectText + 50 + 1580 + + false + true + true + + String + + "None" + + + + + 1701879014361 + v_clickedObjectAdress + 50 + 1600 + + false + true + true + + String + + "" + + + + + 1702041370471 + v_simulationArea1Color + 1310 + 1230 + + false + true + true + + Color + + new Color(178, 34, 34, 0) + + + + + 1702043349202 + v_companyBuildingColor + 690 + 1060 + + false + true + true + + Color + + teal + + + + + 1702043408687 + v_detailedCompanyBuildingColor + 690 + 1110 + + false + true + true + + Color + + navy + + + + + 1702043479414 + v_houseBuildingColor + 690 + 1160 + + false + true + true + + Color + + new Color(154, 208, 194) + + + + + 1702043554935 + v_restBuildingColor + 690 + 1210 + + false + true + true + + Color + + gainsboro + + + + + 1702046920293 + v_clickedObjectDetails + 50 + 1620 + + false + true + true + + String + + "" + + + + + 1704450852556 + v_solarParkColor + 690 + 1310 + + false + true + true + + Color + + new Color(250, 246, 179, 206) + + + + + 1704463271534 + v_selectionColor + 400 + 1080 + + false + true + true + + Color + + yellow + + + + + 1704463281781 + v_selectionColorAddBuildings + 400 + 1100 + + false + true + true + + Color + + yellow + + + + + 1705663820237 + v_HVMVNodeColor + 1030 + 1060 + + false + true + true + + Color + + new Color(253, 223, 134, 206) + + + + + 1705663820239 + v_HVMVLineColor + 1030 + 1080 + + false + true + true + + Color + + navy + + + + + 1705664070254 + v_solarParkLineColor + 690 + 1330 + + false + true + true + + Color + + gold + + + + + 1705664575869 + v_electrolyserColor + 690 + 1445 + + false + true + true + + Color + + new Color(33, 164, 195) + + + + + 1705664587285 + v_chargingStationColor + 690 + 1490 + + false + true + true + + Color + + cyan + + + + + 1705668042403 + v_antiLayerColor + 1310 + 1210 + + false + true + true + + Color + + new Color(192, 192, 192, 100) + + + + + 1705668569794 + v_electrolyserLineColor + 690 + 1465 + + false + true + true + + Color + + navy + + + + + 1705668590932 + v_chargingStationLineColor + 690 + 1510 + + false + true + true + + Color + + darkBlue + + + + + 1705673181898 + v_clickedGridNode + 50 + 1460 + + false + true + true + + GridNode + + + + 1705673647104 + v_previousClickedObjectType + 50 + 1430 + + false + true + true + + OL_GISObjectType + + + + 1705673714784 + v_previousClickedGridNode + 50 + 1480 + + false + true + true + + GridNode + + + + 1705967311665 + v_simulationArea1LineColor + 1310 + 1250 + + false + true + true + + Color + + dimGray + + + + + 1705967344378 + v_simulationArea2Color + true + 1310 + 1270 + + false + true + true + + Color + + new Color(178, 34, 34, 0) + + + + + 1705967344381 + v_simulationArea2LineColor + true + 1310 + 1290 + + false + true + true + + Color + + dimGray + + + + + 1706892713276 + GISregion_antiLaag + -280 + 250 + + false + true + true + + GISRegion + + + + 1706990958029 + v_backgroundColor + 1312 + 1060 + + false + true + true + + Color + + (new Color(208, 208, 245)).brighter() + + + + + 1707918668189 + v_clickedObjectType + 50 + 1410 + + false + true + true + + OL_GISObjectType + + + + 1709803708318 + v_gridNodeFeedinColor + 400 + 1120 + + false + true + true + + Color + + orange + + + + + 1710162245199 + v_batteryColor + 690 + 1400 + + false + true + true + + Color + + green.darker() + + + + + 1710162245201 + v_batteryLineColor + 690 + 1420 + + false + true + true + + Color + + green + + + + + 1710166484674 + v_windFarmColor + 690 + 1355 + + false + true + true + + Color + + white + + + + + 1710166484676 + v_windFarmLineColor + 690 + 1375 + + false + true + true + + Color + + black + + + + + 1714137967101 + v_MVLVNodeColor + 1030 + 1220 + + false + true + true + + Color + + green + + + + + 1714137970406 + v_MVLVLineColor + 1030 + 1240 + + false + true + true + + Color + + green.brighter() + + + + + 1714137978358 + v_gridNodeColorStrained + 1030 + 1415 + + false + true + true + + Color + + orange + + + + + 1714137980262 + v_gridNodeLineColorStrained + 1030 + 1435 + + false + true + true + + Color + + orange.brighter() + + + + + 1714137982277 + v_gridNodeColorCongested + 1030 + 1460 + + false + true + true + + Color + + red + + + + + 1714137984157 + v_gridLineColorCongested + 1030 + 1480 + + false + true + true + + Color + + red.brighter() + + + + + 1718264413499 + v_unknownConsumptionColor + 395 + 1305 + + false + true + true + + Color + + white + + + + + 1718567214780 + b_updateLiveCongestionColors + 1030 + 1600 + + false + true + true + + boolean + + false + + + + + 1719311576065 + v_newChargingStationColor + 690 + 1540 + + false + true + true + + Color + + new Color(173, 255, 47, 156) + + + + + 1719311576067 + v_newChargingStationLineColor + 690 + 1560 + + false + true + true + + Color + + green + + + + + 1719830571563 + v_outsideTemperature + 940 + -260 + + false + false + true + + double + + + + 1719830581855 + v_solarIrradiance + 940 + -240 + + false + false + true + + int + + + + 1719830591551 + v_windspeed + 940 + -220 + + false + false + true + + String + + + + 1720905248678 + v_selectedGridConnectionIndex + 940 + -130 + + false + true + true + + int + + 0 + + + + + 1720905365617 + v_nbGridConnectionsInSelectedBuilding + 940 + -110 + + false + true + true + + int + + 0 + + + + + 1721652532124 + v_companyBuildingLineColor + 690 + 1080 + + false + true + true + + Color + + black + + + + + 1721652543732 + v_detailedCompanyBuildingLineColor + 690 + 1130 + + false + true + true + + Color + + black + + + + + 1721652554195 + v_houseBuildingLineColor + 690 + 1180 + + false + true + true + + Color + + black + + + + + 1721652564323 + v_restBuildingLineColor + 690 + 1230 + + false + true + true + + Color + + + + 1721729327873 + v_parcelColor + 690 + 1590 + + false + true + true + + Color + + navajoWhite + + + + + 1721729331151 + v_parcelLineColor + 690 + 1610 + + false + true + true + + Color + + black + + + + + 1721996776514 + v_MVMVNodeColor + 1030 + 1150 + + false + true + true + + Color + + new Color(253, 223, 134, 206) + + + + + 1721996776516 + v_MVMVLineColor + 1030 + 1170 + + false + true + true + + Color + + navy + + + + + 1721998215865 + v_HVMVNodeSize + 1030 + 1100 + + false + true + true + + double + + 100 + + + + + 1721998236233 + v_MVMVNodeSize + 1030 + 1190 + + false + true + true + + double + + 30 + + + + + 1721998240384 + v_MVLVNodeSize + 1030 + 1260 + + false + true + true + + double + + 20 + + + + + 1725018118872 + b_showCables + 50 + 1660 + + false + true + true + + boolean + + false + + + + + 1728404379677 + v_energyAssetLineWidth + 690 + 1280 + + false + true + true + + double + + 2 + + + + + 1732027307811 + b_runningMainInterfaceScenarios + -670 + 706 + + false + true + true + + boolean + + false + + + + + 1734617425109 + b_gridLoopsAreDefined + -630 + 510 + + false + true + true + + boolean + + false + + + + + 1739980192808 + v_customEnergyCoop + 50 + 1370 + + false + true + true + + EnergyCoop + + + + 1742298194173 + v_forcedClickScreenColor + 140 + -840 + + false + true + true + + Color + + new Color(105, 105, 105, 150) + + + + + 1743092928263 + b_inManualFilterSelectionMode + -1530 + 580 + + false + true + true + + boolean + + false + + + + + 1743666440153 + v_currentActiveInfoBubble + true + -1990 + 150 + + false + true + true + + ShapeImage + + + + 1744205147072 + v_infoText + -2010 + 80 + + false + true + true + + J_InfoText + + new J_InfoText() + + + + + 1750086295616 + v_parkingSpaceColor_private + 690 + 1720 + + false + true + true + + Color + + salmon + + + + + 1750086307414 + v_parkingSpaceLineColor_private + 690 + 1740 + + false + true + true + + Color + + red + + + + + 1750089169786 + v_parkingSpaceColor_electric + 690 + 1680 + + false + true + true + + Color + + lightGreen + + + + + 1750089169788 + v_parkingSpaceLineColor_electric + 690 + 1700 + + false + true + true + + Color + + green + + + + + 1750089171472 + v_parkingSpaceColor_public + 690 + 1640 + + false + true + true + + Color + + lightBlue + + + + + 1750089171474 + v_parkingSpaceLineColor_public + 690 + 1660 + + false + true + true + + Color + + blue + + + + + 1750165528617 + v_numberOfSurveyCompanies + 1390 + 1520 + + false + true + true + + int + + + + 1750777761770 + v_HVMVNodeIsVisible + 1030 + 1120 + + false + true + true + + boolean + + false + + + + + 1752836273466 + v_gridNodeLineColorUncongested + 1030 + 1390 + + false + true + true + + Color + + green.brighter() + + + + + 1752836375624 + v_gridNodeColorUncongested + 1030 + 1370 + + false + true + true + + Color + + green + + + + + 1752837181466 + v_LVLVNodeColor + 1030 + 1290 + + false + true + true + + Color + + green + + + + + 1752837181468 + v_LVLVLineColor + 1030 + 1310 + + false + true + true + + Color + + green.brighter() + + + + + 1752837181470 + v_LVLVNodeSize + 1030 + 1330 + + false + true + true + + double + + 10 + + + + + 1753105667219 + rb_mapOverlay + 1920 + 1495 + + false + true + true + + ShapeRadioButtonGroup + + + + 1753110308594 + v_amountOfDefinedGridLoops + -630 + 530 + + false + true + true + + int + + 0 + + + + + 1753115730758 + v_gridNodeColorCapacityUnknown + 1030 + 1510 + + false + true + true + + Color + + gray + + + + + 1753115736678 + v_gridNodeLineColorCapacityUnknown + 1030 + 1530 + + false + true + true + + Color + + gray.brighter() + + + + + 1754312936616 + v_parkingSpaceLineColor_unkown + 690 + 1810 + + false + true + true + + Color + + gray.darker() + + + + + 1754312949585 + v_parkingSpaceColor_unkown + 690 + 1790 + + false + true + true + + Color + + gray + + + + + 1756375264408 + v_currentViewArea + -2010 + 100 + + false + true + true + + ViewArea + + va_Interface + + + + + 1758795129963 + zero_loader + 50 + -250 + + false + true + true + + Zero_Loader + + + + 1715858732720 + energyModel + -200 + 1020 + + false + true + true + + EnergyModel + NONE + false + + 1715858732718 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1727251571552 + settings + -670 + 110 + + false + false + true + + Settings + NONE + false + + 1727251571550 + + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1746106585457 + p_currentActiveInfoBubble + -1990 + 170 + + false + true + true + + List<ShapeImage> + NONE + false + + new ArrayList<ShapeImage>() + + + 1746106585455 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1744987127500 + p_maxNrSelectedGCForExport + true + -555 + -440 + + false + true + true + + int + NONE + false + + 20 + + + 1744987127498 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1745937830300 + p_minSelectedGCForPublicAggregation + -655 + 895 + + false + true + true + + int + NONE + false + + 10 + + + 1745937830298 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1753446312779 + b_inEnergyHubSelectionMode + 2240 + -2110 + + false + true + true + + boolean + NONE + false + + false + + + 1753446312777 + CHECK_BOX + 0 + 100 + NO_DELIMETER + + + + + 1753446312783 + b_inEnergyHubMode + 2240 + -2130 + + false + true + true + + boolean + NONE + false + + false + + + 1753446312781 + CHECK_BOX + 0 + 100 + NO_DELIMETER + + + + + 1756395079958 + user + -670 + 130 + + false + false + true + + User + NONE + false + + 1756395079956 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1758028435828 + project_data + Should be filled with the Project_data record created in the startup of the project model + -670 + 90 + + false + false + true + + Project_data + NONE + false + + 1758028435826 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760978961206 + uI_Company + -250 + 480 + + false + false + true + + UI_company + NONE + false + + 1760978961204 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760978964017 + uI_Hydrogen + -250 + 520 + + false + false + true + + UI_Hydrogen + NONE + false + + 1760978964015 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760978968830 + uI_Battery + -250 + 560 + + false + false + true + + UI_Battery + NONE + false + + 1760978968828 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1760979190278 + uI_EnergyHub + -250 + 440 + + false + false + true + + UI_EnergyHub + NONE + false + + 1760979190276 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761118903683 + rb_scenarios + -1150 + 100 + + false + true + true + + ShapeRadioButtonGroup + NONE + false + + 1761118903681 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761119479237 + t_scenario_current + -1145 + 245 + + false + true + true + + String + NONE + false + + "Het huidige scenario bevat de energie dynamieken van dit moment. \n" + +"Dit omvat o.a. de huidige zonnepanelen, het aantal elektrische \n" + +"voertuigen in per buurt, de energie consumptie profielen van bedrijven \n" + +"en de huidige gasconsumptie voor verwarming." + + + 1761119479235 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761119479242 + t_scenario_future + -1140 + 290 + + false + true + true + + String + NONE + false + + "Het toekomstige scenario bevat de energie dynamieken van dit moment, \n" + +"plus de toekomst plannen van alle bedrijven die de enquete hebben \n" + +"ingevuld. Deze plannen kunnen bevatten: het instaleren van extra \n" + +"zonnepanelen, aangevraagde net uitbereiding, maar ook plannen voor \n" + +"het electrificeren van het transport." + + + 1761119479240 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761119827711 + t_scenario_custom + -1140 + 335 + + false + true + true + + String + NONE + false + + "" + + + 1761119827709 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1761134798639 + p_residentialScenario_Current + -1160 + 150 + + false + true + true + + J_SliderSettings_Residential + NONE + false + + 1761134798637 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1763657709730 + map_filterOptionUINames + Map that matches OL_FilterOptionsGC option with a user friendly name + -1560 + 90 + + false + true + true + + Map<OL_FilterOptionsGC, String> + NONE + false + + Map.of( +OL_FilterOptionsGC.COMPANIES, "Bedrijfspanden", +OL_FilterOptionsGC.HOUSES,"Woonhuizen", +OL_FilterOptionsGC.DETAILED,"Met bekende data", +OL_FilterOptionsGC.NONDETAILED,"Met geschatte data", +OL_FilterOptionsGC.HAS_PV,"Met zonnepanelen", +OL_FilterOptionsGC.HAS_TRANSPORT,"Met voertuigen", +OL_FilterOptionsGC.HAS_EV,"Met EV", +OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP,"In de aangewezen 'lus'", +OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD,"In de aangewezen 'buurt'", +OL_FilterOptionsGC.MANUAL_SELECTION, "Handmatige selectie" +) + + + 1763657709728 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1764772112998 + map_UINamesFilterOption + Map that matches the user friendly name with the OL_FilterOptionsGC option +-> This is created dynamically and a direct reverse copy of map_filterOptionUINames + -1560 + 110 + + false + true + true + + Map<String, OL_FilterOptionsGC> + NONE + false + + 1764772112996 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1765213300991 + p_defaultMainSliderGCName_solarfarm + 420 + 2050 + + false + true + true + + String + NONE + false + + "Main solarfarm slider" + + + 1765213300989 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1765213382483 + p_defaultMainSliderGCName_windfarm + 420 + 2070 + + false + true + true + + String + NONE + false + + "Main windfarm slider" + + + 1765213382481 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1765213390361 + p_defaultMainSliderGCName_battery + 420 + 2090 + + false + true + true + + String + NONE + false + + "Main battery slider" + + + 1765213390359 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1765213400597 + p_defaultEnergyHubSliderGCName_solarfarm + 420 + 2110 + + false + true + true + + String + NONE + false + + "EnergyHub solarfarm slider" + + + 1765213400595 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1765213400601 + p_defaultEnergyHubSliderGCName_windfarm + 420 + 2130 + + false + true + true + + String + NONE + false + + "EnergyHub windfarm slider" + + + 1765213400599 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1765213400605 + p_defaultEnergyHubSliderGCName_battery + 420 + 2150 + + false + true + true + + String + NONE + false + + "EnergyHub battery slider" + + + 1765213400603 + TEXT_BOX + 0 + 100 + NO_DELIMETER + + + + + 1707918668148 + c_GISNeighborhoods + -280 + 230 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1713429665418 + c_scenarioMap_Future + -280 + 340 + + false + true + true + + LinkedHashMap + String + J_scenario_Future + + + + 1713874283959 + c_scenarioMap_Current + -280 + 320 + + false + true + true + + LinkedHashMap + String + J_scenario_Current + + + + 1715178022675 + c_orderedVehicles + 510 + -710 + + false + true + true + + ArrayList + J_EA + String + + + + 1715183417595 + c_orderedHeatingSystemsCompanies + 510 + -650 + + false + true + true + + ArrayList + GCUtility + String + + + + 1715183423011 + c_orderedPVSystemsCompanies + 510 + -690 + + false + true + true + + ArrayList + GCUtility + String + + + + 1719176257019 + c_orderedHeatingSystemsHouses + 840 + -650 + + false + true + true + + ArrayList + GCHouse + String + + + + 1722344496313 + c_GISNetplanes + -280 + 210 + + false + true + true + + ArrayList + GISRegion + GISRegion + + + + 1721302080638 + c_selectedGridConnections + 50 + 1340 + + false + true + true + + ArrayList + GridConnection + String + + + + 1725276677836 + c_LVCables + -280 + 170 + + false + true + true + + ArrayList + GISRoute + String + + + + 1725276688077 + c_MVCables + -280 + 190 + + false + true + true + + ArrayList + GISRoute + String + + + + 1734442668540 + c_selectedFilterOptions + -1550 + 160 + + false + true + true + + ArrayList + OL_FilterOptionsGC + String + + + + 1734512815255 + c_previousSelectedObjects + 50 + 1530 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1734513139372 + c_selectedObjects + 50 + 1510 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1742226708562 + c_manualFilterDeselectedGC + -1530 + 555 + + false + true + true + + ArrayList + GridConnection + String + + + + 1742226748068 + c_manualFilterSelectedGC + -1530 + 535 + + false + true + true + + ArrayList + GridConnection + String + + + + 1742376749972 + c_filterSelectedGridLoops + -1530 + 410 + + false + true + true + + ArrayList + GridNode + String + + + + 1742376765347 + c_filterSelectedNeighborhoods + -1530 + 470 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1744886925970 + c_presentations + Would have to be filled by hand with all presentations that are (indirectly) on the interface canvas. eg: c_presentations.add(uI_Tabs_presentation) + true + -2020 + 210 + + false + true + true + + ArrayList + ShapeEmbeddedObjectPresentation + String + + + + 1749741070275 + c_orderedParkingSpaces + 510 + -630 + + false + true + true + + ArrayList + GIS_Object + String + + + + 1747300275742 + c_orderedPVSystemsHouses + 840 + -690 + + false + true + true + + ArrayList + GCHouse + String + + + + 1750078746618 + c_modelActiveSpecialGISObjects + 1390 + 1480 + + false + true + true + + LinkedHashSet + OL_GISObjectType + String + + + + 1750247117301 + c_orderedV1GChargers + 530 + -590 + + false + true + true + + ArrayList + J_EAChargePoint + String + + + + 1750089494475 + c_modelActiveParkingSpaceTypes + 1390 + 1500 + + false + true + true + + LinkedHashSet + OL_ParkingSpaceType + String + + + + 1750247117305 + c_orderedV2GChargers + 530 + -570 + + false + true + true + + ArrayList + J_EAChargePoint + String + + + + 1750156136377 + c_modelActiveDefaultGISBuildings + 1390 + 1460 + + false + true + true + + LinkedHashSet + OL_GISBuildingTypes + String + + + + 1750333680450 + c_orderedVehiclesPrivateParking + 510 + -530 + + false + true + true + + ArrayList + J_EAVehicle + String + + + + 1750335318608 + c_orderedPublicChargers + Niet laadpleinen, alleen losse palen + 510 + -610 + + false + true + true + + ArrayList + GCPublicCharger + String + + + + 1753087052979 + c_loadedMapOverlayTypes + 1920 + 1470 + + false + true + true + + ArrayList + OL_MapOverlayTypes + String + + + + 1753951769737 + c_orderedPTSystemsHouses + 510 + -670 + + false + true + true + + ArrayList + GCHouse + String + + + + 1756121323600 + c_mappingOfVehiclesPerCharger + 530 + -550 + + false + true + true + + LinkedHashMap + String + List<J_EADieselVehicle> + + + + 1756993771846 + c_UIResultsInstances + -290 + 650 + + false + true + true + + ArrayList + UI_Results + String + + + + 1760715323344 + c_additionalVehicles + 510 + -500 + + false + true + true + + LinkedHashMap + String + List<J_EAVehicle> + + + + 1763657607448 + c_cbFilterOptions + -1560 + 70 + + false + true + true + + ArrayList + OL_FilterOptionsGC + String + + + + + + 1658497469833 + e_calculateEnergyBalance + Trigger voor energieberekeningen in de model backbone. Volgorde is belangrijk voor consistente resultaten. + +@since: Sprint 6 +@author: Jorrit + -240 + 910 + + false + true + true + + + 1 + HOUR + + + 1/p_timeStep_h + PER_HOUR + + 1658477089965 + true + 1658563200000 + + 0 + HOUR + + + energyModel.p_timeStep_h + HOUR + + false + + // Trigger timestep in energymodel for continuous simulation ('interactive mode') +energyModel.f_runTimestep(); + + +// This function colors the trafos according to the amount of congestion. (maybe move this function call somewhere else?) +if ( b_updateLiveCongestionColors ){ + for (GridNode gn : energyModel.pop_gridNodes) { + if ((v_clickedObjectType != OL_GISObjectType.GRIDNODE || v_clickedGridNode != gn) && gn.p_energyCarrier == OL_EnergyCarriers.ELECTRICITY) { + f_setColorsBasedOnCongestion_gridnodes(gn, true); + } + } +} + + +// Update the NFATO values in the selected companyUI +if(c_selectedGridConnections.size() > 0 && c_selectedGridConnections.get(0).v_enableNFato){ + if(uI_Company.v_NFATO_active){ + uI_Company.f_getNFATOValues(); + } +} + +// Get the weather info +f_getWeatherInfo(); + + + 1743509682728 + e_setStartView + -660 + 265 + + false + true + true + + + 1 + HOUR + + + 1 + PER_HOUR + + 1658477089964 + true + 1743580800000 + + 0 + HOUR + + + 1 + HOUR + + false + + f_setStartView(); + + + + + VOID + double + 1696837759924 + f_setColorsBasedOnEnergyLabels + 1960 + 1870 + + false + true + true + + b + GIS_Object + + if (b.gisRegion != null){ + + OL_GridConnectionIsolationLabel buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.NONE; + + //Find the lowest energy label in the building + for(GridConnection GC : b.c_containedGridConnections){ + switch(GC.p_energyLabel){ + case A: + if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.A; + } + break; + case B: + if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.A){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.B; + } + break; + case C: + if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.B + || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.C){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.C; + } + break; + case D: + if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.E || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.F + || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.D; + } + break; + case E: + if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.F || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.E; + } + break; + case F: + if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.F; + } + break; + case G: + buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.G; + break; + } + } + + //Color building based on lowest energy label + switch(buildingLowestEnergyLabel){ + + case A: + b.gisRegion.setFillColor(v_energyLabelAColor); + break; + case B: + b.gisRegion.setFillColor(v_energyLabelBColor); + break; + case C: + b.gisRegion.setFillColor(v_energyLabelCColor); + break; + case D: + b.gisRegion.setFillColor(v_energyLabelDColor); + break; + case E: + b.gisRegion.setFillColor(v_energyLabelEColor); + break; + case F: + b.gisRegion.setFillColor(v_energyLabelFColor); + break; + case G: + b.gisRegion.setFillColor(v_energyLabelGColor); + break; + case NONE: + b.gisRegion.setFillColor(v_energyLabelUnknownColor); + break; + } +} + + + VOID + double + 1696863329251 + f_selectGISRegion + Function that selects gisregions after click on the map + 50 + 1060 + + false + true + true + + clickx + double + + + clicky + double + + //After a click, reset previous clicked building/gridNode colors and text +ArrayList<GIS_Object> buildingsConnectedToSelectedBuildingsList = new ArrayList<>(); + +//Deselect previous selection +f_deselectPreviousSelect(); + +//Check if click was on Gridnode, if yes, select grid node +for ( GridNode GN : energyModel.pop_gridNodes ){ + if( GN.gisRegion != null && GN.gisRegion.contains(clickx, clicky) && GN.gisRegion.isVisible() ){ + if(f_checkIfGCsAreAccesible(GN.f_getAllLowerLVLConnectedGridConnections())){ + f_selectGridNode(GN); + } + else{ + f_selectEnergyModel(); + } + return; + } +} + +//Check if click was on Building, if yes, select grid building +for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ + if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ + if (b.gisRegion.isVisible()) { //only allow us to click on visible objects + if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections + if(f_checkIfGCsAreAccesible(b.c_containedGridConnections)){ + buildingsConnectedToSelectedBuildingsList = b.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building + f_selectBuilding(b, buildingsConnectedToSelectedBuildingsList); + } + else{ + f_selectEnergyModel(); + } + return; + } + } + } +} + +//Check if click was on remaining objects such as chargers, solarfields, parcels: if yes, select object +for ( GIS_Object GISobject : energyModel.pop_GIS_Objects ){ + if( GISobject.gisRegion != null && GISobject.gisRegion.contains(clickx, clicky) ) { + if (GISobject.gisRegion.isVisible()) { //only allow us to click on visible objects + if (GISobject.c_containedGridConnections.size() > 0 ) { // only allow objects with gridconnections + if(f_checkIfGCsAreAccesible(GISobject.c_containedGridConnections)){ + // Find buildings powered by the same GC as the clicked object + buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; + + //Find the (first) connected GC in the object + GridConnection selectedGC = GISobject.c_containedGridConnections.get(0); + + //Set the selected GIS object type + v_clickedObjectType = GISobject.p_GISObjectType; + c_selectedObjects.add(GISobject); + + //Set the correct interface view for each object type + switch(v_clickedObjectType){ + + case CHARGER: + f_selectCharger((GCPublicCharger)selectedGC, GISobject ); + break; + + default: + buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building + f_selectBuilding(GISobject, buildingsConnectedToSelectedBuildingsList); + break; + } + } + else{ + f_selectEnergyModel(); + } + return; + } + } + } +} + +//Still no clicked object? : select energyModel +f_selectEnergyModel(); + + + VOID + double + 1702045084338 + f_styleAreas + -670 + 351 + + false + true + true + + gis_area + GIS_Object + + double width = 1; + +if (gis_area instanceof GIS_Parcel || + gis_area.c_containedGridConnections.size() == 0 || + gis_area.c_containedGridConnections.get(0) instanceof GCPublicCharger ) { + // Parcels, Chargers and GIS Objects without GCs are always the default color + gis_area.f_style(null, null, null, null); + return; +} + +//Get selected map overlay type, based on loaded order of the radio buttons +OL_MapOverlayTypes selectedMapOverlayType; +if(rb_mapOverlay != null){ + selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); +} +else{ + selectedMapOverlayType = OL_MapOverlayTypes.DEFAULT; +} +//Set the correct map overlay +switch(selectedMapOverlayType){ + case DEFAULT: + gis_area.f_style(null, null, null, null); + break; + case ELECTRICITY_CONSUMPTION: + if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { + f_setColorsBasedOnConsumptionProfileHouseholds(gis_area); + } + else { + f_setColorsBasedOnElectricityConsumption(gis_area); + } + break; + case PV_PRODUCTION: + f_setColorsBasedOnProduction(gis_area); + break; + case GRID_NEIGHBOURS: + f_setColorsBasedOnGridTopology_objects(gis_area); + break; + case CONGESTION: + f_setColorsBasedOnCongestion_objects(gis_area); + break; + case ENERGY_LABEL: + f_setColorsBasedOnEnergyLabels(gis_area); + break; + case PARKING_TYPE: + f_setColorsBasedOnParkingType_objects(gis_area); + break; +} + + + VOID + double + 1702385530773 + f_styleSimulationAreas + -670 + 331 + + false + true + true + + area + GIS_Object + + GISRegion gisregion = area.gisRegion; + +switch( area.p_GISObjectType ) { + case ANTI_LAYER: + gisregion.setVisible(true); + gisregion.setLineStyle( LINE_STYLE_SOLID ); + gisregion.setLineWidth( 0); + gisregion.setLineColor( v_antiLayerColor ); + gisregion.setFillColor( v_antiLayerColor ); + GISregion_antiLaag = gisregion; + + //Pas p_id aan naar een normale naam + area.p_id = "Buitengebied"; + break; + + default: + gisregion.setVisible(true); + gisregion.setLineColor( v_simulationArea1LineColor ); + gisregion.setLineStyle( LINE_STYLE_SOLID ); + gisregion.setLineWidth( 1); + gisregion.setFillColor( v_simulationArea1Color ); +} + + + VOID + double + 1705499586056 + f_styleGridNodes + -670 + 371 + + false + true + true + + GN + GridNode + + //Get selected map overlay type, based on loaded order of the radio buttons +OL_MapOverlayTypes selectedMapOverlayType; +if(rb_mapOverlay != null){ + selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); +} +else{ + selectedMapOverlayType = OL_MapOverlayTypes.DEFAULT; +} +//Set the correct map overlay +switch(selectedMapOverlayType){ + case DEFAULT: + case ELECTRICITY_CONSUMPTION: + case PV_PRODUCTION: + if(!b_updateLiveCongestionColors){ + switch( GN.p_nodeType ) { + case LVLV: + f_styleLVLV(GN.gisRegion); + break; + case MVLV: + f_styleMVLV(GN.gisRegion); + break; + case SUBMV: + f_styleSUBMV(GN.gisRegion); + break; + case MVMV: + f_styleMVMV(GN.gisRegion); + break; + case HVMV: + f_styleHVMV(GN.gisRegion); + break; + case HT: + + break; + case MT: + + break; + case LT: + + break; + default: + } + } + else{ + f_setColorsBasedOnCongestion_gridnodes(GN, true); + } + break; + case GRID_NEIGHBOURS: + f_setColorsBasedOnGridTopology_gridnodes(GN); + break; + case CONGESTION: + f_setColorsBasedOnCongestion_gridnodes(GN, false); + break; + case PARKING_TYPE: + f_setColorsBasedOnParkingType_gridnodes(GN); + break; +} + + + VOID + double + 1705505495599 + f_styleMVLV + -650 + 451 + + false + true + true + + gisregion + GISRegion + + gisregion.setLineStyle( LINE_STYLE_SOLID ); +gisregion.setLineColor( v_MVLVLineColor ); +gisregion.setLineWidth(2); +gisregion.setFillColor(v_MVLVNodeColor); + + + VOID + double + 1705505509120 + f_styleHVMV + -650 + 391 + + false + true + true + + gisregion + GISRegion + + gisregion.setFillColor(v_HVMVNodeColor); +gisregion.setLineStyle( LINE_STYLE_SOLID ); +gisregion.setLineColor( v_HVMVLineColor ); +gisregion.setLineWidth(2); +gisregion.setVisible(v_HVMVNodeIsVisible); + + + VOID + double + 1705925024602 + f_setUITabs + -670 + 601 + + false + true + true + //Create the tabs for the project +f_createUITabs_default(); + +//Initialize the uI_Tabs with the gridconnections +uI_Tabs.f_initializeUI_Tabs(energyModel.f_getGridConnectionsCollectionPointer(), energyModel.f_getPausedGridConnectionsCollectionPointer(), f_getMainInterfaceSliderEAGCs()); + +//Initialize sliders and start scenario with certain presets +b_runningMainInterfaceScenarios = true; +f_setSliderPresets(); +b_runningMainInterfaceScenarios = false; + +//Store the initial slider state for Residential areas for the scenario current button +if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { + f_storeResidentialScenario_Current(); +} + + + VOID + double + 1707918668161 + f_selectGridNode + 70 + 1100 + + false + true + true + + GN + GridNode + + v_clickedGridNode = GN; +v_clickedObjectType = OL_GISObjectType.GRIDNODE; + +//Disable the KPI summary (button) +uI_Results.getCheckbox_KPISummary().setSelected(false, true); +uI_Results.getCheckbox_KPISummary().setEnabled(false); + + +// 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; +} + +v_clickedObjectAdress = ""; +v_clickedObjectDetails = "Type station:\t" + GN.p_description; + + +// Color the GridNode +GN.gisRegion.setFillColor( v_selectionColor ); +GN.gisRegion.setLineColor( orange ); + +// Color the connected GridConnections +for ( GridConnection GC : GN.f_getAllLowerLVLConnectedGridConnections()){ + if (GC.c_connectedGISObjects.size() == 0){ + //traceln("Gridconnection with ID " + GC.p_ownerID + " and index " + GC.getIndex() + " has no GIS building"); + } + else { + GC.c_connectedGISObjects.forEach(gb -> gb.f_style(v_gridNodeFeedinColor, v_gridNodeFeedinColor, 2.0, null)); + } +} + +uI_Results.f_updateUIresultsGridNode(GN); + + + VOID + double + 1707918668163 + f_selectBuilding + 70 + 1120 + + false + true + true + + b + GIS_Object + + + buildingsConnectedToSelectedGC_list + ArrayList<GIS_Object> + + c_selectedObjects = new ArrayList<GIS_Object>(buildingsConnectedToSelectedGC_list); +v_clickedObjectType = b.p_GISObjectType; + +//Enable checkbox +uI_Results.getCheckbox_KPISummary().setEnabled(true); + +// Color all buildings of the GridConnection associated with the selected building +if (!c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.equals("-") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("woonfunctie") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("Onbekend")){ + for (GIS_Object obj : c_selectedObjects) { //Buildings that are grouped, select as well. + obj.gisRegion.setFillColor(v_selectionColorAddBuildings); + } +} + +//Check the number of GCs in building +v_nbGridConnectionsInSelectedBuilding = b.c_containedGridConnections.size(); + +//Multiple GC in building: set additional adress in building info + buttons +if ( v_nbGridConnectionsInSelectedBuilding > 1 ){ + v_selectedGridConnectionIndex = 0; + v_clickedObjectText = "Pand met " + b.c_containedGridConnections.size() + " adressen: " + b.p_id; + gr_multipleBuildingInfo.setVisible(true); +} +else { + String text = ""; + if (project_data.project_type() == OL_ProjectType.BUSINESSPARK) { + if (b instanceof GIS_Building) { + if(b.c_containedGridConnections.get(0).p_owner.p_detailedCompany){ + text = b.c_containedGridConnections.get(0).p_owner.p_actorID + ", "; + } + else if(b.p_annotation != null){ + text = b.p_annotation + ", "; + } + } + else { + text = b.p_id + ", "; + } + } + else{ + if(b.p_annotation != null){ + text = b.p_annotation + ", "; + } + else{ + text = b.p_id + ", "; + } + } + + //Set adres text + if (c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address == null || c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress() == null) { + text = text + "Onbekend adres"; + } + else { + text = text + c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress(); + } + + v_clickedObjectText = text; + gr_multipleBuildingInfo.setVisible(false); +} + + + +//Update the resultsUI +f_updateUIResultsData(); + +//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(); + + + + VOID + double + 1707918668165 + f_deselectPreviousSelect + 70 + 1080 + + false + true + true + v_previousClickedObjectType = v_clickedObjectType; +c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); +c_selectedGridConnections.clear(); +c_selectedObjects.clear(); + +if(v_previousClickedObjectType != null){ + // Update for results_ui when deselecting objects to show entire area again as default option + v_clickedObjectText = "None"; + v_clickedObjectAdress = ""; + v_clickedObjectDetails = ""; + v_clickedObjectType = null; + button_goToUI.setVisible(false); + gr_multipleBuildingInfo.setVisible(false); + + // We restore the colors of what we clicked on before + if (v_previousClickedObjectType == OL_GISObjectType.GRIDNODE){ + v_previousClickedGridNode = v_clickedGridNode; + f_styleGridNodes(v_clickedGridNode); + for ( Agent agent : v_previousClickedGridNode.f_getAllLowerLVLConnectedGridConnections()){ + if (agent instanceof GridConnection) { + GridConnection GC = (GridConnection)agent; + for (GIS_Object a : GC.c_connectedGISObjects) { + f_styleAreas(a); + } + } + } + } + else if (v_previousClickedObjectType == OL_GISObjectType.BUILDING || + v_previousClickedObjectType == OL_GISObjectType.SOLARFARM || + v_previousClickedObjectType == OL_GISObjectType.WINDFARM || + v_previousClickedObjectType == OL_GISObjectType.ELECTROLYSER || + v_previousClickedObjectType == OL_GISObjectType.BATTERY || + v_previousClickedObjectType == OL_GISObjectType.CHARGER || + v_previousClickedObjectType == OL_GISObjectType.PARKING){ + for(GIS_Object previousClickedObject: c_previousSelectedObjects){ + f_styleAreas(previousClickedObject); + } + } + + if(v_customEnergyCoop != null){ + energyModel.f_removeEnergyCoop(v_customEnergyCoop); + v_customEnergyCoop = null; + } +} + + + VOID + double + 1709716821854 + f_connectResultsUI + -670 + 780 + + false + true + true + //Style resultsUI +f_styleResultsUI(); + +//Set ResultsUI radiobutton setup +if(settings.resultsUIRadioButtonSetup() != null){ + uI_Results.v_selectedRadioButtonSetup = settings.resultsUIRadioButtonSetup(); +} + +//Disable summary button if summary is not selected +if(settings.showKPISummary() == null || !settings.showKPISummary()){ + uI_Results.getCheckbox_KPISummary().setVisible(false); +} + +//Connect resultsUI +uI_Results.f_initializeResultsUI(); + +c_UIResultsInstances.add(uI_Results); + + + VOID + double + 1709718252272 + f_resetSettings + -290 + 750 + + false + true + true + if(!b_runningMainInterfaceScenarios){ + b_resultsUpToDate = false; + + // Update asset flow categories of all agents + energyModel.f_updateActiveAssetsMetaData(); + + // Switch to the live plots and do not allow the user to switch away from the live plot when the year is not yet simulated + for (UI_Results ui_results : c_UIResultsInstances) { + if (ui_results.f_getSelectedObjectData() != null) { + f_enableLivePlotsOnly(ui_results); + } + } + + // On all screens cover the resultsUI Buttons with the simulate year button + f_setAllSimulateYearScreens(); + + runSimulation(); +} + + + VOID + double + 1714130288661 + f_initialPVSystemsOrder + 85 + -690 + + false + true + true + List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); +List<GCHouse> housesWithoutPV = houses.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); +List<GCHouse> housesWithPV = new ArrayList<>(houses); +housesWithPV.removeAll(housesWithoutPV); + +c_orderedPVSystemsHouses = new ArrayList<>(housesWithoutPV); +c_orderedPVSystemsHouses.addAll(housesWithPV); + + +List<GCUtility> companies = new ArrayList<GCUtility>(energyModel.UtilityConnections.findAll( x -> true)); +List<GCUtility> companiesWithoutPV = companies.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); +List<GCUtility> companiesWithPV = companies.stream().filter( gc -> gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); +List<GCUtility> detailedCompaniesWithPV = companiesWithPV.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); +List<GCUtility> genericCompaniesWithPV = new ArrayList<>(companiesWithPV); +genericCompaniesWithPV.removeAll(detailedCompaniesWithPV); + +c_orderedPVSystemsCompanies = new ArrayList<>(companiesWithoutPV); +c_orderedPVSystemsCompanies.addAll(genericCompaniesWithPV); +c_orderedPVSystemsCompanies.addAll(detailedCompaniesWithPV); + + + + + VOID + double + 1714130342440 + f_initialElectricVehiclesOrder + 85 + -710 + + false + true + true + // First we make a copy of all the vehicle energy assets +List<J_EA> EAs = new ArrayList<>(findAll(energyModel.f_getEnergyAssets(), ea -> !(ea.getParentAgent() instanceof GCPublicCharger))); +EAs = EAs.stream().filter(ea -> ea instanceof J_EAVehicle).collect(Collectors.toList()); +// Find all the EVs at the start of the simulation +ArrayList<J_EA> otherEAs = EAs.stream().filter(ea -> !(ea instanceof J_EAEV)).collect(Collectors.toCollection(ArrayList::new)); +// We make sure that the EVs at the start of the simulation are the last in the list + + +for(J_EA vehicle : EAs){ + if(vehicle instanceof J_EAEV && !(vehicle.getParentAgent() instanceof GCUtility)){ // Companies can not get lower EV then current situation + otherEAs.add((J_EAEV) vehicle); + } +} + +c_orderedVehicles = otherEAs; + + + VOID + double + 1714131269202 + f_initialHeatingSystemsOrder + 85 + -650 + + false + true + true + List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); +List<GCHouse> housesWithoutHP = houses.stream().filter( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP ).collect(Collectors.toList()); +List<GCHouse> housesWithHP = new ArrayList<>(houses); +housesWithHP.removeAll(housesWithoutHP); + +c_orderedHeatingSystemsHouses = new ArrayList<>(housesWithoutHP); +c_orderedHeatingSystemsHouses.addAll(housesWithHP); + +List<GCUtility> companies = new ArrayList<GCUtility>(energyModel.UtilityConnections.findAll( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE && gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.CUSTOM)); +List<GCUtility> companiesWithoutHP = companies.stream().filter( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP).collect(Collectors.toList()); +List<GCUtility> companiesWithHP = companies.stream().filter( gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP ).collect(Collectors.toList()); +List<GCUtility> detailedCompaniesWithHP = companiesWithHP.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); +List<GCUtility> genericCompaniesWithHP = new ArrayList<>(companiesWithHP); +genericCompaniesWithHP.removeAll(detailedCompaniesWithHP); + +c_orderedHeatingSystemsCompanies = new ArrayList<>(companiesWithoutHP); +c_orderedHeatingSystemsCompanies.addAll(genericCompaniesWithHP); +c_orderedHeatingSystemsCompanies.addAll(detailedCompaniesWithHP); + + + + + VOID + double + 1714135623471 + f_initialAssetOrdering + 70 + -730 + + false + true + true + f_initialElectricVehiclesOrder(); +f_initialPVSystemsOrder(); +f_initialPTSystemsOrder_households(); +f_initialHeatingSystemsOrder(); +f_initialParkingSpacesOrder(); +f_initialChargerOrder(); +f_initializePrivateAndPublicParkingCarsOrder(); +f_initializeAdditionalVehicles(); +f_projectSpecificOrderedCollectionAdjustments(); + + + + + VOID + double + 1715116336665 + f_setColorsBasedOnElectricityConsumption + 1960 + 1610 + + false + true + true + + gis_area + GIS_Object + + if(gis_area.c_containedGridConnections.size() > 0){ + + double yearlyEnergyConsumption = sum( gis_area.c_containedGridConnections, x -> x.v_rapidRunData.getTotalElectricityConsumed_MWh()); + + if ( yearlyEnergyConsumption < 10){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} + else if ( yearlyEnergyConsumption < 50){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} + else if ( yearlyEnergyConsumption < 150){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} + else if ( yearlyEnergyConsumption < 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} + else if ( yearlyEnergyConsumption > 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} +} + + + VOID + double + 1715118739710 + f_setColorsBasedOnProduction + 1960 + 1680 + + false + true + true + + gis_area + GIS_Object + + if (gis_area.c_containedGridConnections.size() > 0) { + + //Define medium PV Value + double mediumPVValue_kWp = 100; + if (project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + mediumPVValue_kWp = 5; + } + + //Calculate total pv capacity on the gis object + double totalPVCapacity_kWp = 0; + for(GridConnection GC : gis_area.c_containedGridConnections){ + totalPVCapacity_kWp += GC.v_liveAssetsMetaData.totalInstalledPVPower_kW; + } + + //Set color of object based on total pv capacity + if(totalPVCapacity_kWp == 0){ + gis_area.f_style(rect_mapOverlayLegend_PVProduction1.getFillColor(), null, null, null); + } + else if (totalPVCapacity_kWp < mediumPVValue_kWp){ + gis_area.f_style(rect_mapOverlayLegend_PVProduction2.getFillColor(), null, null, null); + } + else{ + gis_area.f_style(rect_mapOverlayLegend_PVProduction3.getFillColor(), null, null, null); + } +} + + + VOID + double + 1715157302225 + f_projectSpecificSettings + -660 + 240 + + false + false + true + //Should be overridden in child interface!!! +traceln("Forgot to override project specific settings!!"); + + + VOID + double + 1715859145993 + f_UIStartup + -670 + 180 + + false + true + true + // UI elements + +//Project specific settings +f_projectSpecificSettings(); + +// Initialize the slider Asset Ordering lists +f_initialAssetOrdering(); + +//Connect the results UI +f_connectResultsUI(); + +//Initialize the UITabs +f_setUITabs(); + +//Initialize scenario radio button +f_initializeScenarioRadioButton(); + +//Initialize the legend +f_initializeLegend(); + +//Initialize map overlay buttons +f_initializeMapOverlayRadioButton(); + +//Set ui button visibility false at startup +f_createAdditionalUIs(); +button_goToUI.setVisible(false); + +//Create and set the grid topology colors (Netvlakken) +f_setGridTopologyColors(); + +//Disable cable button if no cables have been loaded in +if(c_LVCables.size() == 0 && c_MVCables.size() == 0){ + checkbox_cabels.setVisible(false); +} + +//Set order of certain layovers and submenus +f_initializePresentationOrder(); + +//Set to public model version styling if activated +if(settings.isPublicModel() || user.GCAccessType != OL_UserGCAccessType.FULL){ + f_changeDefaultColorOfPrivateGC(); +} + +//Turn on update of live congestion colloring +b_updateLiveCongestionColors = true; + +//Set filter combo box options +f_setFilterComboBoxOptions(); + + + RETURNS_VALUE + GISRegion + 1715868403475 + f_createGISObject + Functino used by the loader to create new GIS objects on the GIS map + -280 + 90 + + false + true + true + + gisTokens + double[] + + GISRegion gisregion = new GISRegion(map, gisTokens); +return gisregion; + + + VOID + double + 1716419446045 + f_enableTraceln + -640 + -120 + + false + true + true + + originalPrintStream + PrintStream + + System.setOut(originalPrintStream); + + + RETURNS_VALUE + PrintStream + 1716419448047 + f_disableTraceln + -640 + -140 + + false + true + true + PrintStream originalPrintStream = System.out; + +System.setOut(new PrintStream(new OutputStream() { + public void write(int b) { + } + })); +return originalPrintStream; + + + VOID + double + 1718263685462 + f_setColorsBasedOnConsumptionProfileHouseholds + 1960 + 1630 + + false + true + true + + gis_area + GIS_Object + + double yearlyElectricityConsumption_kWh = 0; +for( GridConnection gc : gis_area.c_containedGridConnections){ + if(gc.v_rapidRunData != null){ + yearlyElectricityConsumption_kWh += gc.v_rapidRunData.getTotalElectricityConsumed_MWh()*1000; + } + else{ + for ( J_EAConsumption consumptionAsset : gc.c_consumptionAssets){ + if( consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND ){ + yearlyElectricityConsumption_kWh += consumptionAsset.yearlyDemand_kWh; + } + } + } +} + +if ( yearlyElectricityConsumption_kWh == 0) { gis_area.f_style( v_unknownConsumptionColor, null, null, null );} +else if ( yearlyElectricityConsumption_kWh < 1500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} +else if ( yearlyElectricityConsumption_kWh < 2500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} +else if ( yearlyElectricityConsumption_kWh < 4000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} +else if ( yearlyElectricityConsumption_kWh < 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} +else if ( yearlyElectricityConsumption_kWh > 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} + + + + + VOID + double + 1718288402102 + f_updateMainInterfaceSliders + -670 + 686 + + false + true + true + uI_Tabs.f_updateSliders(); + +if(uI_EnergyHub != null){ + uI_EnergyHub.uI_Tabs.f_updateSliders(); +} + + + VOID + double + 1718552624959 + f_selectCharger + 70 + 1140 + + false + true + true + + charger + GCPublicCharger + + + objectGIS + GIS_Object + + objectGIS.gisRegion.setFillColor( v_selectionColor ); +objectGIS.gisRegion.setLineColor( orange ); + +//set info text +v_clickedObjectText = ""; //charger.p_CPOName + " laadpunt, "; +if (charger.p_address == null || charger.p_address.getAddress() == null) { + v_clickedObjectAdress = "Onbekend adres"; +} +else{ + v_clickedObjectAdress = charger.p_address.getStreetName(); +} +v_clickedObjectDetails = "No detaild info of charger available"; + +//v_clickedGridConnection = charger; +c_selectedGridConnections = new ArrayList<GridConnection>(Arrays.asList(charger)); +uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + +//Set the UI button +f_setUIButton(); + + + VOID + double + 1718566260603 + f_setColorsBasedOnGridTopology_objects + 1960 + 1730 + + false + true + true + + gis_area + GIS_Object + + if (gis_area.c_containedGridConnections.size() > 0) { + Color c = gis_area.c_containedGridConnections.get(0).p_parentNodeElectric.p_uniqueColor; + gis_area.f_style(c, black, 1.0, null); +} + + + VOID + double + 1719830600300 + f_getWeatherInfo + 940 + -280 + + false + false + true + v_outsideTemperature = roundToDecimal(energyModel.pp_ambientTemperature_degC.getCurrentValue(), 1); +v_solarIrradiance = roundToInt(energyModel.pp_PVProduction35DegSouth_fr.getCurrentValue() * 1000); + +double windspeed = roundToDecimal(energyModel.pp_windProduction_fr.getCurrentValue(), 1); +if (windspeed < 0.2){ + v_windspeed = "Laag"; +} +else if (windspeed < 0.6){ + v_windspeed = "Midden"; +} +else if (windspeed < 0.8){ + v_windspeed = "Hoog"; +} +else { + v_windspeed = "Zeer hoog"; +} + + + VOID + double + 1720793723819 + f_updateUIResultsData + 80 + 1160 + + false + true + true + for (GridConnection gc : c_selectedObjects.get(0).c_containedGridConnections) { + if (!c_selectedGridConnections.contains(gc)) { + c_selectedGridConnections.add(gc); + } +} + +if(c_selectedGridConnections.size()>1){ + v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); + uI_Results.f_updateResultsUI(v_customEnergyCoop); +} +else{ + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); +} + + + + VOID + double + 1721991420806 + f_setGridTopologyColors + -650 + 491 + + false + true + true + //Find all MV substations +List<GridNode> MVsubstations = findAll(energyModel.pop_gridNodes, GN -> GN.p_nodeType == OL_GridNodeType.SUBMV); + +if(MVsubstations.size() > 0 || project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + b_gridLoopsAreDefined = true; +} + +v_amountOfDefinedGridLoops = 0; + +if(MVsubstations != null){ + //Set all unique grid topology colors for each substation and its children if the gridloops are defined + for (GridNode MVsub : MVsubstations){ + + //Create a unique color from a spectrum and assign it to the subMV + MVsub.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, MVsubstations.size()); + + //Assign unique color to all underlying grid nodes + MVsub.f_getLowerLVLConnectedGridNodes().forEach(GN -> GN.p_uniqueColor = MVsub.p_uniqueColor); + + //Update spectrum color index and total defined colours + v_amountOfDefinedGridLoops++; + } +} +else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + int totalNotToplevelGridNodes = energyModel.f_getGridNodesNotTopLevel().size(); + //Set all unique grid topology colors for each substation and its children if the gridloops are defined + for (GridNode node : energyModel.f_getGridNodesNotTopLevel()){ + + //Create a unique color from a spectrum and assign it to the subMV + node.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, totalNotToplevelGridNodes); + + //Update spectrum color index and total defined colours + v_amountOfDefinedGridLoops++; + } +} + + + VOID + double + 1721991963719 + f_styleSUBMV + -650 + 431 + + false + true + true + + gisregion + GISRegion + + gisregion.setVisible(false); + + + VOID + double + 1721992103665 + f_styleMVMV + -650 + 411 + + false + true + true + + gisregion + GISRegion + + gisregion.setFillColor(v_MVMVNodeColor); +gisregion.setLineStyle( LINE_STYLE_SOLID ); +gisregion.setLineColor( v_MVMVLineColor ); +gisregion.setLineWidth(2); + + + VOID + double + 1721049341787 + f_listFunctions + 80 + 1180 + + false + true + true + if(c_selectedObjects.get(0).c_containedGridConnections.size() > 1){ + HashMap<String, Integer> functionsList = new HashMap<String, Integer>(); + + for (int i = 0; i < c_selectedObjects.get(0).c_containedGridConnections.size(); i++) { + //split functies als er meerdere zijn + String[] splitFunctions = c_selectedObjects.get(0).c_containedGridConnections.get(i).p_purposeBAG.split(","); + + for (int j = 0; j < splitFunctions.length; j++) { + // als de key al bestaat, itereer + if (functionsList.get(splitFunctions[j]) != null) { + functionsList.put(splitFunctions[j], functionsList.get(splitFunctions[j]) + 1); + } + // zo niet, voeg toe + else { + functionsList.put(splitFunctions[j],1); + } + } + } + + /* + for (String i : functionsList.keySet()) { + traceln(i + ": " + functionsList.get(i)); + } + */ +} + + + VOID + double + 1725006890451 + f_setUIButton + 80 + 1200 + + false + true + true + switch(v_clickedObjectType){ + +case BUILDING: + if (c_selectedGridConnections.size() > 1 || !(c_selectedGridConnections.get(0) instanceof GCUtility) || !c_selectedGridConnections.get(0).v_isActive){ + button_goToUI.setVisible(false); + } + else{ + button_goToUI.setText("Ga naar het Bedrijfsportaal"); + button_goToUI.setVisible(true); + } + break; + +case ELECTROLYSER: + button_goToUI.setText("Ga naar het Waterstof Dashboard"); + button_goToUI.setVisible(true); + break; + +case BATTERY: + button_goToUI.setText("Ga naar het Batterijen Dashboard"); + button_goToUI.setVisible(true); + break; + +case CHARGER: + button_goToUI.setVisible(false); + break; + +default: + button_goToUI.setVisible(false); + break; +} + + + + RETURNS_VALUE + GISRoute + 1725266804325 + f_createGISLine + -280 + 110 + + false + true + true + + GISCoords + double[] + + + objectType + OL_GISObjectType + + +Curve curve = new Curve(); +for(int i = 0; i+3 < GISCoords.length; i += 2){ + GISMarkupSegmentLine segment = new GISMarkupSegmentLine(GISCoords[i], GISCoords[i+1], GISCoords[i+2], GISCoords[i+3]); + curve.addSegment(segment); +} + +//Create route (line) +GISRoute gisroute = new GISRoute(map, curve, true); + +//Object styling +switch(objectType){ + + case LV_CABLE: + c_LVCables.add(gisroute); + //Styling + gisroute.setLineStyle(LINE_STYLE_SOLID); + gisroute.setLineWidth(0.8); + gisroute.setLineColor(v_LVGridColor); + gisroute.setVisible(false); + break; + + case MV_CABLE: + c_MVCables.add(gisroute); + //Styling + gisroute.setLineStyle(LINE_STYLE_SOLID); + gisroute.setLineWidth(1); + gisroute.setLineColor(v_MVGridColor); + gisroute.setVisible(false); + break; +} + +return gisroute; + + + + VOID + double + 1725968656820 + f_setColorsBasedOnGridTopology_gridnodes + 1960 + 1750 + + false + true + true + + GN + GridNode + + if(GN.gisRegion != null){ + GN.gisRegion.setFillColor(GN.p_uniqueColor); + GN.gisRegion.setLineColor(GN.p_uniqueColor.brighter()); +} + + + VOID + double + 1725977409304 + f_setSliderPresets + -650 + 661 + + false + false + true + //Should be overridden in child interface!!! +traceln("Forgot to override project specific slider settings!!"); + + + VOID + double + 1726068314849 + f_projectSpecificStyling + -660 + 220 + + false + true + true + //Function used to set the colors, styling, and other parameters/functions for each specific project +//Should be overridden!! +traceln("DID NOT OVERRIDE THE PROJECT SPECIFIC STYLING!"); + + + VOID + double + 1729685968993 + f_projectSpecificOrderedCollectionAdjustments + 86 + -550 + + false + true + true + //Function that can be used to make project specific adjustments to the ordered collection +//SHOULD BE OVERRIDEN IF YOU WANT TO USE THIS + + + VOID + double + 1734442458629 + f_applyFilter + -1575 + 210 + + false + true + true + + selectedFilter + OL_FilterOptionsGC + + + selectedFilterName + String + + c_selectedFilterOptions.add(selectedFilter); + +ArrayList<GridConnection> toBeFilteredGC = new ArrayList<GridConnection>(); + +if(c_selectedFilterOptions.size()>1 && c_selectedGridConnections.size()> 0){ // Already filtering + toBeFilteredGC = new ArrayList<GridConnection>(c_selectedGridConnections); +} +else{ // First filter + toBeFilteredGC = new ArrayList<GridConnection>(energyModel.f_getActiveGridConnections()); +} + +//After a filter selecttion, reset previous clicked building/gridNode colors and text +f_deselectPreviousSelect(); + + +//Can filter return 0? (Only allowed for filters who are not inmediately active (gridLoops, nbh, etc.) +boolean filterCanReturnZero = false; + +switch(selectedFilter){ + case COMPANIES: + f_filterCompanies(toBeFilteredGC); + break; + + case HOUSES: + f_filterHouses(toBeFilteredGC); + break; + + case DETAILED: + f_filterDetailed(toBeFilteredGC); + break; + + case NONDETAILED: + f_filterEstimated(toBeFilteredGC); + break; + + case HAS_PV: + f_filterHasPV(toBeFilteredGC); + break; + + case HAS_TRANSPORT: + f_filterHasTransport(toBeFilteredGC); + break; + + case HAS_EV: + f_filterHasEV(toBeFilteredGC); + break; + + case GRIDTOPOLOGY_SELECTEDLOOP: + if(!c_filterSelectedGridLoops.isEmpty()){ + f_filterGridLoops(toBeFilteredGC); + } + else{ + + f_setForcedClickScreenText("Selecteer een lus"); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(true); + } + + if(c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.GRID_NEIGHBOURS)){ + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.GRID_NEIGHBOURS),true); + } + if(c_selectedFilterOptions.size() > 1){ + c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); + } + else{ + filterCanReturnZero = true; + } + } + break; + + case SELECTED_NEIGHBORHOOD: + if(!c_filterSelectedNeighborhoods.isEmpty()){ + f_filterNeighborhoods(toBeFilteredGC); + } + else{ + f_setForcedClickScreenText("Selecteer een buurt"); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(true); + } + if(c_selectedFilterOptions.size() > 1){ + c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); + } + else{ + filterCanReturnZero = true; + } + } + break; + case MANUAL_SELECTION: + if(c_manualFilterSelectedGC.size() > 0){ + f_filterManualSelection(toBeFilteredGC); + } + else if(c_selectedFilterOptions.size() > 1){ + if(c_manualFilterDeselectedGC.size() > 0){ + f_filterManualSelection(toBeFilteredGC); + } + else{ + c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); + } + } + else{ + filterCanReturnZero = true; + } + + break; +} + +if(c_selectedGridConnections.size() == 0 && !filterCanReturnZero){ // Not allowed to return zero, while returning zero + f_removeFilter(selectedFilter, selectedFilterName); + + //Notify filter has not been applied, cause no results are given + f_setErrorScreen("Geselecteerde filter geeft geen resultaten. De filter is gedeactiveerd.", 0, 0); +} +else if(c_selectedGridConnections.size() == 0 && filterCanReturnZero){//Allowed to return zero filtered gc, while returning zero + //Do nothing +} +else{//Filtered GC returns GC + + //Set color of all gis objects of new filter selection + v_clickedObjectType = OL_GISObjectType.BUILDING; + + for (GridConnection GC: c_selectedGridConnections){ + for (GIS_Object objectGIS : GC.c_connectedGISObjects) { + objectGIS.gisRegion.setFillColor(v_selectionColorAddBuildings); + c_selectedObjects.add(objectGIS); + } + } + + //Set graphs + if(c_selectedGridConnections.size()>1){ + v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); + uI_Results.f_updateResultsUI(v_customEnergyCoop); + } + else{ + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + } +} + + + VOID + double + 1734442462084 + f_setFilter + -1575 + 140 + + false + true + true + + selectedFilter + OL_FilterOptionsGC + + String selectedFilterName = map_filterOptionUINames.get(selectedFilter); + +//Remove manual filter first +if(selectedFilter != OL_FilterOptionsGC.MANUAL_SELECTION && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + button_removeManualSelection.action(); +} + +if(!selectedFilterName.equals("-") && !c_selectedFilterOptions.contains(selectedFilter)){ // Set filter + traceln("Geselecteerde filter ( " + selectedFilterName + " ) toegevoegd."); + t_activeFilters.setText( t_activeFilters.getText() + selectedFilterName + "\n"); + f_applyFilter(selectedFilter, selectedFilterName); +} +else if(c_selectedFilterOptions.contains(selectedFilter)){ // Remove filter + f_removeFilter(selectedFilter, selectedFilterName); +} + + + VOID + double + 1734445008646 + f_removeAllFilters + -1570 + 605 + + false + true + true + c_selectedFilterOptions.clear(); +t_activeFilters.setText(""); + +//Deselect everything and set region as main +f_clearSelectionAndSelectEnergyModel(); + + + VOID + double + 1734447122780 + f_selectGridLoop + -1530 + 390 + + false + true + true + + clickx + double + + + clicky + double + + +//Check if click was on Building, if yes, select grid building +for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ + if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ + if (b.gisRegion.isVisible()) { //only allow us to click on visible objects + if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections + GridConnection clickedGridConnection = b.c_containedGridConnections.get(0); // Find buildings powered by the same GC as the clicked building + GridNode clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; + ArrayList<GridNode> allGridNodes = new ArrayList<GridNode>(energyModel.f_getGridNodesTopLevel()); + allGridNodes.addAll(energyModel.f_getGridNodesNotTopLevel()); + + while( clickedGridConnectionConnectedGridNode.p_parentNodeID != null && + clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.SUBMV && + clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.MVMV && + clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.HVMV + ){ + String parentNodeName = clickedGridConnectionConnectedGridNode.p_parentNodeID; + if(parentNodeName != null && !parentNodeName.equals("-") && !parentNodeName.equals("")){ + clickedGridConnectionConnectedGridNode = findFirst(allGridNodes, GN -> GN.p_gridNodeID.equals(parentNodeName)); + } + else{ // At top node --> select the directly attached grid node instead, and break out of while loop. + clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; + break; + } + } + + //This deselect the previous selection of gridloops + f_setFilter(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP); + + if(c_filterSelectedGridLoops.contains(clickedGridConnectionConnectedGridNode)){ + c_filterSelectedGridLoops.remove(clickedGridConnectionConnectedGridNode); + } + else{ + c_filterSelectedGridLoops.add(clickedGridConnectionConnectedGridNode); + } + + if(gr_forceMapSelection.isVisible()){ + f_setForcedClickScreenText(""); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); + } + } + + //This selects the new selection of gridloops + f_setFilter(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP); + + return; + + } + } + } +} + + + + VOID + double + 1734448628428 + f_filterCompanies + -1550 + 230 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC instanceof GCUtility)); + + + + + VOID + double + 1734448687355 + f_filterHouses + -1550 + 250 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC instanceof GCHouse)); + + + + + VOID + double + 1734448688472 + f_filterDetailed + -1550 + 270 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.p_owner.p_detailedCompany)); + + + + VOID + double + 1734448689519 + f_filterEstimated + -1550 + 290 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> !GC.p_owner.p_detailedCompany)); + + + + VOID + double + 1734448690487 + f_filterHasPV + -1550 + 310 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(); +for(GridConnection GC : toBeFilteredGC){ //Find all GC with PV AND a gis region (to prevent selecting slider PVGC) + if(GC.c_connectedGISObjects.size() > 0 && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ + c_selectedGridConnections.add(GC); + } +} + + + VOID + double + 1734448691508 + f_filterHasTransport + -1550 + 330 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.c_vehicleAssets.size() > 0)); + + + + + VOID + double + 1734451505770 + f_removeFilter + -1575 + 185 + + false + true + true + + selectedFilter + OL_FilterOptionsGC + + + selectedFilterName + String + + c_selectedFilterOptions.remove(selectedFilter); + +ArrayList<OL_FilterOptionsGC> toBeReappliedFilters = new ArrayList<OL_FilterOptionsGC>(c_selectedFilterOptions); +c_selectedFilterOptions.clear(); + +if(toBeReappliedFilters.size() > 0){ + for(OL_FilterOptionsGC filterOption : toBeReappliedFilters){ + f_applyFilter(filterOption, selectedFilterName); + } + String toBeAdjustedFilterText = t_activeFilters.getText(); + String newActiveFilterText = toBeAdjustedFilterText.replace(selectedFilterName + "\n", ""); + t_activeFilters.setText(newActiveFilterText); + + traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); +} +else{ // All filters removed + traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); + f_removeAllFilters(); +} + + + VOID + double + 1734517589341 + f_filterGridLoops + -1550 + 370 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + HashSet<GridConnection> gridConnectionsOnLoop = new HashSet<GridConnection>(); + +for(GridNode GridLoop : c_filterSelectedGridLoops) + if(b_gridLoopsAreDefined){ + OL_GridNodeType loopTopNodeType= GridLoop.p_nodeType; + switch(loopTopNodeType){ + case MVLV: + for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + break; + case SUBMV: + for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + break; + + case MVMV: + for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + + break; + + case HVMV: + for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + break; + } + } + else{ + for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ + if(toBeFilteredGC.contains(GC)){ + gridConnectionsOnLoop.add(GC); + } + } + } + +c_selectedGridConnections = new ArrayList<>(gridConnectionsOnLoop); + + + VOID + double + 1736344958050 + f_setErrorScreen + 3410 + 930 + + false + true + true + + errorMessage + String + + + xOffset + double + + + yOffset + double + + gr_errorScreen.setPos(xOffset, yOffset); + +//Reset location and height +button_errorOK.setY(550); +rect_errorMessage.setY(380); +rect_errorMessage.setHeight(200); +t_errorMessage.setY(430); + +//Set position above all other things +f_setShapePresentationOnTop(gr_errorScreen); + +int width_numberOfCharacters = 44; + +// Set Text +Pair<String, Integer> p = v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); +errorMessage = p.getFirst(); +int numberOfLines = p.getSecond(); +int additionalLines = max(0, numberOfLines - 3); + +// Set Size +rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); +rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); +//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); +t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); + +t_errorMessage.setText(errorMessage); +gr_errorScreen.setVisible(true); + + + VOID + double + 1736442051389 + f_styleResultsUI + -650 + 800 + + false + true + true + uI_Results.f_styleResultsUIHeader(zenmocolor_blue3.getFillColor(), zenmocolor_blue3.getFillColor(), 1.0, LINE_STYLE_SOLID); +uI_Results.f_styleAllCharts(v_backgroundColor, zenmocolor_blue3.getFillColor(), 1.0, LINE_STYLE_SOLID); + + + VOID + double + 1737653178011 + f_selectNeighborhood + -1530 + 450 + + false + true + true + + clickx + double + + + clicky + double + + +//Check if click was on Building, if yes, select grid building +for ( GIS_Object region : c_GISNeighborhoods ){ + if( region.gisRegion != null && region.gisRegion.contains(clickx, clicky) ){ + if (region.gisRegion.isVisible()) { //only allow us to click on visible objects + + GIS_Object clickedNeighborhood = region; + + + //This deselects the previous selected neighborhood filter + f_setFilter(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD); + + if(c_filterSelectedNeighborhoods.contains(clickedNeighborhood)){ + c_filterSelectedNeighborhoods.remove(clickedNeighborhood); + } + else{ + c_filterSelectedNeighborhoods.add(clickedNeighborhood); + } + + if(gr_forceMapSelection.isVisible()){ + f_setForcedClickScreenText(""); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); + } + } + //This sets the new selected neighborhoods filter + f_setFilter(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD); + + return; + } + } +} + + + + VOID + double + 1737653178013 + f_filterNeighborhoods + -1550 + 430 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + ArrayList<GridConnection> gridConnectionsInNeighborhood = new ArrayList<GridConnection>(); + +for(GridConnection GC : toBeFilteredGC){ + for(GIS_Object nbh : c_filterSelectedNeighborhoods) + if( nbh.gisRegion.contains(GC.p_latitude, GC.p_longitude) ){ + gridConnectionsInNeighborhood.add(GC); + } +} + +//If NBH results in zero GC, remove last added nbh +if(gridConnectionsInNeighborhood.isEmpty() && !c_filterSelectedNeighborhoods.isEmpty()){ + c_filterSelectedNeighborhoods.remove(c_filterSelectedNeighborhoods.size() - 1); +} + +c_selectedGridConnections = new ArrayList<>(gridConnectionsInNeighborhood); + + + VOID + double + 1740043548084 + f_enableLivePlotsOnly + -270 + 770 + + false + true + true + + resultsUI + UI_Results + + if (resultsUI.f_getSelectedObjectData() != null) { + if(resultsUI.getGr_resultsUIHeader().isVisible()){ + resultsUI.getRadioButtons().setValue(0, true); + } + resultsUI.chartProfielen.getPeriodRadioButton().setValue(0, true); + resultsUI.f_enableNonLivePlotRadioButtons(false); +} +for (ShapeRadioButtonGroup rb :resultsUI.chartProfielen.getAllPeriodRadioButtons()) { + rb.setValue(0, false); +} +resultsUI.chartProfielen.getPeriodRadioButton().setValue(0, true); + +resultsUI.f_enableNonLivePlotRadioButtons(false); + + + VOID + double + 1742226689515 + f_filterManualSelection + -1550 + 495 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + ArrayList<GridConnection> resultingGridConnectionSelection = new ArrayList<GridConnection>(); + +if(c_selectedFilterOptions.size() > 1){ + resultingGridConnectionSelection.addAll(toBeFilteredGC); +} +else{//Manual selection is the only active filter -> Resulting grid connection selection should start empty +} + +for(GridConnection manualSelectedGC : c_manualFilterSelectedGC){ + if(!resultingGridConnectionSelection.contains(manualSelectedGC)){ + resultingGridConnectionSelection.add(manualSelectedGC); + } +} +for(GridConnection manualDeselectedGC : c_manualFilterDeselectedGC){ + if(resultingGridConnectionSelection.contains(manualDeselectedGC)){ + resultingGridConnectionSelection.remove(manualDeselectedGC); + } +} + + +c_selectedGridConnections = new ArrayList<>(resultingGridConnectionSelection); + + + VOID + double + 1742226787560 + f_selectManualFilteredGC + -1530 + 515 + + false + true + true + + clickx + double + + + clicky + double + + //Initialize clickedObject +GIS_Object clickedObject = null; + +//Check if click was on Building, if yes, select building +for ( GIS_Object object : energyModel.pop_GIS_Buildings ){//pop_GIS_Buildings + if( object.gisRegion != null && object.gisRegion.contains(clickx, clicky) ){ + if (object.gisRegion.isVisible()) { //only allow us to click on visible objects + if (object.c_containedGridConnections.size() > 0 ){ + clickedObject = object; + break; + } + } + } +} + +//If click was not on a building, check if click was on an EA, if yes, select EA +if(clickedObject == null){ + for ( GIS_Object object : energyModel.pop_GIS_Objects ){//pop_GIS_Buildings + if( object.gisRegion != null && object.gisRegion.contains(clickx, clicky) ){ + if (object.gisRegion.isVisible()) { //only allow us to click on visible objects + if (object.c_containedGridConnections.size() > 0 ){ + clickedObject = object; + break; + } + } + } + } +} + +//If a building or EA has been selected perform click functionality +if(clickedObject != null){ + boolean select = true; // Deselect == false; + boolean removedFromSelectedGC = false; + boolean removedFromDeselectedGC = false; + + ArrayList<GridConnection> clickedGridConnections = new ArrayList<GridConnection>(clickedObject.c_containedGridConnections); + + for (GridConnection clickedGC : clickedGridConnections){ + if(c_selectedGridConnections.contains(clickedGC)){ + c_selectedGridConnections.remove(clickedGC); + select = false; + } + + if(c_manualFilterSelectedGC.contains(clickedGC)){ + c_manualFilterSelectedGC.remove(clickedGC); + } + else if(c_manualFilterDeselectedGC.contains(clickedGC)){ + c_manualFilterDeselectedGC.remove(clickedGC); + } + } + + if(select){ + c_selectedGridConnections.addAll(clickedGridConnections); + c_manualFilterSelectedGC.addAll(clickedGridConnections); + traceln("Handmatig geselecteerd object toegevoegd aan selectie"); + } + else{ + c_manualFilterDeselectedGC.addAll(clickedGridConnections); + traceln("Handmatig geselecteerd object verwijderd van selectie"); + } + + + //Disable traceln + PrintStream originalPrintStream = f_disableTraceln(); + + //This deactivates the previous selection + f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); + + //This activates the new selection + f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); + + //Enable traceln + f_enableTraceln(originalPrintStream); + + return; +} + + + VOID + double + 1742300624199 + f_setForcedClickScreenText + 140 + -880 + + false + true + true + + forcedClickScreenText + String + + t_forcedClickMessage.setText(forcedClickScreenText); + +if(t_forcedClickMessage.getText().equals("")){ + gr_ForceMapSelectionText.setVisible(false); +} +else{ + gr_ForceMapSelectionText.setVisible(true); +} + + + VOID + double + 1743509491686 + f_setMapViewBounds + -640 + -90 + + false + true + true + + GISObjects + List<GIS_Object> + + // Initialize min and max values +double minLat = Double.MAX_VALUE; +double maxLat = Double.MIN_VALUE; +double minLon = Double.MAX_VALUE; +double maxLon = Double.MIN_VALUE; + +// Loop through all GISRegions and find the bounding box +for(GIS_Object go : GISObjects){ + + GISRegion region = go.gisRegion; + double[] points = region.getPoints(); // Get the boundary points of the region + + for (int i = 0; i < points.length; i += 2) { // i+=2 because data is in lat, lon pairs + double lat = points[i]; // Latitude + double lon = points[i + 1]; // Longitude + + + + // Update min/max latitude and longitude + minLat = Math.min(minLat, lat); + maxLat = Math.max(maxLat, lat); + minLon = Math.min(minLon, lon); + maxLon = Math.max(maxLon, lon); + } +} + +//Make it slightly bigger, so it isnt exact on the line of the regions +minLat = minLat - 0.0001; +maxLat = maxLat + 0.0001; +minLon = minLon - 0.0001; +maxLon = maxLon + 0.0001; + +// Set the map to fit the calculated bounds +map.fitBounds(minLat, minLon, maxLat, maxLon); + + + VOID + double + 1743518032245 + f_setStartView + -640 + 285 + + false + true + true + //traceln("f_setStartView() reached!"); + +if(project_data.map_centre_latitude() != null && project_data.map_centre_longitude() != null && project_data.map_centre_latitude() != 0 && project_data.map_centre_longitude() != 0){ + map.setCenterLatitude(project_data.map_centre_latitude()); + map.setCenterLongitude(project_data.map_centre_longitude()); +} +else{ + ArrayList<GIS_Object> gisObjects_for_mapViewBounds = new ArrayList<GIS_Object>(); + if((settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0) && findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION).size() > 0){ + gisObjects_for_mapViewBounds.addAll(findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION)); + } + else{ + for (GIS_Object building : energyModel.pop_GIS_Buildings) { + if(building.gisRegion.isVisible()){ + gisObjects_for_mapViewBounds.add(building); + } + } + } + f_setMapViewBounds(gisObjects_for_mapViewBounds); +} + +if(project_data.map_scale() != null){ + map.setMapScale(project_data.map_scale()); +} + +va_Interface.navigateTo(); +v_currentViewArea = va_Interface; + + + VOID + double + 1743665953113 + f_setInfoText + -2010 + 120 + + false + true + true + + infoBubble + ShapeImage + + + descriptionText + String + + + xPosition + double + + + yPosition + double + + if ( p_currentActiveInfoBubble.size() > 0 && p_currentActiveInfoBubble.get(0) == infoBubble ) { + // If we click a second time on the same bubble it should close the window + p_currentActiveInfoBubble.clear(); + gr_infoText.setVisible(false); +} +else { + p_currentActiveInfoBubble.clear(); + p_currentActiveInfoBubble.add(infoBubble); + + int width_ch = 50; + // Set Text + Pair<String, Integer> p = v_infoText.restrictWidth(descriptionText, width_ch); + t_infoTextDescription.setText(p.getFirst()); + + // Set Size + rect_infoText.setWidth(width_ch * 7.5); // about 7.5 px per char for sans serif 14 pt + rect_infoText.setHeight(50 + p.getSecond() * 20); // about 50 px for title and 20 px per line for sans serif 14 pt + + // Set Position + // The group position is on the top left, not the centre. + double margin_px = 15; + //double posX = f_getAbsolutePosition(infoBubble).getX(); + //double posY = f_getAbsolutePosition(infoBubble).getY(); + if (xPosition < (v_currentViewArea.getX() + v_currentViewArea.getWidth()/2) ) { + // bubble is on the left half, so text should appear to the right + gr_infoText.setX( xPosition + margin_px + infoBubble.getWidth()/2); + } + else { + // bubble is on the right half, so text should appear to the left + gr_infoText.setX( xPosition - margin_px + infoBubble.getWidth()/2 - rect_infoText.getWidth()); + } + + // In AnyLogic the Y-Axis is inverted + if (yPosition > (v_currentViewArea.getY() + v_currentViewArea.getHeight()/2) ) { + // bubble is on the bottom half, so text should appear above + gr_infoText.setY( yPosition - margin_px + infoBubble.getHeight()/2 - rect_infoText.getHeight()); + } + else { + // bubble is on the top half, so text should appear below + gr_infoText.setY( yPosition + margin_px + infoBubble.getHeight()/2); + } + + // Position of close button + gr_closeInfoText.setX( width_ch * 7.5 - 20 ); // 20 px offset from the right hand side + + gr_infoText.setVisible(true); +} + + + RETURNS_VALUE + Pair<ShapeGroup, Point> + 1744894817569 + f_getGroupPositionIteration + true + -1980 + 265 + + false + true + true + + pair + Pair<ShapeGroup, Point> + + return new Pair(pair.getFirst().getGroup(), new Point(pair.getFirst().getX() + pair.getSecond().getX(), pair.getFirst().getY() + pair.getSecond().getY())); + + + RETURNS_VALUE + Point + 1744894817571 + f_getAbsolutePosition + true + -2000 + 240 + + false + true + true + + shape + Shape + + // Note: Only works if the Agent is not living in the space of the interface! + +// Start with the shape position +Point point = new Point(shape.getX(), shape.getY()); +traceln("point0: " + point); + +// Find presentation the shape is in to get the offset. +if (shape.getPresentable() == this) { + // The shape is on this canvas, no additional offset +} +else { + // The shape is in a (possibly nested) presentation + traceln("shape.getPresentable(): " + shape.getPresentable()); + traceln("shapetoplevel: " + shape.getPresentable().getPresentationShape()); + for (ShapeEmbeddedObjectPresentation ap : c_presentations) { + traceln("AP: " + ap); + traceln("AG: " + ap.getEmbeddedObject()); + } + ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable()); + if (presentation == null) { + throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); + } + traceln("point1: " + point); + + point.add( new Point(presentation.getX(), presentation.getY()) ); + // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. + traceln("point2: " + point); + + point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); + + traceln("point3: " + point); + Pair<ShapeEmbeddedObjectPresentation, Point> pair = new Pair(presentation, point); + while ( pair.getFirst().getPresentable() != this ) { + pair = f_getPresentationPositionIteration(pair); + traceln("pair: " + pair); + traceln("point_i: " + pair.getSecond()); + } + point = pair.getSecond(); +} + +// Recursively add the group offsets. +ShapeGroup group = shape.getGroup(); +traceln("group x: " + group.getX()); +traceln("group y: " + group.getY()); +Pair<ShapeGroup, Point> pair = new Pair(group, point); +while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { + pair = f_getGroupPositionIteration(pair); + traceln("point_j: " + pair.getSecond()); +} +return pair.getSecond(); + + + + + +/* +(main) tabs_presentation (tabs_presentation.getEmbeddedobject() = agent1) + (agent 1) tab_elec_presentation (tab_elec_presentation.getEmbeddedobject() = agent2) + (agent 2) shape (shape.getpresentable() = agent2) + + +findfirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable() ) => tab_elec_presentation + +tab_elec_presentation.getPresentable() => agent 1, so use this in the next iteration + +findfirst(c_presentations, ap -> ap.getEmbeddedObject() == tab_elec_presentation.getPresentable() ) => tabs_presentation + +*/ + + +/* + +double presentationOffsetX; +double presentationOffsetY; +if (shape.getPresentable() == this) { + // The shape is on this canvas, no additional offset + presentationOffsetX = 0.0; + presentationOffsetY = 0.0; +} +else { + traceln("getEmbeddedObject: " + c_presentations.get(0).getEmbeddedObject()); + traceln("getEmbeddedObject: " + c_presentations.get(1).getEmbeddedObject()); + traceln("shape.getPresentable()" + shape.getPresentable()); + traceln("agent presentable: " + agent.presentation); + traceln("this presentable: " + this.presentation); + ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable()); + if (presentation == null) { + throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); + } + presentationOffsetX = presentation.getX(); + presentationOffsetY = presentation.getY(); + // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. + presentationOffsetX += presentation.getGroup().getX(); + presentationOffsetY += presentation.getGroup().getY(); + traceln("presentationOffsetX: " + presentationOffsetX); +} + +// Add the presentation offset to the shape position and then recursively add the group offsets. +Point point = new Point(shape.getX() + presentationOffsetX, shape.getY() + presentationOffsetY); +ShapeGroup group = shape.getGroup(); +Pair<ShapeGroup, Point> pair = new Pair(group, point); +while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { + pair = f_getGroupPositionIteration(pair); +} +return pair.getSecond(); + +*/ + + + + RETURNS_VALUE + Pair<ShapeEmbeddedObjectPresentation, Point> + 1744894817573 + f_getPresentationPositionIteration + true + -1980 + 285 + + false + true + true + + pair + Pair<ShapeEmbeddedObjectPresentation. Point> + + ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == pair.getFirst().getPresentable()); +if (presentation == null) { + throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); +} +Point point = pair.getSecond(); +traceln("presentation agent: " + presentation.getEmbeddedObject()); +traceln("point in presentation iteration before: " + point); +point.add( new Point(presentation.getX(), presentation.getY()) ); +// It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. +traceln("point in presentation iteration middle: " + point); +point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); +traceln("point in presentation iteration after: " + point); + +return new Pair(presentation, point); + + + VOID + double + 1744624088848 + f_harvestEnergyModelLoadData + true + -556 + -710 + + false + true + true + traceln("Start writing Electricity Load Balance data to excel!"); + +//Clear the sheet first +f_clearExportSheet(); + +//Set column names +excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); +excel_exportBalanceLoadData.setCellValue("Totale load van het Hele gebied [kWh]", "Electricity Load Balance", 1, 2); + +//Get energyModel profile +double[] loadArray_kW = energyModel.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); + +for (int i = 0; i < loadArray_kW.length ; i++) { + + //Time series + excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); + + //Data + excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 2); +} + +//Write file +excel_exportBalanceLoadData.writeFile(); + +traceln("Finished writing Electricity Load Balance data to excel!"); + + + VOID + double + 1744624088850 + f_harvestSelectedGCLoadData + true + -556 + -470 + + false + true + true + traceln("Start writing Electricity Load Balance data to excel!"); + +//Clear the sheet first +f_clearExportSheet(); + +//Initialize column index +int columnIndex = 2; + +//Initialize total balance flow for all selected GC +double[] cumulativeLoadArray_kW = new double[energyModel.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW().length]; + +//Loop over gc and add the data +for(GridConnection GC : c_selectedGridConnections){ + + //Add gc data + excel_exportBalanceLoadData.setCellValue(GC.p_ownerID, "Electricity Load Balance", 1, columnIndex); + + double[] loadArray_kW = GC.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); + + for (int i = 0; i < loadArray_kW.length; i++ ) { + excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, columnIndex); + + //Add to cumulative load array + cumulativeLoadArray_kW[i] += loadArray_kW[i]; + } + + //Add timestep column (only the first time) + if (columnIndex == 2) { + excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); + traceln("ArraySize: %s", loadArray_kW.length); + for (int i = 0; i < loadArray_kW.length ; i++) { + excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); + } + } + + //Increase columnIndex + columnIndex++; +} + +//Cumulative data column +if(c_selectedGridConnections.size() > 1){ + excel_exportBalanceLoadData.setCellValue("Totale load [kWh]", "Electricity Load Balance", 1, columnIndex); + for (int i = 0; i < cumulativeLoadArray_kW.length ; i++) { + excel_exportBalanceLoadData.setCellValue( cumulativeLoadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, columnIndex); + } +} + +//Write the file +excel_exportBalanceLoadData.writeFile(); + +traceln("Finished writing Electricity Load Balance data to excel!"); + + + VOID + double + 1744624088852 + f_harvestTotalBalanceLoadOfSelectedEnergyCoop + true + -556 + -590 + + false + true + true + traceln("Start writing Electricity Load Balance data to excel!"); + +//Clear the sheet first +f_clearExportSheet(); + +//Set column names +excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); +excel_exportBalanceLoadData.setCellValue("Totale load van de geselecteerde EnergyCoop [kWh]", "Electricity Load Balance", 1, 2); + +//Get energyModel profile +double[] loadArray_kW = v_customEnergyCoop.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); + +for (int i = 0; i < loadArray_kW.length ; i++) { + + //Time series + excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); + + //Data + excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 2); +} + +//Write file +excel_exportBalanceLoadData.writeFile(); + +traceln("Finished writing Electricity Load Balance data to excel!"); + + + VOID + double + 1744985599017 + f_setAllFileDownloadersDisabled + true + -556 + -410 + + false + true + true + fileChooser_exportBalanceLoadEnergyModel.setEnabled(false); +fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(false); +fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(false); + + + VOID + double + 1744986150240 + f_clearExportSheet + true + -556 + -390 + + false + true + true + //Clear the sheet first +for (int row = 1; row <= 35137; row++) { + for (int col = 1; col <= p_maxNrSelectedGCForExport + 2; col++) { + excel_exportBalanceLoadData.setCellValue("", "Electricity Load Balance", row, col); + } +} + + + VOID + double + 1746085650084 + f_changeDefaultColorOfPrivateGC + -670 + 915 + + false + true + true + for(GIS_Object object : energyModel.pop_GIS_Objects){ + for(GridConnection GC : object.c_containedGridConnections){ + if(!GC.p_owner.b_dataIsAccessible){ + object.p_defaultFillColor = transparent(object.p_defaultFillColor, 0.6);//v_dataSharingDisagreedColor; + object.p_defaultLineStyle = LINE_STYLE_DOTTED; + object.f_style(null, null, null, null); + break; + } + } +} + +for(GIS_Building building : energyModel.pop_GIS_Buildings){ + for(GridConnection GC : building.c_containedGridConnections){ + if(!GC.p_owner.b_dataIsAccessible){ + building.p_defaultFillColor = transparent(building.p_defaultFillColor, 0.6);//v_dataSharingDisagreedColor; + building.p_defaultLineStyle = LINE_STYLE_DOTTED; + building.f_style(null, null, null, null); + break; + } + } +} + + + VOID + double + 1749741185117 + f_initialParkingSpacesOrder + 85 + -630 + + false + true + true + //Collections.shuffle(c_orderedParkingSpaces); + + + VOID + double + 1750247111856 + f_initialChargerOrder + 85 + -610 + + false + true + true + c_orderedV1GChargers = new ArrayList<J_EAChargePoint>(); +c_orderedV2GChargers = new ArrayList<J_EAChargePoint>(); +c_orderedPublicChargers = new ArrayList<GCPublicCharger>(); + +List<J_EAChargePoint> c_inactiveV1GChargers = new ArrayList<J_EAChargePoint>(); +List<J_EAChargePoint> c_inactiveV2GChargers = new ArrayList<J_EAChargePoint>(); + +for (GridConnection gc : energyModel.f_getActiveGridConnections()) { + for (J_EAChargePoint charger : gc.c_chargers) { + if (charger.getV1GCapable()) { + c_orderedV1GChargers.add(0, charger); + } + else { + c_orderedV1GChargers.add(charger); + } + if (charger.getV2GCapable()) { + c_orderedV2GChargers.add(0, charger); + } + else { + c_orderedV2GChargers.add(charger); + } + } +} + +for (GridConnection gc : energyModel.f_getPausedGridConnections()) { + for (J_EAChargePoint charger : gc.c_chargers) { + if (charger.getV1GCapable()) { + c_inactiveV1GChargers.add(0, charger); + } + else { + c_inactiveV1GChargers.add(charger); + } + if (charger.getV2GCapable()) { + c_inactiveV2GChargers.add(0, charger); + } + else { + c_inactiveV2GChargers.add(charger); + } + } +} + +c_orderedV1GChargers.addAll( c_inactiveV1GChargers ); +c_orderedV2GChargers.addAll( c_inactiveV2GChargers ); + +for (GCPublicCharger gc : energyModel.PublicChargers) { + if ( !gc.p_isChargingCentre ) { + c_orderedPublicChargers.add(gc); + } +} + +//Collections.shuffle(c_orderedPublicChargers); + + + VOID + double + 1750078798174 + f_initializeSpecialGISObjectsLegend + 1410 + 1630 + + false + true + true + int numberOfSpecialActiveGISObjectTypes = 0; + +for(OL_GISObjectType activeSpecialGISObjectType : c_modelActiveSpecialGISObjects){ + if(activeSpecialGISObjectType == OL_GISObjectType.PARKING){ + for(OL_ParkingSpaceType activeParkingSpaceType : c_modelActiveParkingSpaceTypes){ + numberOfSpecialActiveGISObjectTypes ++; + Pair<ShapeText, ShapeRectangle> legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); + f_setParkingSpaceLegendItem(activeParkingSpaceType, legendShapes.getFirst(), legendShapes.getSecond()); + } + } + else{ + numberOfSpecialActiveGISObjectTypes ++; + Pair<ShapeText, ShapeRectangle> legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); + f_setSpecialGISObjectLegendItem(activeSpecialGISObjectType, legendShapes.getFirst(), legendShapes.getSecond()); + + if(activeSpecialGISObjectType == OL_GISObjectType.CHARGER){ + numberOfSpecialActiveGISObjectTypes ++; + legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); + legendShapes.getFirst().setVisible(true); + legendShapes.getSecond().setVisible(true); + legendShapes.getFirst().setText("Laadpaal/plein (Toegevoegd)"); + legendShapes.getSecond().setFillColor(v_newChargingStationColor); + legendShapes.getSecond().setLineColor(v_newChargingStationLineColor); + } + } +} + + + VOID + double + 1750261221085 + f_setTrafoText + 50 + 1700 + + false + true + true + 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; +} + + + VOID + double + 1750079113839 + f_setSpecialGISObjectLegendItem + 1430 + 1670 + + false + true + true + + activeSpecialGISObjectType + OL_GISObjectType + + + legendText + ShapeText + + + legendRect + ShapeRectangle + + legendText.setVisible(true); +legendRect.setVisible(true); + +switch(activeSpecialGISObjectType){ + case SOLARFARM: + legendText.setText("Zonneveld"); + legendRect.setFillColor(v_solarParkColor); + legendRect.setLineColor(v_solarParkLineColor); + break; + case WINDFARM: + legendText.setText("Windmolen"); + legendRect.setFillColor(v_windFarmColor); + legendRect.setLineColor(v_windFarmLineColor); + break; + case CHARGER: + legendText.setText("Laadpaal/plein (Bestaand)"); + legendRect.setFillColor(v_chargingStationColor); + legendRect.setLineColor(v_chargingStationLineColor); + break; + case BATTERY: + legendText.setText("Batterij"); + legendRect.setFillColor(v_batteryColor); + legendRect.setLineColor(v_batteryLineColor); + break; + case PARCEL: + legendText.setText("Nieuw Perceel"); + legendRect.setFillColor(v_parcelColor); + legendRect.setLineColor(v_parcelLineColor); + break; + case ELECTROLYSER: + legendText.setText("Electrolyser"); + legendRect.setFillColor(v_electrolyserColor); + legendRect.setLineColor(v_electrolyserLineColor); + break; +} + + + VOID + double + 1750080865693 + f_initializeLegend + 1390 + 1550 + + false + true + true + //Default GIS buildings +f_initializeDefaultGISBuildingsLegend(); + +//Special gis objects +f_initializeSpecialGISObjectsLegend(); + + + VOID + double + 1750089851073 + f_setParkingSpaceLegendItem + 1430 + 1690 + + false + true + true + + activeParkingSpaceType + OL_ParkingSpaceType + + + legendText + ShapeText + + + legendRect + ShapeRectangle + + legendText.setVisible(true); +legendRect.setVisible(true); + +switch(activeParkingSpaceType){ + case PUBLIC: + legendText.setText("Parkeerplek: publiek"); + legendRect.setFillColor(v_parkingSpaceColor_public); + legendRect.setLineColor(v_parkingSpaceLineColor_public); + break; + case PRIVATE: + legendText.setText("Parkeerplek: privé"); + legendRect.setFillColor(v_parkingSpaceColor_private); + legendRect.setLineColor(v_parkingSpaceLineColor_private); + break; + case ELECTRIC: + legendText.setText("Parkeerplek: electrisch"); + legendRect.setFillColor(v_parkingSpaceColor_electric); + legendRect.setLineColor(v_parkingSpaceLineColor_electric); + break; +} + + + RETURNS_VALUE + Pair<ShapeText, ShapeRectangle> + 1750092444018 + f_getNextSpecialLegendShapes + 1430 + 1650 + + false + true + true + + legendShapesNumber + int + + ShapeText legendText; +ShapeRectangle legendRect; + +switch(legendShapesNumber){ + case 1: + legendText = t_specialGISObjectLegend1; + legendRect = rect_specialGISObjectLegend1; + break; + case 2: + legendText = t_specialGISObjectLegend2; + legendRect = rect_specialGISObjectLegend2; + break; + case 3: + legendText = t_specialGISObjectLegend3; + legendRect = rect_specialGISObjectLegend3; + break; + case 4: + legendText = t_specialGISObjectLegend4; + legendRect = rect_specialGISObjectLegend4; + break; + case 5: + legendText = t_specialGISObjectLegend5; + legendRect = rect_specialGISObjectLegend5; + break; + case 6: + legendText = t_specialGISObjectLegend6; + legendRect = rect_specialGISObjectLegend6; + break; + case 7: + legendText = t_specialGISObjectLegend7; + legendRect = rect_specialGISObjectLegend7; + break; + case 8: + legendText = t_specialGISObjectLegend8; + legendRect = rect_specialGISObjectLegend8; + break; + case 9: + legendText = t_specialGISObjectLegend9; + legendRect = rect_specialGISObjectLegend9; + break; + case 10: + legendText = t_specialGISObjectLegend10; + legendRect = rect_specialGISObjectLegend10; + break; + case 11: + legendText = t_specialGISObjectLegend11; + legendRect = rect_specialGISObjectLegend11; + break; + case 12: + legendText = t_specialGISObjectLegend12; + legendRect = rect_specialGISObjectLegend12; + break; + default: + legendText = t_specialGISObjectLegend1; + legendRect = rect_specialGISObjectLegend1; + break; +} + +return new Pair(legendText, legendRect); + + + + VOID + double + 1750162397332 + f_initializeDefaultGISBuildingsLegend + 1410 + 1570 + + false + true + true + int numberOfDefaultActiveGISObjectTypes = 1;//Always start at 2 (1 ++) for the building types, cause 'selection' is always present (for now). + +for(OL_GISBuildingTypes activeDefaultGISBuildingType : c_modelActiveDefaultGISBuildings){ + numberOfDefaultActiveGISObjectTypes ++; + Pair<ShapeText, ShapeOval> legendShapes = f_getNextDefaultLegendShapes(numberOfDefaultActiveGISObjectTypes); + f_setDefaultGISBuildingLegendItem(activeDefaultGISBuildingType, legendShapes.getFirst(), legendShapes.getSecond()); +} + + + RETURNS_VALUE + Pair<ShapeText, ShapeOval> + 1750162514744 + f_getNextDefaultLegendShapes + 1430 + 1610 + + false + true + true + + legendShapesNumber + int + + ShapeText legendText; +ShapeOval legendOval; + +switch(legendShapesNumber){ + case 1: + legendText = t_defaultLegend1; + legendOval = oval_defaultLegend1; + break; + case 2: + legendText = t_defaultLegend2; + legendOval = oval_defaultLegend2; + break; + case 3: + legendText = t_defaultLegend3; + legendOval = oval_defaultLegend3; + break; + case 4: + legendText = t_defaultLegend4; + legendOval = oval_defaultLegend4; + break; + case 5: + legendText = t_defaultLegend5; + legendOval = oval_defaultLegend5; + break; + default: + legendText = t_defaultLegend1; + legendOval = oval_defaultLegend1; +} + +return new Pair(legendText, legendOval); + + + + VOID + double + 1750165143690 + f_setDefaultGISBuildingLegendItem + 1430 + 1590 + + false + true + true + + activeDefaultGISBuildingType + OL_GISBuildingTypes + + + legendText + ShapeText + + + legendOval + ShapeOval + + legendText.setVisible(true); +legendOval.setVisible(true); + +switch(activeDefaultGISBuildingType){ + case DETAILED_COMPANY: + legendText.setText("Gedetaileerd bedrijf: " + v_numberOfSurveyCompanies); + legendOval.setFillColor(v_detailedCompanyBuildingColor); + legendOval.setLineColor(v_detailedCompanyBuildingLineColor); + break; + case DEFAULT_COMPANY: + legendText.setText("Standaard bedrijf"); + legendOval.setFillColor(v_companyBuildingColor); + legendOval.setLineColor(v_companyBuildingLineColor); + break; + case HOUSE: + legendText.setText("Huizen"); + legendOval.setFillColor(v_houseBuildingColor); + legendOval.setLineColor(v_houseBuildingLineColor); + break; + case REMAINING: + legendText.setText("Overige gebouwen"); + legendOval.setFillColor(v_restBuildingColor); + legendOval.setLineColor(v_restBuildingLineColor); + break; +} + + + + VOID + double + 1752756002220 + f_setColorsBasedOnCongestion_objects + 1960 + 1800 + + false + true + true + + gis_area + GIS_Object + + if (gis_area.c_containedGridConnections.size() > 0) { + double maxLoad_fr_gis_object = 0; + boolean capacityKnown = false; + + for(GridConnection gc : gis_area.c_containedGridConnections){ + if(gc.v_rapidRunData != null){ + double maxLoad_fr_gc = 0; + double maxLoad_fr_gc_delivery = gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown ? gc.v_rapidRunData.getPeakDelivery_kW()/gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW : 0; + double maxLoad_fr_gc_feedin = gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown ? gc.v_rapidRunData.getPeakFeedin_kW()/gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW : 0; + + switch(rb_mapOverlayLegend_congestion.getValue()){ + case 0: + maxLoad_fr_gc = maxLoad_fr_gc_delivery; + + if(gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ + capacityKnown = true; + } + break; + case 1: + maxLoad_fr_gc = maxLoad_fr_gc_feedin; + if(gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ + capacityKnown = true; + } + break; + case 2: + maxLoad_fr_gc = max(maxLoad_fr_gc_delivery, maxLoad_fr_gc_feedin); + if(maxLoad_fr_gc_delivery > maxLoad_fr_gc_feedin && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ + capacityKnown = true; + } + else if(maxLoad_fr_gc_feedin > maxLoad_fr_gc_delivery && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ + capacityKnown = true; + } + break; + } + if(maxLoad_fr_gc > maxLoad_fr_gis_object){ + maxLoad_fr_gis_object = maxLoad_fr_gc; + } + } + } + + //Set colour based on found parameters + if(!capacityKnown && project_data.project_type() != RESIDENTIAL){ + gis_area.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); + gis_area.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); + } else if (maxLoad_fr_gis_object > 1) { + gis_area.gisRegion.setFillColor(v_gridNodeColorCongested); + gis_area.gisRegion.setLineColor(v_gridLineColorCongested); + } else if (maxLoad_fr_gis_object > 0.7) { + gis_area.gisRegion.setFillColor(v_gridNodeColorStrained); + gis_area.gisRegion.setLineColor(v_gridNodeLineColorStrained); + } else { + gis_area.gisRegion.setFillColor(v_gridNodeColorUncongested); + gis_area.gisRegion.setLineColor(v_gridNodeLineColorUncongested); + } +} + + + VOID + double + 1752756016324 + f_setColorsBasedOnCongestion_gridnodes + 1960 + 1820 + + false + true + true + + gn + GridNode + + + isLiveSim + boolean + + if (gn!=null && gn.gisRegion != null){ + double maxLoad_fr = 0; + if(isLiveSim){ + maxLoad_fr = abs(gn.v_currentLoad_kW)/gn.p_capacity_kW; + } + else{ + J_LoadDurationCurves loadCurves = gn.f_getDuurkrommes(); + double maxLoad_fr_delivery = gn.p_capacity_kW > 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(0))/gn.p_capacity_kW : 0; + double maxLoad_fr_feedin = gn.p_capacity_kW > 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(loadCurves.ds_loadDurationCurveTotal_kW.size()-1))/gn.p_capacity_kW : 0; + + switch(rb_mapOverlayLegend_congestion.getValue()){ + case 0: + maxLoad_fr = maxLoad_fr_delivery; + break; + case 1: + maxLoad_fr = maxLoad_fr_feedin; + break; + case 2: + maxLoad_fr = max(maxLoad_fr_delivery, maxLoad_fr_feedin); + break; + } + } + + if(!isLiveSim && !gn.p_realCapacityAvailable && project_data.project_type() != RESIDENTIAL){ + gn.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); + gn.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); + } else if (maxLoad_fr > 1) { + gn.gisRegion.setFillColor(v_gridNodeColorCongested); + gn.gisRegion.setLineColor(v_gridLineColorCongested); + } else if (maxLoad_fr > 0.7) { + gn.gisRegion.setFillColor(v_gridNodeColorStrained); + gn.gisRegion.setLineColor(v_gridNodeLineColorStrained); + } else { + gn.gisRegion.setFillColor(v_gridNodeColorUncongested); + gn.gisRegion.setLineColor(v_gridNodeLineColorUncongested); + } + + if( gn == v_clickedGridNode && gn != v_previousClickedGridNode){ // dit zorgt ervoor dat de kleuringfunctie correct werkt in zowel live stand als pauze stand + gn.gisRegion.setFillColor( v_selectionColor ); + gn.gisRegion.setLineColor( orange ); + } +} + + + VOID + double + 1752836715726 + f_clearSelectionAndSelectEnergyModel + 50 + 1240 + + false + true + true + f_deselectPreviousSelect(); +f_selectEnergyModel(); + + + VOID + double + 1752837115143 + f_styleLVLV + -650 + 470 + + false + true + true + + gisregion + GISRegion + + gisregion.setLineStyle( LINE_STYLE_SOLID ); +gisregion.setLineColor( v_LVLVLineColor ); +gisregion.setLineWidth(2); +gisregion.setFillColor(v_LVLVNodeColor); + + + VOID + double + 1753085860778 + f_initializeMapOverlayRadioButton + 1920 + 1450 + + false + true + true + //Set active map overlay types if they are set in the project settings +if(settings.activeMapOverlayTypes() != null && settings.activeMapOverlayTypes().size() > 0){ + c_loadedMapOverlayTypes = new ArrayList<OL_MapOverlayTypes>(settings.activeMapOverlayTypes()); + if(!c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.DEFAULT)){ + c_loadedMapOverlayTypes.add(0, OL_MapOverlayTypes.DEFAULT); // Force default to be available + } +} +else{//Take the default + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.DEFAULT); + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.ELECTRICITY_CONSUMPTION); + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.PV_PRODUCTION); + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.GRID_NEIGHBOURS); + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.CONGESTION); + if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.PARKING_TYPE); + } +} + + +//Adjust the visualisation of the radiobuttons +Presentable presentable = gr_mapOverlayLegenda.getPresentable(); +boolean ispublic = true; +double x = 756; +double y = c_loadedMapOverlayTypes.size() < 6 ? 837 : 837 - 18; +double width = 130; +double height = 0;//Not needed, automatically adjust by adding options +Color textColor = Color.BLACK; +boolean enabled = true; +Font font = new Font("Dialog", Font.PLAIN, 11); +boolean vertical = true; + + +//Set words for the radiobutton options +List<String> RadioButtonOptions_list = new ArrayList<String>(); +for(OL_MapOverlayTypes mapOverlayType : c_loadedMapOverlayTypes){ + switch(mapOverlayType){ + case DEFAULT: + RadioButtonOptions_list.add("Standaard"); + break; + case ELECTRICITY_CONSUMPTION: + RadioButtonOptions_list.add("Elektriciteitsverbruik"); + break; + case PV_PRODUCTION: + RadioButtonOptions_list.add("PV Opwek"); + break; + case GRID_NEIGHBOURS: + RadioButtonOptions_list.add("Energie Buren"); + break; + case CONGESTION: + RadioButtonOptions_list.add("Netbelasting"); + break; + case ENERGY_LABEL: + RadioButtonOptions_list.add("Energielabel"); + break; + case PARKING_TYPE: + RadioButtonOptions_list.add("Parkeer type"); + break; + } +} + +String[] RadioButtonOptions = RadioButtonOptions_list.toArray(String[]::new); + +//Create the radiobutton and set the correct action. +rb_mapOverlay = new ShapeRadioButtonGroup(presentable, ispublic, x ,y, width, height, textColor, enabled, font, vertical, RadioButtonOptions){ + @Override + public void action() { + f_setMapOverlay(); + } +}; + +presentation.add(rb_mapOverlay); + +//For now: Adjust location of radiobutton title if 6 buttons +if(c_loadedMapOverlayTypes.size() > 5){ + gr_colorings.setY(-17); +} + + + VOID + double + 1753096794863 + f_setMapOverlay + 1920 + 1540 + + false + true + true + //reset legend +gr_defaultLegenda.setVisible(false); +gr_mapOverlayLegend_ElectricityConsumption.setVisible(false); +gr_mapOverlayLegend_PVProduction.setVisible(false); +gr_mapOverlayLegend_gridNeighbours.setVisible(false); +gr_mapOverlayLegend_congestion.setVisible(false); +gr_mapOverlayLegend_EnergyLabel.setVisible(false); +b_updateLiveCongestionColors = false; + +if(!b_inEnergyHubMode){ + f_clearSelectionAndSelectEnergyModel(); +} + +//Get selected map overlay type, based on loaded order of the radio buttons +OL_MapOverlayTypes selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); + +//Set the correct map overlay +switch(selectedMapOverlayType){ + case DEFAULT: + f_setMapOverlay_Default(); + break; + case ELECTRICITY_CONSUMPTION: + f_setMapOverlay_ElectricityConsumption(); + break; + case PV_PRODUCTION: + f_setMapOverlay_PVProduction(); + break; + case GRID_NEIGHBOURS: + f_setMapOverlay_GridTopology(); + break; + case CONGESTION: + f_setMapOverlay_Congestion(); + break; + case ENERGY_LABEL: + f_setMapOverlay_EnergyLabel(); + break; + case PARKING_TYPE: + f_setMapOverlay_ParkingType(); + break; +} + + + VOID + double + 1753097345978 + f_setMapOverlay_ElectricityConsumption + 1940 + 1590 + + false + true + true + //Set legend +b_updateLiveCongestionColors = true; +gr_mapOverlayLegend_ElectricityConsumption.setVisible(true); + +//Colour gis objects +if (project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnConsumptionProfileHouseholds(building); + } +} +else { + if(energyModel.v_rapidRunData == null){ + f_setErrorScreen("Dit overzicht wordt pas beschikbaar na het uitvoeren van een jaarsimulatie. In plaats daarvan is de standaard kaart geselecteerd.", 0, 0); + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); + return; + } + gr_mapOverlayLegend_ElectricityConsumption.setVisible(true); + for (GIS_Building building : energyModel.pop_GIS_Buildings){ + if(building.gisRegion.isVisible()){ + f_setColorsBasedOnElectricityConsumption(building); + } + } + /*for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_setColorsBasedOnConsumpion(object); + }*/ +} + + + VOID + double + 1753097409446 + f_setMapOverlay_PVProduction + 1940 + 1660 + + false + true + true + //Set legend +b_updateLiveCongestionColors = true; +gr_mapOverlayLegend_PVProduction.setVisible(true); + +//Colour gis objects +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnProduction(building); +} +/*for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_setColorsBasedOnProduction(object); +}*/ + + + VOID + double + 1753097484078 + f_setMapOverlay_GridTopology + 1940 + 1710 + + false + true + true + //Set legend +gr_mapOverlayLegend_gridNeighbours.setVisible(true); +b_updateLiveCongestionColors = false; + +//Colour gis objects +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnGridTopology_objects(building); +} +/*for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_setColorsBasedOnGridTopology_objects(object); +}*/ +for (GridNode GN : energyModel.pop_gridNodes){ + f_setColorsBasedOnGridTopology_gridnodes(GN); +} + + + VOID + double + 1753097518541 + f_setMapOverlay_Congestion + 1940 + 1780 + + false + true + true + if(energyModel.v_rapidRunData == null){ + f_setErrorScreen("Dit overzicht wordt pas beschikbaar na het uitvoeren van een jaarsimulatie. In plaats daarvan is de standaard kaart geselecteerd.", 0, 0); + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); + return; +} + +//Set legend +gr_mapOverlayLegend_congestion.setVisible(true); +b_updateLiveCongestionColors = false; + +//Colour gis objects +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnCongestion_objects(building); +} +/* +for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_setColorsBasedOnCongestion_objects(object); +} +*/ +for (GridNode GN : energyModel.pop_gridNodes){ + f_setColorsBasedOnCongestion_gridnodes(GN, false); +} + + + VOID + double + 1753097561639 + f_setMapOverlay_Default + 1940 + 1565 + + false + true + true + b_updateLiveCongestionColors = true; +gr_defaultLegenda.setVisible(true); +for (GIS_Building b: energyModel.pop_GIS_Buildings) { + f_styleAreas(b); +} +/*for (GIS_Object object : energyModel.pop_GIS_Objects){ + f_styleAreas(object); +}*/ + + + VOID + double + 1753108764992 + f_setMapOverlay_EnergyLabel + 1940 + 1850 + + false + true + true + //Set legend +b_updateLiveCongestionColors = true; +gr_mapOverlayLegend_EnergyLabel.setVisible(true); + +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnEnergyLabels(building); +} + + + VOID + double + 1753440028514 + f_setShapePresentationOnTop + -640 + -60 + + false + true + true + + shape + Shape + + presentation.remove(shape); +presentation.insert(presentation.size(), shape); + + + VOID + double + 1753713001191 + f_updateOrderedListsAfterDeserialising + true + 80 + -490 + + false + true + true + + newEnergyModel + EnergyModel + + // Update references of GClists +for (int i=0; i< c_orderedPVSystemsHouses.size(); i++) { + String GCid = c_orderedPVSystemsHouses.get(i).p_gridConnectionID; + c_orderedPVSystemsHouses.set(i,findFirst(newEnergyModel.Houses, x->x.p_gridConnectionID == GCid)); +} + +for (int i=0; i< c_orderedPVSystemsCompanies.size(); i++) { + String GCid = c_orderedPVSystemsCompanies.get(i).p_gridConnectionID; + c_orderedPVSystemsCompanies.set(i,findFirst(newEnergyModel.UtilityConnections, x->x.p_gridConnectionID == GCid)); +} + +for (int i=0; i< c_orderedHeatingSystemsCompanies.size(); i++) { + String GCid = c_orderedHeatingSystemsCompanies.get(i).p_gridConnectionID; + c_orderedHeatingSystemsCompanies.set(i,findFirst(newEnergyModel.UtilityConnections, x->x.p_gridConnectionID == GCid)); +} + +for (int i=0; i< c_orderedHeatingSystemsHouses.size(); i++) { + String GCid = c_orderedHeatingSystemsHouses.get(i).p_gridConnectionID; + c_orderedHeatingSystemsHouses.set(i,findFirst(newEnergyModel.Houses, x->x.p_gridConnectionID == GCid)); +} + +for (int i=0; i< c_orderedPublicChargers.size(); i++) { + String GCid = c_orderedPublicChargers.get(i).p_gridConnectionID; + c_orderedPublicChargers.set(i,findFirst(newEnergyModel.PublicChargers, x->x.p_gridConnectionID == GCid)); +} + +// TODO: Update references of J_EAlists + + + + VOID + double + 1753440184174 + f_initializePresentationOrder + -660 + 200 + + false + true + true + //Set order of certain layovers and submenus +f_setShapePresentationOnTop(map); +f_setShapePresentationOnTop(gr_zoomButton); +f_setShapePresentationOnTop(gr_sliderClickBlocker); +f_setShapePresentationOnTop(gr_forceMapSelection); +f_setShapePresentationOnTop(gr_filterInterface); +f_setShapePresentationOnTop(gr_infoText); + + + + VOID + double + 1753445407428 + f_setForcedClickScreenVisibility + 140 + -860 + + false + true + true + + showForcedClickScreen + boolean + + gr_forceMapSelection.setVisible(showForcedClickScreen); + + + VOID + double + 1753446312775 + f_selectEnergyHubGC + 2240 + -2090 + + false + true + true + + clickx + double + + + clicky + double + + if(b_inManualFilterSelectionMode){ + f_selectManualFilteredGC(clickx, clicky); +} +else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || + c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ + f_selectGridLoop(clickx, clicky); + } + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + f_selectNeighborhood(clickx, clicky); + } +} + + + VOID + double + 1753698716095 + f_startEnergyHubConfiguration + 2240 + -2180 + + false + true + true + pauseSimulation(); + +b_inEnergyHubMode = true; +b_inEnergyHubSelectionMode = true; + +f_setForcedClickScreenText(""); +f_setForcedClickScreenVisibility(true); + +cb_showFilterInterface.setSelected(true, true); +gr_filterInterface.setPos(170, 580); + + + VOID + double + 1753698810590 + f_finalizeEnergyHubConfiguration + 2240 + -2060 + + false + true + true + if(b_inEnergyHubSelectionMode){ + if(button_completeManualSelectionMode.isVisible()){ + button_completeManualSelectionMode.action(); + } + + + //Move scenario radiobuttons over + f_getScenarioButtons().setPos( + gr_energyHubPresentation.getX() + uI_EnergyHub.rect_scenarios.getX() + 25.0, + gr_energyHubPresentation.getY() + uI_EnergyHub.rect_scenarios.getY() + 50.0 + ); + + //Set map in correct pos and navigate to e-hub view + map.setPos( + gr_energyHubPresentation.getX() + uI_EnergyHub.rect_map.getX() + 10.0, + gr_energyHubPresentation.getY() + uI_EnergyHub.rect_map.getY() + 10.0 + ); + map.setScale( 0.85, 0.85 ); + va_EHubDashboard.navigateTo(); + v_currentViewArea = va_EHubDashboard; + + //Copy selected GC and coop to e-hub dashboard + v_customEnergyCoop.p_actorID = "eHubConfiguratorCoop"; + uI_EnergyHub.v_energyHubCoop = v_customEnergyCoop; + + //Set E-hub selection mode false + b_inEnergyHubSelectionMode = false; + + uI_EnergyHub.f_initializeEnergyHubDashboard(); +} + + + + VOID + ArrayList<GridConnection> + 1753713085487 + f_updateGClistAfterDeserialisation + true + 95 + -470 + + false + true + true + + GClist + ArrayList<? extends GridConnection> + + + newEnergyModel + EnergyModel + + for (int i=0; i< GClist.size(); i++) { + String GCid = GClist.get(i).p_gridConnectionID; + GClist.set(i,findFirst(newEnergyModel.c_gridConnections, x->x.p_gridConnectionID == GCid)); +} + + + + + VOID + ArrayList<GridConnection> + 1753713662613 + f_updateJ_EAlistAfterDeserialisation + true + 110 + -450 + + false + true + true + + EAlist + ArrayList<J_EA> + + + newEnergyModel + EnergyModel + + for (int i=0; i< EAlist.size(); i++) { + String GCid = EAlist.get(i).getParentAgent();p_gridConnectionID; + EAlist.set(i,findFirst(newEnergyModel.c_gridConnections, x->x.p_gridConnectionID == GCid)); +} + + + + + VOID + double + 1753881971788 + f_createUITabs_default + -650 + 620 + + false + true + true + // CHOOSE WHICH TABS YOU WANT TO BE ABLE TO SHOW FOR YOUR PROJECT +// (OVERRIDE FUNCTION IN CHILD IF YOU WANT OTHER THAN DEFAULT) + +// Adding the (child) tabs to the tabArea population + +// If you use an extension of a tab, you must update the pointer to the instance of the interface +// Something like: tabElectricity.zero_Interface = loader_Project.zero_Interface; +// No update to the pointer is needed for the generic tabs + + +uI_Tabs.add_pop_tabElectricity(); +uI_Tabs.add_pop_tabHeating(); +uI_Tabs.add_pop_tabMobility(); + +// Group visibilities +// When using an extension of a generic tab don't forget to typecast it! +if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { + ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_ResidentialArea().setVisible(true); + ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersResidentialArea().setVisible(true); + ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_residential().setVisible(true); +} +else { + uI_Tabs.add_pop_tabEHub(); + ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_Businesspark().setVisible(true); + ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersCompanies().setVisible(true); + ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_default().setVisible(true); + ((tabEHub)uI_Tabs.pop_tabEHub.get(0)).getGroupHubSliders().setVisible(true); +} + + + VOID + double + 1753882411689 + f_initializePrivateAndPublicParkingCarsOrder + 85 + -590 + + false + true + true + //Get all public and private parked cars +c_orderedVehiclesPrivateParking = new ArrayList<J_EAVehicle>(); +List<J_EADieselVehicle> allPublicParkedCars = new ArrayList<J_EADieselVehicle>(); +for (GCHouse house : energyModel.Houses) { + if (house.p_eigenOprit) { + c_orderedVehiclesPrivateParking.addAll(house.c_vehicleAssets); + } + else{ + allPublicParkedCars.addAll(house.c_dieselVehicles); + } +} + +//Shuffle the collections to not have skewed initialization +//Collections.shuffle(c_orderedVehiclesPrivateParking); +//Collections.shuffle(allPublicParkedCars); + +//Get the total amount of public chargers +int totalChargers = c_orderedPublicChargers.size(); + +if(totalChargers > 0){ + // Fair distribution of vehicles across chargers + List<Integer> numberOfCarsPerCharger = f_getNumberOfCarsPerCharger(allPublicParkedCars.size(), totalChargers); + + // Assign vehicles to chargers + c_mappingOfVehiclesPerCharger.clear(); + int index = 0; + for (int i = 0; i < totalChargers; i++) { + GCPublicCharger charger = c_orderedPublicChargers.get(i); + int numberOfCars = numberOfCarsPerCharger.get(i); + + List<J_EADieselVehicle> assignedCars = new ArrayList<>(allPublicParkedCars.subList(index, index + numberOfCars)); + c_mappingOfVehiclesPerCharger.put(charger.p_uid, assignedCars); + + // Place vehicles depending on whether the charger is active + if (charger.v_isActive) { + for (J_EADieselVehicle car : assignedCars) { + J_ActivityTrackerTrips tripTracker = car.getTripTracker(); //Needed, as triptracker is removed when removeEnergyAsset is called. + car.removeEnergyAsset(); + car.setTripTracker(tripTracker);//Re-set the triptracker again, for storing. + } + } + + index += numberOfCars; + } +} + + + + VOID + double + 1753884000493 + f_simulateYearFromMainInterface + 1980 + 390 + + false + true + true + +gr_simulateYear.setVisible(false); +gr_loadIconYearSimulation.setVisible(true); + +new Thread( () -> { + //Run rapid run + energyModel.f_runRapidSimulation(); + + //After rapid run: remove loading screen + f_removeAllSimulateYearScreens(); + + if (c_selectedGridConnections.size() == 0){//Update main area collection + uI_Results.f_updateResultsUI(energyModel); + } + else if (c_selectedGridConnections.size() == 1){//Update selected GC area collection + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + } + else if(c_selectedGridConnections.size() > 1){//Update COOP area collection + uI_Results.f_updateResultsUI(v_customEnergyCoop); + } + if (uI_EnergyHub != null && uI_EnergyHub.v_energyHubCoop != null) { + uI_EnergyHub.uI_Results.f_updateResultsUI(uI_EnergyHub.v_energyHubCoop); + } + + //Update and show kpi summary chart after run + if(settings.showKPISummary() != null && settings.showKPISummary() && v_clickedObjectType != OL_GISObjectType.GRIDNODE){ + uI_Results.getCheckbox_KPISummary().setSelected(true, true); + } + + //Enable radio buttons again + uI_Results.f_enableNonLivePlotRadioButtons(true); + if(uI_EnergyHub != null){ + uI_EnergyHub.uI_Results.f_enableNonLivePlotRadioButtons(true); + } + if(uI_Company != null){ + uI_Company.uI_Results.f_enableNonLivePlotRadioButtons(true); + } + + b_resultsUpToDate = true; +}).start(); + + + VOID + double + 1753951802256 + f_initialPTSystemsOrder_households + 85 + -670 + + false + true + true + List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); +List<GCHouse> housesWithoutPT = houses.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW) ).collect(Collectors.toList()); +List<GCHouse> housesWithPT = new ArrayList<>(houses); +housesWithPT.removeAll(housesWithoutPT); + +c_orderedPTSystemsHouses = new ArrayList<>(housesWithoutPT); +c_orderedPTSystemsHouses.addAll(housesWithPT); + + + + VOID + double + 1754312747144 + f_setMapOverlay_ParkingType + 1940 + 1900 + + false + true + true + //Set legend +b_updateLiveCongestionColors = true; + +//Colour gis objects +for (GIS_Building building : energyModel.pop_GIS_Buildings){ + f_setColorsBasedOnParkingType_objects(building); +} +for (GridNode GN : energyModel.pop_gridNodes){ + f_setColorsBasedOnParkingType_gridnodes(GN); +} + + + VOID + double + 1754312755135 + f_setColorsBasedOnParkingType_objects + 1960 + 1920 + + false + true + true + + gis_area + GIS_Object + + if (gis_area.c_containedGridConnections.size() > 0) { + + //Unkown by default + Color objectColor = v_parkingSpaceColor_unkown; + Color objectLineColor = v_parkingSpaceLineColor_unkown; + + //Check if houses and if public parking + boolean containsHouses = false; + boolean containsHousesWithPublicParking = false; + for(GridConnection gc : gis_area.c_containedGridConnections){ + if(gc instanceof GCHouse){ + containsHouses = true; + if(!((GCHouse)gc).p_eigenOprit){ + containsHousesWithPublicParking = true; + } + } + } + + //Change color based on parking type if houses present + if(containsHouses){ + if(containsHousesWithPublicParking){ + objectColor = v_parkingSpaceColor_public; + objectLineColor = v_parkingSpaceLineColor_public; + } + else{ + objectColor = v_parkingSpaceColor_private; + objectLineColor = v_parkingSpaceLineColor_private; + } + } + gis_area.f_style(objectColor, objectLineColor, null, null); +} + + + VOID + double + 1754314128315 + f_setColorsBasedOnParkingType_gridnodes + 1960 + 1940 + + false + true + true + + GN + GridNode + + if(GN.gisRegion != null){ + GN.gisRegion.setFillColor(v_parkingSpaceColor_unkown); + GN.gisRegion.setLineColor(v_parkingSpaceLineColor_unkown); +} + + + RETURNS_VALUE + List<Integer> + 1756122011053 + f_getNumberOfCarsPerCharger + 110 + -570 + + false + true + true + + totalPublicParkedCars + int + + + totalPublicChargers + int + + List<Integer> numberOfCarsPerCharger = new ArrayList<>(); +if(totalPublicChargers > 0){ + + + int baseNumberOfCars = (int) floor(totalPublicParkedCars / totalPublicChargers); //Could also simply be totalPublicParkedCars / totalPublicChargers, as int/int is already floored, but just to make sure what should happen here it is written in full + int remainingCars = totalPublicParkedCars % totalPublicChargers; // extra vehicles that can be distributed + + for (int i = 0; i < totalPublicChargers; i++) { + if (i < remainingCars) { + numberOfCarsPerCharger.add(baseNumberOfCars + 1); // some chargers get one extra + } else { + numberOfCarsPerCharger.add(baseNumberOfCars); + } + } +} + +return numberOfCarsPerCharger; + + + RETURNS_VALUE + ShapeRadioButtonGroup + 1756369604291 + f_getScenarioButtons + -1020 + 100 + + false + true + true + return rb_scenarios; + + + VOID + double + 1756994047356 + f_enableAllPlots + -290 + 680 + + false + true + true + + resultsUI + UI_Results + + + selectedObjectInterface + I_EnergyData + + if (resultsUI.f_getSelectedObjectData() != null) { + uI_Results.f_updateResultsUI(selectedObjectInterface); + uI_Results.f_enableNonLivePlotRadioButtons(true); +} + + + VOID + double + 1756995218301 + f_setAllSimulateYearScreens + -290 + 700 + + false + true + true + gr_simulateYear.setVisible(true); +if(uI_EnergyHub != null){ + uI_EnergyHub.gr_simulateYearEnergyHub.setVisible(true); +} +if(uI_Company != null){ + uI_Company.gr_simulateYearScreen.setVisible(true); +} + + + VOID + double + 1756997038652 + f_removeAllSimulateYearScreens + -290 + 720 + + false + true + true + gr_simulateYear.setVisible(false); +gr_loadIconYearSimulation.setVisible(false); +if(uI_EnergyHub != null){ + uI_EnergyHub.gr_simulateYearEnergyHub.setVisible(false); + uI_EnergyHub.gr_loadIconYearSimulationEnergyHub.setVisible(false); +} +if(uI_Company != null){ + uI_Company.gr_simulateYearScreen.setVisible(false); + uI_Company.gr_loadIcon.setVisible(false); +} + + + VOID + double + 1760014973975 + f_cancelEnergyHubConfiguration + 2250 + -2160 + + false + true + true + button_clearFilters.action(); + +b_inEnergyHubMode = false; +b_inEnergyHubSelectionMode = false; + +f_setForcedClickScreenText(""); +f_setForcedClickScreenVisibility(false); + +cb_showFilterInterface.setSelected(false, true); + + + VOID + double + 1760085891920 + f_filterHasEV + -1550 + 350 + + false + true + true + + toBeFilteredGC + ArrayList<GridConnection> + + c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.c_electricVehicles.size() > 0)); +//Werkt nog niet helemaal naar behoren, want ghost assets worden nog niet aangemaakt, +//en dus hebben bedrijven met ghost ev geen c_electricVehicles en dus komen niet door deze filter. +// --> Als ghost vehicles ook worden aangemaakt, werkt het wel. + + + VOID + double + 1760955904715 + f_initializeAdditionalVehicles + 85 + -520 + + false + true + true + for(GridConnection GC : energyModel.UtilityConnections){ + c_additionalVehicles.put(GC.p_uid, new ArrayList<J_EAVehicle>()); +} + + + VOID + double + 1760978860758 + f_createAdditionalUIs + -280 + 400 + + false + true + true + //Energy hub dashboard +if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ + uI_EnergyHub = add_pop_UI_EnergyHub(); +} + +//Private companyUI dashboard +if(energyModel.UtilityConnections.size() > 0){ + uI_Company = add_pop_UI_Company(); +} + +/* +//Hydrogen dashboard NOT FINISHED +for(GCEnergyConversion conversionGC : energyModel.EnergyConversionSites){ + for(J_EAConversion conversionEA : conversionGC.c_conversionAssets){ + if(conversionEA instanceof J_EAConversionElectrolyser){ + uI_Hydrogen = add_pop_UI_Hydrogen(); + break; + } + } +} + +//Battery dashboard NOT FINISHED +for(GCGridBattery batteryGC : energyModel.GridBatteries){ + if(batteryGC.c_connectedGISObjects.size()>0){ + uI_Battery = add_pop_UI_Battery(); + break; + } +} +*/ + + + VOID + double + 1761060882101 + f_setCompaniesScenario + -1160 + 445 + + false + true + true + + scenarioMap + LinkedHashMap + + //Solution for now +int companyUIScenarioRBIndex = 0; +if(scenarioMap == c_scenarioMap_Current){ + companyUIScenarioRBIndex = 0; +} +else if(scenarioMap == c_scenarioMap_Future){ + companyUIScenarioRBIndex = 1; +} +else{ + throw new RuntimeException("Tried to call the setCompaniesScenario function with a non existing companyUI scenario"); +} + +//Set companyUI to correct radio button setting +uI_Company.b_runningMainInterfaceScenarioSettings = true; +for (GCUtility GC : energyModel.UtilityConnections){ + uI_Company.f_setCompanyUI(GC); + uI_Company.getRb_scenariosPrivateUI().setValue(companyUIScenarioRBIndex, true); +} +uI_Company.b_runningMainInterfaceScenarioSettings = false; + + + VOID + double + 1761117997540 + f_initializeScenarioRadioButton + -1180 + 60 + + false + true + true + //Set the default visualisation of the radiobuttons +Presentable presentable = this.presentation.getPresentable(); +boolean ispublic = true; +double x = rb_scenarios_template.getX(); +double y = rb_scenarios_template.getY(); +double width = rb_scenarios_template.getWidth(); +double height = 0;//Not needed, automatically adjust by adding options +Color textColor = Color.BLACK; +boolean enabled = true; +Font font = new Font("Dialog", Font.PLAIN, 14); +boolean vertical = true; + +//Set words for the radiobutton options +String[] RadioButtonOptions = f_getScenarioOptions(); + +//Check if it contains the custom option +boolean containsCustomOption = false; +for(String scenarioOption : RadioButtonOptions){ + if(scenarioOption.equals("Custom")){ + containsCustomOption = true; + } +} + +if(!containsCustomOption){ + traceln("WARNING: Scenario radiobutton option 'Custom' was not included in the custom scenario options, it has automatically been added!"); + RadioButtonOptions = Arrays.copyOf(RadioButtonOptions, RadioButtonOptions.length + 1); + RadioButtonOptions[RadioButtonOptions.length - 1] = "Custom"; +} + +//Create the radiobutton and set the correct action. +rb_scenarios = new ShapeRadioButtonGroup(presentable, ispublic, x ,y, width, height, textColor, enabled, font, vertical, RadioButtonOptions){ + @Override + public void action() { + f_scenarioRadioButtonAction(); + } +}; + +presentation.add(rb_scenarios); + +//For now: Adjust location of radiobutton title if 6 buttons +if(c_loadedMapOverlayTypes.size() > 5){ + gr_colorings.setY(-17); +} + + + RETURNS_VALUE + String + 1761119066060 + f_setSelectedScenario + -1170 + 200 + + false + true + true + //Default scenario switch statement, override this function if you want to add/change scenario options! +String selected_scenario = ""; + +switch(rb_scenarios.getValue()){ + case 0: + selected_scenario = "Huidige situatie"; + f_setScenario_Current(); + + break; + case 1: + if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ + selected_scenario = "Toekomstplannen"; + f_setScenario_Future(); + } + else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + selected_scenario = "Custom"; + t_scenarioDescription.setText(t_scenario_custom); + } + break; + case 2: + selected_scenario = "Custom"; + t_scenarioDescription.setText(t_scenario_custom); + break; + + default: + traceln("Unsupported scenario selected"); +} + +return selected_scenario; + + + RETURNS_VALUE + String[] + 1761119264046 + f_getScenarioOptions + -1150 + 80 + + false + true + true + //OVERRIDE THIS FUNCTION IF YOU WANT TO ADJUST THE SCENARIO OPTIONS. +// -> MAKE SURE TO ALWAYS INCLUDE A CUSTOM +String[] scenarioOptions = null; +if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ + scenarioOptions = new String[]{"Huidige situatie", "Toekomstplannen", "Custom"}; +} +else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + scenarioOptions = new String[]{"Huidige situatie", "Custom"}; +} +return scenarioOptions; + + + VOID + double + 1761119479231 + f_setScenario_Future + -1160 + 270 + + false + true + true + if(c_scenarioMap_Future != null){ + f_setCompaniesScenario(c_scenarioMap_Future); +} +//Set specifc assets active/non-active +f_projectSpecificScenarioSettings("Future"); + +//Set the scenario text +t_scenarioDescription.setText(t_scenario_future); + + + VOID + double + 1761119479233 + f_setScenario_Current + -1160 + 225 + + false + true + true + if(c_scenarioMap_Current != null){ + f_setCompaniesScenario(c_scenarioMap_Current); +} +//Reset sliders for households +if(project_data.project_type() == OL_ProjectType.RESIDENTIAL && p_residentialScenario_Current != null){ + f_setResidentialScenario_Current(); +} + + +//Set specifc assets active/non-active +f_projectSpecificScenarioSettings("Current"); + +//Set the scenario text +t_scenarioDescription.setText(t_scenario_current); + + + VOID + double + 1761119842140 + f_resetSpecialSlidersAndButtons + -1160 + 365 + + false + true + true + uI_Tabs.pop_tabEHub.get(0).getButton_remove_nfato().action(); + + + + + + + +//Project specific sliders and buttons reset +f_resetProjectSpecificSlidersAndButtons(); + + + VOID + double + 1761121949197 + f_resetProjectSpecificSlidersAndButtons + -1140 + 385 + + false + true + true + //OVERRIDE THIS FUNCTION IF YOU WANT TO RESET CERTAIN CUSTOM SLIDERS +//AND BUTTONS THAT ARE NOT IN THE GENERIC LOADERFACE + + + VOID + double + 1761122139097 + f_projectSpecificScenarioSettings + -1160 + 415 + + false + true + true + + selectedScenario + String + + //OVERRIDE IF THIS IS NEEDED FOR YOUR SPECIFIC PROJECT + +//Example code: +/* +//Find specific scenario assets +GridConnection testGC_new = findFirst(energyModel.UtilityConnections, GC -> GC.p_gridConnectionID.equals("testGC_nieuwBouw")); +GIS_Building testBuilding_additionalBuilding = findFirst(energyModel.pop_GIS_Buildings, B -> B.p_id.equals("testBuilding_additionalBuilding")); + +switch(selectedScenario){ + case "Current": + //Pause assets + testGC_new.f_setActive(false); + testBuilding_additionalBuilding.gisRegion.setVisible(false); + break; + + case "Future": + //Unpause assets + testGC_new.f_setActive(true); + testBuilding_additionalBuilding.gisRegion.setVisible(true); + break; +} +*/ + + + + VOID + double + 1761132028131 + f_setResidentialScenario_Current + -1160 + 465 + + false + true + true + ////Electricity +tabElectricity tabElec = uI_Tabs.pop_tabElectricity.get(0); + +double pv_pct = p_residentialScenario_Current.getHousesWithPV_pct(); +tabElec.sl_householdPVResidentialArea_pct.setValue(roundToInt(pv_pct), true); + +double battery_pct = p_residentialScenario_Current.getPvHousesWithBattery_pct(); +tabElec.sl_householdBatteriesResidentialArea_pct.setValue(roundToInt(battery_pct), true); + +//Electric cooking +double cooking_pct = p_residentialScenario_Current.getCooking_pct(); +tabElec.sl_householdElectricCookingResidentialArea_pct.setValue(roundToInt(cooking_pct), true); + +//Consumption growth +double electricityDemandIncrease_pct = p_residentialScenario_Current.getElectricityDemandIncrease_pct(); +tabElec.sl_electricityDemandIncreaseResidentialArea_pct.setValue(roundToInt(electricityDemandIncrease_pct), true); + +//Gridbatteries +double averageNeighbourhoodBatterySize_kWh = p_residentialScenario_Current.getAverageNeighbourhoodBatterySize_kWh(); +tabElec.sl_gridBatteriesResidentialArea_kWh.setValue(averageNeighbourhoodBatterySize_kWh, true); + +////Heating +tabHeating tabHeat = uI_Tabs.pop_tabHeating.get(0); + +double housesWithGasBurners_pct = p_residentialScenario_Current.getHousesWithGasBurners_pct(); +double housesWithHybridHeatpump_pct = p_residentialScenario_Current.getHousesWithHybridHeatpump_pct(); +double housesWithElectricHeatpump_pct = p_residentialScenario_Current.getHousesWithElectricHeatpump_pct(); +boolean cb_householdHTDistrictHeatingActive = p_residentialScenario_Current.getCb_householdHTDistrictHeatingActive(); +boolean cb_householdLTDistrictHeatingActive = p_residentialScenario_Current.getCb_householdLTDistrictHeatingActive(); + +if(cb_householdHTDistrictHeatingActive || cb_householdLTDistrictHeatingActive){ + tabHeat.sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, false); + tabHeat.sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, false); + tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, false); + if(cb_householdHTDistrictHeatingActive){ + tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); + tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, true); + } + else if(cb_householdLTDistrictHeatingActive){ + tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); + tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, true); + } +} +else{ + tabHeat.sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, true); + tabHeat.sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, true); + tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, true); + tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); + tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, false); +} + + +//Houses with Airco +double pctOfHousesWithAirco = p_residentialScenario_Current.getHousesWithAirco_pct(); +tabHeat.sl_householdAircoResidentialArea_pct.setValue(pctOfHousesWithAirco, true); + +//Houses with better isolation +double pctOfHousesWithImprovedInsulation = p_residentialScenario_Current.getHousesWithImprovedInsulation_pct(); +tabHeat.sl_householdHeatDemandReductionResidentialArea_pct.setValue(roundToInt(pctOfHousesWithImprovedInsulation), true); + +//PT +double nbHousesWithPT_pct = p_residentialScenario_Current.getNbHousesWithPT_pct(); +tabHeat.sl_rooftopPTHouses_pct.setValue(roundToInt(nbHousesWithPT_pct), true); + + + +////Mobility +tabMobility tabMob = uI_Tabs.pop_tabMobility.get(0); + +//Private EV +double privateEVs_pct = p_residentialScenario_Current.getPrivateEVs_pct(); +double privateEVsThatSupportV2G_pct = p_residentialScenario_Current.getPrivateEVsThatSupportV2G_pct(); +tabMob.sl_privateEVsResidentialArea_pct.setValue(roundToInt(privateEVs_pct), true); +tabMob.sl_EVsThatSupportV2G_pct.setValue(roundToInt(privateEVsThatSupportV2G_pct), true); + +//Selected charging mode +String selectedChargingAttitudeStringPrivateEV = p_residentialScenario_Current.getSelectedChargingAttitudeStringPrivateEVs(); +boolean V2GActivePrivateEV = p_residentialScenario_Current.getV2GActivePrivateEVs(); + +tabMob.cb_chargingAttitudePrivateParkedCars.setValue(selectedChargingAttitudeStringPrivateEV, true); +tabMob.cb_activateV2GPrivateParkedCars.setSelected(V2GActivePrivateEV, true); + +//Chargers +double activePublicChargers_pct = p_residentialScenario_Current.getActivePublicChargers_pct(); +tabMob.sl_publicChargersResidentialArea_pct.setValue(roundToInt(activePublicChargers_pct), true); + +double V1G_pct = p_residentialScenario_Current.getChargersV1G_pct(); +double V2G_pct = p_residentialScenario_Current.getChargersV2G_pct(); +tabMob.sl_chargersThatSupportV1G_pct.setValue(roundToInt(V1G_pct), true); +tabMob.sl_chargersThatSupportV2G_pct.setValue(roundToInt(V2G_pct), true); + +//Selected charging mode +String selectedChargingAttitudeStringChargers = p_residentialScenario_Current.getSelectedChargingAttitudeStringChargers(); +boolean V2GActiveChargers = p_residentialScenario_Current.getV2GActiveChargers(); + +tabMob.cb_chargingAttitudePrivatePublicChargers.setValue(selectedChargingAttitudeStringChargers, true); +tabMob.cb_activateV2GPublicChargers.setSelected(V2GActiveChargers, true); + + + VOID + double + 1761134737334 + f_storeResidentialScenario_Current + -1180 + 130 + + false + true + true + //Create the class that will store the initial slider settings of a residential model +p_residentialScenario_Current = new J_SliderSettings_Residential(); + +////Electricity +if(uI_Tabs.pop_tabElectricity.size() > 0){ + tabElectricity tabElec = uI_Tabs.pop_tabElectricity.get(0); + + double housesWithPV_pct = tabElec.sl_householdPVResidentialArea_pct.getValue(); + p_residentialScenario_Current.setHousesWithPV_pct(housesWithPV_pct); + + double pvHousesWithBattery_pct = tabElec.sl_householdBatteriesResidentialArea_pct.getValue(); + p_residentialScenario_Current.setPvHousesWithBattery_pct(pvHousesWithBattery_pct); + + + //Electric cooking + double cooking_pct = tabElec.sl_householdElectricCookingResidentialArea_pct.getValue(); + p_residentialScenario_Current.setCooking_pct(cooking_pct); + + //Consumption growth + double electricityDemandIncrease_pct = tabElec.sl_electricityDemandIncreaseResidentialArea_pct.getValue(); + p_residentialScenario_Current.setElectricityDemandIncrease_pct(electricityDemandIncrease_pct); + + //Gridbatteries + double averageNeighbourhoodBatterySize_kWh = tabElec.sl_gridBatteriesResidentialArea_kWh.getValue(); + p_residentialScenario_Current.setAverageNeighbourhoodBatterySize_kWh(averageNeighbourhoodBatterySize_kWh); +} + +////Heating +if(uI_Tabs.pop_tabHeating.size() > 0){ + tabHeating tabHeat = uI_Tabs.pop_tabHeating.get(0); + + double housesWithGasBurners_pct = tabHeat.sl_householdGasBurnerResidentialArea_pct.getValue(); + double housesWithHybridHeatpump_pct = tabHeat.sl_householdHybridHeatpumpResidentialArea.getValue(); + double housesWithElectricHeatpump_pct = tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.getValue(); + boolean cb_householdHTDistrictHeatingActive = tabHeat.cb_householdHTDistrictHeatingResidentialArea.isSelected(); + boolean cb_householdLTDistrictHeatingActive = tabHeat.cb_householdLTDistrictHeatingResidentialArea.isSelected(); + + p_residentialScenario_Current.setHousesWithGasBurners_pct(housesWithGasBurners_pct); + p_residentialScenario_Current.setHousesWithHybridHeatpump_pct(housesWithHybridHeatpump_pct); + p_residentialScenario_Current.setHousesWithElectricHeatpump_pct(housesWithElectricHeatpump_pct); + p_residentialScenario_Current.setCb_householdHTDistrictHeatingActive(cb_householdHTDistrictHeatingActive); + p_residentialScenario_Current.setCb_householdLTDistrictHeatingActive(cb_householdLTDistrictHeatingActive); + + + //Houses with Airco + double housesWithAirco_pct = tabHeat.sl_householdAircoResidentialArea_pct.getValue(); + p_residentialScenario_Current.setHousesWithAirco_pct(housesWithAirco_pct); + + //Houses with better isolation + double housesWithImprovedInsulation_pct = tabHeat.sl_householdHeatDemandReductionResidentialArea_pct.getValue(); + p_residentialScenario_Current.setHousesWithImprovedInsulation_pct(housesWithImprovedInsulation_pct); + + //PT + double nbHousesWithPT_pct = tabHeat.sl_rooftopPTHouses_pct.getValue(); + p_residentialScenario_Current.setNbHousesWithPT_pct(nbHousesWithPT_pct); +} + +////Mobility +if(uI_Tabs.pop_tabMobility.size() > 0){ + tabMobility tabMob = uI_Tabs.pop_tabMobility.get(0); + + //Private EV + double privateEVs_pct = tabMob.sl_privateEVsResidentialArea_pct.getValue(); + double privateEVsThatSupportV2G_pct = tabMob.sl_EVsThatSupportV2G_pct.getValue(); + p_residentialScenario_Current.setPrivateEVs_pct(privateEVs_pct); + p_residentialScenario_Current.setPrivateEVsThatSupportV2G_pct(privateEVsThatSupportV2G_pct); + + //Selected charging mode + String selectedChargingAttitudeStringPrivateEVs = tabMob.cb_chargingAttitudePrivateParkedCars.getValue(); + boolean V2GActivePrivateEVs = tabMob.cb_activateV2GPrivateParkedCars.isSelected(); + p_residentialScenario_Current.setSelectedChargingAttitudeStringPrivateEVs(selectedChargingAttitudeStringPrivateEVs); + p_residentialScenario_Current.setV2GActivePrivateEVs(V2GActivePrivateEVs); + + //Chargers + double activePublicChargers_pct = tabMob.sl_publicChargersResidentialArea_pct.getValue(); + double chargersV1G_pct = tabMob.sl_chargersThatSupportV1G_pct.getValue(); + double chargersV2G_pct = tabMob.sl_chargersThatSupportV2G_pct.getValue(); + + p_residentialScenario_Current.setActivePublicChargers_pct(activePublicChargers_pct); + p_residentialScenario_Current.setChargersV1G_pct(chargersV1G_pct); + p_residentialScenario_Current.setChargersV2G_pct(chargersV2G_pct); + + //Selected charging mode + String selectedChargingAttitudeStringChargers = tabMob.cb_chargingAttitudePrivatePublicChargers.getValue(); + boolean V2GActiveChargers = tabMob.cb_activateV2GPublicChargers.isSelected(); + p_residentialScenario_Current.setSelectedChargingAttitudeStringChargers(selectedChargingAttitudeStringChargers); + p_residentialScenario_Current.setV2GActiveChargers(V2GActiveChargers); +} + + + RETURNS_VALUE + String + 1762253228735 + f_getDateAndTimeString + 940 + -340 + + false + true + true + Date date = energyModel.f_getDate(); + +SimpleDateFormat formatter = new SimpleDateFormat(); +formatter.applyPattern("dd MMM yyyy, kk:mm"); + +return formatter.format(date); + + + RETURNS_VALUE + String + 1762253251373 + f_getDateString + 940 + -320 + + false + true + true + Date date = energyModel.f_getDate(); + +SimpleDateFormat formatter = new SimpleDateFormat(); +formatter.applyPattern("dd MMM yyyy"); + +return formatter.format(date); + + + VOID + double + 1762356801733 + f_setLoadingScreen + 3080 + 930 + + false + true + true + + visibility + boolean + + + xOffset + double + + + yOffset + double + + if (visibility) { + // Screen Size / View Area is 1920 x 980, so centre at 960, 490 + // Icon Size is 180 x 180, so top left at 960 - 90 = 870, 490 - 90 = 400 + double xPos = 870 + xOffset; + double yPos = 400 + yOffset; + + image_loadingScreenIcon.setPos(xPos, yPos); + + // Make sure the image is at the top of the presentation level + f_setShapePresentationOnTop(image_loadingScreenIcon); + image_loadingScreenIcon.setVisible(true); +} +else { + image_loadingScreenIcon.setVisible(false); +} + + + VOID + double + 1762533624267 + f_scenarioRadioButtonAction + -1180 + 180 + + false + true + true + //Set boolean of running main interface scenario true +b_runningMainInterfaceScenarios = true; + +////Set selected scenario +String selected_scenario = f_setSelectedScenario(); + +//Set scenario name text to the correct scenario +t_scenarioName.setText("Scenario: " + selected_scenario); +traceln("Selected scenario: \"" + selected_scenario + "\""); + +//Deselect the selected building, if selected GC is now paused +if(c_selectedGridConnections.size()>0 && !c_selectedGridConnections.get(0).v_isActive){ + f_clearSelectionAndSelectEnergyModel(); +} + +//Set boolean of running main interface scenario false +b_runningMainInterfaceScenarios = false; + +if(!selected_scenario.equals("Custom")){ + f_resetSettings(); + + f_updateMainInterfaceSliders(); + + //Colour recolor pv map again if it is active + if(c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); + } +} + + + +/* +//Pause simulation and set loading screen +pauseSimulation(); +f_setLoadingScreen(true, 0, 0); + +new Thread( () -> { + + //Set selected scenario + String selected_scenario = f_setSelectedScenario(); + + //Set scenario name text to the correct scenario + t_scenarioName.setText("Scenario: " + selected_scenario); + traceln("Selected scenario: \"" + selected_scenario + "\""); + + //Deselect the selected building, if selected GC is now paused + if(c_selectedGridConnections.size()>0 && !c_selectedGridConnections.get(0).v_isActive){ + f_clearSelectionAndSelectEnergyModel(); + } + + //Set boolean of running main interface scenario true + b_runningMainInterfaceScenarios = false; + + if(!selected_scenario.equals("Custom")){ + f_resetSettings(); + + f_updateMainInterfaceSliders(); + + //Colour recolor pv map again if it is active + if(c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ + rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); + } + } + + //Resume live simulation and remove loading screen + runSimulation(); + f_setLoadingScreen(false, 0, 0); + +}).start(); +*/ + + + VOID + double + 1762775121080 + f_setScenarioToCustom + -1160 + 315 + + false + true + true + String[] scenarioOptions = f_getScenarioOptions(); + +int customOptionIndex = 0; +for(String scenarioOption : scenarioOptions){ + if(scenarioOption.equals("Custom")){ + break; + } + customOptionIndex++; +} + +rb_scenarios.setValue(customOptionIndex, true); + + + VOID + double + 1763657360843 + f_setFilterComboBoxOptions + -1580 + 50 + + false + true + true + //Check wheter a filter will result in anything. The order it is added here, is the order it will show up in the filter drop down menu. +if(energyModel.Houses.size() > 0){ + c_cbFilterOptions.add(OL_FilterOptionsGC.HOUSES); +} +if(energyModel.UtilityConnections.size() > 0){ + c_cbFilterOptions.add(OL_FilterOptionsGC.COMPANIES); + if(v_numberOfSurveyCompanies > 0){ + c_cbFilterOptions.add(OL_FilterOptionsGC.DETAILED); + } +} + +if(findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION).size() > 1){ + c_cbFilterOptions.add(SELECTED_NEIGHBORHOOD); +} +if(b_gridLoopsAreDefined){ + c_cbFilterOptions.add(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP); +} + + +//More specific default options only available if GC accestype is full +if(user.GCAccessType == OL_UserGCAccessType.FULL){ + c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_PV); + if(c_cbFilterOptions.contains(OL_FilterOptionsGC.COMPANIES)){ + c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_TRANSPORT); + c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_EV); + } + else{ + for (J_EA ea : energyModel.c_energyAssets) { + if (ea instanceof J_EAVehicle) { + c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_TRANSPORT); + c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_EV); + break; + } + } + } +} + +c_cbFilterOptions.add(OL_FilterOptionsGC.NONDETAILED); + + +String[] filterOptionsNames = new String[1 + c_cbFilterOptions.size()]; +filterOptionsNames[0] = "-"; +for(int j = 1; j < c_cbFilterOptions.size() + 1; j++){ + filterOptionsNames[j] = map_filterOptionUINames.get(c_cbFilterOptions.get(j-1)); +} + +cb_filterOptions.setItems(filterOptionsNames, false); + +//Set cb to correct option +cb_filterOptions.setValueIndex(0, false); + + +//Create the reverse of map_filterOptionUINames -> map_UINamesFilterOption +map_UINamesFilterOption = new HashMap<>(); +for (Map.Entry<OL_FilterOptionsGC, String> entry : map_filterOptionUINames.entrySet()) { + map_UINamesFilterOption.put(entry.getValue(), entry.getKey()); +} + + + + VOID + double + 1764776636006 + f_selectEnergyModel + 70 + 1220 + + false + true + true + v_clickedObjectType = OL_GISObjectType.REGION; +uI_Results.f_updateResultsUI(energyModel); + +//Enable kpi summary button +uI_Results.getCheckbox_KPISummary().setEnabled(true); + + + RETURNS_VALUE + boolean + 1764777516393 + f_checkIfGCsAreAccesible + -670 + 875 + + false + true + true + + GCList + List<GridConnection> + + if(!settings.isPublicModel() && user.GCAccessType == OL_UserGCAccessType.FULL){ + return true; +} +if(GCList.size() >= p_minSelectedGCForPublicAggregation){ + return true; +} +for(GridConnection GC : GCList){ + if(!GC.p_owner.b_dataIsAccessible){ + return false; + } +} +return true; + + + RETURNS_VALUE + List<GridConnection> + 1765207097247 + f_getMainInterfaceSliderEAGCs + -650 + 640 + + false + true + true + List<GridConnection> electricityTabEASliderGCs = new ArrayList<GridConnection>(); + +//Find the energy production slider gcs that are not specificly for the EnergyHub +List<GCEnergyProduction> electricityTabEASliderGCs_prod = findAll(energyModel.EnergyProductionSites, sliderProd -> + sliderProd.p_isSliderGC && + !sliderProd.p_gridConnectionID.equals(p_defaultEnergyHubSliderGCName_solarfarm) && + !sliderProd.p_gridConnectionID.equals(p_defaultEnergyHubSliderGCName_windfarm)); +if(electricityTabEASliderGCs_prod.size() == 2){ + electricityTabEASliderGCs.addAll(electricityTabEASliderGCs_prod); +} +else{ + throw new RuntimeException("electricityTabEASliderGCs_prod.size() != 2 -> Should be exactly 2, one solarfarm and one windfarm."); +} + +//Find the GridBattery slider gcs that are not specificly for the EnergyHub +List<GCGridBattery> electricityTabEASliderGCs_bat = findAll(energyModel.GridBatteries, sliderBat -> sliderBat.p_isSliderGC && + !sliderBat.p_gridConnectionID.equals("EnergyHub battery slider")); + +if(project_data.project_type() == OL_ProjectType.BUSINESSPARK && electricityTabEASliderGCs_bat.size() != 1){ + throw new RuntimeException("electricityTabEASliderGCs_bat.size() != 1 -> Should be exactly 1 for businesspark models."); +} +else{ + electricityTabEASliderGCs.addAll(electricityTabEASliderGCs_bat); +} + +return electricityTabEASliderGCs; + + + + + 1744624088854 + excel_exportBalanceLoadData + true + -555 + -365 + + false + true + true + + zerointerfaceloader + Export_ModelData.xlsx + + false + true + true + + + + + 1658477103135 + connections + 50 + -230 + + false + true + true + false + COLLECTION_OF_LINKS + true + Object + SOLID + 1 + -16777216 + UNDER_AGENTS + NONE + END + + + + + 1708522361909 + pop_UI_Company + -260 + 460 + + false + true + true + + zerointerfaceloader + UI_company + + + + zerointerfaceloader + UI_company + 1708522361868 + + + + + p_companyName + + + p_maxAddedVehicles + + + p_scenarioSettings_Current + + + p_scenarioSettings_Future + + + p_gridConnection + + + true + + 0 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + EMPTY + + 1658477089963 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1709049456144 + pop_UI_Battery + -260 + 540 + + false + true + true + + zerointerfaceloader + UI_Battery + + + + zerointerfaceloader + UI_Battery + 1709049456141 + + + + + p_amountOfGISObjects + + + p_amountOfGC + + + true + + 0 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + EMPTY + + 1658477089962 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1716193013122 + uI_Results + -670 + 760 + + false + true + true + 1716193014596 + + digital_twin_results + UI_Results + + + + digital_twin_results + UI_Results + 1704197366556 + + + + + energyModel + + energyModel + + + + p_cutOff_MWh + + + gr_infoText + + gr_infoText + + + + gr_closeInfoText + + gr_closeInfoText + + + + t_infoTextDescription + + t_infoTextDescription + + + + rect_infoText + + rect_infoText + + + + p_currentActiveInfoBubble + + p_currentActiveInfoBubble + + + + false + + 100 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089961 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1717506326727 + pop_UI_Hydrogen + -260 + 500 + + false + true + true + + zerointerfaceloader + UI_Hydrogen + + + + zerointerfaceloader + UI_Hydrogen + 1717506309785 + + + + + p_amountOfGISObjects + + + p_amountOfGC + + + true + + 0 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + "" + + EMPTY + + 1658477089960 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722252541830 + uI_Tabs + -670 + 581 + + false + true + true + 1722252542596 + + zerointerfaceloader + UI_Tabs + + + + zerointerfaceloader + UI_Tabs + 1722245292191 + + + + false + + 100 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + "" + + SPECIFIED_NUMBER + + 1658477089959 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + 1722252541830 + pop_UI_EnergyHub + -260 + 420 + + false + true + true + 1747229957336 + + zerointerfaceloader + UI_EnergyHub + + + + zerointerfaceloader + UI_EnergyHub + 1709049506460 + + + + + p_energyHubBackGroundColor + + + p_energyHubLineColor + + + p_energyHubLineWidth + + + p_energyHubLineStyle + + + true + + 0 + + ARRAY_LIST_BASED + XYZ + + 0 + + + 0 + + + "" + + EMPTY + + 0 + + + ONE_AGENT_PER_DATABASE_RECORD + + + + + + 1658477103139 + level + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + 1756124196459 + rect_sliderCollectionOrdering + 0 + -800 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -14774017 + null + SOLID + 1220 + 400 + 0.0 + -1 + null + + + 1701947860073 + rect_canvas + -600 + -200 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 6000 + 2400 + 0.0 + -1 + null + + + 1701952231399 + rect_gismap + 400 + 85 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1020 + 675 + 0.0 + + zenmocolor_blue3.getFillColor() + null + + + 1747229984708 + gr_energyHubPresentation + 2600 + -2200 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1747229957336 + pop_UI_EnergyHub_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 52.565832561661324 + 6.28960063917648 + + + + + 1724074923402 + gr_logos + 940 + -10 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074980260 + rect_logoBackground + -960 + -70 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1960 + 160 + 0.0 + 682673374 + v_backgroundColor + null + + + 1724074987235 + image_tueLogo + 730 + 25 + + true + true + false + SHAPE_DRAW_2D3D + getExperimentHost().openWebSite("https://www.tue.nl/en/"); + false + 0 + 205.802 + 60 + 0.0 + + + zerointerfaceloader + logo_TUe_red.png + + + zerointerfaceloader + logo_TUe_white.png + + + false + + + 1731938214224 + image_luxLogo + -858 + 13 + + true + true + false + SHAPE_DRAW_2D3D + //Go to website on click +getExperimentHost().openWebSite("https://lux.energy/"); + + false + 0 + 216 + 90.947 + 0.0 + + + zerointerfaceloader + logo_lux-energy-twin.png + + + false + + + 1758877617096 + image_zenmoLogo + 532 + 16 + + true + true + false + SHAPE_DRAW_2D3D + getExperimentHost().openWebSite("https://zenmo.com/"); + false + 0 + 170 + 73 + 0.0 + + + zerointerfaceloader + logo_zenmo.png + + + false + + + + + 1665052211228 + rect_mainFunctions + -700 + 0 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16744448 + null + SOLID + 680 + 1060 + 0.0 + -1 + null + + + 1705481955546 + rect_simulationEngine + -270 + 860 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16744448 + null + SOLID + 250 + 200 + 0.0 + -1 + null + + + 1665052603927 + rect_input + -700 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16744448 + null + SOLID + 169 + 40 + 0.0 + -1 + null + + + 1665052191319 + t_input + -640 + 5 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16744448 + Input + + SansSerif + 18 + + + LEFT + + + 1690205003572 + line_simulationEngine + -230 + 890 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 170 + 0 + 0 + + + 1690205003577 + t_simulationEngine + -151 + 870 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simulation engine + + SansSerif + 14 + + + CENTER + + + 1690975123923 + t_date + 420 + 54 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Datum + energyModel.v_isRapidRun ? f_getDateString() : f_getDateAndTimeString() + + SansSerif + 16 + + + LEFT + + + 1696520897606 + gr_zoomButton + 1330 + 680 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1696520897608 + arc_zoomIn + -2.5319999999999965 + -20.114000000000004 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -13882324 + null + SOLID + 0 + 0.0 + 17.53 + 40 + -179.1999969482422 + 178.1999969482422 + -13882324 + null + + + 1696520897610 + arc_zoomOut + -2.483000000000004 + 8.137 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -13882324 + null + SOLID + 0 + 0.0 + 17.483 + 40 + 1.2000000476837158 + 178.1999969482422 + -13882324 + null + + + 1696520897612 + rect_zoomButton + -20 + -20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -13882324 + null + SOLID + 35 + 28 + 0.0 + -13882324 + null + + + 1696520897614 + line_zoomButtonSeperator + -16 + -5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 1 + 0 + 1 + 0 + 27 + 0 + 0 + + + 1696520897616 + line_zoomIn1 + -9 + -21 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -1 + null + SOLID + 1 + 0 + 1 + 0 + 12 + 0 + 0 + + + 1696520897618 + line_zoomIn2 + -3 + -27 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -1 + null + SOLID + 1 + 0 + 1 + 0 + 0 + 12 + 0 + + + 1696520897620 + line_zoomOut + -10 + 8 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2 + -1 + null + SOLID + 1 + 0 + 1 + 0 + 15 + 0 + 0 + + + 1696520897622 + rect_zoomIn + -20 + -35 + + true + true + false + SHAPE_DRAW_2D3D + map.zoomIn(); + false + 0 + 10 + 1 + + null + SOLID + 35 + 30 + 0.0 + + null + + + 1696520897624 + rect_zoomOut + -20 + -5 + + true + true + false + SHAPE_DRAW_2D3D + map.zoomOut(); + false + 0 + 10 + 1 + + null + SOLID + 35 + 30 + 0.0 + + null + + + + + 1696837759915 + t_legendaColors + 380 + 1020 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Legenda Colors + + SansSerif + 18 + + + LEFT + + + 1696863329245 + t_mapClickingFunctions + 40 + 1020 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Map connections and clicking + + SansSerif + 18 + + + LEFT + + + 1702552223737 + t_stylingFunctions + -680 + 301 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Interface styling: + + SansSerif + 14 + + + LEFT + + + 1704210756310 + gr_clickedObjectInfo + 370 + 220 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1713259123999 + rect_clickedObjectInfo + 40 + -131 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + zenmocolor_blue3.getFillColor() + null + SOLID + 555 + 20 + 0.0 + -1 + zenmocolor_blue3.getFillColor() + null + + + 1701879145306 + t_clickedObjectInfo + 321 + -129 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer een gebouw + v_clickedObjectText.equals("None") ? +"Selecteer een gebouw of trafostation" : +v_clickedObjectText + + SansSerif + 12 + + + CENTER + + + + + 1705663500141 + t_buildingColors + 680 + 1030 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Building colors + + SansSerif + 14 + + + LEFT + + + 1705663820235 + t_gridnodeColors + 1022 + 1030 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + GridNode colors + + SansSerif + 14 + + + LEFT + + + 1705664522164 + t_specificBuildingColors + 680 + 1250 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Specific building colors + + SansSerif + 14 + + + LEFT + + + 1705667994053 + t_areaColors + 1300 + 1180 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Area colors + + SansSerif + 14 + + + LEFT + + + 1706004011983 + txt_generalColors + 1300 + 1030 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + General styling + + SansSerif + 14 + + + LEFT + + + false + 1708522580070 + button_goToUI + 1140 + 87 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + if(energyModel.v_rapidRunData != null){ + switch(v_clickedObjectType){ + + case BUILDING: + uI_Company.f_setCompanyUI(c_selectedGridConnections.get(0)); + uI_Company.va_companyUI.navigateTo(); + v_currentViewArea = uI_Company.va_companyUI; + break; + + case ELECTROLYSER: + //uI_Hydrogen.f_setHydrogenUI(c_selectedGridConnections.get(0)); + uI_Hydrogen.va_hydrogenUI.navigateTo(); + v_currentViewArea = uI_Hydrogen.va_hydrogenUI; + break; + + case BATTERY: + //uI_Battery.f_setBatteryUI(c_selectedGridConnections.get(0)); + uI_Battery.va_batteryUI.navigateTo(); + v_currentViewArea = uI_Battery.va_batteryUI; + break; + + case SOLARFARM: + case WINDFARM: + case CHARGER: + default: + break; + } +} +else{ + f_setErrorScreen("Je kan alleen naar de companyUI gaan als er een jaar simulatie is voltooid.", 0, 0); +} + + + + + Ga naar bedrijfs interface + + + + 1708595212229 + txt_additionalUIs + -290 + 370 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Additional UIs: + + SansSerif + 14 + + + LEFT + + + false + 1709718299889 + rb_scenarios_template + 19.333 + 144.667 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + false + true + f_scenarioRadioButtonAction(); + + + + 0 + VERTICAL + + + + false + + + + 1709718299891 + t_scenarios + 19.333 + 118.667 + + true + true + false + true + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer een scenario + + Calibri + 20 + + + LEFT + + + 1709718299897 + gr_scenarioDescription + 199.333 + 374.667 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1709718299901 + t_scenarioDescription + 0.667 + -24.667 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Het huidige scenario bevat de energie dynamieken van dit moment. +Dit omvat o.a. de huidige zonnepanelen op de daken van huizen en +bedrijven, het aantal voertuigen per type, de electriciteitsconsumptie +van het gebied, en de huidige gasconsumptie voor verwarming. + + SansSerif + 11 + + + CENTER + + + 1709718299903 + t_scenarioName + 0 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Huidig scenario + + Calibri + 16 + + + CENTER + + + + + 1710174312959 + t_resultsUIFunctions + -680 + 730 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Results UI initialization + + SansSerif + 14 + + + LEFT + + + 1713429772427 + t_scenarioDictionaries + -290 + 290 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Scenario dictionaries + + SansSerif + 12 + + + LEFT + + + 1713431901010 + t_initializationFunctions + -680 + 150 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Interface initialization functions + + SansSerif + 14 + + + LEFT + + + 1715951689412 + t_inputParameters + -680 + 50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Input Parameters + + SansSerif + 14 + + + LEFT + + + false + 1716988295617 + button_gotoEngine + -260 + 960 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + energyModel.va_engine.navigateTo(); + + + + Go to Engine + + + + 1719217632486 + line_ordereringDescription + 40 + -755 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 1 + 0 + 1 + 0 + 210 + 0 + 0 + + + 1719217632488 + t_ordereringDescription + 40 + -780 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Initial conditions & ordering + + SansSerif + 16 + + + LEFT + + + 1719829894799 + t_outsideTemperature + 1326 + 17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -7631989 + Buitentemperatuur: 23 graden + "Buiten temperatuur " + v_outsideTemperature + " graden" + + Cambria + 10 + + + RIGHT + + + 1719829988146 + t_solarIrradiance + 1326 + 42 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -7631989 + Zonne instraling: 12 w/m2 + "Zonneinstraling " + v_solarIrradiance + " W/m2" + + Cambria + 10 + + + RIGHT + + + 1719829993001 + t_windSpeed + 1326 + 67 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -7631989 + Windsnelheid: hoog + "Windsnelheid: " + v_windspeed + + Cambria + 10 + + + RIGHT + + + 1719847144211 + plot_outsideTemperature + 1335 + 12 + + true + true + false + SHAPE_DRAW_2D3D + true + + 1751013532916 + true + 1719907200000 + + 0 + HOUR + + + 1 + HOUR + + + false + 84 + 23 + + -16777216 + + 0 + 0 + 84 + 23 + -1 + -16777216 + -6632142 + + + SOUTH + -16777216 + 30 + + + NONE + NONE + -10496 + + false + MOVEMENT_WITH_TIME + MODEL_TIME_UNIT + -5 + 28 + FIXED + true + LINEAR + + Title + 1719847144208 + my_dataset + -16776961 + v_outsideTemperature + true + NONE + 1.0 + + 96 + 96 + true + HH_mm + + + 1719848137592 + plot_solarIrradiance + 1335 + 38 + + true + true + false + SHAPE_DRAW_2D3D + true + + 1751013532918 + true + 1719907200000 + + 0 + HOUR + + + 1 + HOUR + + + false + 84 + 23 + + -16777216 + + 0 + 0 + 84 + 23 + -1 + -16777216 + -6632142 + + + SOUTH + -16777216 + 30 + + + NONE + NONE + -10496 + + false + MOVEMENT_WITH_TIME + MODEL_TIME_UNIT + 0 + 1000 + FIXED + true + LINEAR + + Title + 1719848137589 + my_dataset + -10496 + v_solarIrradiance + true + NONE + 1.0 + + 96 + 96 + true + HH_mm + + + 1720909739871 + gr_multipleBuildingInfo + 1040 + 55 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + false + 1720904897811 + button_nextBuilding + -65 + 32 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + v_selectedGridConnectionIndex < v_nbGridConnectionsInSelectedBuilding + if (v_selectedGridConnectionIndex < v_nbGridConnectionsInSelectedBuilding ){ + v_selectedGridConnectionIndex += 1; + + c_selectedGridConnections = new ArrayList<>(); + + if(v_customEnergyCoop != null){ + energyModel.f_removeEnergyCoop(v_customEnergyCoop); + v_customEnergyCoop = null; + } + + if( v_selectedGridConnectionIndex > 0){ + c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + } + /* + else { + c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); + v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); + uI_Results.f_updateResultsUI(v_customEnergyCoop); + } + */ + /* + //Update the resultsUI + f_updateUIResultsData(); + */ + + //Set dashboard UI button + f_setUIButton(); +} + + + + Toon volgend adres + + + + false + 1720904921271 + button_previousBuilding + -65 + 53 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + v_selectedGridConnectionIndex > 0 + if (v_selectedGridConnectionIndex > 0){ + c_selectedGridConnections = new ArrayList<>(); + v_selectedGridConnectionIndex -= 1; + + if( v_selectedGridConnectionIndex > 0){ + c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); + uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); + } + else { + c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); + + v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); + uI_Results.f_updateResultsUI(v_customEnergyCoop); + } + + /* + //Update the resultsUI + f_updateUIResultsData(); + */ + + //Set dashboard UI button + f_setUIButton(); +} + + + + + + + Toon vorig adres + + + + 1720908988631 + t_multipleBuildingInfo + -360 + 57 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Je kijkt naar de som van alle 5 addressen samen in het geselecteerde pand + v_selectedGridConnectionIndex > 0 && c_selectedGridConnections.size() > 0 && c_selectedGridConnections.get(0).p_owner.p_detailedCompany ? +"Je kijkt naar: " + c_selectedGridConnections.get(0).p_ownerID + ", " + c_selectedGridConnections.get(0).p_address.getAddress() +: +v_selectedGridConnectionIndex > 0 ? +"Je kijkt naar het " + (v_selectedGridConnectionIndex ) + "e adres in het geselecteerde pand" +: +"Je kijkt naar de som van alle " + v_nbGridConnectionsInSelectedBuilding + " addressen in dit pand" + + SansSerif + 11 + + + CENTER + + + + + 1721819768547 + rect_CustomColors + 1880 + 1400 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -10496 + null + SOLID + 630 + 610 + 0.0 + -1 + null + + + 1721819794985 + txt_mapOverlayFunctionalities + 1900 + 1410 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Map Overlay Functionalities + + + SansSerif + 18 + + + LEFT + + + 1722252542596 + uI_Tabs_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 52.51902183517265 + 6.169494834925871 + + + 1724419174775 + rect_scenarioText + -1210 + 0 + + false + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 460 + 700 + 0.0 + -1 + null + + + 1724419379552 + txt_scenarioFunctions + -1190 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Scenario functions, text and settings + + SansSerif + 14 + + + LEFT + + + false + 1725017697644 + checkbox_cabels + 20 + 460 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + for(GISRoute GISCable : c_LVCables){ + GISCable.setVisible(b_showCables); +} + +for(GISRoute GISCable : c_MVCables){ + GISCable.setVisible(b_showCables); +} + + + + + Toon stroom kabels + false + true + b_showCables + + + + 1725020138710 + map + 410 + 130 + + true + true + false + true + SHAPE_DRAW_2D3D + if(b_inEnergyHubMode ){ + if(b_inEnergyHubSelectionMode){ + f_selectEnergyHubGC(clickx, clicky); + } +} +else if(b_inManualFilterSelectionMode){ + f_selectManualFilteredGC(clickx, clicky); +} +else{ + if (uI_Tabs.pop_tabEHub.size() > 0 && uI_Tabs.pop_tabEHub.get(0).b_NFATOListener) { + uI_Tabs.pop_tabEHub.get(0).f_checkGISRegion(clickx, clicky); + } + else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || + c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ + f_selectGridLoop(clickx, clicky); + } + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + f_selectNeighborhood(clickx, clicky); + } + } + + else { + if(c_selectedFilterOptions.size() > 0){ + f_removeAllFilters(); + } + f_selectGISRegion(clickx, clicky); + } +} + false + 1000 + 620 + if(b_inEnergyHubMode ){ + if(b_inEnergyHubSelectionMode){ + f_selectEnergyHubGC(clickx, clicky); + } +} +else if(b_inManualFilterSelectionMode){ + f_selectManualFilteredGC(clickx, clicky); +} +else{ + if (uI_Tabs.pop_tabEHub.size() > 0 && uI_Tabs.pop_tabEHub.get(0).b_NFATOListener) { + uI_Tabs.pop_tabEHub.get(0).f_checkGISRegion(clickx, clicky); + } + else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || + c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ + f_selectGridLoop(clickx, clicky); + } + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ + f_selectNeighborhood(clickx, clicky); + } + } + + else { + if(c_selectedFilterOptions.size() > 0){ + f_removeAllFilters(); + } + f_selectGISRegion(clickx, clicky); + } +} + + 52.539123187983904 + 6.173604854475837 + 25000 + -4144960 + -1 + true + false + https://a.tile.openstreetmap.org/[zoom]/[x]/[y].png + WEB_SERVICE + CREATE_STRAIGHT_LINE + CAR + FASTEST + DIJKSTRABI + false + + + true + 1000 + + + 1725456122345 + txt_sliderInitialization + -680 + 551 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Slider Initialization + + SansSerif + 14 + + + LEFT + + + 1725525689286 + txt_GISObjectCreationFunctions + -290 + 60 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + GIS Object creation functions + + SansSerif + 14 + + + LEFT + + + 1730113808401 + gr_uI_Results_presentation + 1440 + 230 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1716193014596 + uI_Results_presentation + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + AUTOMATICALLY_CALCULATED + 1000 + 1000000000 + 52.52173648990926 + 6.109451573117503 + + + + + 1734442437753 + rect_filterFunctions + -1620 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 360 + 630 + 0.0 + -1 + null + + + 1734443343976 + t_selectionColors + 380 + 1050 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selection colors + + SansSerif + 14 + + + LEFT + + + 1734443865835 + txt_filterFunctions + -1580 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Filter Functions + + SansSerif + 14 + + + LEFT + + + false + 1734444497900 + cb_showFilterInterface + 20 + 480 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + cb_showFilterInterface.isEnabled() + true + !settings.isPublicModel() && c_cbFilterOptions.size() > 0 + gr_filterInterface.setVisible(cb_showFilterInterface.isSelected()); + +if(!cb_showFilterInterface.isSelected()){ + button_clearFilters.action(); + gr_sliderClickBlocker.setVisible(false); +} +else{ + gr_sliderClickBlocker.setVisible(true); + gr_filterInterface.setPos(170, 710); +} + + + + Filter opties + false + + + + 1734444441402 + gr_filterInterface + -1470 + 830 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1734443987142 + rect_filterInterface + -150 + -180 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 350 + 350 + 0.0 + -1 + null + + + 1734443492902 + txt_filterDescription + -130 + -140 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selecteer gebouwen: + + SansSerif + 12 + + + LEFT + + + false + 1734442617547 + cb_filterOptions + -10 + -140 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + true + !gr_ForceMapSelectionText.isVisible() + f_setFilter(map_UINamesFilterOption.get(cb_filterOptions.getValue())); + +cb_filterOptions.setValueIndex(0); + + + + false + + + + + + + + + + + false + + + + 1734443541801 + txt_activeFilters + -130 + -110 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geen Actieve Filters. + !t_activeFilters.getText().equals("") ? "Actieve filters:" : "Geen Actieve Filters." + + SansSerif + 12 + + + LEFT + + + 1734444104065 + t_activeFilters + -130 + -90 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + + + SansSerif + 12 + + + LEFT + + + 1734444671650 + txt_filterInterface + 25 + -170 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Filter opties + + SansSerif + 14 + + + CENTER + + + false + 1734446701124 + button_clearFilters + 40 + 130 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + c_filterSelectedGridLoops.clear(); +c_filterSelectedNeighborhoods.clear(); +c_manualFilterSelectedGC.clear(); +c_manualFilterDeselectedGC.clear(); +b_inManualFilterSelectionMode = false; +if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); +} + +f_setForcedClickScreenText(""); +if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); +} + +f_removeAllFilters(); +traceln("Alle filters zijn verwijderd."); + + + + Verwijder alle filters + + + + 1734524446136 + t_selectedGridLoop + -130 + 140 + + true + true + false + SHAPE_DRAW_2D + c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) + false + 0 + 0.0 + -16777216 + + c_filterSelectedGridLoops.size() == 1 ? "Geselecteerde lus: " + c_filterSelectedGridLoops.get(0).p_gridNodeID : c_filterSelectedGridLoops.size() > 1 ? "Meerdere lussen geselecteerd." : "Geen lus geselecteerd." + + SansSerif + 12 + + + LEFT + + + 1737640715642 + t_selectedNBh + -130 + 117 + + true + true + false + SHAPE_DRAW_2D + c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD) + false + 0 + 0.0 + -16777216 + + c_filterSelectedNeighborhoods.size() == 1 ? "Geselecteerde buurt: " + c_filterSelectedNeighborhoods.get(0).p_id : c_filterSelectedNeighborhoods.size() > 1 ? "Meerdere buurten geselecteerd." : "Geen buurt geselecteerd." + + SansSerif + 12 + + + LEFT + + + false + 1742227694564 + button_removeManualSelection + 40 + 85 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + !(c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty()) + if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + c_manualFilterSelectedGC.clear(); + c_manualFilterDeselectedGC.clear(); + + f_setForcedClickScreenText(""); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); + } + + b_inManualFilterSelectionMode = false; + if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); + } +} + + + + Wis handmatige selectie + + + + false + 1743092954558 + button_manualFilterSelection + 40 + 50 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + user.GCAccessType == OL_UserGCAccessType.FULL && (!gr_ForceMapSelectionText.isVisible() || b_inManualFilterSelectionMode) + if(!b_inManualFilterSelectionMode){ + b_inManualFilterSelectionMode = true; + + f_setForcedClickScreenText("(De)Selecteer gebouwen"); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(true); + } + + if(!c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); + } +} +else{ + b_inManualFilterSelectionMode = false; + + f_setForcedClickScreenText(""); + if(!b_inEnergyHubSelectionMode){ + f_setForcedClickScreenVisibility(false); + } + + if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ + f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); + } +} + + + + Handmatige selectie + b_inManualFilterSelectionMode ? "Selectie voltooien" : "Handmatige selectie" + + + + + + 1736337963311 + gr_errorScreen + 3380 + -100 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1736344526647 + rect_errorScreenGrayOut + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + //traceln(); + false + 0 + 10 + 1 + -2049715245 + null + SOLID + 1920 + 980 + 0.0 + -2049715245 + null + + + 1736443451929 + rect_errorScreenClickBlocking + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + double click_block = 0; + false + 0 + 10 + 1 + -2049715245 + null + null + SOLID + 1920 + 980 + 0.0 + -2049715245 + null + null + + + 1747320252784 + rect_errorMessage + 690 + 380 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 4 + -65536 + null + SOLID + 540 + 200 + 0.0 + -1 + null + 10 + + + 1736337707551 + t_errorMessage + 960 + 430 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + TYPE YOUR ERROR MESSAGE HERE + + SansSerif + 24 + + + CENTER + + + 1736338014404 + button_errorOK + 960 + 550 + + true + true + false + SHAPE_DRAW_2D3D + gr_errorScreen.setVisible(false); + false + 0 + 0.0 + + + 1736338014406 + rect_errorOK + -60 + -20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 120 + 40 + 0.0 + -1 + null + + + 1736338014408 + txt_errorOK + 0 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Ok + + SansSerif + 18 + + + CENTER + + + + + + + 1742482935391 + gr_sliderClickBlocker + -440 + -1860 + + true + false + false + true + SHAPE_DRAW_2D3D + 200 + 750 + false + 0 + 0.0 + + + 1742482847835 + rect_sliderClickBlocker + -200 + -240 + + true + true + false + SHAPE_DRAW_2D3D + int clickBlocker; + false + 0 + 10 + 1 + + null + SOLID + 400 + 470 + 0.0 + -1 + new Color(255, 255, 255, 0) + null + + + 1742482890780 + rect_sliderClickBlocker2 + -200 + -240 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 400 + 470 + 0.0 + 16777215 + null + + + + + 1744624088806 + gr_writeDataToExcel + true + -410 + -730 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1744624088808 + rect_exportToExcelFunctions + -190 + -120 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 450 + 530 + 0.0 + -1 + null + + + false + 1744624088810 + fileChooser_exportBalanceLoadEnergyModel + -156 + -30 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + false + fileChooser_exportBalanceLoadEnergyModel.setEnabled(false); + + + + Klik om kwartierwaarden excel te downloaden (Totaal gebied) + DOWNLOAD + .xlsx, .xls + Export_ModelData.xlsx + + + + false + 1744624088812 + button_exportBalanceLoadEnergyModel + -156 + -70 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + f_setAllFileDownloadersDisabled(); + +f_harvestEnergyModelLoadData(); + +fileChooser_exportBalanceLoadEnergyModel.setEnabled(true); + + + + Schrijf kwartierwaarden naar excel (hele gebied) + + + + 1744624088814 + txt_writeToExcelFunctions + -150 + -100 + + true + true + false + true + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Write data to excel (Un-ignore if you want to use this) + + SansSerif + 14 + + + LEFT + + + false + 1744624088816 + button_exportBalanceLoadSelectedCompanies + -156 + 170 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + c_selectedGridConnections.size() > 0 && c_selectedGridConnections.size()< p_maxNrSelectedGCForExport + 1 + f_setAllFileDownloadersDisabled(); + +f_harvestSelectedGCLoadData(); + +fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(true); + + + + Schrijf kwartierwaarden naar excel (Geselecteerde bedrijven) + + + + false + 1744624088818 + fileChooser_exportBalanceLoadSelectedCompanies + -156 + 210 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + false + fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(false); + + + + Klik om kwartierwaarden excel te downloaden (Geselecteerde bedrijven) + DOWNLOAD + .xlsx, .xls + Export_ModelData.xlsx + + + + false + 1744624088820 + fileChooser_exportBalanceLoadSelectedEnergyCoop + -156 + 90 + + true + true + false + SHAPE_DRAW_2D3D + + false + -1 + -16777216 + false + fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(false); + + + + Klik om kwartierwaarden excel te downloaden (Totaal geselecteerde COOP) + DOWNLOAD + .xlsx, .xls + Export_ModelData.xlsx + + + + false + 1744624088822 + button_exportBalanceLoadSelectedEnergyCoop + -156 + 50 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + c_selectedGridConnections.size() > 1 && v_customEnergyCoop != null + f_setAllFileDownloadersDisabled(); + +f_harvestTotalBalanceLoadOfSelectedEnergyCoop(); + +fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(true); + + + + Schrijf kwartierwaarden naar excel (Totaal van Geselecteerde Coop) + + + + + + 1745935981029 + txt_dataAccesibilityFunctionalities + -680 + 845 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Data Accesibility Functionalities + + SansSerif + 12 + + + LEFT + + + 1746110300955 + rect_ìnfoBubbleFunctions + -2070 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 360 + 350 + 0.0 + -1 + null + + + 1746110305368 + txt_infoBubbleFunctions + -2040 + 30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Info Bubble Functions + + SansSerif + 14 + + + LEFT + + + 1746187848442 + gr_publicVersionWarningMessage + 460 + -2160 + + true + true + false + SHAPE_DRAW_2D3D + 740 + 40 + settings.isPublicModel() + false + 0 + 0.0 + + + 1746027175818 + txt_publicVersion + -20 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -65536 + Dit is een publieke versie met beperkte functionaliteiten + + SansSerif + 24 + + + CENTER + + + 1746187821228 + i_publicVersionWarningMessage + 304 + -14 + + true + true + false + SHAPE_DRAW_2D3D + f_setInfoText(i_publicVersionWarningMessage, v_infoText.publicVersionWarning, i_publicVersionWarningMessage.getX() + gr_publicVersionWarningMessage.getX(), i_publicVersionWarningMessage.getY() + gr_publicVersionWarningMessage.getY()); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1750078687228 + rect_dynamicLegend + 1360 + 1400 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -65536 + null + SOLID + 470 + 310 + 0.0 + -1 + null + + + 1750078716831 + txt_dynamicLegend + 1380 + 1420 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Dynamic legend functionality + + SansSerif + 18 + + + LEFT + + + 1752231354833 + txt_visualObjects + -290 + 140 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + GIS Objects pure for visuals + + SansSerif + 14 + + + LEFT + + + 1746110287596 + gr_infoText + -2260 + 360 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1746110662246 + rect_infoText + 0 + 0 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 620 + 170 + 0.0 + -1 + null + 10 + + + 1746110287600 + gr_closeInfoText + 600 + 20 + + true + true + false + SHAPE_DRAW_2D3D + p_currentActiveInfoBubble.clear(); +gr_infoText.setVisible(false); + false + 0 + 0.0 + + + 1746110287602 + oval_closeInfoText + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 12 + 40 + 0.0 + -12566464 + null + + + 1746110287604 + line_closeInfoText1 + -6 + 6 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + null + SOLID + 1 + 0 + 1 + 0 + 12 + -12 + 0 + + + 1746110287606 + line_closeInfoText2 + 6 + 6 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -1 + null + SOLID + 1 + 0 + 1 + 0 + -12 + -12 + 0 + + + + + 1746110287608 + t_infoTextHeader + 20 + 20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Extra Informatie + + Calibri + 18 + + + LEFT + + + 1746110287610 + t_infoTextDescription + 20 + 50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, +quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat +nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui +officia deserunt mollit anim id est laborum." + + SansSerif + 14 + + + LEFT + + + + + 1742296970246 + gr_forceMapSelection + 1080 + -1480 + + true + false + false + SHAPE_DRAW_2D3D + 960 + 500 + false + 0 + 0.0 + + + 1742297070582 + rect_forceMapSelectionClickBlocker1 + -960 + -500 + + true + true + false + SHAPE_DRAW_2D3D + int clickblocker; + false + 0 + 10 + 1 + + null + SOLID + 410 + 980 + 0.0 + 16777215 + null + + + 1742297242137 + rect_forceMapSelectionClickBlocker2 + -550 + -500 + + true + true + false + SHAPE_DRAW_2D3D + int clickblocker; + false + 0 + 10 + 1 + + null + SOLID + 1000 + 130 + 0.0 + 16777215 + null + + + 1742297244098 + rect_forceMapSelectionClickBlocker3 + -550 + 250 + + true + true + false + SHAPE_DRAW_2D3D + int clickblocker; + false + 0 + 10 + 1 + + null + SOLID + 1000 + 230 + 0.0 + 16777215 + null + + + 1742297246008 + rect_forceMapSelectionClickBlocker4 + 450 + -500 + + true + true + false + SHAPE_DRAW_2D3D + int clickblocker; + false + 0 + 10 + 1 + + null + SOLID + 510 + 980 + 0.0 + 16777215 + null + + + 1742296784951 + rect_forceMapSelection1 + -960 + -620 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 410 + 1200 + 0.0 + -1765752640 + v_forcedClickScreenColor + null + + + 1742296859875 + rect_forceMapSelection2 + -550 + -620 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1000 + 250 + 0.0 + -1765752640 + v_forcedClickScreenColor + null + + + 1742296941081 + rect_forceMapSelection3 + -550 + 250 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1000 + 330 + 0.0 + -1765752640 + v_forcedClickScreenColor + null + + + 1742296952388 + rect_forceMapSelection4 + 450 + -620 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 510 + 1200 + 0.0 + -1765752640 + v_forcedClickScreenColor + null + + + 1753446087501 + gr_ForceMapSelectionText + -40 + -320 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1742300401759 + rect_selectText + -440 + -40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 2 + -16777216 + null + SOLID + 860 + 70 + 0.0 + -1 + null + 10 + + + false + 1753445072603 + button_completeManualSelectionMode + 220 + -30 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + gr_ForceMapSelectionText.isVisible() && b_inManualFilterSelectionMode + true + button_completeManualSelectionMode.isVisible() + if(b_inManualFilterSelectionMode){ + button_manualFilterSelection.action(); +} + + + + Voltooi handmatige selectie + + + + 1742300418297 + t_forcedClickMessage + -10 + -30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + + + SansSerif + 36 + + + CENTER + + + + + 1760015470890 + gr_energyHubSelectionButtons + 10 + -240 + + true + true + false + SHAPE_DRAW_2D + b_inEnergyHubSelectionMode //&& gr_forceMapSelection.isVisible() + false + 0 + 0.0 + + + 1760020289242 + gr_completeEnergyHubSelection_grayedOut + -770 + 550 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + + + 1760020289244 + button_completeSelection_grayedOut + -140 + -40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 3 + -8355712 + null + SOLID + 275 + 75 + 0.0 + -2302756 + null + 10 + + + 1760020289246 + txt_completeEnergyHubSelection_grayedOut + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -8355712 + Voltooien + + SansSerif + 28 + + + CENTER + + + + + 1760015470892 + gr_completeEnergyHubSelection + -770 + 550 + + true + true + false + SHAPE_DRAW_2D + c_selectedGridConnections.size()>1 + f_finalizeEnergyHubConfiguration(); + false + 0 + 0.0 + + + 1760015470894 + button_completeSelection + -140 + -40 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 275 + 75 + 0.0 + -1 + null + 10 + + + 1760015470896 + txt_completeEnergyHubSelection + 0 + -20 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Voltooien + + SansSerif + 28 + + + CENTER + + + + + 1760015470898 + gr_energieHubConfiguratorTxt + -60 + -190 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + + + 1760015470900 + rect_energyHubConfigurator + -500 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 2 + -16777216 + uI_EnergyHub.p_energyHubLineColor + null + SOLID + 1000 + 90 + 0.0 + -1 + uI_EnergyHub.p_energyHubBackGroundColor + null + 10 + + + 1760015470902 + txt_energyHubConfigurator + 0 + -35 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energie Hub Configurator + + SansSerif + 48 + + + CENTER + + + + + 1760015470904 + gr_cancelEnergyHubConfiguration + -820 + 630 + + true + true + false + SHAPE_DRAW_2D + f_cancelEnergyHubConfiguration(); + false + 0 + 0.0 + + + 1760015470906 + button_cancelEnergyHubConfiguration + -90 + -30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 10 + 3 + -2345659 + null + SOLID + 275 + 75 + 0.0 + -1 + null + 10 + + + 1760015470908 + txt_cancelEnergyHubConfiguration + 48 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Annuleer + + SansSerif + 28 + + + CENTER + + + + + + + + + 1753440008648 + gr_supportFunctions + -540 + -110 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1716419413991 + rect_supportFunctions + -140 + -80 + + true + true + false + true + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 300 + 160 + 0.0 + -1 + null + + + 1716419425042 + t_supportFunctions + -120 + -70 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Support functions + + SansSerif + 14 + + + LEFT + + + + + 1701951640330 + gr_legenda + 910 + 880 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1701951640332 + rect_legendaBackground + true + -510 + -110 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 1020 + 210 + 0.0 + -542254 + zenmocolor_red3.getFillColor() + null + + + 1701951640336 + rect_legenda + -500 + -90 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -6632142 + zenmocolor_blue3.getFillColor() + null + SOLID + 1000 + 183 + 0.0 + -1 + null + + + 1701951640338 + t_legenda + -470 + -110 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Legenda + + Calibri + 18 + + + LEFT + + + 1701951640396 + line_legendaSeperator1 + -165 + -70 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + 0 + 140 + 0 + + + 1724074247375 + line_legendaSeperator2 + -10 + -70 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + 0 + 140 + 0 + + + 1724074154126 + gr_infrastructure + -340 + 5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074154148 + t_infrastructure + -60 + -79 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Infrastructuur + + Calibri + 16 + + + LEFT + + + 1724074154158 + line_infrastructure + -120 + -59 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + 271 + 0 + 0 + + + 1724074839746 + gr_gridnodes + -75 + -19 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074853961 + polyline_congestedGridnode + -55 + 40 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + v_gridLineColorCongested + null + SOLID + 1 + 0 + 1 + 0 + + v_gridNodeColorCongested + null + + + 0 + 0 + 0 + + + 10 + -14 + 0 + + + 20 + 0 + 0 + + + 0 + 0 + 0 + + + false + + + 1724074853963 + txt_congestedGridnode + -25 + 25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trafo overbelast + + SansSerif + 12 + + + LEFT + + + 1724074853967 + polyline_gridnode + -55 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + v_MVLVLineColor + null + SOLID + 1 + 0 + 1 + 0 + + v_MVLVNodeColor + null + + + 0 + 0 + 0 + + + 10 + -14 + 0 + + + 20 + 0 + 0 + + + 0 + 0 + 0 + + + false + + + 1724074853969 + txt_gridnode + -25 + -21 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trafo stabiel + + SansSerif + 12 + + + LEFT + + + 1724074853971 + polyline_strainedGridnode + -55 + 15 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + v_gridNodeLineColorStrained + null + SOLID + 1 + 0 + 1 + 0 + + v_gridNodeColorStrained + null + + + 0 + 0 + 0 + + + 10 + -14 + 0 + + + 20 + 0 + 0 + + + 0 + 0 + 0 + + + false + + + 1724074853973 + txt_strainedGridnode + -25 + 2 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Trafo belast + + SansSerif + 12 + + + LEFT + + + + + 1724074839748 + gr_cables + 75 + 5 + + true + true + false + SHAPE_DRAW_2D3D + b_showCables + false + 0 + 0.0 + + + 1724074864095 + t_HV + true + -15 + 15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + HS-net + + SansSerif + 12 + + + LEFT + + + 1724074864097 + line_HV + true + -40 + 25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2.5 + -16776961 + v_HVGridColor + null + SOLID + 1 + 0 + 1 + 0 + 10 + 0 + 0 + + + 1724074870571 + t_MV + -15 + -50 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + MS-net + + SansSerif + 12 + + + LEFT + + + 1724074870573 + t_LV + -15 + -25 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + LS-net + + SansSerif + 12 + + + LEFT + + + 1724074870575 + line_LV + -40 + -15 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2.5 + -6737204 + v_LVGridColor + null + SOLID + 1 + 0 + 1 + 0 + 10 + 0 + 0 + + + 1724074870577 + line_MV + -40 + -40 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 2.5 + -12156236 + v_MVGridColor + null + SOLID + 1 + 0 + 1 + 0 + 10 + 0 + 0 + + + 1724074875518 + t_gasNetwork + true + -15 + -2.5 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Gasnet + + SansSerif + 12 + + + LEFT + + + 1724074875520 + oval_gasNetwork + true + -35 + 5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 5.75 + 40 + 0.0 + -1 + v_gasGridColor + null + + + + + + + 1724074493431 + gr_buildings + 80 + 10 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074500599 + t_buildings + 50 + -84 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Gebouwen + + Calibri + 16 + + + LEFT + + + 1724074502826 + line_buildings + 380 + -64 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + -458 + 0 + 0 + + + 1724074508882 + gr_colorings + -180 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074508886 + txt_colorings + 4 + -71 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Kleur gebouwen o.b.v.: + + SansSerif + 11 + + + CENTER + + + + + + + 1753868816347 + gr_mapOverlayLegenda + 1750 + 840 + + true + true + false + SHAPE_DRAW_2D3D + 70 + 20 + false + 0 + 0.0 + + + 1753868816349 + gr_mapOverlayLegend_ElectricityConsumption + 180 + -10 + + true + false + false + SHAPE_DRAW_2D3D + 0 + -10 + false + 0 + 0.0 + + + 1753868816351 + rect_mapOverlayLegend_ElectricityConsumption1 + -60 + -52 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -1 + null + + + 1753868816353 + rect_mapOverlayLegend_ElectricityConsumption2 + -60 + -28 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -32 + null + + + 1753868816355 + rect_mapOverlayLegend_ElectricityConsumption3 + -60 + -4 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -263774 + null + + + 1753868816357 + rect_mapOverlayLegend_ElectricityConsumption4 + -60 + 20 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -1063822 + null + + + 1753868816359 + rect_mapOverlayLegend_ElectricityConsumption5 + -60 + 44 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -3318692 + null + + + 1753868816361 + txt_mapOverlayLegend_ElectricityConsumption1 + -20 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 10 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 1500 kWh / jaar" : "< 10 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816363 + txt_mapOverlayLegend_ElectricityConsumption2 + -20 + -28 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 50 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 2500 kWh / jaar" : "< 50 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816365 + txt_mapOverlayLegend_ElectricityConsumption3 + -20 + -3 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 150 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 4000 kWh / jaar" : "< 150 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816367 + txt_mapOverlayLegend_ElectricityConsumption4 + -20 + 21 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 500 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 6000 kWh / jaar" : "< 500 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816369 + txt_mapOverlayLegend_ElectricityConsumption5 + -20 + 45 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + > 500 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "> 6000 kWh / jaar" : "> 500 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + + + 1753868816371 + gr_defaultLegenda + 10 + 10 + + true + true + false + SHAPE_DRAW_2D3D + 10 + 10 + false + 0 + 0.0 + + + 1753868816373 + oval_defaultLegend4 + -60 + 10 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + null + + + 1753868816375 + t_defaultLegend2 + -39.5 + -47.5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Gedetaileerd bedrijf + + SansSerif + 12 + + + LEFT + + + 1753868816377 + t_defaultLegend5 + -39.5 + 27.5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Overig + + SansSerif + 12 + + + LEFT + + + 1753868816379 + oval_defaultLegend5 + -60 + 35 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + null + + + 1753868816381 + t_defaultLegend3 + -39.5 + -22.5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Bedrijf + + SansSerif + 12 + + + LEFT + + + 1753868816383 + oval_defaultLegend2 + -60 + -40 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + null + + + 1753868816385 + t_defaultLegend4 + -39.5 + 2.5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Huis + + SansSerif + 12 + + + LEFT + + + 1753868816387 + oval_defaultLegend3 + -60 + -15 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + null + + + 1753868816389 + t_defaultLegend1 + -39.5 + -72.5 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Selectie + + SansSerif + 12 + + + LEFT + + + 1753868816391 + oval_defaultLegend1 + -60 + -65 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 6.5 + 40 + 0.0 + -1 + v_selectionColor + null + + + + + 1753868816393 + gr_mapOverlayLegend_PVProduction + 380 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + -10 + false + 0 + 0.0 + + + 1753868816395 + rect_mapOverlayLegend_PVProduction1 + -60 + -52 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -1 + null + + + 1753868816397 + rect_mapOverlayLegend_PVProduction2 + -60 + -28 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -256 + null + + + 1753868816399 + rect_mapOverlayLegend_PVProduction3 + -60 + -4 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -10496 + null + + + 1753868816401 + txt_mapOverlayLegend_PVProduction1 + -20 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Geen opwek + + SansSerif + 10 + + + LEFT + + + 1753868816403 + txt_mapOverlayLegend_PVProduction2 + -20 + -28 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + < 100 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 5000 kWh / jaar" : "< 100 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + 1753868816405 + txt_mapOverlayLegend_PVProduction3 + -20 + -3 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + > 100 MWh / jaar + project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "> 5000 kWh / jaar" : "> 100 MWh / jaar" + + SansSerif + 10 + + + LEFT + + + + + 1753868816407 + gr_mapOverlayLegend_gridNeighbours + 600 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 0 + -10 + false + 0 + 0.0 + + + 1753868816409 + rect_mapOverlayLegend_gridNeighbours1 + -60 + -52 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -8355712 + null + + + 1753868816411 + rect_mapOverlayLegend_gridNeighbours2 + -60 + -28 + + true + true + false + SHAPE_DRAW_2D3D + txt_mapOverlayLegend_gridNeighbours2.isVisible() + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -16776961 + null + + + 1753868816413 + rect_mapOverlayLegend_gridNeighbours3 + -60 + -4 + + true + true + false + SHAPE_DRAW_2D3D + txt_mapOverlayLegend_gridNeighbours3.isVisible() + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -65536 + null + + + 1753868816415 + txt_mapOverlayLegend_gridNeighbours1 + -20 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Onbekend + + SansSerif + 10 + + + LEFT + + + 1753868816417 + txt_mapOverlayLegend_gridNeighbours2 + -20 + -28 + + true + true + false + SHAPE_DRAW_2D + v_amountOfDefinedGridLoops > 0 + false + 0 + 0.0 + -16777216 + Lus 1 + + SansSerif + 10 + + + LEFT + + + 1753868816419 + txt_mapOverlayLegend_gridNeighbours3 + -20 + -3 + + true + true + false + SHAPE_DRAW_2D + v_amountOfDefinedGridLoops > 1 + false + 0 + 0.0 + -16777216 + Lus 2 + + SansSerif + 10 + + + LEFT + + + 1753868816421 + rect_mapOverlayLegend_gridNeighbours4 + -60 + 20 + + true + true + false + SHAPE_DRAW_2D3D + txt_mapOverlayLegend_gridNeighbours4.isVisible() + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -16711936 + null + + + 1753868816423 + txt_mapOverlayLegend_gridNeighbours4 + -20 + 20 + + true + true + false + SHAPE_DRAW_2D + v_amountOfDefinedGridLoops > 2 + false + 0 + 0.0 + -16777216 + Lus 3 + + SansSerif + 10 + + + LEFT + + + 1753868816425 + txt_mapOverlayLegend_gridNeighbours5 + -18 + 50 + + true + false + false + SHAPE_DRAW_2D + v_amountOfDefinedGridLoops > 4 + false + 0 + 0.0 + -16777216 + Etc. + + SansSerif + 10 + + + LEFT + + + + + 1753868816427 + gr_mapOverlayLegend_congestion + 800 + 0 + + true + false + false + SHAPE_DRAW_2D3D + 10 + -10 + false + 0 + 0.0 + + + false + 1753868816429 + rb_mapOverlayLegend_congestion + -80 + 5 + + true + true + false + SHAPE_DRAW_2D3D + + false + -16777216 + true + rb_mapOverlay.setValue(rb_mapOverlay.getValue(), true); + + + + VERTICAL + + + + false + + + + 1753868816431 + txt_mapOverlayLegend_congestion3 + -80 + -10 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Type belasting: + + SansSerif + 11 + + + LEFT + + + 1753868816433 + rect_mapOverlayLegend_congestion1 + -80 + -55 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 25 + 15 + 0.0 + -8355712 + null + + + 1753868816435 + txt_mapOverlayLegend_congestion1 + -40 + -55 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Onbekende capaciteit + + SansSerif + 10 + + + LEFT + + + 1753868816437 + i_mapOverlayLegend_congestion_Degrees + 60 + -33 + + true + true + false + SHAPE_DRAW_2D3D + f_setInfoText(i_mapOverlayLegend_congestion_Degrees, v_infoText.i_mapOverlayLegend_congestion_Degrees, i_mapOverlayLegend_congestion_Degrees.getX() + gr_mapOverlayLegend_congestion.getX() + gr_mapOverlayLegenda.getX() + gr_legenda.getX(), i_mapOverlayLegend_congestion_Degrees.getY() + gr_mapOverlayLegend_congestion.getY() + gr_mapOverlayLegenda.getY() + gr_legenda.getY()); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + 1753868816439 + gr_rect_mapOverlayLegend_congestion2 + -65 + -25 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1753868816441 + rect_mapOverlayLegend_congestion21 + -15 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 8 + 15 + 0.0 + -16744448 + null + + + 1753868816443 + rect_mapOverlayLegend_congestion22 + -7 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 9 + 15 + 0.0 + -23296 + null + + + 1753868816445 + rect_mapOverlayLegend_congestion23 + 2 + -7 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 8 + 15 + 0.0 + -65536 + null + + + + + 1753868816447 + txt_mapOverlayLegend_congestion2 + -40 + -30 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Stabiel - Overbelast + + SansSerif + 10 + + + LEFT + + + 1753868816449 + i_mapOverlayLegend_congestion_Types + -5 + -12 + + true + true + false + SHAPE_DRAW_2D3D + f_setInfoText(i_mapOverlayLegend_congestion_Types, v_infoText.i_mapOverlayLegend_congestion_Types, i_mapOverlayLegend_congestion_Types.getX() + gr_mapOverlayLegend_congestion.getX() + gr_mapOverlayLegenda.getX() + gr_legenda.getX(), i_mapOverlayLegend_congestion_Types.getY() + gr_mapOverlayLegend_congestion.getY() + gr_mapOverlayLegenda.getY() + gr_legenda.getY()); + false + 0 + 20 + 20 + 0.0 + + + zerointerfaceloader + icon_i.png + + + false + + + + + 1758020855460 + gr_mapOverlayLegend_EnergyLabel + 985 + -5 + + true + false + false + SHAPE_DRAW_2D3D + 10 + -20 + false + 0 + 0.0 + + + 1758020855462 + rect_mapOverlayLegend_EnergyLabelA + -60 + -52 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -16751616 + v_energyLabelAColor + null + + + 1758020855464 + rect_mapOverlayLegend_EnergyLabelB + -60 + -35 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -16744448 + v_energyLabelBColor + null + + + 1758020855466 + rect_mapOverlayLegend_EnergyLabelC + -60 + -18 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -6632142 + v_energyLabelCColor + null + + + 1758020855468 + rect_mapOverlayLegend_EnergyLabelD + -60 + -1 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -10496 + v_energyLabelDColor + null + + + 1758020855470 + rect_mapOverlayLegend_EnergyLabelE + -60 + 16 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -23296 + v_energyLabelEColor + null + + + 1758020855472 + txt_mapOverlayLegend_EnergyLabelA + -20 + -51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel A + + SansSerif + 10 + + + LEFT + + + 1758020855474 + txt_mapOverlayLegend_EnergyLabelB + -20 + -35 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel B + + SansSerif + 10 + + + LEFT + + + 1758020855476 + txt_mapOverlayLegend_EnergyLabelC + -20 + -17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel C + + SansSerif + 10 + + + LEFT + + + 1758020855478 + txt_mapOverlayLegend_EnergyLabelD + -20 + 0 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel D + + SansSerif + 10 + + + LEFT + + + 1758020855480 + txt_mapOverlayLegend_EnergyLabelE + -20 + 17 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel E + + SansSerif + 10 + + + LEFT + + + 1758022404682 + rect_mapOverlayLegend_EnergyLabelF + -60 + 33 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -47872 + v_energyLabelFColor + null + + + 1758022404684 + txt_mapOverlayLegend_EnergyLabelF + -20 + 34 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel F + + SansSerif + 10 + + + LEFT + + + 1758022520158 + rect_mapOverlayLegend_EnergyLabelG + -60 + 50 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -65536 + v_energyLabelGColor + null + + + 1758022520160 + txt_mapOverlayLegend_EnergyLabelG + -20 + 51 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Energielabel G + + SansSerif + 10 + + + LEFT + + + 1758026700134 + rect_mapOverlayLegend_EnergyLabelUnknown + -60 + 67 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -8355712 + null + SOLID + 25 + 15 + 0.0 + -8355712 + v_energyLabelUnknownColor + null + + + 1758026700136 + txt_mapOverlayLegend_EnergyLabelUnknown + -20 + 68 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Onbekend + + SansSerif + 10 + + + LEFT + + + + + + + 1750161603547 + gr_specificGISObjectLegend + 440 + 0 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1724074583633 + rect_specialGISObjectLegend1 + -180 + -40 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1724074583635 + t_specialGISObjectLegend1 + -150 + -40 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079302589 + rect_specialGISObjectLegend2 + -180 + -20 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079302591 + t_specialGISObjectLegend2 + -150 + -20 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079303790 + rect_specialGISObjectLegend3 + -180 + 0 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079303792 + t_specialGISObjectLegend3 + -150 + 0 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079304863 + rect_specialGISObjectLegend4 + -180 + 20 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079304865 + t_specialGISObjectLegend4 + -150 + 20 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079305949 + rect_specialGISObjectLegend5 + -180 + 40 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079305951 + t_specialGISObjectLegend5 + -150 + 40 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750079521906 + rect_specialGISObjectLegend6 + -180 + 60 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750079521908 + t_specialGISObjectLegend6 + -150 + 60 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093126455 + gr_extendedLegend + 170 + 960 + + true + false + false + SHAPE_DRAW_2D3D + 120 + -5 + false + 0 + 0.0 + + + 1750093048056 + rect_extendedLegend_line + true + -100 + -100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + SOLID + 200 + 205 + 0.0 + -542254 + rect_legendaBackground.getFillColor() + null + + + 1760980017754 + rect_extendedLegendLine + -114 + -85 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -6632142 + rect_legenda.getLineColor() + null + SOLID + 204 + 183 + 0.0 + -1 + null + + + 1750092986493 + rect_extendedLegend + -115 + -84.5 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 0 + + null + SOLID + 204 + 182 + 0.0 + -1 + null + + + 1750093291589 + rect_specialGISObjectLegend7 + -90 + -35 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093291591 + t_specialGISObjectLegend7 + -60 + -35 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093292693 + rect_specialGISObjectLegend8 + -90 + -15 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093292695 + t_specialGISObjectLegend8 + -60 + -15 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093293851 + rect_specialGISObjectLegend9 + -90 + 5 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093293853 + t_specialGISObjectLegend9 + -60 + 5 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093295400 + rect_specialGISObjectLegend10 + -90 + 25 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093295402 + t_specialGISObjectLegend10 + -60 + 25 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093296550 + rect_specialGISObjectLegend11 + -90 + 45 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093296552 + t_specialGISObjectLegend11 + -60 + 45 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093324907 + rect_specialGISObjectLegend12 + -90 + 65 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 15 + 15 + 0.0 + -1 + null + + + 1750093324909 + t_specialGISObjectLegend12 + -60 + 65 + + true + false + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Zonneweide + + SansSerif + 12 + + + LEFT + + + 1750093436378 + line + -115 + -49 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + null + SOLID + 1 + 0 + 1 + 0 + 192 + 0 + 0 + + + + + 1750092915668 + t_seeMoreLegend + 0 + -70 + + true + true + false + SHAPE_DRAW_2D + t_specialGISObjectLegend7.isVisible(); + if(!gr_extendedLegend.isVisible()){ + gr_extendedLegend.setVisible(true); + t_seeMoreLegend.setText("Zie minder..."); +} +else{ + gr_extendedLegend.setVisible(false); + t_seeMoreLegend.setText("Zie meer..."); +} + false + 0 + 0.0 + -14774017 + Zie meer... + + SansSerif + 10 + + + LEFT + + + + + + + 1753883303789 + gr_simulateYearScreen + 1920 + 160 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1709717180404 + gr_loadIconYearSimulation + -261 + -25 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 0.0 + + + 1709717180406 + rect_loadIconSmall + -219 + -50 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -1644806 + zenmocolor_blue1.getFillColor() + null + DASHED + 460 + 250 + 0.0 + -369756683 + null + + + 1709717180408 + image_loadIconSmall + -19 + 60 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 60 + 60 + 0.0 + + + zerointerfaceloader + icon_loading.gif + + + false + + + 1709717180410 + t_loadIconSmall + 12 + 15 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Jaar wordt gesimuleerd + + SansSerif + 22 + + + CENTER + + + + + 1709717180367 + gr_simulateYear + 270 + 20 + + true + false + false + SHAPE_DRAW_2D3D + -250 + 20 + false + 0 + 0.0 + + + 1709717180369 + rect_simulateYearScreenSmall + -230 + -95 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + + null + DASHED + 460 + 185 + 0.0 + -1 + zenmocolor_blue2.getFillColor() + null + + + 1709717180371 + gr_simulateYearButton + 10 + 50 + + true + true + false + SHAPE_DRAW_2D3D + f_simulateYearFromMainInterface(); + false + 0 + 0.0 + + + 1709717180373 + t_simulateYearToCalculateCostsSmall + 10 + -60 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Simuleer jaar voor KPI's + + SansSerif + 22 + + + CENTER + + + 1709717180375 + image_simulateYearToCalculateCostsSmall + -200 + -75 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 60 + 60 + 0.0 + + + zerointerfaceloader + icon_greater_than.png + + + false + + + + + + + + + 1758032385328 + txt_cablesAndPipesColors + 380 + 1150 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Cables and pipes colors + + SansSerif + 14 + + + LEFT + + + 1758032461183 + txt_mapOverlayColors + 380 + 1270 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Specific map overlay colors + + SansSerif + 14 + + + LEFT + + + 1758878134333 + zenmocolor_blue3 + 1920 + 1260 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -4069658 + null + + + 1758878337017 + zenmocolor_blue + 1920 + 1020 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -16744828 + null + + + 1758878373971 + zenmocolor_blue1 + 1920 + 1100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -14115680 + null + + + 1758878411330 + zenmocolor_yellow + 2020 + 1020 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -212480 + null + + + 1758878483028 + zenmocolor_yellow1 + 2020 + 1100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -405954 + null + + + 1758878529753 + zenmocolor_yellow2 + 2020 + 1180 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -402308 + null + + + 1758878532475 + zenmocolor_yellow3 + 2020 + 1260 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -398405 + null + + + 1758878539502 + zenmocolor_red + 1820 + 1020 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -1834917 + null + + + 1758878547235 + zenmocolor_red1 + 1820 + 1100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -1426815 + null + + + 1758878550221 + zenmocolor_red2 + 1820 + 1180 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -886359 + null + + + 1758878552357 + zenmocolor_red3 + 1820 + 1260 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -542254 + null + + + 1758878556881 + zenmocolor_blue2 + 1920 + 1180 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -16777216 + null + SOLID + 80 + 60 + 0.0 + -10502977 + null + + + 1758882933738 + line1 + 10 + 300 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -402308 + null + SOLID + 1 + 0 + 1 + 0 + 375 + 0 + 0 + + + 1758882973077 + line2 + 10 + 440 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -402308 + null + SOLID + 1 + 0 + 1 + 0 + 375 + 0 + 0 + + + 1758882977187 + line3 + 5 + 100 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 1 + -402308 + null + SOLID + 1 + 0 + 1 + 0 + 375 + 0 + 0 + + + 1761138344359 + txt_projectSpecificScenarios + -1190 + 500 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Project specific scenarios + + SansSerif + 14 + + + LEFT + + + 1762354401486 + image_loadingScreenIcon + 3470 + 3040 + 680 + + true + false + false + SHAPE_DRAW_2D3D + false + 0 + 180 + 180 + 0.0 + + + zerointerfaceloader + icon_loading.gif + + + false + + + 1765273010072 + rect_defaultSliderNames + 400 + 2000 + + true + true + false + SHAPE_DRAW_2D3D + false + 0 + 10 + 3 + -16777216 + null + SOLID + 420 + 170 + 0.0 + -1 + null + + + 1765273035274 + txt_defaultSliderNames + 410 + 2010 + + true + true + false + SHAPE_DRAW_2D + false + 0 + 0.0 + -16777216 + Default Slider Names + + SansSerif + 16 + + + LEFT + + + + + 1699290897134 + level1 + 0 + 0 + + true + true + false + SHAPE_DRAW_2D3D + 0 + DIM_NON_CURRENT + + + + + 1696520909213 + va_Interface + 0 + 0 + + false + true + false + + <Width>1920</Width> + <Height>980</Height> + </Area> + <Area> + <Id>1747229303402</Id> + <Name>va_EHubDashboard</Name> + <X>2600</X> + <Y>-2200</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Title/> + <Width>1920</Width> + <Height>980</Height> + </Area> + </Areas> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1726584205735</Id> + <Name>Zero_Loader</Name> + <Import>import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.node.ArrayNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.databind.node.TextNode; +import com.fasterxml.jackson.databind.node.NumericNode; +import com.fasterxml.jackson.core.type.TypeReference; + +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.annotation.JsonAutoDetect; + +import java.io.FileOutputStream; +import java.util.stream.Stream; +import java.util.stream.IntStream; +import java.util.Dictionary.*; +import java.util.Hashtable.*; +import java.util.*; +import java.util.stream.Collectors; +import org.apache.commons.lang3.tuple.Triple; + +import java.io.*; +import java.io.File; +import java.io.IOException; +//import java.util.Date; +import java.text.SimpleDateFormat; +import com.fasterxml.jackson.databind.node.JsonNodeFactory; + + +//Possibility to turn of traceln +import java.io.OutputStream; +import java.io.PrintStream; + +//Import survey API library +import com.zenmo.vallum.Vallum; +import com.zenmo.zummon.companysurvey.TimeSeries; + +import zeroPackage.ZeroMath; +import com.zenmo.zummon.companysurvey.PandIDKt; +import com.zenmo.vallum.PandKt; +import kotlinx.datetime.DateTimeUnit; + +import com.zenmo.zummon.companysurvey.HeatingType; +import com.querydsl.core.types.dsl.CaseBuilder; + +import energy.lux.uplux.*; +import java.util.UUID;</Import> + <Generic>false</Generic> + <GenericParameter> + <Id>1726584205730</Id> + <Name>1726584205730</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>GIS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>false</AutoCreate> + <Id>1658477089958</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1658563200000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>p_timeStep_h</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1726584205731</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1726584205903</CurrentLevel> + <ConnectionsId>1726584206083</ConnectionsId> + <Variables> + <Variable Class="PlainVariable"> + <Id>1726584205883</Id> + <Name>v_timeOfModelStart_ms</Name> + <X>1560</X> + <Y>140</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1726584205885</Id> + <Name>v_modelStartUpDuration_s</Name> + <X>1560</X> + <Y>160</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1726584205887</Id> + <Name>v_simStartYear</Name> + <X>1560</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1733235094633</Id> + <Name>v_numberOfSurveyCompanies</Name> + <X>1560</X> + <Y>240</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>int</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1733389557748</Id> + <Name>v_simStartHour_h</Name> + <Description>The hour 0 is defined as january 1st, 00:00h in the year energyModel.p_year</Description> + <X>1560</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>0</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1733390702422</Id> + <Name>v_simDuration_h</Name> + <X>1560</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + <InitialValue Class="CodeValue"> + <Code>8760</Code> + </InitialValue> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1737972861302</Id> + <Name>map_buildingData_Vallum</Name> + <X>-370</X> + <Y>395</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>Map<String, com.zenmo.bag.Pand></Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1753450969530</Id> + <Name>v_objectMapper</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2450</X> + <Y>49</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>ObjectMapper</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1755876520422</Id> + <Name>v_probabilityForAdditionalCar_privateParking</Name> + <X>1560</X> + <Y>190</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="PlainVariable"> + <Id>1755876547633</Id> + <Name>v_probabilityForAdditionalCar_publicParking</Name> + <X>1560</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" + Constant="false" + AccessType="public" + StaticVariable="false"> + <Type>double</Type> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206064</Id> + <Name>zero_Interface</Name> + <X>30</X> + <Y>910</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>Zero_Interface</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206062</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206070</Id> + <Name>defaultProfiles_data</Name> + <X>-370</X> + <Y>280</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>DefaultProfiles_data</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206068</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206073</Id> + <Name>project_data</Name> + <Description>Should be filled with the Project_data record created in the startup of the project model</Description> + <X>-370</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>Project_data</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206071</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206076</Id> + <Name>settings</Name> + <Description>Should be filled with the settings record created in the startup of the project model</Description> + <X>-370</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>Settings</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206074</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1726584206079</Id> + <Name>user</Name> + <X>-370</X> + <Y>210</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>User</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1726584206077</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1762184918471</Id> + <Name>p_userIdToken</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2630</X> + <Y>50</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>String</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <ParameterEditor> + <Id>1762184918469</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1761907535651</Id> + <Name>p_remainingTotals</Name> + <X>1560</X> + <Y>290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type>J_RemainingTotalsManager</Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code>new J_RemainingTotalsManager(avgc_data)</Code> + </DefaultValue> + <ParameterEditor> + <Id>1761907535649</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205737</Id> + <Name>c_gridNodeIDsInScope</Name> + <X>1560</X> + <Y>320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>String</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205739</Id> + <Name>c_companyBuilding_data</Name> + <X>-370</X> + <Y>415</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205741</Id> + <Name>c_gridNode_data</Name> + <X>-370</X> + <Y>360</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GridNode_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205743</Id> + <Name>c_surveyCompanyBuilding_data</Name> + <X>-380</X> + <Y>910</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="private" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205745</Id> + <Name>c_houseBuilding_data</Name> + <X>-370</X> + <Y>435</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205747</Id> + <Name>c_solarfarm_data</Name> + <X>-370</X> + <Y>482</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Solarfarm_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205749</Id> + <Name>c_windfarm_data</Name> + <X>-370</X> + <Y>502</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Windfarm_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205751</Id> + <Name>c_electrolyser_data</Name> + <X>-370</X> + <Y>521</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Electrolyser_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205753</Id> + <Name>c_battery_data</Name> + <X>-370</X> + <Y>540</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Battery_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205755</Id> + <Name>c_cable_data</Name> + <X>-370</X> + <Y>650</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Cable_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205757</Id> + <Name>c_neighbourhood_data</Name> + <X>-370</X> + <Y>590</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Neighbourhood_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205759</Id> + <Name>c_remainingBuilding_data</Name> + <X>-370</X> + <Y>455</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205763</Id> + <Name>c_chargingstation_data</Name> + <X>-370</X> + <Y>560</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Chargingstation_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1726584205765</Id> + <Name>c_parcel_data</Name> + <X>-370</X> + <Y>630</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Parcel_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1737744140895</Id> + <Name>c_vallumBuilding_data</Name> + <X>-380</X> + <Y>930</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>Building_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1748944117397</Id> + <Name>c_customProfiles_data</Name> + <X>-370</X> + <Y>300</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>CustomProfile_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1749631164240</Id> + <Name>c_gridNodeIDsWithProfiles</Name> + <X>1560</X> + <Y>350</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>String</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1749649688266</Id> + <Name>c_chargerProfiles_data</Name> + <X>-370</X> + <Y>320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>ChargerProfile_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1749738339329</Id> + <Name>c_parkingSpace_data</Name> + <X>-370</X> + <Y>610</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>ParkingSpace_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1759135072429</Id> + <Name>c_GISregions</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2450</X> + <Y>149</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>LinkedHashMap</CollectionClass> + <ElementClass>String</ElementClass> + <ValueElementClass>GISRegion</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1763648784984</Id> + <Name>c_activeNBH</Name> + <X>1540</X> + <Y>420</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="private" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>GIS_Object</ElementClass> + <ValueElementClass>GISRegion</ValueElementClass> + </Properties> + </Variable> + </Variables> + <Functions> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205769</Id> + <Name>f_createGISRegions</Name> + <Description>Creates the outline of the simulated area</Description> + <X>1546.739</X> + <Y>539</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>// Create neighborhoods and draw them +for (Neighbourhood_data NBH : c_neighbourhood_data) { + GIS_Object area = energyModel.add_pop_GIS_Objects(); + + area.p_id = NBH.neighbourhoodname(); + area.p_GISObjectType = f_getNBHGISObjectType(area, NBH.neighbourhoodcode(), NBH.neighbourhoodtype()); + + //Create gisregion + area.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(NBH.polygon(), area.p_GISObjectType)); + + //Style area + zero_Interface.f_styleSimulationAreas(area); + zero_Interface.c_GISNeighborhoods.add(area); + + + //Energy totals + p_remainingTotals.addNBH(NBH); +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205771</Id> + <Name>f_createGridConnections</Name> + <X>90</X> + <Y>250</Y> + <Label> + <X>11</X> + <Y>1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Energy production sites +f_createSolarParks(); +f_createWindFarms(); + +//Other infra assets +f_createChargingStations(); +f_createElectrolysers(); +f_createBatteries(); + +//Consumers +f_createCompanies(); +f_createHouses();</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205773</Id> + <Name>f_configureEngine_default</Name> + <Description>Generieke functie die flexibele modelconfiguratie mogelijk maakt op basis van externe data. Expliciet gemodelleerd om profiling en volgorde van initialisatie te kunnen controleren. + +@param: none +@return: none +@since: Sprint 6 +@author: Jorrit</Description> + <X>79</X> + <Y>191</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Set basic input files +energyModel.p_truckTripsCsv = inputCSVtruckTrips; +energyModel.p_householdTripsCsv = inputCSVhouseholdTrips; +energyModel.p_cookingPatternCsv = inputCSVcookingActivities; + +//Initialize specific slider GC +f_initializeSpecificSliderGC(); + +//Actors +f_createActors(); + +//Create regions and initialize energy totals per region +f_createGISRegions(); + +if(user.NBHAccessType != null && user.NBHAccessType != OL_UserNBHAccessType.FULL){ + f_removeObjectsNotInActiveNBH(); +} + +//Grid nodes +f_createGridNodes(); + +//Grid connections +f_createGridConnections(); + +//Additional GIS objects +f_createAdditionalGISObjects(); + +//Initialize the engine +energyModel.p_runStartTime_h = v_simStartHour_h; +energyModel.p_runEndTime_h = v_simStartHour_h + v_simDuration_h; +energyModel.f_initializeEngine(); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205775</Id> + <Name>f_createGridNodes</Name> + <X>50</X> + <Y>540</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>OL_GridNodeType nodeType; +GISRegion gisregion; + +// Grid operator (for now only one in the area) +GridOperator Grid_Operator = findFirst(energyModel.pop_gridOperators, p->p.p_actorID.equals(project_data.grid_operator())) ; + +for (GridNode_data GN_data : c_gridNode_data) { + // if no scope selected, or if node has 'all scopes' in input file or if the node specific scope is selected (exists in the arrayList) + if( settings.subscopesToSimulate() == null || settings.subscopesToSimulate().isEmpty() || GN_data.subscope() == null || settings.subscopesToSimulate().indexOf(GN_data.subscope()) > -1 ){ + if (GN_data.status()) { + GridNode GN = energyModel.add_pop_gridNodes(); + GN.p_gridNodeID = GN_data.gridnode_id(); + c_gridNodeIDsInScope.add(GN.p_gridNodeID); + + // Check wether transformer capacity is known or estimated + GN.p_capacity_kW = GN_data.capacity_kw(); + GN.p_originalCapacity_kW = GN.p_capacity_kW; + GN.p_realCapacityAvailable = GN_data.is_capacity_available(); + + // Basic GN information + //GN.p_nodeStatus = GN_data.status(); + GN.p_description = GN_data.description(); + String nodeTypeString = GN_data.type(); + + // Connect + GN.p_parentNodeID = GN_data.parent_node_id(); // Needs to be manually defined in the excel file of the nodes! + GN.p_ownerGridOperator = Grid_Operator; + + //Define node type + switch (nodeTypeString) { + case "LVLV": + GN.p_nodeType = OL_GridNodeType.LVLV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + break; + case "MVLV": + GN.p_nodeType = OL_GridNodeType.MVLV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + break; + case "SUBMV": + GN.p_nodeType = OL_GridNodeType.SUBMV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + break; + case "MVMV": + GN.p_nodeType = OL_GridNodeType.MVMV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + break; + case "HVMV": + GN.p_nodeType = OL_GridNodeType.HVMV; + GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; + break; + default: + traceln("There is a gridnode in your input file with an incorrect node type"); + break; + } + + //Define GN location + GN.p_latitude = GN_data.latitude(); + GN.p_longitude = GN_data.longitude(); + GN.setLatLon(GN.p_latitude, GN.p_longitude); + + //Create gis region + GN.gisRegion = zero_Interface.f_createGISObject(f_createGISNodesTokens(GN)); + zero_Interface.f_styleGridNodes(GN); + + //Grid operator nodes + Grid_Operator.c_electricityGridNodes.add(GN); + + + //Gridnode service area + if (GN_data.service_area_polygon() != null){ + //Create service area gis object + GN.p_serviceAreaGisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(GN_data.service_area_polygon(), OL_GISObjectType.GN_SERVICE_AREA)); + + //Add to hashmap + zero_Interface.c_GISNetplanes.add( GN.p_serviceAreaGisRegion ); + } + + //Gridnode profile + if(GN_data.profile_data_kWh() != null){ + f_addGridNodeProfile(GN, GN_data.profile_data_kWh()); + } + } + } +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double[]</ReturnType> + <Id>1726584205777</Id> + <Name>f_createGISObjectsTokens</Name> + <X>1565.241</X> + <Y>700</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>RegionCoords</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>GISObjectType</Name> + <Type>OL_GISObjectType</Type> + </Parameter> + <Body>if (RegionCoords.startsWith("MultiPolygon")){ + RegionCoords = RegionCoords.replace("MultiPolygon (((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace(")))",""); +} +else if(RegionCoords.startsWith("MULTIPOLYGON")){ + RegionCoords = RegionCoords.replace("MULTIPOLYGON (((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace(")))",""); +} +else if(RegionCoords.startsWith("Poly")){ + RegionCoords = RegionCoords.replace("Polygon ((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace("))",""); +} +else if(RegionCoords.startsWith("POLYGON")){ + RegionCoords = RegionCoords.replace("POLYGON ((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace("))",""); +} +else if(RegionCoords.startsWith("MultiLineString")){ + RegionCoords = RegionCoords.replace("MultiLineString ((",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace("))",""); +} +else if(RegionCoords.startsWith("LineString")){ + RegionCoords = RegionCoords.replace("LineString (",""); + RegionCoords = RegionCoords.replace(","," "); + RegionCoords = RegionCoords.replace(")",""); +} +else { + traceln("GIS coordinaten in de excel data die niet starten met Multi of Poly"); +} + + + +if(RegionCoords.contains(")(") || RegionCoords.contains(") (") || RegionCoords.contains(") (")){ + if (GISObjectType == OL_GISObjectType.ANTI_LAYER){ + RegionCoords = RegionCoords.replace(")("," "); // Combine all polies into one! + RegionCoords = RegionCoords.replace(") ("," "); // Combine all polies into one! + } + else{ + RegionCoords = RegionCoords.split("\\)")[0]; + } +} + +RegionCoords = RegionCoords.replace(" "," "); +String delims = " "; +String[] tokens; +tokens = RegionCoords.split(delims); + +int nbCoords = tokens.length; +double[] GISCoords = new double[nbCoords]; + +for (int i=0; i<nbCoords; i++) { + if (i % 2 == 0) { // latitudes + GISCoords[i]=Double.parseDouble(tokens[i+1]); + } else { // longitudes + GISCoords[i]=Double.parseDouble(tokens[i-1]); + } +} +return GISCoords;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205779</Id> + <Name>f_importExcelTablesToDB</Name> + <Description>Automatisch inladen van excel files uit de model map naar de database. + +@author: Ate +@since: 14-12-23</Description> + <X>-390</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//inputHouseholdTrips.readFile(); +//inputCookingActivities.readFile(); +//inputTruckTrips.readFile(); + +//inputCSVcookingActivities.readFile(); +//inputCSVcookingActivities. + +if(settings.reloadDatabase()){ + + //Get the database names that are selected for reloading + List<String[]> databaseNames = project_data.databaseNames(); + + //Get the model database + ModelDatabase modelDB = getEngine().getModelDatabase(); + + //Loop over all databases + for(String[] databaseName : databaseNames){ + + //Create the file path string + String filePathString = "data_" + project_data.project_name() + "/" + databaseName[0] + "_" + project_data.project_name() + ".xlsx"; + + //If file exists, load it into the database + File f = new File(filePathString); + if(f.exists() && !f.isDirectory()) { + Database myFileDatabase = new Database(this, databaseName[1], filePathString); + modelDB.importFromExternalDB(myFileDatabase.getConnection(), databaseName[1], databaseName[1], true, false); + traceln("Database %s has been updated.", databaseName[1]); + } else { // if file does not exist, clear the database to make sure there are no wrong values in the simulation! + executeStatement("DELETE FROM " + databaseName[1] + " c"); + traceln("File not found, database %s has been cleared!", databaseName[1]); + } + } + + //Overwrite specific database values + f_overwriteSpecificDatabaseValues(); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205785</Id> + <Name>f_createSolarParks</Name> + <Description>Function used to generate solar parks: grid connections and park owner (connection owner actor)</Description> + <X>430.001</X> + <Y>790.001</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>ConnectionOwner owner; +GCEnergyProduction solarpark; + +List<String> existing_actors = new ArrayList(); +List<String> existing_solarFields = new ArrayList(); + +for (Solarfarm_data dataSolarfarm : f_getSolarfarmsInSubScope(c_solarfarm_data)) { // MOET NOG CHECK OF ZONNEVELD ACTOR AL BESTAAT OP, zo ja --> Zonneveld koppelen aan elkaar en niet 2 GC en 2 actoren maken. + + if (!existing_solarFields.contains( dataSolarfarm.gc_id() )) { + solarpark = energyModel.add_EnergyProductionSites(); + + solarpark.set_p_gridConnectionID( dataSolarfarm.gc_id() ); + solarpark.set_p_name( dataSolarfarm.gc_name() ); + + //Check wether it can be changed using sliders + solarpark.p_isSliderGC = dataSolarfarm.isSliderGC(); + + //Grid Capacity + solarpark.v_liveConnectionMetaData.physicalCapacity_kW = dataSolarfarm.connection_capacity_kw(); + if ( dataSolarfarm.connection_capacity_kw() > 0 ) { + solarpark.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + if ( dataSolarfarm.contracted_feed_in_capacity_kw() != null) { + solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.contracted_feed_in_capacity_kw(); + solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else { + solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.connection_capacity_kw(); + solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + + //solarpark.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + solarpark.set_p_ownerID( dataSolarfarm.owner_id() ); + solarpark.set_p_parentNodeElectricID( dataSolarfarm.gridnode_id() ); + + solarpark.v_isActive = dataSolarfarm.initially_active() ; + + //Add EA + f_addEnergyProduction(solarpark, OL_EnergyAssetType.PHOTOVOLTAIC, "Solar farm" , dataSolarfarm.capacity_electric_kw()); + + + if (!existing_actors.contains(solarpark.p_ownerID)){ // check if owner exists already, if not, create new owner. + owner = energyModel.add_pop_connectionOwners(); + + owner.set_p_actorID( dataSolarfarm.owner_id()); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.SOLARFARM_OP ); + owner.b_dataSharingAgreed = true; + existing_actors.add(owner.p_actorID); + } + else { // Owner exists already: add new GC to existing owner + owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataSolarfarm.owner_id())); + } + + solarpark.set_p_owner( owner ); + + existing_solarFields.add(solarpark.p_gridConnectionID); + } + else { // solarpark and its owner exist already, only create new gis building which is added to the park + solarpark = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataSolarfarm.gc_id()) ); + owner = solarpark.p_owner; + + } + + if (dataSolarfarm.polygon() != null) { + //Create GIS object for the solar park + GIS_Object area = f_createGISObject( dataSolarfarm.gc_name(), dataSolarfarm.latitude(), dataSolarfarm.longitude(), dataSolarfarm.polygon(), OL_GISObjectType.SOLARFARM); + + //Add to collections + area.c_containedGridConnections.add(solarpark); + solarpark.c_connectedGISObjects.add(area); + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_solarParkColor ); + area.set_p_defaultLineColor( zero_Interface.v_solarParkLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } +} +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205787</Id> + <Name>f_createBatteries</Name> + <Description>Function used to create (neighborhood) battery grid connection and actor</Description> + <X>430.001</X> + <Y>930</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>for (Battery_data dataBattery : f_getBatteriesInSubScope(c_battery_data)) { // MOET NOG CHECK OF battery ACTOR AL BESTAAT OP, zo ja --> battery koppelen aan elkaar en niet 2 GC en 2 actoren maken. + + ConnectionOwner owner = energyModel.add_pop_connectionOwners(); + GCGridBattery gridbattery = energyModel.add_GridBatteries(); + + //Owner parameters + owner.set_p_actorID( dataBattery.owner_id() ); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.BATTERY_OP ); + owner.b_dataSharingAgreed = true; + + //GC parameters + gridbattery.set_p_gridConnectionID( dataBattery.gc_id () ); + gridbattery.set_p_name( dataBattery.gc_name() ); + gridbattery.set_p_ownerID( dataBattery.owner_id() ); + gridbattery.set_p_owner( owner ); + gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); + + //Check wether it can be changed using sliders + gridbattery.p_isSliderGC = dataBattery.isSliderGC(); + + //Grid Capacity + gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); + if ( dataBattery.connection_capacity_kw() > 0 ) { + gridbattery.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + if ( dataBattery.contracted_delivery_capacity_kw() != null ) { + gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.contracted_delivery_capacity_kw(); + gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; + } + else { + gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.connection_capacity_kw(); + gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + } + if ( dataBattery.contracted_feed_in_capacity_kw() != null ) { + gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.contracted_feed_in_capacity_kw(); + gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else { + gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.connection_capacity_kw(); + gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + gridbattery.set_p_parentNodeElectricID( dataBattery.gridnode_id() ); + //gridbattery.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + + switch (dataBattery.operation_mode()) { + case PRICE: + gridbattery.f_setBatteryManagement(new J_BatteryManagementPrice(gridbattery)); + break; + case PEAK_SHAVING_PARENT_NODE: + J_BatteryManagementPeakShaving batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); + GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals(gridbattery.p_parentNodeElectricID)); + if (gn == null) { + throw new RuntimeException("Could not find GridNode with ID: " + gridbattery.p_parentNodeElectricID + " for GCGridBattery"); + } + batteryAlgorithm.setTarget(gn); + gridbattery.f_setBatteryManagement(batteryAlgorithm); + break; + case PEAK_SHAVING_COOP: + // target agent is still null, should be set at the moment of coop creation + batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); + batteryAlgorithm.setTargetType( OL_ResultScope.ENERGYCOOP ); + gridbattery.f_setBatteryManagement(batteryAlgorithm); + break; + default: + throw new RuntimeException("Battery Operation Mode: " + dataBattery.operation_mode() + " is not supported for GCGridBattery."); + } + + //Get initial state + gridbattery.v_isActive = dataBattery.initially_active(); + + if (dataBattery.polygon() != null) { + //Create gis object for the battery + GIS_Object area = f_createGISObject( dataBattery.gc_name(), dataBattery.latitude(), dataBattery.longitude(), dataBattery.polygon(), OL_GISObjectType.BATTERY); + + //Add to collections + gridbattery.c_connectedGISObjects.add(area); + area.c_containedGridConnections.add(gridbattery); + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_batteryColor ); + area.set_p_defaultLineColor( zero_Interface.v_batteryLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } + //Create energy asset for the battery + f_addStorage(gridbattery, dataBattery.capacity_electric_kw(), dataBattery.storage_capacity_kwh(), OL_EnergyAssetType.STORAGE_ELECTRIC ); + +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205789</Id> + <Name>f_createElectrolysers</Name> + <Description>Function used to create electrolyser grid connections and actors</Description> + <X>430</X> + <Y>910</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>ConnectionOwner owner; +List<String> existing_actors = new ArrayList(); + + +for (Electrolyser_data dataElectrolyser : f_getElectrolysersInSubScope(c_electrolyser_data)) { + GCEnergyConversion H2Electrolyser = energyModel.add_EnergyConversionSites(); + + H2Electrolyser.set_p_gridConnectionID( dataElectrolyser.gc_id() ); + H2Electrolyser.set_p_name( dataElectrolyser.gc_name() ); + //H2Electrolyser.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + H2Electrolyser.set_p_ownerID( dataElectrolyser.owner_id() ); + H2Electrolyser.set_p_parentNodeElectricID( dataElectrolyser.gridnode_id() ); + + //Grid Capacity + H2Electrolyser.v_liveConnectionMetaData.physicalCapacity_kW = dataElectrolyser.connection_capacity_kw(); + if ( dataElectrolyser.connection_capacity_kw() > 0 ) { + H2Electrolyser.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + if ( dataElectrolyser.contracted_delivery_capacity_kw() != null ) { + H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.contracted_delivery_capacity_kw(); + H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; + } + else { + H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.connection_capacity_kw(); + H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + } + if ( dataElectrolyser.contracted_feed_in_capacity_kw() != null ) { + H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.contracted_feed_in_capacity_kw(); + H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else { + H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.connection_capacity_kw(); + H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + + + H2Electrolyser.v_isActive = dataElectrolyser.initially_active(); + H2Electrolyser.p_minProductionRatio = dataElectrolyser.min_production_ratio(); + + //Electrolyser operation mode + H2Electrolyser.set_p_electrolyserOperationMode( dataElectrolyser.default_operation_mode()); + + //Create EA for the electrolyser GC + J_EAConversionElectrolyser h2ElectrolyserEA = new J_EAConversionElectrolyser(H2Electrolyser, dataElectrolyser.capacity_electric_kw(), dataElectrolyser.conversion_efficiency(), energyModel.p_timeStep_h, OL_ElectrolyserState.STANDBY, dataElectrolyser.load_change_time_s(), dataElectrolyser.start_up_time_shutdown_s(), dataElectrolyser.start_up_time_standby_s(), dataElectrolyser.start_up_time_idle_s()); + + if (!existing_actors.contains(H2Electrolyser.p_ownerID)){ // check if owner exists already, if not, create new owner. + owner = energyModel.add_pop_connectionOwners(); + + owner.set_p_actorID( H2Electrolyser.p_ownerID ); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.ELECTROLYSER_OP ); + owner.b_dataSharingAgreed = true; + } + else { // Owner exists already: add new GC to existing owner + owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataElectrolyser.owner_id())); + } + + H2Electrolyser.set_p_owner( owner ); + + if (dataElectrolyser.polygon() != null) { + //Create GIS object for the electrolyser + GIS_Object area = f_createGISObject( dataElectrolyser.gc_name(), dataElectrolyser.latitude(), dataElectrolyser.longitude(), dataElectrolyser.polygon(), OL_GISObjectType.ELECTROLYSER); + + //Add to collections + area.c_containedGridConnections.add(H2Electrolyser); + H2Electrolyser.c_connectedGISObjects.add(area); + + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_electrolyserColor ); + area.set_p_defaultLineColor( zero_Interface.v_electrolyserLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205791</Id> + <Name>f_createWindFarms</Name> + <Description>Function used to create all windfarm grid connections, actors, EAs and GISObjects</Description> + <X>430.001</X> + <Y>810</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>ConnectionOwner owner; +GCEnergyProduction windfarm; + +List<String> existing_actors = new ArrayList(); +List<String> existing_windFarms = new ArrayList(); + +for (Windfarm_data dataWindfarm : f_getWindfarmsInSubScope(c_windfarm_data)) { + if (!existing_windFarms.contains(dataWindfarm.gc_id())) { // Check if windfarm exists already, if not, create new windfarm GC + turbine + windfarm = energyModel.add_EnergyProductionSites(); + + windfarm.set_p_gridConnectionID( dataWindfarm.gc_id() ); + windfarm.set_p_name( dataWindfarm.gc_name() ); + + //Check wether it can be changed using sliders + windfarm.p_isSliderGC = dataWindfarm.isSliderGC(); + + //Grid capacity + windfarm.v_liveConnectionMetaData.physicalCapacity_kW = dataWindfarm.connection_capacity_kw(); + if ( dataWindfarm.connection_capacity_kw() > 0 ) { + windfarm.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + if ( dataWindfarm.contracted_feed_in_capacity_kw() != null) { + windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.contracted_feed_in_capacity_kw(); + windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else { + windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.connection_capacity_kw(); + windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + //windfarm.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + windfarm.set_p_ownerID( dataWindfarm.owner_id() ); + windfarm.set_p_parentNodeElectricID( dataWindfarm.gridnode_id() ); + + //Get initial state + windfarm.v_isActive = dataWindfarm.initially_active(); + + //Create EA for the windturbine GC + f_addEnergyProduction(windfarm, OL_EnergyAssetType.WINDMILL, "Windmill onshore", dataWindfarm.capacity_electric_kw()); + + if (!existing_actors.contains(windfarm.p_ownerID)){ // check if owner exists already, if not, create new owner. + owner = energyModel.add_pop_connectionOwners(); + + owner.set_p_actorID( windfarm.p_ownerID ); + //owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.WINDFARM_OP ); + owner.b_dataSharingAgreed = true; + } + else { // Owner exists already: add new GC to existing owner + owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataWindfarm.owner_id())); + } + + windfarm.set_p_owner( owner ); + + existing_windFarms.add(windfarm.p_gridConnectionID); + } + else { // winfarm and its owner exist already, only create new gis building which is added to the farm + windfarm = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataWindfarm.gc_id()) ); + owner = windfarm.p_owner; + + } + + //Create GIS object for the windfarm + if (dataWindfarm.polygon() != null) { + GIS_Object area = f_createGISObject( dataWindfarm.gc_name(), dataWindfarm.latitude(), dataWindfarm.longitude(), dataWindfarm.polygon(), OL_GISObjectType.WINDFARM ); + + //Add to collections + area.c_containedGridConnections.add(windfarm); + windfarm.c_connectedGISObjects.add(area); + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_windFarmColor ); + area.set_p_defaultLineColor( zero_Interface.v_windFarmLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double[]</ReturnType> + <Id>1726584205793</Id> + <Name>f_createGISNodesTokens</Name> + <X>70</X> + <Y>560</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GN</Name> + <Type>GridNode</Type> + </Parameter> + <Body>double scaling_factor_LVLV = zero_Interface.v_LVLVNodeSize; +double scaling_factor_MVLV = zero_Interface.v_MVLVNodeSize; +double scaling_factor_MVMV = zero_Interface.v_MVMVNodeSize; +double scaling_factor_HVMV = zero_Interface.v_HVMVNodeSize; + +int nb_GISCoords; +String node_shape = "TRIANGLE"; +double scaling_factor_gridnode = 0; + +switch( GN.p_nodeType ) { + case LVLV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_LVLV; + break; + case MVLV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_MVLV; + break; + case SUBMV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_MVLV; + break; + case MVMV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_MVMV; + break; + case HVMV: + nb_GISCoords = 6; + node_shape = "TRIANGLE"; + scaling_factor_gridnode = scaling_factor_HVMV; + break; + case HT: + nb_GISCoords = 6; + break; + case MT: + nb_GISCoords = 6; + break; + case LT: + nb_GISCoords = 6; + break; + case LT5thgen: + nb_GISCoords = 6; + break; + default: + nb_GISCoords = 6; +} + +double[] GISCoords = new double[nb_GISCoords]; + + +switch(node_shape){ + + case "TRIANGLE": + //latitudes + GISCoords[0]=GN.p_latitude; + GISCoords[2]=GN.p_latitude - scaling_factor_gridnode*0.00001; + GISCoords[4]=GN.p_latitude - scaling_factor_gridnode*0.00001; + + //longitudes + GISCoords[1]=GN.p_longitude; + GISCoords[3]=GN.p_longitude + scaling_factor_gridnode*0.00001; + GISCoords[5]=GN.p_longitude - scaling_factor_gridnode*0.00001; + break; + case "DIAMOND": + //latitudes + GISCoords[0]=GN.p_latitude; + GISCoords[2]=GN.p_latitude - scaling_factor_gridnode*0.00001; + GISCoords[4]=GN.p_latitude; + GISCoords[6]=GN.p_latitude + scaling_factor_gridnode*0.00001; + + //longitudes + GISCoords[1]=GN.p_longitude; + GISCoords[3]=GN.p_longitude + scaling_factor_gridnode*0.00001; + GISCoords[5]=GN.p_longitude + scaling_factor_gridnode*0.00001*2; + GISCoords[7]=GN.p_longitude + scaling_factor_gridnode*0.00001; + break; + /* + case "CIRCLE": + // if you want Circle coordinates --> + //x = r * cos(t) + a + //y = r * sin(t) + b + //t is an angle between 0 and 2π (more steps is more circle points, about 10-12 should suffice. --> adjust nb_GISCoords accordingly + // r is the radius: 0.000009 degrees in latitude is about 1 meter + // a and b are latitude and longitude + break; + */ +} + +return GISCoords; + + + + + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205795</Id> + <Name>f_createEnergyActors</Name> + <Description>Function used to generate specific actors like grid operator, energy supplier and energy coop. Actors used to create variable pricing.</Description> + <X>60</X> + <Y>460</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>// Create the grid operator +GridOperator GO = energyModel.add_pop_gridOperators(); + +GO.p_actorID = project_data.grid_operator(); +GO.p_hasCongestionPricing = project_data.hasCongestionPricing() != null ? project_data.hasCongestionPricing() : false; + + +// Create the energy coop +if (project_data.energy_coop() != null && !project_data.energy_coop().equals("None")){ + + EnergyCoop EC = energyModel.add_pop_energyCoops(); + + EC.p_actorID = project_data.energy_coop(); + EC.p_gridOperator = GO; + //EC.p_CoopParent = EC.p_actorID; // WAT BETEKENT COOP PARENT?? +} + + +// Energy supplier +if (project_data.energy_supplier() != null && !project_data.energy_supplier().equals("None")){ + + EnergySupplier ES = energyModel.add_pop_energySuppliers(); + + ES.p_actorID = project_data.energy_supplier(); +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205799</Id> + <Name>f_createGenericCompanies</Name> + <Description>Creating the companies (using a single GC) + owned buildings, that have not filled in the survey. If created, they will be simulated using average values, scaled with the totals (CBS data) of the area.</Description> + <X>430</X> + <Y>533</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Initialize variables +List<GCUtility> generic_company_GCs = new ArrayList(); +HashMap<GridConnection, Double> map_GC_to_installedBuildingPV = new HashMap(); + +//Get buildings in scope +List<Building_data> buildingDataGenericCompanies = f_getBuildingsInSubScope(c_companyBuilding_data); + +//Add generic companies to the legend if in model +if(buildingDataGenericCompanies.size()>0){ + zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DEFAULT_COMPANY); +} + +//Loop over the remaining buildings in c_CompanyBuilding_data (Survey buildings have been removed from this collection) +for (Building_data genericCompany : buildingDataGenericCompanies) { + + GCUtility companyGC = findFirst(generic_company_GCs, GC -> GC.p_gridConnectionID.equals(genericCompany.address_id())); + + if(companyGC == null){ + //Create new companyGC + companyGC = energyModel.add_UtilityConnections(); + + //Update counter and collections + generic_company_GCs.add(companyGC); + map_GC_to_installedBuildingPV.put(companyGC, 0.0); + + //Set parameters for the Grid Connection + companyGC.p_gridConnectionID = genericCompany.address_id(); + + // Check that is needed until connectioncapacity is no longer in 'Panden' excel + if (genericCompany.contracted_capacity_kw() == null || genericCompany.contracted_capacity_kw() <= 0) { + companyGC.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; + } + else{ + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = genericCompany.contracted_capacity_kw(); + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; + companyGC.v_liveConnectionMetaData.physicalCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; + } + + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + + //set GC Adress + companyGC.p_address = new J_Address(); + companyGC.p_address.setStreetName(genericCompany.streetname()); + if (genericCompany.house_number() == null) { + companyGC.p_address.setHouseNumber(0); + } + else { + companyGC.p_address.setHouseNumber(genericCompany.house_number()); + } + companyGC.p_address.setHouseLetter(genericCompany.house_letter()); + companyGC.p_address.setHouseAddition(genericCompany.house_addition()); + companyGC.p_address.setPostalcode(genericCompany.postalcode()); + companyGC.p_address.setCity(genericCompany.city()); + + + //Set location of GC + companyGC.p_latitude = genericCompany.latitude(); + companyGC.p_longitude = genericCompany.longitude(); + companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); + + //Update remaining totals (AFTER Lat/Lon has been defined!) + p_remainingTotals.adjustTotalNumberOfAnonymousCompanies(companyGC, 1); + p_remainingTotals.adjustTotalFloorSurfaceAnonymousCompanies_m2(companyGC, genericCompany.address_floor_surface_m2()); + + //Connect GC to grid node + companyGC.p_parentNodeElectricID = genericCompany.gridnode_id (); + + + // Create new actor and assign GC to that + ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company + + COC.p_actorID = genericCompany.address_id(); + COC.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; + COC.p_detailedCompany = false; + COC.b_dataSharingAgreed = true; + + companyGC.p_owner = COC; + companyGC.p_ownerID = COC.p_actorID; + } + + //Check wheter this building already exists + GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(genericCompany.building_id())); + + if(existingBuilding == null){//Create new GIS building and connect + GIS_Building b = f_createGISBuilding( genericCompany, companyGC ); + + companyGC.p_roofSurfaceArea_m2 += b.p_roofSurfaceArea_m2; + map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + (genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0)); + + //Style building + b.p_defaultFillColor = zero_Interface.v_companyBuildingColor; + b.p_defaultLineColor = zero_Interface.v_companyBuildingLineColor; + zero_Interface.f_styleAreas(b); + } + else{// Connect with existing building + //Redistribute the PV installed + List<GridConnection> currentConnectedGCWithBuilding_notDetailed = findAll(existingBuilding.c_containedGridConnections, gc -> !gc.p_owner.p_detailedCompany); + int currentAmountOfConnectedGCWithBuilding_notDetailed = currentConnectedGCWithBuilding_notDetailed.size(); + + double buildingPV = genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0; + double newPVDistributionForAllAttachedGC_kW = buildingPV/(currentAmountOfConnectedGCWithBuilding_notDetailed+1); + double deltaPV_earlierConnectedGC_kW = newPVDistributionForAllAttachedGC_kW - (buildingPV/currentAmountOfConnectedGCWithBuilding_notDetailed); + + for(GridConnection earlierConnectedGC : currentConnectedGCWithBuilding_notDetailed){ + map_GC_to_installedBuildingPV.put(earlierConnectedGC, map_GC_to_installedBuildingPV.get(earlierConnectedGC) + deltaPV_earlierConnectedGC_kW); + if(map_GC_to_installedBuildingPV.get(earlierConnectedGC) < 0){ + new RuntimeException("Negative installed PV for GC: " + earlierConnectedGC.p_gridConnectionID + " after redistribution of PV on the building. This should never be possible!"); + } + } + + map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + newPVDistributionForAllAttachedGC_kW); + + //Connect to the existing building + f_connectGCToExistingBuilding(companyGC, existingBuilding, genericCompany); + } + + companyGC.p_floorSurfaceArea_m2 += genericCompany.address_floor_surface_m2(); +} + +//Finalize the remaining totals distribution +p_remainingTotals.finalizeRemainingTotalsDistributionCompanies(); + +//Add EA to all generic companies (Has to be after the remaining totals finalization, so cant happen at the same time as the creation of the GC and their buildings) +for (GridConnection GCcompany : generic_company_GCs ) { + f_iEAGenericCompanies(GCcompany, map_GC_to_installedBuildingPV.get(GCcompany)); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>GIS_Building</ReturnType> + <Id>1726584205801</Id> + <Name>f_createGISBuilding</Name> + <Description>Creates the GIS object(s) building(s) for the companies and houses</Description> + <X>1547.621</X> + <Y>600</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>buildingData</Name> + <Type>Building_data</Type> + </Parameter> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>GIS_Building b = energyModel.add_pop_GIS_Buildings(); + +b.p_id = buildingData.building_id(); +b.p_GISObjectType = OL_GISObjectType.BUILDING; +b.p_buildingYear = buildingData.build_year(); +b.p_status = buildingData.status(); +b.p_useType = buildingData.purpose(); + +// Adres data +b.p_annotation = buildingData.annotation(); + +//Create gisregion +b.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(buildingData.polygon(), b.p_GISObjectType)); + +//Use the first point of the polygon as lat lon +double[] gisregion_points = b.gisRegion.getPoints(); // get all points of the gisArea of the building in the format lat1,lon1,lat2,lon2, etc. + +//position and coordinates +b.p_latitude = gisregion_points[0]; +b.p_longitude = gisregion_points[1]; + +//Set latlon +b.setLatLon(b.p_latitude, b.p_longitude); + + +//Define roof surface area (with Null checks and gisregion area as back up) +b.p_roofSurfaceArea_m2 = buildingData.polygon_area_m2() != null ? buildingData.polygon_area_m2() : b.gisRegion.area(); + +//Define floor surface area (with Null check, and make it 0 if unkown, else counting errors due to order of loadin of building data) +b.p_floorSurfaceArea_m2 = buildingData.address_floor_surface_m2() != null ? buildingData.address_floor_surface_m2() : 0; + +//Add to collections +b.c_containedGridConnections.add(parentGC); +parentGC.c_connectedGISObjects.add(b); + + +return b;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205803</Id> + <Name>f_addElectricityDemandProfile</Name> + <X>900</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityDemand_kWh</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>pvPower_kW</Name> + <Type>Double</Type> + </Parameter> + <Parameter> + <Name>hasQuarterlyData</Name> + <Type>boolean</Type> + </Parameter> + <Parameter> + <Name>profileName</Name> + <Type>String</Type> + </Parameter> + <Body>if ( hasQuarterlyData == true ) { // Add quarterly electricity data pattern if available + + //Initialize the arrays + List<Double> yearlyElectricityFeedin_kWh_list = null; + List<Double> yearlyElectricityProduction_kWh_list = null; + + //Check for PV, and if so: check for additional quarterhourly values + if(pvPower_kW != null && pvPower_kW > 0){ + //Check for feedin values availability, if available: fill the list, if not, list = null; + try { + if(selectFirstValue(Double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption LIMIT 1;") != null){ + yearlyElectricityFeedin_kWh_list = selectValues(double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption;"); + } + } + catch(Exception e) { + //Do nothing, cause initialized with null; + } + + //Check for bruto production values availability, if available: fill the list, if not, list = null; + try { + if(selectFirstValue(Double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption LIMIT 1;") != null){ + yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption;"); + } + } + catch(Exception e) { + //Do nothing, cause initialized with null; + } + } + + //Get the delivery values + List<Double> yearlyElectricityDelivery_kWh_list = selectValues(double.class, "SELECT " + profileName + "_demand FROM comp_elec_consumption;"); + + + //Convert lists into arrays + double[] yearlyElectricityDelivery_kWh_array = (yearlyElectricityDelivery_kWh_list != null) ? yearlyElectricityDelivery_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; + double[] yearlyElectricityFeedin_kWh_array = (yearlyElectricityFeedin_kWh_list != null) ? yearlyElectricityFeedin_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; + double[] yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; + + + //Preprocess and add the profiles + f_createPreprocessedElectricityProfile_PV(parentGC, yearlyElectricityDelivery_kWh_array, yearlyElectricityFeedin_kWh_array, yearlyElectricityProduction_kWh_array, pvPower_kW, null); + +} + +else { // Add regular electricity and consumption profiles + J_EAConsumption profile = new J_EAConsumption(parentGC, OL_EnergyAssetType.ELECTRICITY_DEMAND, profileName, yearlyElectricityDemand_kWh, OL_EnergyCarriers.ELECTRICITY, energyModel.p_timeStep_h, null); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205807</Id> + <Name>f_createGISParcels</Name> + <Description>Creates "empty" parcels on the gismap, these parcels do not contain buildings or gridconnections. Currently no need for the function to return the GIS_Object.</Description> + <X>1547.621</X> + <Y>620</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Add GISObject type to the legenda +if(c_parcel_data.size()>0){ + zero_Interface.c_modelActiveSpecialGISObjects.add(OL_GISObjectType.PARCEL); +} + +for (Parcel_data dataParcel : c_parcel_data) { + + GIS_Parcel parcel = energyModel.add_pop_GIS_Parcels(); + + parcel.set_p_latitude( dataParcel.latitude() ); + parcel.set_p_longitude( dataParcel.longitude() ); + parcel.setLatLon(parcel.p_latitude, parcel.p_longitude); + parcel.set_p_id( dataParcel.parcel_id() ); + parcel.set_p_GISObjectType(OL_GISObjectType.PARCEL); + + //Building + styling the gisregion and putting it on the map + GISRegion gisregion = zero_Interface.f_createGISObject(f_createGISObjectsTokens( dataParcel.polygon(), parcel.p_GISObjectType)); + parcel.gisRegion = gisregion; + + parcel.set_p_defaultFillColor( zero_Interface.v_parcelColor ); + parcel.set_p_defaultLineColor( zero_Interface.v_parcelLineColor ); + parcel.set_p_defaultLineStyle( LineStyle.LINE_STYLE_DASHED ); + zero_Interface.f_styleAreas(parcel); +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205809</Id> + <Name>f_addEnergyProduction</Name> + <X>900</X> + <Y>200</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>asset_type</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>asset_name</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>installedPower_kW</Name> + <Type>double</Type> + </Parameter> + <Body>double assetCapacity_kW = 0; +double timestep_h = energyModel.p_timeStep_h; +J_ProfilePointer profilePointer = null; +OL_EnergyCarriers energyCarrier = OL_EnergyCarriers.ELECTRICITY; +switch (asset_type){ + +case PHOTOVOLTAIC: + energyCarrier = OL_EnergyCarriers.ELECTRICITY; + profilePointer = energyModel.pp_PVProduction35DegSouth_fr; + assetCapacity_kW = installedPower_kW; + break; + +case WINDMILL: + energyCarrier = OL_EnergyCarriers.ELECTRICITY; + profilePointer=energyModel.pp_windProduction_fr; + assetCapacity_kW = installedPower_kW; + break; + +case PHOTOTHERMAL: //NOT USED YET + energyCarrier = OL_EnergyCarriers.HEAT; + profilePointer = energyModel.pp_PVProduction35DegSouth_fr; // Voor nu om te testen! Misschien valt dit wel te gebruiken met bepaalde efficientie factor! + assetCapacity_kW = installedPower_kW; + break; +} + +J_EAProduction production_asset = new J_EAProduction(parentGC, asset_type, asset_name, energyCarrier, assetCapacity_kW, timestep_h, profilePointer); + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>GIS_Object</ReturnType> + <Id>1726584205811</Id> + <Name>f_createGISObject</Name> + <Description>Creates the GIS object for the area EA (windfarms, solarparks, electrolysers, batteries, etc.)</Description> + <X>1547.621</X> + <Y>580</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>name</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>latitude</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>longitude</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>polygon</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>GISObjectType</Name> + <Type>OL_GISObjectType</Type> + </Parameter> + <Body>GIS_Object area = energyModel.add_pop_GIS_Objects(); + +area.p_id = name; +area.p_GISObjectType = GISObjectType; + +//position and coordinates +area.p_latitude = latitude; +area.p_longitude = longitude; +area.setLatLon(area.p_latitude, area.p_longitude); + +//Create gisregion +area.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(polygon, area.p_GISObjectType)); + +//Add GISObject type to the legenda +zero_Interface.c_modelActiveSpecialGISObjects.add(area.p_GISObjectType); + +return area; +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205815</Id> + <Name>f_createSurveyCompanies_Zorm</Name> + <X>429.001</X> + <Y>119</Y> + <Label> + <X>10.999</X> + <Y>1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Get the survey data +List<com.zenmo.zummon.companysurvey.Survey> surveys = f_getSurveys(); +traceln("Size of survey List: %s", surveys.size()); + +//Get the building data +try{ + map_buildingData_Vallum = com.zenmo.vallum.PandKt.fetchBagPanden(surveys); +} +catch (Exception e){ //if api of bag is down, leave bag buildings empty and display error message + zero_Interface.f_setErrorScreen("BAG API is offline, het is mogelijk dat bepaalde panden niet zijn ingeladen!", 0, 0); +} + + +traceln("Companies that filled in the survey:"); +for (var survey : surveys) { + + traceln(survey.getCompanyName()); + + //Create connection owner + ConnectionOwner survey_owner = energyModel.add_pop_connectionOwners(); + survey_owner.p_actorID = survey.getCompanyName(); + survey_owner.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; + survey_owner.p_detailedCompany = true; + survey_owner.b_dataSharingAgreed = survey.getDataSharingAgreed(); + survey_owner.b_dataIsAccessible = f_getAccessOfSurveyGC(survey.getDataSharingAgreed(), survey.getId()); + + for (var address : survey.getAddresses()) { + + //Update number of survey companies (locations) + v_numberOfSurveyCompanies++; + + for (var gridConnection: address.getGridConnections()) { + + //Check if it has (or will have) a direct connection with the grid (either gas or electric), if not: skip this gc. + boolean hasNaturalGasConnection = (gridConnection.getNaturalGas().getHasConnection() != null)? gridConnection.getNaturalGas().getHasConnection() : false; + boolean hasExpansionRequest = (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null ) ? gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() : false; + + if (!gridConnection.getElectricity().getHasConnection() && !hasExpansionRequest && !hasNaturalGasConnection){ + traceln("surveyGC with sequence: " + gridConnection.getSequence() + " is not created, as it has no connection to the grid, future grid connection or current gas connection."); + continue; + } + + //Create GC + GCUtility companyGC = energyModel.add_UtilityConnections(); + + //Set parameters for the Grid Connection + companyGC.p_ownerID = survey.getCompanyName(); + companyGC.p_gridConnectionID = gridConnection.getSequence().toString() ; + + //Find actor and connect GC + companyGC.p_owner = survey_owner; + + //Adress data + companyGC.p_address = new J_Address(); + companyGC.p_address.setStreetName(address.getStreet().substring(0,1).toUpperCase() + address.getStreet().substring(1).toLowerCase()); + companyGC.p_address.setHouseNumber(address.getHouseNumber()); + companyGC.p_address.setHouseLetter(address.getHouseLetter().equals("") ? null : address.getHouseLetter()); + companyGC.p_address.setHouseAddition(address.getHouseNumberSuffix().equals("") ? null : address.getHouseNumberSuffix()); + companyGC.p_address.setPostalcode(address.getPostalCode().equals("") ? null : address.getPostalCode().toUpperCase().replaceAll("\\s","")); + companyGC.p_address.setCity(address.getCity().substring(0,1).toUpperCase() + address.getCity().substring(1).toLowerCase()); + + //Get attached building info + List<Building_data> buildings = f_getSurveyGCBuildingData(companyGC, gridConnection); + + //Total new additional floor/roof surface area + double totalNewFloorSurfaceAreaGC_m2 = 0; + double totalNewRoofSurfaceAreaGC_m2 = 0; + + //Create the GIS buildings + for (Building_data buildingData : buildings) { + GIS_Building gisBuilding = findFirst(energyModel.pop_GIS_Buildings, b -> b.p_id.equals(buildingData.building_id())); // Check if building already exists in engine + if (gisBuilding != null) { + // Connect GC to existing building in engine + f_connectGCToExistingBuilding(companyGC, gisBuilding, buildingData); + } + else{ + gisBuilding = f_createGISBuilding( buildingData, companyGC); + } + + //Set name of building + if(gisBuilding.p_annotation == null){ + gisBuilding.p_annotation = companyGC.p_ownerID; + } + + //Accumulate surface areas + totalNewFloorSurfaceAreaGC_m2 += buildingData.address_floor_surface_m2(); + totalNewRoofSurfaceAreaGC_m2 += gisBuilding.p_roofSurfaceArea_m2; + + //Set trafo ID + companyGC.p_parentNodeElectricID = buildingData.gridnode_id(); + + //Style building + gisBuilding.p_defaultFillColor = zero_Interface.v_detailedCompanyBuildingColor; + gisBuilding.p_defaultLineColor = zero_Interface.v_detailedCompanyBuildingLineColor; + zero_Interface.f_styleAreas(gisBuilding); + + } + + //Add (combined) building data to GC (latitude and longitude + area) + companyGC.p_floorSurfaceArea_m2 += totalNewFloorSurfaceAreaGC_m2; + companyGC.p_roofSurfaceArea_m2 += totalNewRoofSurfaceAreaGC_m2; + + + if(!companyGC.c_connectedGISObjects.isEmpty()){ + companyGC.p_longitude = companyGC.c_connectedGISObjects.get(0).p_longitude; // Get longitude of first building (only used to get nearest trafo) + companyGC.p_latitude = companyGC.c_connectedGISObjects.get(0).p_latitude; // Get latitude of first building (only used to get nearest trafo) + + if(buildings.isEmpty()){ //GC will not have gotten a gridnode assigned, + for (var PID : gridConnection.getPandIds() ) { + Building_data surveyBuildingData = findFirst(c_surveyCompanyBuilding_data, b -> b.building_id().equals(PID.getValue())); + if(surveyBuildingData != null){ + companyGC.p_parentNodeElectricID = surveyBuildingData.gridnode_id(); + break; + } + } + } + + //In Subscope check + if(companyGC.p_parentNodeElectricID != null && !c_gridNodeIDsInScope.contains(companyGC.p_parentNodeElectricID)){ + //--> Company not in subscope -> PAUSE AND REMOVE FROM ASSIGNED GRIDNODE + companyGC.p_parentNodeElectricID = null; + companyGC.v_isActive = false; + } + } + else{ + traceln("Gridconnection %s with owner %s has no buildings!!!", companyGC.p_gridConnectionID, companyGC.p_ownerID); + } + + //Set lat lon + companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); + + if(user.NBHAccessType != null && user.NBHAccessType != OL_UserNBHAccessType.FULL){ + if(!f_isLocatedInActiveNBH(companyGC.p_latitude, companyGC.p_longitude)){ + companyGC.p_parentNodeElectricID = null; + companyGC.v_isActive = false; + } + } + + //Energy asset initialization + f_iEASurveyCompanies_Zorm(companyGC, gridConnection); + } + } +} + +//If survey companies are present, add to the ui legend +if(v_numberOfSurveyCompanies>0){ + //Add to the legend + zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DETAILED_COMPANY); + + //Pass the number of survey companies to interface for the dynamic legend + zero_Interface.v_numberOfSurveyCompanies = v_numberOfSurveyCompanies; +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<com.zenmo.zummon.companysurvey.Survey></ReturnType> + <Id>1726584205819</Id> + <Name>f_getSurveys</Name> + <X>449</X> + <Y>139</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Connect with API to database +Vallum vallum = new Vallum(user.PROJECT_CLIENT_ID(), user.PROJECT_CLIENT_SECRET()); + + +List<com.zenmo.zummon.companysurvey.Survey> surveys = new ArrayList(); + + +String[] zorm_project_names; +if(project_data.zorm_project_names() != null){ + zorm_project_names = project_data.zorm_project_names(); +} +else{ + zorm_project_names = new String[]{project_data.project_name()}; +} + +surveys = vallum.getEnabledSurveysByProjectNames(zorm_project_names); + +//Clear vallum user data +user.clearVallumUser(); + +return surveys;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205821</Id> + <Name>f_createActors</Name> + <X>90</X> + <Y>231</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Create specific actors like Grid operator, energy supplier, energy coop +f_createEnergyActors();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>OL_GridConnectionHeatingType</ReturnType> + <Id>1726584205825</Id> + <Name>f_getHeatingTypeSurvey</Name> + <Description>This function determines the heatingType (OL_GridConnectionHeatingType) from the list of heating types (zummon.companysurvey.HeatingType)</Description> + <X>480</X> + <Y>280</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>// This function determines a heatingType for the GC, which will be passed on to the function that determines the heating management +OL_GridConnectionHeatingType heatingType = null; + +if (surveyGC.getHeat().getHeatingTypes().size() > 1) { + // We currently only recognize a couple of combinations that we assume are meant as hybrid heatpumps + if (surveyGC.getHeat().getHeatingTypes().size() == 2) { + if (surveyGC.getHeat().getHeatingTypes().contains(HeatingType.GAS_BOILER)) { + if (surveyGC.getHeat().getHeatingTypes().contains(HeatingType.HYBRID_HEATPUMP) || surveyGC.getHeat().getHeatingTypes().contains(HeatingType.ELECTRIC_HEATPUMP)) { + heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; + } + } + } +} +else if (surveyGC.getHeat().getHeatingTypes().size() == 1) { + // We translate the survey enum to the OL_GridConnectionHeatingType + switch(surveyGC.getHeat().getHeatingTypes().get(0)) { + case GAS_BOILER: + heatingType = OL_GridConnectionHeatingType.GAS_BURNER; + break; + case HYBRID_HEATPUMP: + heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; + break; + case ELECTRIC_HEATPUMP: + heatingType = OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP; + break; + case DISTRICT_HEATING: + heatingType = OL_GridConnectionHeatingType.DISTRICTHEAT; + break; + case COMBINED_HEAT_AND_POWER: + heatingType = OL_GridConnectionHeatingType.GAS_CHP; + break; + case OTHER: + heatingType = OL_GridConnectionHeatingType.CUSTOM; + break; + default: + throw new RuntimeException("Incorrect heating: " + surveyGC.getHeat().getHeatingTypes().get(0) + " detected for '" + engineGC.p_ownerID + "'"); + } +} +else if (surveyGC.getHeat().getHeatingTypes().size() == 0) { + // There is no heating type in the survey, but there is gas consumption (either yearly total or hourly values) + if ( (surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) + || ( surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear() ) ) { + // We assume that all gas consumption is to heat the building(s) + heatingType = OL_GridConnectionHeatingType.GAS_BURNER; + } + else { + heatingType = OL_GridConnectionHeatingType.NONE; + } +} +if (heatingType == null) { + heatingType = OL_GridConnectionHeatingType.CUSTOM; +} + +return heatingType;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_EAEV</ReturnType> + <Id>1726584205827</Id> + <Name>f_addElectricVehicle</Name> + <X>900</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>vehicle_type</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>isDefaultVehicle</Name> + <Type>boolean</Type> + </Parameter> + <Parameter> + <Name>annualTravelDistance_km</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>maxChargingPower_kW</Name> + <Type>double</Type> + </Parameter> + <Body>double storageCapacity_kWh = 0; +double energyConsumption_kWhpkm = 0; +double capacityElectricity_kW = 0; +double stateOfCharge_fr = 1; // Initial state of charge +double timestep_h = energyModel.p_timeStep_h; +double vehicleScaling = 1.0; + +switch(vehicle_type){ + + /* + case ELECTRIC_VEHICLE_COMUTERS: // ??? Hoe laad je andere laadprofielen in.?? Deze moet ander laadprofiel dan de Standaard Electric_vehicle + capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; + storageCapacity_kWh = avgc_data.p_avgEVStorageCar_kWh; + energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; + break; + */ + + case ELECTRIC_VEHICLE: + capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; + storageCapacity_kWh = avgc_data.p_avgEVStorageCar_kWh; + energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; + break; + + case ELECTRIC_VAN: + capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerVan_kW; + storageCapacity_kWh = avgc_data.p_avgEVStorageVan_kWh; + energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; + break; + + case ELECTRIC_TRUCK: + capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerTruck_kW; + storageCapacity_kWh = avgc_data.p_avgEVStorageTruck_kWh; + energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; + break; + +} + +if (!isDefaultVehicle && maxChargingPower_kW > 0){ + capacityElectricity_kW = maxChargingPower_kW; +} +if (!isDefaultVehicle && maxChargingPower_kW <= 0) { + traceln("Trying to create an EV with no/negative maxChargingPower_kW: %s", maxChargingPower_kW); +} + +//Create the EV vehicle energy asset with the set parameters + links +J_EAEV electricVehicle = new J_EAEV(parentGC, capacityElectricity_kW, storageCapacity_kWh, stateOfCharge_fr, timestep_h, energyConsumption_kWhpkm, vehicleScaling, vehicle_type, null); + +if (!isDefaultVehicle && annualTravelDistance_km > 1000){ + electricVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); +} +else if (vehicle_type == OL_EnergyAssetType.ELECTRIC_VAN){ + electricVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); +} + +return electricVehicle;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_EADieselVehicle</ReturnType> + <Id>1726584205829</Id> + <Name>f_addDieselVehicle</Name> + <X>900</X> + <Y>760</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>vehicle_type</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>isDefaultVehicle</Name> + <Type>Boolean</Type> + </Parameter> + <Parameter> + <Name>annualTravelDistance_km</Name> + <Type>double</Type> + </Parameter> + <Body>double energyConsumption_kWhpkm = 0; +double vehicleScaling = 1.0; + +//Diesel car +switch (vehicle_type){ + + case DIESEL_VEHICLE: + energyConsumption_kWhpkm = roundToDecimal(uniform(0.7, 1.3),2) * avgc_data.p_avgDieselConsumptionCar_kWhpkm; + break; + + case DIESEL_VAN: + energyConsumption_kWhpkm = avgc_data.p_avgDieselConsumptionVan_kWhpkm; + break; + + case DIESEL_TRUCK: + energyConsumption_kWhpkm = avgc_data.p_avgDieselConsumptionTruck_kWhpkm; + break; +} + +//Create EA +J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); + +//Set annual travel distance +if (!isDefaultVehicle && annualTravelDistance_km > 1000){ + dieselVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); +} +else if (vehicle_type == OL_EnergyAssetType.DIESEL_VAN){ + dieselVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); +} + +return dieselVehicle; + + + +</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205831</Id> + <Name>f_addStorage</Name> + <X>900</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>storagePower_kw</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>storageCapacity_kWh</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>storageType</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Body>J_EAStorage storage = null; + +switch (storageType){ + + case STORAGE_ELECTRIC: + double initialStateOfCharge_fr = 0.5; + storage = new J_EAStorageElectric(parentGC, storagePower_kw, storageCapacity_kWh, initialStateOfCharge_fr, energyModel.p_timeStep_h); + //traceln("Battery with StorageCapacity_kWh: %s", storageCapacity_kWh); + break; + + case STORAGE_HEAT: + double lossFactor_WpK = 0; // For now no losses, waiting for new setup heating assets before this can be implemented correctly (its JEA_Building depedent) + double minTemperature_degC = avgc_data.p_avgMinHeatBufferTemperature_degC; + double maxTemperature_degC = avgc_data.p_avgMaxHeatBufferTemperature_degC; + double initialTemperature_degC = (minTemperature_degC + maxTemperature_degC) / 2; + double setTemperature_degC = initialTemperature_degC; + //double storageCapacity_kg = (storageCapacity_kWh*3.6e6)/(avgc_data.p_waterHeatCapacity_JpkgK * (maxTemperature_degC - minTemperature_degC)); + //double heatCapacity_JpK = avgc_data.p_waterHeatCapacity_JpkgK * storageCapacity_kg; + //in short -> + double heatCapacity_JpK = storageCapacity_kWh*3.6e6 / (maxTemperature_degC - minTemperature_degC); + new J_EAStorageHeat(parentGC, storageType, storagePower_kw, lossFactor_WpK, energyModel.p_timeStep_h, initialTemperature_degC, minTemperature_degC, maxTemperature_degC, setTemperature_degC, heatCapacity_JpK, OL_AmbientTempType.AMBIENT_AIR ); + + break; + + case STORAGE_GAS: + + break; + + default: + + return; +} +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205833</Id> + <Name>f_iEAGenericCompanies</Name> + <Description>Initialisation of the Energy assets using average values for companies that have not filled in the survey (yet) combined with totals (floor surface, electricity/yr, gas/yr and trucks) of the simulated area.</Description> + <X>450</X> + <Y>553</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>pv_installed_kwp</Name> + <Type>Double</Type> + </Parameter> + <Body>//Create current & future scenario parameter list +J_scenario_Current current_scenario_list = new J_scenario_Current(); +zero_Interface.c_scenarioMap_Current.put(companyGC.p_uid, current_scenario_list); + +J_scenario_Future future_scenario_list = new J_scenario_Future(); +zero_Interface.c_scenarioMap_Future.put(companyGC.p_uid, future_scenario_list); + +//Set parent +current_scenario_list.setParentAgent(companyGC); +future_scenario_list.setParentAgent(companyGC); + +//Add current grid capacity to current (and future, feedin, physical, as no data on plans so assumption it is/stays the same) scenario list +current_scenario_list.setCurrentContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); +future_scenario_list.setRequestedContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); +current_scenario_list.setCurrentContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); +future_scenario_list.setRequestedContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); +current_scenario_list.setCurrentPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); +future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); + +//Basic heating and electricity demand profiles +if (companyGC.p_floorSurfaceArea_m2 > 0){ + + if(p_remainingTotals.getRemainingElectricityDeliveryCompanies_kWh(companyGC) > 0){ + //Buidling Base electricity load + double Remaining_electricity_demand_kWh_p_m2_yr = p_remainingTotals.getElectricityDeliveryOfAnonymousCompanies_kWhpm2(companyGC); + double yearlyElectricityDemand_kWh = Remaining_electricity_demand_kWh_p_m2_yr * companyGC.p_floorSurfaceArea_m2; + + //Add base load profile + f_addElectricityDemandProfile(companyGC, yearlyElectricityDemand_kWh, null, false, "default_office_electricity_demand_fr"); + } + + if(p_remainingTotals.getRemainingGasDeliveryCompanies_m3(companyGC) > 0){ + //Building Gas demand profile (purely heating) + double Remaining_gas_demand_m3_p_m2_yr = p_remainingTotals.getGasDeliveryOfAnonymousCompanies_m3pm2(companyGC); + double yearlyGasDemand_m3 = Remaining_gas_demand_m3_p_m2_yr*companyGC.p_floorSurfaceArea_m2; + double ratioGasUsedForHeating = 1; + + //Add heat demand profile + OL_GridConnectionHeatingType heatingType = avgc_data.p_avgCompanyHeatingMethod; + double maxHeatOutputPower_kW = f_createHeatProfileFromAnnualGasTotal(companyGC, heatingType, yearlyGasDemand_m3, ratioGasUsedForHeating); + f_addHeatAsset(companyGC, heatingType, maxHeatOutputPower_kW); + companyGC.f_addHeatManagement(heatingType, false); + + //Set current scenario heating type + current_scenario_list.setCurrentHeatingType(heatingType); + future_scenario_list.setPlannedHeatingType(heatingType); + } +} + + +//Production asset (PV) ??????????????????????????????????????????? willen we die toevoegen aan generieke bedrijven? +if(pv_installed_kwp != null && pv_installed_kwp > 0){ + f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", pv_installed_kwp); +} + + +//add to scenario: current & future +current_scenario_list.setCurrentBatteryPower_kW(0f); +current_scenario_list.setCurrentBatteryCapacity_kWh(0f); +future_scenario_list.setPlannedBatteryPower_kW(0f); +future_scenario_list.setPlannedBatteryCapacity_kWh(0f); + + +//Transport (total remaining cars, vans and trucks (total as defined in project selection - survey company usage) + +//Cars +if(p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.CAR) > 0){ + int nbCars = 0; + int ceiledRemainingNumberOfCarsPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.CAR); + for (int k = 0; k < ceiledRemainingNumberOfCarsPerCompany; k++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.CAR, - 1); + nbCars++; + } + + //Reduce remaining number of anonymous companies that still can get vehicles + p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.CAR, - 1); + + //Set current scenario cars + current_scenario_list.setCurrentDieselCars(nbCars); + //Set planned scenario cars + future_scenario_list.setPlannedEVCars(0); +} + +//Vans +if(p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN) > 0){ + int nbVans = 0; + int ceiledRemainingNumberOfVansPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.VAN); + for (int k = 0; k< ceiledRemainingNumberOfVansPerCompany; k++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, true, 0); + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - 1); + nbVans++; + } + + //Reduce remaining number of anonymous companies that still can get vehicles + p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.VAN, - 1); + + //Set current scenario vans + current_scenario_list.setCurrentDieselVans(nbVans); + //Set planned scenario vans + future_scenario_list.setPlannedEVVans(0); +} + +//Trucks +if (p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK) > 0){ + int nbTrucks= 0; + int ceiledRemainingNumberOfTrucksPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.TRUCK); + for (int k = 0; k< ceiledRemainingNumberOfTrucksPerCompany; k++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, true, 0); + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK, - 1); + nbTrucks++; + } + + //Reduce remaining number of anonymous companies that still can get vehicles + p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.TRUCK, - 1); + + //Set current scenario trucks + current_scenario_list.setCurrentDieselTrucks(nbTrucks); + //Set planned scenario trucks + future_scenario_list.setPlannedEVTrucks(0); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205835</Id> + <Name>f_createRemainingBuildings</Name> + <X>1546.739</X> + <Y>659</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//If remaining buildings in model, add to legend +if(c_remainingBuilding_data.size()>0){ + zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.REMAINING); +} + +for (Building_data remainingBuilding_data : c_remainingBuilding_data) { + + GIS_Building building = energyModel.add_pop_GIS_Buildings(); + building.p_id = remainingBuilding_data.building_id(); + building.p_longitude = remainingBuilding_data.longitude(); + building.p_latitude = remainingBuilding_data.latitude(); + building.setLatLon(building.p_latitude, building.p_longitude); + building.p_GISObjectType = OL_GISObjectType.REMAINING_BUILDING; + + //Building + styling the gisregion and putting it on the map + building.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(remainingBuilding_data.polygon(), building.p_GISObjectType)); + + building.p_defaultFillColor = zero_Interface.v_restBuildingColor; + building.p_defaultLineColor = zero_Interface.v_restBuildingLineColor; + zero_Interface.f_styleAreas(building); +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205837</Id> + <Name>f_addTransportHydrogen</Name> + <X>900</X> + <Y>780</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>vehicle_type</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>isDefaultVehicle</Name> + <Type>boolean</Type> + </Parameter> + <Parameter> + <Name>annualTravelDistance_km</Name> + <Type>double</Type> + </Parameter> + <Body>double energyConsumption_kWhpkm = 0; +double vehicleScaling = 1.0; + +//Hydrogen car +switch (vehicle_type){ + + case HYDROGEN_VEHICLE: + energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionCar_kWhpkm; + break; + + case HYDROGEN_VAN: + energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionVan_kWhpkm; + break; + + case HYDROGEN_TRUCK: + energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; + break; +} + +//Create EA +J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); + +//Set annual travel distance +if (!isDefaultVehicle && annualTravelDistance_km > 1000){ + hydrogenVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); +} +else if (vehicle_type == OL_EnergyAssetType.HYDROGEN_VAN){ + hydrogenVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205845</Id> + <Name>f_addChargingDemandProfile</Name> + <X>900</X> + <Y>720</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>GC</Name> + <Type>GCPublicCharger</Type> + </Parameter> + <Parameter> + <Name>profileName</Name> + <Type>String</Type> + </Parameter> + <Body>J_EAProfile profile = new J_EAProfile(GC, OL_EnergyCarriers.ELECTRICITY, null, OL_AssetFlowCategories.evChargingPower_kW, energyModel.p_timeStep_h); +profile.energyAssetName = "charging profile"; +List<Double> quarterlyEnergyDemand_kWh = selectValues(double.class, "SELECT " + profileName + " FROM charging_profiles;"); +profile.a_energyProfile_kWh = quarterlyEnergyDemand_kWh.stream().mapToDouble(d -> max(0,d)).map( d -> d / 4).toArray();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>GISRegion</ReturnType> + <Id>1726584205847</Id> + <Name>f_createGISRegionChargingStation</Name> + <X>1547.621</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>lat</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>lon</Name> + <Type>double</Type> + </Parameter> + <Body>//create shape Coords +int nb_points = 6; +double[] GISCoords = new double[nb_points * 2]; + +for (int i=0; i < nb_points ; i++){ + double size = 0.00004; + GISCoords[i * 2] = size * cos( i * ( 2 * Math.PI ) / nb_points) + lat; + GISCoords[i * 2 + 1] = 1.64 * size * sin( i * ( 2 * Math.PI ) / nb_points) + lon; +} + +//Create the region +GISRegion gisregion = zero_Interface.f_createGISObject( GISCoords ); + +return gisregion; +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205849</Id> + <Name>f_createChargingStations</Name> + <X>431</X> + <Y>831</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Initialize parameters +int laadpaal_nr = 1; +int laadstation_nr = 1; + +//Loop over charging stations +for (Chargingstation_data dataChargingStation : f_getChargingstationsInSubScope(c_chargingstation_data)){ + + GCPublicCharger chargingStation = energyModel.add_PublicChargers(); + + chargingStation.set_p_gridConnectionID( dataChargingStation.gc_id()); + chargingStation.set_p_name( dataChargingStation.gc_name() ); + + //Electric Capacity + if (dataChargingStation.connection_capacity_kw() != null) { + // Assume the connection capacity is both physical and contracted. + chargingStation.v_liveConnectionMetaData.physicalCapacity_kW = dataChargingStation.connection_capacity_kw(); + chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataChargingStation.connection_capacity_kw(); + chargingStation.v_liveConnectionMetaData.physicalCapacityKnown = true; + chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; + } + + //chargingStation.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); + + //Set parent node + chargingStation.p_parentNodeElectricID = dataChargingStation.gridnode_id(); + + //Is active at start? + chargingStation.v_isActive = dataChargingStation.initially_active(); + + //chargingStation.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.SIMPLE); + + //Create and connect owner + ConnectionOwner owner = energyModel.add_pop_connectionOwners(); + + chargingStation.set_p_ownerID( dataChargingStation.owner_id()); + owner.set_p_actorID( chargingStation.p_ownerID ); + //owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); + owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.CHARGEPOINT_OP ); + owner.b_dataSharingAgreed = true; + + chargingStation.set_p_owner( owner ); + + + //Check if centre or single + chargingStation.p_isChargingCentre = dataChargingStation.is_charging_centre(); + if (chargingStation.p_isChargingCentre) { + + if (chargingStation.p_ownerID == null){ + chargingStation.p_ownerID = "Publiek laadstation " + laadstation_nr; + laadstation_nr++; + } + + chargingStation.set_p_nbOfChargers( dataChargingStation.number_of_chargers() ); + chargingStation.set_p_maxChargingPower_kW( dataChargingStation.power_per_charger_kw() ); + + //If check on connection capacity to prevent more charging than possible + if(chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW > chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW){ + chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW; + } + + //Set vehicle type + chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); + + //Create vehicles that charge at the charging centre + if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ + List<J_ChargingSession> chargerProfile = f_getChargerProfile(); + boolean V1GCapable = randomTrue(avgc_data.p_v1gProbability); + boolean V2GCapable = randomTrue(avgc_data.p_v2gProbability); + new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); + } + else{ + for(int k = 0; k < chargingStation.p_nbOfChargers*avgc_data.p_avgVehiclesPerChargePoint; k++ ){ + f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); + } + } + + + if (dataChargingStation.polygon() != null) { + //Create EA GIS object (building) for the charging centre + GIS_Object area = f_createGISObject( dataChargingStation.gc_name(), dataChargingStation.latitude(), dataChargingStation.longitude(), dataChargingStation.polygon(), OL_GISObjectType.CHARGER ); + + //Set gis object type + area.p_GISObjectType = OL_GISObjectType.CHARGER; + + //Add to collections + area.c_containedGridConnections.add(chargingStation); + chargingStation.c_connectedGISObjects.add(area); + + //Style building + area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); + area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); + area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); + zero_Interface.f_styleAreas(area); + } + else{ + traceln("No gisobject created for charge centre: " + chargingStation.p_name); + } + } + else { + + if (chargingStation.p_ownerID == null){ + chargingStation.p_ownerID = "Publieke laadpaal " + laadpaal_nr; + laadpaal_nr++; + } + + //Set charging power + chargingStation.set_p_maxChargingPower_kW( dataChargingStation.power_per_charger_kw() ); + + //Set vehicle type + chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); + + //Create vehicles that charge at the charging station + if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ + List<J_ChargingSession> chargerProfile = f_getChargerProfile(); + boolean V1GCapable = true; //randomTrue(avgc_data.p_v1gProbability); + boolean V2GCapable = true; //randomTrue(avgc_data.p_v2gProbability); + new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); + } + else{ + for(int k = 0; k < avgc_data.p_avgVehiclesPerChargePoint; k++ ){ + f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); + } + } + + + //Create GIS object for the chargingStation + GIS_Object area = energyModel.add_pop_GIS_Objects(); + + //position and coordinates + area.p_latitude = dataChargingStation.latitude(); + area.p_longitude = dataChargingStation.longitude(); + area.setLatLon(area.p_latitude, area.p_longitude); + + //Create gisregion + area.gisRegion = f_createGISRegionChargingStation( area.p_latitude, area.p_longitude ); + + //Set area type + area.p_GISObjectType = OL_GISObjectType.CHARGER; + + chargingStation.c_connectedGISObjects.add(area); + area.c_containedGridConnections.add(chargingStation); + if(chargingStation.v_isActive){ + area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); + area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); + } + else{ + area.set_p_defaultFillColor( zero_Interface.v_newChargingStationColor ); + area.set_p_defaultLineColor( zero_Interface.v_newChargingStationLineColor ); + } + zero_Interface.f_styleAreas(area); + + zero_Interface.c_modelActiveSpecialGISObjects.add(area.p_GISObjectType); + } +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205853</Id> + <Name>f_createInterface</Name> + <X>30</X> + <Y>930</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//OVERRIDE THE zero_Interface parameter here +//zero_Interface = YOUR INTERFACE; +throw new RuntimeException("Didnt replace the generic interface with a project interface!");</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205859</Id> + <Name>f_createGISCables</Name> + <X>1547.621</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Create cables +for (Cable_data dataCable : c_cable_data) { + if(dataCable.line().contains("Multi")){ + continue; + } + zero_Interface.f_createGISLine(f_createGISObjectsTokens(dataCable.line(), dataCable.type()), dataCable.type()); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205861</Id> + <Name>f_createPreprocessedElectricityProfile_PV</Name> + <Description>Principe: +verbruik = levering + productie - teruglevering</Description> + <X>920</X> + <Y>130</Y> + <Label> + <X>9</X> + <Y>-1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityDelivery_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityFeedin_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityProduction_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>pvPower_kW</Name> + <Type>Double</Type> + </Parameter> + <Parameter> + <Name>yearlyHeatPumpElectricityConsumption_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Body>//Create the profile +J_EAProfile profile = new J_EAProfile(parentGC, OL_EnergyCarriers.ELECTRICITY, null, OL_AssetFlowCategories.fixedConsumptionElectric_kW, energyModel.p_timeStep_h); +profile.setStartTime_h(v_simStartHour_h); +profile.energyAssetName = parentGC.p_ownerID + " custom profile"; +double extraConsumption_kWh = 0; + +//Initialize parameters +double nettDelivery_kWh; + +//Preprocessing and adding new array to the J_EAProfile +if (yearlyElectricityProduction_kWh != null && yearlyElectricityFeedin_kWh != null) { // When delivery, feedin and production profiles are available + double[] yearlyElectricityConsumption_kWh = new double[yearlyElectricityDelivery_kWh.length]; + for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { + yearlyElectricityConsumption_kWh[i] = yearlyElectricityDelivery_kWh[i] - yearlyElectricityFeedin_kWh[i] + yearlyElectricityProduction_kWh[i]; + extraConsumption_kWh += -min(yearlyElectricityConsumption_kWh[i],0); + yearlyElectricityConsumption_kWh[i] = max(0,yearlyElectricityConsumption_kWh[i]); + } + profile.a_energyProfile_kWh = yearlyElectricityConsumption_kWh; + nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum() - Arrays.stream(yearlyElectricityFeedin_kWh).sum(); + //traceln("Calculating consumption profile on delivery, feedin and production profiles for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); +} else if (pvPower_kW != null && pvPower_kW > 0) { // When only delivery, feedin profiles are available, in addition to PV power, make explicit consumption and production arrays using delivery profile and PV installed power [kW] + double[] yearlyElectricityConsumption_kWh = new double[yearlyElectricityDelivery_kWh.length]; + if (yearlyElectricityFeedin_kWh != null) { // Terugleveringsdata beschikbaar + //traceln("Estimating electricity consumption based on delivery and feedin profiles with pv power estimate for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); + double addedConsumption_kWh = 0; + for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { + double pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); + double estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); + addedConsumption_kWh += max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); + yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); + } + //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); + } else { // Zonder terugleveringsdata, alleen afname + traceln("Estimating electricity consumption based on delivery profile and pv power for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); + double pvPowerEstimate_kW = 0; + double estimatedConsumption_kWh = 0; + double addedConsumption_kWh = 0; + for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { + pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); + + if (yearlyElectricityDelivery_kWh[i] != 0) { // Only update consumption if delivery is non-zero, otherwise hold previously estimated consumption constant + estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + pvPowerEstimate_kW*0.25; + //addedConsumption_kWh += pvPowerEstimate_kW * 0.25; + } else { + estimatedConsumption_kWh = min(pvPowerEstimate_kW*0.25, estimatedConsumption_kWh); // Take minimum to prevent to much consumption when there is not enough sun in model sun, compared to real sun data!! + + //addedConsumption_kWh += max(0, estimatedConsumption_kWh - pvPowerEstimate_kW*0.25);//* 0.25; + } + yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); + } + //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); + } + profile.a_energyProfile_kWh = yearlyElectricityConsumption_kWh; + nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); +} else { // No PV production + profile.a_energyProfile_kWh = yearlyElectricityDelivery_kWh; + nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); +} + +//Adjust remaining totals +p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(parentGC, - nettDelivery_kWh); + +if (extraConsumption_kWh > 1) { + traceln("Preprocessing of delivery and production data led to negative consumption of: %s kWh", extraConsumption_kWh); + traceln("Consumption profile was capped to 0kW"); +} + +if(yearlyHeatPumpElectricityConsumption_kWh != null){ + for(int i = 0; i < yearlyHeatPumpElectricityConsumption_kWh.length; i++){ + yearlyHeatPumpElectricityConsumption_kWh[i] = max(0,yearlyHeatPumpElectricityConsumption_kWh[i]); + } + double[] preProcessedDefaultConsumptionProfile = new double[profile.a_energyProfile_kWh.length]; + for(int i = 0; i < preProcessedDefaultConsumptionProfile.length; i++){ + preProcessedDefaultConsumptionProfile[i] = max(0,profile.a_energyProfile_kWh[i] - yearlyHeatPumpElectricityConsumption_kWh[i]); + } + profile.a_energyProfile_kWh = preProcessedDefaultConsumptionProfile; + + J_EAProfile profileHeatPumpElectricityConsumption = new J_EAProfile(parentGC, OL_EnergyCarriers.ELECTRICITY, yearlyHeatPumpElectricityConsumption_kWh, OL_AssetFlowCategories.heatPumpElectricityConsumption_kW, energyModel.p_timeStep_h); + profileHeatPumpElectricityConsumption.setStartTime_h(v_simStartHour_h); + profileHeatPumpElectricityConsumption.energyAssetName = parentGC.p_ownerID + " custom heat pump electricity consumption profile"; +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205865</Id> + <Name>f_startUpLoader_default</Name> + <X>60</X> + <Y>90</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>traceln("---------------------------"); +traceln("======= STARTING UP ======="); +traceln("---------------------------"); +traceln(""); + +double startTime = System.currentTimeMillis(); +v_timeOfModelStart_ms = startTime; + +//Get simulation start time +f_getSimulationTimeVariables(); + +//Send avgc data to engine +avgc_data.f_setAVGC_data(); + +// Set default heating strategies +f_setDefaultHeatingStrategies(); + +//Import excel data to the anylogic database +f_importExcelTablesToDB(); + +//Fill the record collections +f_readDatabase(); + +//Initialize model totals +p_remainingTotals.initializeModelTotals(project_data, user); + +//Weather market data +f_setEngineProfiles(); + +//Create the project interface +f_createInterface(); + +//Initialize the pointers on the interface +f_initializeInterfacePointers(); + +//Project specific styling (Needs to happen before configuring the engine) +zero_Interface.f_projectSpecificStyling(); + +// Populate the model +f_configureEngine_default(); + +//Start up of the User Interface (Needs to happen after configuring the engine) +zero_Interface.f_UIStartup(); + +//Ending of the start up +double endTime = System.currentTimeMillis(); +double duration = endTime - startTime; +v_modelStartUpDuration_s = roundToDecimal(duration / 1000, 3); + +traceln(" "); +traceln("*** Start up finished *** "); +traceln("*** Start up duration: "+ v_modelStartUpDuration_s + " s ***"); +traceln(" "); + + +//Simulate full year simulation for initial KPIs +if( settings.runHeadlessAtStartup() ){ + energyModel.f_runRapidSimulation(); // Do a full year run to have KPIs right away! + + if(project_data.project_type() == BUSINESSPARK){ + for(GCUtility GC : energyModel.UtilityConnections){ + if(GC.p_owner.p_detailedCompany){ // For now only detailed companies + GC.v_originalRapidRunData = GC.v_rapidRunData; + } + } + } + zero_Interface.gr_simulateYear.setVisible(false); + zero_Interface.gr_loadIconYearSimulation.setVisible(false); + zero_Interface.b_resultsUpToDate = true; + zero_Interface.uI_Results.f_enableNonLivePlotRadioButtons(true); +} +else { + zero_Interface.f_resetSettings(); +} + +zero_Interface.uI_Results.f_updateResultsUI(energyModel); + +//Clear all data record collections after loader is done +f_clearDataRecords();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205867</Id> + <Name>f_readDatabase</Name> + <X>-390</X> + <Y>190</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Override this function and: +//Fill the data parameters and collections using your own functions here</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205869</Id> + <Name>f_clearDataRecords</Name> + <X>-390</X> + <Y>710</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Function used to clear all data record collections after the loader is done +//-> no longer needed, by clearing it is send to the garbage collector -> saves memory + +/* +genericProfiles_data = null; +c_GridNode_data.clear(); +c_SurveyCompanyBuilding_data.clear(); +c_GenericCompanyBuilding_data.clear(); +c_HouseBuilding_data.clear(); +c_remainingBuilding_data.clear(); +c_Solarfarm_data.clear(); +c_Windfarm_data.clear(); +c_Electrolyser_data.clear(); +c_Battery_data.clear(); +c_Chargingstation_data.clear(); +c_Neighbourhood_data.clear(); +c_Parcel_data.clear(); +c_Cable_data_LV.clear(); +c_Cable_data_MV.clear(); +*/ +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205871</Id> + <Name>f_createSurveyCompanies_Excel</Name> + <X>430</X> + <Y>508</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>traceln("Survey companies excel should be overridden with your own code");</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205873</Id> + <Name>f_createCompanies</Name> + <X>420</X> + <Y>100</Y> + <Label> + <X>11</X> + <Y>1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Create survey companies based on survey inload structure +switch(project_data.survey_type()){ + + case ZORM: + f_createSurveyCompanies_Zorm(); + break; + + case EXCEL: + f_createSurveyCompanies_Excel(); + break; + + case NONE: + //Do nothing. + break; +} + +//Create generic companies +f_createGenericCompanies();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1726584205881</Id> + <Name>f_createAdditionalGISObjects</Name> + <X>90</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Parking spaces +f_createParkingSpots(); + +//Parcels +f_createGISParcels(); + +//Remaining buildings (no GC or EA) +f_createRemainingBuildings(); + +//Cables +f_createGISCables();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1727792666396</Id> + <Name>f_overwriteSpecificDatabaseValues</Name> + <X>-390</X> + <Y>140</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//SHOULD BE OVERRIDDEN + +//Function used to overwrite specific database values after the databases have been loaded in +//Usecases for example are adjusting floor surface area to 0, to cause no consumption, etc. +// --> without the loss of data in your database sources itself + +//Example code +/* +//Adjust building floor surface area to 0 to cause no consumption (empty buildings) + +List<String> buildingIDS = new ArrayList<String>(); + +// Define the building ids that need to have no consumption +String buildingID_XXXX = "XXXX"; + +buildingIDS.add(buildingID_XXXX); + + +for(String buildingID : buildingIDS){ + update(buildings) + .where(buildings.building_id.eq(buildingID)) + .set(buildings.cumulative_floor_surface_m2, 0.0) + .execute(); +} +*/</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double[]</ReturnType> + <Id>1728035809860</Id> + <Name>f_convertFloatArrayToDoubleArray</Name> + <X>1550</X> + <Y>880</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>floatArray</Name> + <Type>float[]</Type> + </Parameter> + <Body>if (floatArray == null) { + return null; +} +double[] doubleArray = new double[floatArray.length]; +for (int i = 0; i < floatArray.length; i++) { + doubleArray[i] = floatArray[i]; +} +return doubleArray;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1728039545686</Id> + <Name>f_getPreprocessedElectricityConsumptionTotal</Name> + <X>920</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>annualElectricityDelivery_kWh</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>annualElectricityFeedin_kWh</Name> + <Type>Integer</Type> + </Parameter> + <Parameter> + <Name>annualElectricityProduction_kWh</Name> + <Type>Integer</Type> + </Parameter> + <Parameter> + <Name>pvPower_kW</Name> + <Type>Double</Type> + </Parameter> + <Body>double annualElectricityConsumption_kWh = 0; +if(annualElectricityFeedin_kWh != null){ + if(annualElectricityProduction_kWh != null){ + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh - annualElectricityFeedin_kWh + annualElectricityProduction_kWh; + } + else if(pvPower_kW != null && pvPower_kW > 0){ + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh - annualElectricityFeedin_kWh + pvPower_kW*avgc_data.p_avgFullLoadHoursPV_hr; + } + else{//Geen opwek + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; + } +} +else if(pvPower_kW != null && pvPower_kW > 0){ + //WAT HIER?? Voor nu consumption = delivery + //Maar: moet preprocessing van standaard profiel worden, waar gelijktijdigheid gecheckt wordt! + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; +} +else{ + annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; +} +return annualElectricityConsumption_kWh; +</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1732112209863</Id> + <Name>f_createCustomPVAsset</Name> + <X>900</X> + <Y>220</Y> + <Label> + <X>9</X> + <Y>-1</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyElectricityProduction_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>pvPower_kW</Name> + <Type>Double</Type> + </Parameter> + <Body>if (yearlyElectricityProduction_kWh.length != 35040) { + traceln("Skipping creation of PV asset: need 35040 data points, got %d", yearlyElectricityProduction_kWh.length); + return; +} + +// Generate custom PV production asset using production data! +double[] a_arguments = IntStream.range(0, 35040).mapToDouble(i -> v_simStartHour_h + i*0.25).toArray(); // time axis + +// From kWh/quarter to normalized power +double totalProduction_kWh = Arrays.stream(yearlyElectricityProduction_kWh).sum(); +double fullLoadHours_h = totalProduction_kWh / pvPower_kW; +double[] a_normalizedPower_fr = Arrays.stream(yearlyElectricityProduction_kWh).map(i -> 4 * i / totalProduction_kWh * fullLoadHours_h ).toArray(); + +//traceln("Full load hours of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).sum()/4); +//traceln("Max of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).max()); + +TableFunction tf_customPVproduction_fr = new TableFunction(a_arguments, a_normalizedPower_fr, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); +J_ProfilePointer profilePointer = new J_ProfilePointer((parentGC.p_ownerID + "_PVproduction") , tf_customPVproduction_fr); +energyModel.f_addProfile(profilePointer); +J_EAProduction production_asset = new J_EAProduction(parentGC, OL_EnergyAssetType.PHOTOVOLTAIC, (parentGC.p_ownerID + "_rooftopPV"), OL_EnergyCarriers.ELECTRICITY, (double)pvPower_kW, energyModel.p_timeStep_h, profilePointer); + +traceln("Custom PV asset added to GC: " + parentGC.p_ownerID); +//traceln("Custom PV asset added to %s with installed power %s kW and %s full load hours!", parentGC.p_ownerID, pvPower_kW, fullLoadHours_h); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1732112244908</Id> + <Name>f_iEASurveyCompanies_Zorm</Name> + <X>448</X> + <Y>220</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>gridConnection</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>//Initialize boolean that sets the creation of currently existing electric (demand) EA +boolean createElectricEA = true; + +//Create current scenario parameter list +J_scenario_Current current_scenario_list = new J_scenario_Current(); +zero_Interface.c_scenarioMap_Current.put(companyGC.p_uid, current_scenario_list); + +//Create future scenario parameter list +J_scenario_Future future_scenario_list = new J_scenario_Future(); +zero_Interface.c_scenarioMap_Future.put(companyGC.p_uid, future_scenario_list); + + + +//Get PV power (used for preprocessing and estimating grid capacity if unknown) +Double pvPower_kW = (gridConnection.getSupply().getPvInstalledKwp() != null) ? new Double(gridConnection.getSupply().getPvInstalledKwp()) : null; + + +////Electricity (connection and consumption) +//Initialize contract capacity with 0 for when companies fill in survey already but currently have no connection yet +companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = 0.0; +companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = 0.0; +companyGC.v_liveConnectionMetaData.physicalCapacity_kW = 0.0; + +f_createDieselTractors(companyGC, gridConnection.getTransport().getAgriculture()); + +//Check for electricity connection and data +if (gridConnection.getElectricity().getHasConnection()){ + + //Connection capacities + if(gridConnection.getElectricity().getContractedConnectionCapacityKw() != null && gridConnection.getElectricity().getContractedConnectionCapacityKw() >= 0){ + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = gridConnection.getElectricity().getContractedConnectionCapacityKw(); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; + } + else if((gridConnection.getElectricity().getContractedConnectionCapacityKw() == null || + gridConnection.getElectricity().getContractedConnectionCapacityKw() < 0) && + (gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() == null || + gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() <= 0)) { + traceln("SURVEYOWNER HAS NOT FILLED IN DELIVERY OR PHYSICAL CONNECTION CAPACITY!!!"); + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + } + else{ + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw()); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + } + + + //Check if contract capacity feedin has been filled in: if not, make the same as pv capacity + if(gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() >= 0){ + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw()); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; + } + else{ + if(pvPower_kW != null){ + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = pvPower_kW; + } + else{ + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = 0.0; + } + companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + } + + //Check if physical capacity has been filled in: if not, make the same as maximum of contract delivery and feedin + if(gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() > 0){ + companyGC.v_liveConnectionMetaData.physicalCapacity_kW = (double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw(); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.physicalCapacityKnown = true; + } + else{ + companyGC.v_liveConnectionMetaData.physicalCapacity_kW = max(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW, companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); //Contracted connection capacity + companyGC.v_liveConnectionMetaData.physicalCapacityKnown = false; + } + + + //Add to current scenario list + current_scenario_list.setCurrentContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); + current_scenario_list.setCurrentContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); + current_scenario_list.setCurrentPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); + + + //Electricity consumption profile + String profileName = "default_office_electricity_demand_fr"; + + //Check if quarter hourly values are available in vallum + boolean createdTimeSeriesAssets = f_createElectricityTimeSeriesAssets(companyGC, gridConnection); + + if(createdTimeSeriesAssets){ + if(!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile or total is known. + createElectricEA = false; + } + } + else{ //(!createdTimeSeriesAssets) { // + double yearlyElectricityConsumption_kWh = 0; + try { // Check if quarterly hour values are available in excel database + if(selectFirstValue(Double.class, "SELECT " + "ccid" + gridConnection.getSequence().toString() + "_demand FROM comp_elec_consumption LIMIT 1;") != null){ + companyGC.v_hasQuarterHourlyValues = true; + profileName = "ccid" + companyGC.p_gridConnectionID; + + //Check if solar was already producing in simualtion year (Check for now: if year production = 0 , no solar yet, if year production = null, no data: so assume there was solar already) + if(gridConnection.getElectricity().getAnnualElectricityProduction_kWh() != null && gridConnection.getElectricity().getAnnualElectricityProduction_kWh () == 0){ + pvPower_kW = null; + } + + if (!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile is present. + createElectricEA = false; + } + } + } + catch(Exception e) { + //Data not available, do nothing and leave v_hasQuarterHourlyValues on false. + } + + if(companyGC.v_hasQuarterHourlyValues == false){//Calculate yearly consumption based on yearly delivery (and yearly feedin, production or solarpanels if available) + //Get totals + double yearlyElectricityDelivery_kWh = (gridConnection.getElectricity().getAnnualElectricityDemandKwh() != null) ? gridConnection.getElectricity().getAnnualElectricityDemandKwh() : 0; // Yearly electricity consumption (0 if value is null) + Integer yearlyElectricityFeedin_kWh = gridConnection.getElectricity().getAnnualElectricityFeedIn_kWh(); + Integer yearlyElectricityProduction_kWh = gridConnection.getElectricity().getAnnualElectricityProduction_kWh(); + + //Calculate consumption + yearlyElectricityConsumption_kWh = f_getPreprocessedElectricityConsumptionTotal(companyGC, yearlyElectricityDelivery_kWh, yearlyElectricityFeedin_kWh, yearlyElectricityProduction_kWh, pvPower_kW); + + //If no electricity consumption, determine the consumption based on average values and floor surface and connection capacity + if(yearlyElectricityConsumption_kWh == 0){ + yearlyElectricityConsumption_kWh = avgc_data.p_avgCompanyElectricityConsumption_kWhpm2*companyGC.p_floorSurfaceArea_m2; + + //Check if it is within the contracted limits (peak should at least be 20% lower than contracted capacity + if(yearlyElectricityConsumption_kWh*defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr() > 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW){ + yearlyElectricityConsumption_kWh = 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW/defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr(); + } + + } + else if(!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile or total is known. + createElectricEA = false; + } + + //Update total Yearly electricity consumption (only when no timestep data available, cause when thats avaiable, it happens in the preprocessing function) + if (yearlyElectricityDelivery_kWh != 0){ + p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(companyGC, - yearlyElectricityDelivery_kWh); + } + else{ + p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(companyGC, - yearlyElectricityConsumption_kWh); + } + } + + //Add base electricity demand profile (with profile if available, with generic pattern if only yearly data is available) + f_addElectricityDemandProfile(companyGC, yearlyElectricityConsumption_kWh, pvPower_kW, companyGC.v_hasQuarterHourlyValues, profileName); + } +} + +//If everything is 0 set the GC as non active +if(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.physicalCapacity_kW == 0){ + companyGC.v_isActive = false; +} + +//Grid expansion request +if (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null && gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator()){ + future_scenario_list.setRequestedContractDeliveryCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); + future_scenario_list.setRequestedContractFeedinCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); + future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(max(companyGC.v_liveConnectionMetaData.physicalCapacity_kW, max(future_scenario_list.getRequestedContractDeliveryCapacity_kW(), future_scenario_list.getRequestedContractFeedinCapacity_kW()))); +} +else{ + future_scenario_list.setRequestedContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); + future_scenario_list.setRequestedContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); + future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); +} + + +////Supply (pv, wind, etc.) +if (gridConnection.getSupply().getHasSupply() != null && gridConnection.getSupply().getHasSupply()){ + //gridConnection.getElectricity().getAnnualElectricityProductionKwh() // Staat niet meer in het formulier! + + double[] yearlyElectricityProduction_kWh_array = null; + + var quarterHourlyProduction_kWh = gridConnection.getElectricity().getQuarterHourlyProduction_kWh(); + if (quarterHourlyProduction_kWh != null && quarterHourlyProduction_kWh.hasNumberOfValuesForOneYear()) { + yearlyElectricityProduction_kWh_array = f_timeSeriesToQuarterHourlyDoubleArray(quarterHourlyProduction_kWh); + } + + if(yearlyElectricityProduction_kWh_array == null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ + try { + if(selectFirstValue(Double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption LIMIT 1;") != null){ + List<Double> yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption;"); + yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; + } + } + catch(Exception e) { + } + } + if (yearlyElectricityProduction_kWh_array != null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0 && !gridConnection.getHeat().getHeatingTypes().contains(com.zenmo.zummon.companysurvey.HeatingType.COMBINED_HEAT_AND_POWER)){ + f_createCustomPVAsset(companyGC, yearlyElectricityProduction_kWh_array, (double)gridConnection.getSupply().getPvInstalledKwp()); // Create custom PV asset when production data is available! + current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); + } else if (gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ + //gridConnection.getSupply().getPvOrientation(); // Wat doen we hier mee????? Nog niets! + f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", gridConnection.getSupply().getPvInstalledKwp()); + + //add to scenario: current + current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); + //current_scenario_list.currentPV_orient = gridConnection.getSupply().getPvOrientation(); + } + //Wind + if (gridConnection.getSupply().getWindInstalledKw() != null && gridConnection.getSupply().getWindInstalledKw() > 0){ + f_addEnergyProduction(companyGC, OL_EnergyAssetType.WINDMILL, "Wind mill", gridConnection.getSupply().getWindInstalledKw()); + + //add to scenario: current + current_scenario_list.setCurrentWind_kW(gridConnection.getSupply().getWindInstalledKw()); + } +} + +//Planned supply (PV) +if (gridConnection.getSupply().getPvPlanned() != null && gridConnection.getSupply().getPvPlanned()){ + future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW() + (gridConnection.getSupply().getPvPlannedKwp() != null ? gridConnection.getSupply().getPvPlannedKwp() : 0)); + future_scenario_list.setPlannedPV_year(gridConnection.getSupply().getPvPlannedYear()); + //gridConnection.getSupply().getPvPlannedOrientation(); +} +else{ + future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW()); +} + +//Planned supply (Wind) +if (gridConnection.getSupply().getWindPlannedKw() != null && gridConnection.getSupply().getWindPlannedKw() > 0){ + future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW() + (gridConnection.getSupply().getWindPlannedKw() != null ? gridConnection.getSupply().getWindPlannedKw() : 0)); + // plannedWind_year // ??? +} +else{ + future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW()); +} + +////Heating and gas +OL_GridConnectionHeatingType heatingType = f_heatingSurveyCompany(companyGC, gridConnection); + +//add heating type to scenario: current and future +current_scenario_list.setCurrentHeatingType(heatingType); +future_scenario_list.setPlannedHeatingType(heatingType); + + +// Electric Storage +Float battery_power_kW = 0f; +Float battery_capacity_kWh = 0f; + +if (gridConnection.getStorage().getHasBattery() != null && gridConnection.getStorage().getHasBattery() && createElectricEA){ // Check if battery present and if electric demand EA should be created + if (gridConnection.getStorage().getBatteryPowerKw() != null){ + battery_power_kW = gridConnection.getStorage().getBatteryPowerKw(); + } + if (gridConnection.getStorage().getBatteryCapacityKwh() != null){ + battery_capacity_kWh = gridConnection.getStorage().getBatteryCapacityKwh(); + } + + if (battery_power_kW > 0 && battery_capacity_kWh > 0) { + f_addStorage(companyGC, battery_power_kW, battery_capacity_kWh, OL_EnergyAssetType.STORAGE_ELECTRIC); + companyGC.f_setBatteryManagement(new J_BatteryManagementSelfConsumption(companyGC)); + } +} + +//add to scenario: current +current_scenario_list.setCurrentBatteryCapacity_kWh(battery_capacity_kWh); +current_scenario_list.setCurrentBatteryPower_kW(battery_power_kW); + + + +if (gridConnection.getStorage().getHasThermalStorage() != null && gridConnection.getStorage().getHasThermalStorage()){ // Check for thermal storage + //gridConnection.getStorage().getThermalStorageKw() + //J_EAStorageHeat(Agent parentAgent, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { + //J_EAStorageHeat(companyGC, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { + //Denk ook aan aansturing?!! +} + +if (gridConnection.getStorage().getHasPlannedBattery() != null && gridConnection.getStorage().getHasPlannedBattery()){ // Check for planned battery + future_scenario_list.setPlannedBatteryCapacity_kWh((gridConnection.getStorage().getPlannedBatteryCapacityKwh() != null ? gridConnection.getStorage().getPlannedBatteryCapacityKwh() : 0) + current_scenario_list.getCurrentBatteryCapacity_kWh()); + future_scenario_list.setPlannedBatteryPower_kW((gridConnection.getStorage().getPlannedBatteryPowerKw() != null ? gridConnection.getStorage().getPlannedBatteryPowerKw() : 0) + current_scenario_list.getCurrentBatteryPower_kW()); +} +else{ +future_scenario_list.setPlannedBatteryCapacity_kWh(current_scenario_list.getCurrentBatteryCapacity_kWh()); +future_scenario_list.setPlannedBatteryPower_kW(current_scenario_list.getCurrentBatteryPower_kW()); +} + + + +////Transport + +//Cars of comuters and visitors +int nbDailyCarVisitors_notNull = (gridConnection.getTransport().getNumDailyCarVisitors() != null) ? gridConnection.getTransport().getNumDailyCarVisitors() : 0; +int nbDailyCarCommuters_notNull = (gridConnection.getTransport().getNumDailyCarAndVanCommuters() != null) ? gridConnection.getTransport().getNumDailyCarAndVanCommuters() : 0; + +if (nbDailyCarCommuters_notNull + nbDailyCarVisitors_notNull > 0){ + + int nbEVCarsComute = (gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() != null) ? gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() : 0; // Wat doen we hier mee???? + int nbDieselCarsComute = gridConnection.getTransport().getNumDailyCarAndVanCommuters() + nbDailyCarVisitors_notNull - nbEVCarsComute; + + boolean isDefaultVehicle = true; + double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; + + for (int i = 0; i< nbDieselCarsComute; i++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, 0); + } + + + //check if charge power is filled in + if (nbEVCarsComute > 0 && gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ + if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() <= 0) { + traceln("Survey data contains no/negative Car maxChargingPower_kW: %s", gridConnection.getTransport().getCars().getPowerPerChargePointKw()); + } + else{ + maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); + isDefaultVehicle = false; + } + } + + if (createElectricEA){ // Check if electric demand EA should be created + for (int j = 0; j< nbEVCarsComute; j++){ + f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, 0, maxChargingPower_kW); + } + } + + //add to scenario: current + current_scenario_list.setCurrentEVCars(nbEVCarsComute); + current_scenario_list.setCurrentDieselCars(nbDieselCarsComute); + + //Initialize future cars + future_scenario_list.setPlannedEVCars(current_scenario_list.getCurrentEVCars()); + +} + + +//Business vehicles +if (gridConnection.getTransport().getHasVehicles() != null && gridConnection.getTransport().getHasVehicles()){ + + //Cars + if (gridConnection.getTransport().getCars().getNumCars() != null && gridConnection.getTransport().getCars().getNumCars() != 0){ + + + //Update remaning amount of cars (company owned only) + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - gridConnection.getTransport().getCars().getNumCars()); + + //Get amount of EV and diesel cars + Integer nbEVCars = gridConnection.getTransport().getCars().getNumElectricCars(); + if (nbEVCars == null) { + nbEVCars = 0; + } + int nbDieselCars = gridConnection.getTransport().getCars().getNumCars() - nbEVCars; + + //Initialize parameters + boolean isDefaultVehicle = true; + double annualTravelDistance_km = 0; + double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; + + //check if annual travel distance is filled in + if (gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm() != null){ + annualTravelDistance_km = gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm(); + isDefaultVehicle = false; + } + + //create diesel vehicle + for (int i = 0; i< nbDieselCars; i++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, annualTravelDistance_km); + } + + //Get number of chargepoints if filled in + //int numberOfChargepointsBusinessCars = gridConnection.getTransport().getCars().getNumChargePoints() != null ? gridConnection.getTransport().getCars().getNumChargePoints() : 0; + + //check if charge power is filled in + if (nbEVCars > 0 && gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ + if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() <= 0) { + traceln("Survey data contains no/negative Car maxChargingPower_kW: %s", gridConnection.getTransport().getCars().getPowerPerChargePointKw()); + } + else{ + maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); + isDefaultVehicle = false; + } + } + + //create EV + if (createElectricEA){ // Check if electric demand EA should be created + for (int j = 0; j< nbEVCars; j++){ + f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); + } + } + + //add to scenario: current + current_scenario_list.setCurrentEVCars(((current_scenario_list.getCurrentEVCars() != null) ? current_scenario_list.getCurrentEVCars() : 0) + nbEVCars); + current_scenario_list.setCurrentDieselCars(((current_scenario_list.getCurrentDieselCars() != null) ? current_scenario_list.getCurrentDieselCars() : 0) + nbDieselCars); + current_scenario_list.setCurrentEVCarChargePower_kW(maxChargingPower_kW); + + //Update Planned cars + future_scenario_list.setPlannedEVCars((gridConnection.getTransport().getCars().getNumPlannedElectricCars() != null ? gridConnection.getTransport().getCars().getNumPlannedElectricCars() : 0) + current_scenario_list.getCurrentEVCars()); + future_scenario_list.setPlannedHydrogenCars((gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() != null) ? gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() : 0); + + } + + + //Vans + if (gridConnection.getTransport().getVans().getNumVans() != null && gridConnection.getTransport().getVans().getNumVans() != 0){ + + //Update remaning amount of vans + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - gridConnection.getTransport().getVans().getNumVans()); + + Integer nbEVVans = gridConnection.getTransport().getVans().getNumElectricVans(); + if (nbEVVans == null) { + nbEVVans = 0; + } + int nbDieselVans = gridConnection.getTransport().getVans().getNumVans() - nbEVVans; + + boolean isDefaultVehicle = true; + double annualTravelDistance_km = 0; + double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerVan_kW; + + //check if annual travel distance is filled in + if (gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm() != null){ + annualTravelDistance_km = gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm(); + isDefaultVehicle = false; + } + + //create diesel vehicles + for (int i = 0; i< nbDieselVans; i++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, isDefaultVehicle, annualTravelDistance_km); + } + + //Get number of chargepoints if filled in + //int numberOfChargepointsVans = gridConnection.getTransport().getVans().getNumChargePoints() != null ? gridConnection.getTransport().getVans().getNumChargePoints() : 0; + + + //check if charge power is filled in + if (nbEVVans > 0 && gridConnection.getTransport().getVans().getPowerPerChargePointKw() != null){ + if (gridConnection.getTransport().getVans().getPowerPerChargePointKw() < 0) { + traceln("Survey data contains no/negative Van maxChargingPower_kW: %s", gridConnection.getTransport().getVans().getPowerPerChargePointKw()); + } + else{ + maxChargingPower_kW = gridConnection.getTransport().getVans().getPowerPerChargePointKw(); + isDefaultVehicle = false; + } + } + + //create electric vehicles + if (createElectricEA){ // Check if electric demand EA should be created + for (int j = 0; j< nbEVVans; j++){ + f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VAN, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); + } + } + + //add to scenario: current + current_scenario_list.setCurrentEVVans(nbEVVans); + current_scenario_list.setCurrentDieselVans(nbDieselVans); + current_scenario_list.setCurrentEVVanChargePower_kW(maxChargingPower_kW); + + //Planned + future_scenario_list.setPlannedEVVans((gridConnection.getTransport().getVans().getNumPlannedElectricVans() != null ? gridConnection.getTransport().getVans().getNumPlannedElectricVans() : 0) + current_scenario_list.getCurrentEVVans()); + future_scenario_list.setPlannedHydrogenVans((gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() != null) ? gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() : 0); + } + + + + //Trucks + if (gridConnection.getTransport().getTrucks().getNumTrucks() != null && gridConnection.getTransport().getTrucks().getNumTrucks() != 0){ + + //Update remaning amount of trucks + p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK, - gridConnection.getTransport().getTrucks().getNumTrucks()); + + Integer nbEVTrucks = gridConnection.getTransport().getTrucks().getNumElectricTrucks(); + if (nbEVTrucks == null) { + nbEVTrucks = 0; + } + int nbDieselTrucks = gridConnection.getTransport().getTrucks().getNumTrucks() - nbEVTrucks; + + boolean isDefaultVehicle = true; + double annualTravelDistance_km = 0; + double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerTruck_kW; + + //check if annual travel distance is filled in + if (gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm() != null){ + annualTravelDistance_km = gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm(); + isDefaultVehicle = false; + } + + //create diesel vehicles + for (int i = 0; i< nbDieselTrucks; i++){ + f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, isDefaultVehicle, annualTravelDistance_km); + } + + //Get number of chargepoints if filled in + //int numberOfChargepointsVans = gridConnection.getTransport().getTrucks().getNumChargePoints() != null ? gridConnection.getTransport().getTrucks().getNumChargePoints() : 0; + + + //check if charge power is filled in + if (nbEVTrucks > 0 && gridConnection.getTransport().getTrucks().getPowerPerChargePointKw() != null){ + if (gridConnection.getTransport().getTrucks().getPowerPerChargePointKw() <= 0) { + traceln("Survey data contains no/negative Truck maxChargingPower_kW: %s", gridConnection.getTransport().getTrucks().getPowerPerChargePointKw()); + } + else{ + maxChargingPower_kW = gridConnection.getTransport().getTrucks().getPowerPerChargePointKw(); + isDefaultVehicle = false; + } + } + + //create electric vehicles + if (createElectricEA){ // Check if electric demand EA should be created + for (int j = 0; j< nbEVTrucks; j++){ + f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_TRUCK, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); + } + } + + //add to scenario: current + current_scenario_list.setCurrentEVTrucks(nbEVTrucks); + current_scenario_list.setCurrentDieselTrucks(nbDieselTrucks); + current_scenario_list.setCurrentEVTruckChargePower_kW(maxChargingPower_kW); + + //Planned + future_scenario_list.setPlannedEVTrucks((gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() != null ? gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() : 0) + current_scenario_list.getCurrentEVTrucks()); + future_scenario_list.setPlannedHydrogenTrucks((gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() != null) ? gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() : 0); + } + + + //Other + if (Objects.nonNull(gridConnection.getTransport().getOtherVehicles().getHasOtherVehicles())){ + + // Wat doen we hier mee??? + + } +} + +//Save if building is paused at start +current_scenario_list.setIsCurrentlyActive(companyGC.v_isActive); +future_scenario_list.setIsActiveInFuture(companyGC.v_isActive);</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>Building_data</ReturnType> + <Id>1737741603780</Id> + <Name>f_createBuildingData_Vallum</Name> + <X>470</X> + <Y>200</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>PandID</Name> + <Type>String</Type> + </Parameter> + <Body>com.zenmo.bag.Pand pand_data_vallum = map_buildingData_Vallum.get(PandID); + +Building_data building_data_record = null; +if(pand_data_vallum != null){ // Only happens if building has been selected in survey, that is no longer available in BAG (Destroyed for example). + //Calculate surface area + GISRegion gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(pand_data_vallum.getGeometry().toString(), OL_GISObjectType.BUILDING)); + double surfaceArea_m2 = gisRegion.area(); + gisRegion.remove(); + + + //Create a building_data record + building_data_record = Building_data.builder(). + + address_id("verblijfsobject." + PandID). + building_id(PandID). + streetname(companyGC.p_address.getStreetName()). + house_number(companyGC.p_address.getHouseNumber()). + house_letter(companyGC.p_address.getHouseLetter()). + house_addition(companyGC.p_address.getHouseAddition()). + postalcode(companyGC.p_address.getPostalcode()). + city(companyGC.p_address.getPostalcode()). + build_year(pand_data_vallum.getBouwjaar()). + status(pand_data_vallum.getStatus()). + //purpose(row.get( buildings.purpose )). + address_floor_surface_m2(surfaceArea_m2). + polygon_area_m2(surfaceArea_m2). + annotation(companyGC.p_owner.p_actorID). + //extra_info(row.get( buildings.extra_info )). + //gridnode_id(row.get( buildings.gridnode_id )). + //latitude(row.get( buildings.latitude )). + //longitude(row.get( buildings.longitude )). + polygon(pand_data_vallum.getGeometry().toString()). + build(); +} +else{ + traceln("WARNING: SELECTED BUILDING IN SURVEY IS NO LONGER IN THE BAG DATABASE -> BUILDING CAN/HAS NOT BE(EN) CREATED!"); +} + +return building_data_record;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1737712184349</Id> + <Name>f_createDieselTractors</Name> + <X>900</X> + <Y>800</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGridConnection</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>agricultureSurveyData</Name> + <Type>com.zenmo.zummon.companysurvey.Agriculture</Type> + </Parameter> + <Body>final double annualDiesel_L = Optional.ofNullable(agricultureSurveyData.getAnnualDieselUsage_L()).orElse(0.0); +final int numTractors = Optional.ofNullable(agricultureSurveyData.getNumTractors()).orElse(annualDiesel_L > 0.0 ? 1 : 0); + +if (numTractors > 0 && annualDiesel_L <= 0.0) { + // TODO: this should be in Tractor constructor + throw new RuntimeException("Tractor diesel usage missing for " + companyGridConnection.p_gridConnectionID); +} + +CustomProfile_data tractorProfile = findFirst(c_customProfiles_data, profile -> profile.customProfileID().equals("TractorProfile")); ///???? + +for (int i = 0; i < numTractors; i++) { + if(tractorProfile == null){ + throw new RuntimeException("Trying to make a tractor, without having loaded in a tractor profile for GC: " + companyGridConnection.p_gridConnectionID); + } + new J_EADieselTractor(companyGridConnection, annualDiesel_L / numTractors, tractorProfile.getValuesArray(), energyModel.p_timeStep_h); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1738248965949</Id> + <Name>f_createElectricityTimeSeriesAssets</Name> + <X>460</X> + <Y>240</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gridConnection</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>gridConnectionSurvey</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>var electricitySurvey = gridConnectionSurvey.getElectricity(); + +double[] deliveryTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyDelivery_kWh()); +if (deliveryTimeSeries_kWh == null) { + // delivery is the minimum we require to do anything with timeseries data + return false; +} + +double[] feedInTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyFeedIn_kWh()); +double[] productionTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyProduction_kWh()); + +Double pvPower_kW = Optional.ofNullable(gridConnectionSurvey.getSupply().getPvInstalledKwp()) + .map(it -> (double) it) + .orElse(null); + +double[] heatPumpElectricityTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(gridConnectionSurvey.getHeat().getHeatPumpElectricityConsumptionTimeSeries_kWh()); + +//Preprocess the arrays and create the consumption pattern +f_createPreprocessedElectricityProfile_PV(gridConnection, deliveryTimeSeries_kWh, feedInTimeSeries_kWh, productionTimeSeries_kWh, pvPower_kW, heatPumpElectricityTimeSeries_kWh); + +gridConnection.v_hasQuarterHourlyValues = true; + +return true;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double[]</ReturnType> + <Id>1738572338816</Id> + <Name>f_timeSeriesToQuarterHourlyDoubleArray</Name> + <X>1550</X> + <Y>910</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>timeSeries</Name> + <Type>com.zenmo.zummon.companysurvey.TimeSeries</Type> + </Parameter> + <Body>int targetYear = v_simStartYear; +if (timeSeries == null) { + return null; +} + +if (!timeSeries.hasNumberOfValuesForOneYear()) { + traceln("Time series has too few values for one year"); + return null; +} + +return f_convertFloatArrayToDoubleArray(timeSeries.convertToQuarterHourly().getFullYearOrFudgeIt(targetYear));</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1742915722586</Id> + <Name>f_connectGCToExistingBuilding</Name> + <X>1550</X> + <Y>790</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>connectingGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>existingBuilding</Name> + <Type>GIS_Building</Type> + </Parameter> + <Parameter> + <Name>connectingBuildingData</Name> + <Type>Building_data</Type> + </Parameter> + <Body>//Get the total roof surface of the building +double buildingRoofSurface = existingBuilding.p_roofSurfaceArea_m2; + +//Building roof surface removal from all earlier connected GC (so excluding the new one!) +int currentAmountOfConnectedGCWithBuilding = existingBuilding.c_containedGridConnections.size(); +for(GridConnection earlierConnectedGC : existingBuilding.c_containedGridConnections){ + earlierConnectedGC.p_roofSurfaceArea_m2 -= buildingRoofSurface/currentAmountOfConnectedGCWithBuilding; + + if(earlierConnectedGC.p_roofSurfaceArea_m2 < 0){ + new RuntimeException("Negative roofsurface for GC: " + earlierConnectedGC.p_gridConnectionID + " after removal of earlier distributed building roofsurface. This should never be possible!"); + } +} + +//Connect new GC to the building now +existingBuilding.c_containedGridConnections.add(connectingGC); +connectingGC.c_connectedGISObjects.add(existingBuilding); + + +//Adding the newly distributed roof surfaces to the gc (now including the new one!) +int newAmountOfConnectedGCWithBuilding = currentAmountOfConnectedGCWithBuilding + 1; +for(GridConnection connectedGC : existingBuilding.c_containedGridConnections){ + connectedGC.p_roofSurfaceArea_m2 += buildingRoofSurface/newAmountOfConnectedGCWithBuilding; +} + +//Also add the new connecting building data address floor surface +existingBuilding.p_floorSurfaceArea_m2 += connectingBuildingData.address_floor_surface_m2();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1745336570663</Id> + <Name>f_addHeatAsset</Name> + <X>900</X> + <Y>500</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatAssetType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Parameter> + <Name>maxHeatOutputPower_kW</Name> + <Type>double</Type> + </Parameter> + <Body>//Initialize parameters +double heatOutputCapacityGasBurner_kW; +double inputCapacityElectric_kW; +double efficiency; +double baseTemperature_degC; +double outputTemperature_degC; +OL_AmbientTempType ambientTempType; +double sourceAssetHeatPower_kW; +double belowZeroHeatpumpEtaReductionFactor; +if(parentGC.p_BuildingThermalAsset == null){ + maxHeatOutputPower_kW = maxHeatOutputPower_kW*2; // Make the asset capacity twice as high, to make sure it can handle the load in other scenarios with more heat consumption. +} + +switch (heatAssetType){ // There is always only one heatingType, If there are many assets the type is CUSTOM + + case GAS_BURNER: + heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); + J_EAConversionGasBurner gasBurner = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW , avgc_data.p_avgEfficiencyGasBurner_fr, energyModel.p_timeStep_h, 90); + break; + + case HYBRID_HEATPUMP: + + //Add primary heating asset (heatpump) (if its not part of the basic profile already + inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW / 3); //-- /3, kan nog kleiner want is hybride zodat gasbrander ook bij springt, dus kleiner MOETEN aanname voor hoe klein onderzoeken + efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; + baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType); + + zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); + + //Add secondary heating asset (gasburner) + heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); + efficiency = avgc_data.p_avgEfficiencyGasBurner_fr; + outputTemperature_degC = avgc_data.p_avgOutputTemperatureGasBurner_degC; + + J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC); + break; + + case ELECTRIC_HEATPUMP: + //Add primary heating asset (heatpump) + inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW); // Could be a lot smaller due to high cop + efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; + baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; + ambientTempType = OL_AmbientTempType.AMBIENT_AIR; + sourceAssetHeatPower_kW = 0; + belowZeroHeatpumpEtaReductionFactor = 1; + + new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); + break; + + case GAS_CHP: + + double outputCapacityElectric_kW = (maxHeatOutputPower_kW/avgc_data.p_avgEfficiencyCHP_thermal_fr) * avgc_data.p_avgEfficiencyCHP_electric_fr; + outputTemperature_degC = avgc_data.p_avgOutputTemperatureCHP_degC; + efficiency = avgc_data.p_avgEfficiencyCHP_thermal_fr + avgc_data.p_avgEfficiencyCHP_electric_fr; + + new J_EAConversionGasCHP(parentGC, outputCapacityElectric_kW, maxHeatOutputPower_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC ); + break; + + case DISTRICTHEAT: + double heatOutputCapacityDeliverySet_kW = max(avgc_data.p_minDistrictHeatingDeliverySetOutputCapacity_kW, maxHeatOutputPower_kW); + outputTemperature_degC = avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; + efficiency = avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; + + new J_EAConversionHeatDeliverySet(parentGC, heatOutputCapacityDeliverySet_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC); + + //Add GC to heat grid + GridNode heatgrid = findFirst(energyModel.pop_gridNodes, node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); + if(heatgrid == null){ + heatgrid = f_createHeatGridNode(); + } + parentGC.p_parentNodeHeatID = heatgrid.p_gridNodeID; + break; + + case CUSTOM: + f_addCustomHeatAsset(parentGC, maxHeatOutputPower_kW); + break; + + default: + traceln("HEATING TYPE NOT FOUND FOR GC: " + parentGC); +} </Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>GridNode</ReturnType> + <Id>1747300761144</Id> + <Name>f_createHeatGridNode</Name> + <X>50</X> + <Y>600</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>GridNode GN_heat = energyModel.add_pop_gridNodes(); +GN_heat.p_gridNodeID = "Heatgrid"; + +// Check wether transformer capacity is known or estimated +GN_heat.p_capacity_kW = 1000000; +GN_heat.p_realCapacityAvailable = false; + +// Basic GN information +GN_heat.p_description = "Warmtenet"; + +/* +//Owner +GN_heat.p_ownerGridOperator = Grid_Operator; +*/ + +//Define node type +GN_heat.p_nodeType = OL_GridNodeType.HT; +GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; + +//Define GN location +GN_heat.p_latitude = 0; +GN_heat.p_longitude = 0; +GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); + +//Create gis region +/* +GN.gisRegion = zero_Interface.f_createGISObject(f_createGISNodesTokens(GN)); +zero_Interface.f_styleGridNodes(GN); +zero_Interface.c_GISNodes.add(GN.gisRegion); +*/ + +return GN_heat;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747829476305</Id> + <Name>f_addSliderSolarfarm</Name> + <X>50</X> + <Y>340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>sliderGCID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>gridNodeID</Name> + <Type>String</Type> + </Parameter> + <Body>c_solarfarm_data.add(0, Solarfarm_data.builder(). +isSliderGC(true). + +gc_id(sliderGCID). +gc_name("Slider solarfarm"). +owner_id("Slider solarfarm owner"). +streetname(null). +house_number(null). +house_letter(null). +house_addition(null). +postalcode(null). +city(null). +gridnode_id(gridNodeID). +initially_active(false). + +capacity_electric_kw(0.0). +connection_capacity_kw(0.0). +contracted_delivery_capacity_kw(0.0). +contracted_feed_in_capacity_kw(0.0). + +latitude(0). +longitude(0). +polygon(null). +build());</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747829476307</Id> + <Name>f_addSliderWindfarm</Name> + <X>50</X> + <Y>360</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>sliderGCID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>gridNodeID</Name> + <Type>String</Type> + </Parameter> + <Body>c_windfarm_data.add(0, Windfarm_data.builder(). +isSliderGC(true). + +gc_id(sliderGCID). +gc_name("Slider windfarm"). +owner_id("Slider windfarm owner"). +streetname(null). +house_number(null). +house_letter(null). +house_addition(null). +postalcode(null). +city(null). +gridnode_id(gridNodeID). +initially_active(false). + +capacity_electric_kw(0.0). +connection_capacity_kw(0.0). +contracted_delivery_capacity_kw(0.0). +contracted_feed_in_capacity_kw(0.0). + +latitude(0). +longitude(0). +polygon(null). +build()); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747829476311</Id> + <Name>f_addSliderBattery</Name> + <X>50</X> + <Y>378</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>sliderGCID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>gridNodeID</Name> + <Type>String</Type> + </Parameter> + <Body>c_battery_data.add(0, Battery_data.builder(). +isSliderGC(true). + +gc_id(sliderGCID). +gc_name("Slider battery"). +owner_id("Slider battery owner"). +streetname(null). +house_number(null). +house_letter(null). +house_addition(null). +postalcode(null). +city(null). +gridnode_id(gridNodeID). +initially_active(false). + +capacity_electric_kw(0.0). +connection_capacity_kw(0.0). +contracted_delivery_capacity_kw(0.0). +contracted_feed_in_capacity_kw(0.0). + +storage_capacity_kwh(0.0). +operation_mode(OL_BatteryOperationMode.PEAK_SHAVING_PARENT_NODE). +latitude(0). +longitude(0). +polygon(null). +build());</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1747830228830</Id> + <Name>f_initializeSpecificSliderGC</Name> + <X>90</X> + <Y>212</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Create slider GC data packages for assetGC that do not have a sliderGC data package yet +Solarfarm_data sliderSolarfarm_data = findFirst(c_solarfarm_data, sf_data -> sf_data.isSliderGC()); +Windfarm_data sliderWindfarm_data = findFirst(c_windfarm_data, wf_data -> wf_data.isSliderGC()); +Battery_data sliderBattery_data = findFirst(c_battery_data, bat_data -> bat_data.isSliderGC()); + +//Get top gridnode id +GridNode_data topGridNode = findFirst(c_gridNode_data, node_data -> node_data.type().equals("HVMV")); +if ( topGridNode == null ) { + throw new RuntimeException("Unable to find top GridNode of type HVMV to create slider assets."); +} +String topGridNodeID = topGridNode.gridnode_id(); + +//Create data package for e-hub dashboard slider gcs +if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ + f_addSliderSolarfarm(zero_Interface.p_defaultEnergyHubSliderGCName_solarfarm, topGridNodeID); + f_addSliderWindfarm(zero_Interface.p_defaultEnergyHubSliderGCName_windfarm, topGridNodeID); + f_addSliderBattery(zero_Interface.p_defaultEnergyHubSliderGCName_battery, topGridNodeID); +} + +//If no slider data package is present yet for the main: add one as well. +if(sliderSolarfarm_data == null){ + f_addSliderSolarfarm(zero_Interface.p_defaultMainSliderGCName_solarfarm, topGridNodeID); +} +if(sliderWindfarm_data == null){ + f_addSliderWindfarm(zero_Interface.p_defaultMainSliderGCName_windfarm, topGridNodeID); +} +if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ + for(GridNode_data nodeData : c_gridNode_data){ + f_addSliderBattery(zero_Interface.p_defaultMainSliderGCName_battery, nodeData.gridnode_id()); + } +} +else{ + if(sliderBattery_data == null){ + f_addSliderBattery(zero_Interface.p_defaultMainSliderGCName_battery, topGridNodeID); + } +}</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_ProfilePointer</ReturnType> + <Id>1749125189323</Id> + <Name>f_createEngineProfile</Name> + <Description>Functie van gillis voor inladen weer data!</Description> + <X>99</X> + <Y>150</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>profileID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>arguments</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>values</Name> + <Type>double[]</Type> + </Parameter> + <Body>TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); +J_ProfilePointer profilePointer = new J_ProfilePointer(profileID, tf_profile); +energyModel.f_addProfile(profilePointer); +return profilePointer;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749138089965</Id> + <Name>f_setEngineProfiles</Name> + <Description>Functie van gillis voor inladen weer data!</Description> + <X>80</X> + <Y>130</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Profile Arguments +double[] a_arguments_hr = ListUtil.doubleListToArray(defaultProfiles_data.arguments_hr()); + +//Weather data +double[] a_ambientTemperatureProfile_degC = ListUtil.doubleListToArray(defaultProfiles_data.ambientTemperatureProfile_degC()); +double[] a_PVProductionProfile35DegSouth_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile35DegSouth_fr()); +double[] a_PVProductionProfile15DegEastWest_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile15DegEastWest_fr()); +double[] a_windProductionProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.windProductionProfile_fr()); + +//EPEX data +double[] a_epexProfile_eurpMWh = ListUtil.doubleListToArray(defaultProfiles_data.epexProfile_eurpMWh()); + +//Various demand data +double[] a_defaultHouseElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseElectricityDemandProfile_fr()); +double[] a_defaultHouseHotWaterDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseHotWaterDemandProfile_fr()); +double[] a_defaultHouseCookingDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseCookingDemandProfile_fr()); +double[] a_defaultOfficeElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultOfficeElectricityDemandProfile_fr()); +double[] a_defaultBuildingHeatDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultBuildingHeatDemandProfile_fr()); + +//Create Weather engine profiles +energyModel.pp_ambientTemperature_degC = f_createEngineProfile("ambient_temperature_degC", a_arguments_hr, a_ambientTemperatureProfile_degC); +energyModel.pp_PVProduction35DegSouth_fr = f_createEngineProfile("pv_production_south_fr", a_arguments_hr, a_PVProductionProfile35DegSouth_fr); +energyModel.pp_PVProduction15DegEastWest_fr = f_createEngineProfile("pv_production_eastwest_fr", a_arguments_hr, a_PVProductionProfile15DegEastWest_fr); +energyModel.pp_windProduction_fr = f_createEngineProfile("wind_production_fr", a_arguments_hr, a_windProductionProfile_fr); + +//Create Epex engine profile +energyModel.pp_dayAheadElectricityPricing_eurpMWh = f_createEngineProfile("epex_price_eurpMWh", a_arguments_hr, a_epexProfile_eurpMWh); + +//Create Consumption engine profiles: +f_createEngineProfile("default_house_electricity_demand_fr", a_arguments_hr, a_defaultHouseElectricityDemandProfile_fr); +f_createEngineProfile("default_house_hot_water_demand_fr", a_arguments_hr, a_defaultHouseHotWaterDemandProfile_fr); +f_createEngineProfile("default_house_cooking_demand_fr", a_arguments_hr, a_defaultHouseCookingDemandProfile_fr); +f_createEngineProfile("default_office_electricity_demand_fr", a_arguments_hr, a_defaultOfficeElectricityDemandProfile_fr); +f_createEngineProfile("default_building_heat_demand_fr", a_arguments_hr, a_defaultBuildingHeatDemandProfile_fr); + + +//Create custom engine profiles +for(CustomProfile_data customProfile : c_customProfiles_data){ + f_createEngineProfile(customProfile.customProfileID(), customProfile.getArgumentsArray(), customProfile.getValuesArray()); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749628581470</Id> + <Name>f_addGridNodeProfile</Name> + <X>70</X> + <Y>580</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gridnode</Name> + <Type>GridNode</Type> + </Parameter> + <Parameter> + <Name>profile_data_kWh</Name> + <Type>double[]</Type> + </Parameter> + <Body>//Create gridconnection where the profile is attached to +GridConnection GC_GridNode_profile = energyModel.add_pop_gridConnections(); + +//Set GC id +GC_GridNode_profile.p_gridConnectionID = "GridNode " + gridnode.p_gridNodeID + " profile GC"; + +//Set gridnode as parent +GC_GridNode_profile.p_parentNodeElectricID = gridnode.p_gridNodeID; + +//Set capacity same as gridnode +GC_GridNode_profile.v_liveConnectionMetaData.physicalCapacity_kW = gridnode.p_capacity_kW; +GC_GridNode_profile.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = gridnode.p_capacity_kW; +GC_GridNode_profile.v_liveConnectionMetaData.contractedFeedinCapacity_kW = gridnode.p_capacity_kW; + +GC_GridNode_profile.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; +GC_GridNode_profile.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; +GC_GridNode_profile.v_liveConnectionMetaData.physicalCapacityKnown = false; + +//Set lat lon same as gridnode +GC_GridNode_profile.p_latitude = gridnode.p_latitude; // Get latitude of first building (only used to get nearest trafo) +GC_GridNode_profile.p_longitude = gridnode.p_longitude; // Get longitude of first building (only used to get nearest trafo) + +if(project_data.gridnode_profile_timestep_hr() == null){ + new RuntimeException("Trying to load in gridnode profiles, without specifying the timestep of the data in the project_data"); +} + +double profileTimestep_hr = project_data.gridnode_profile_timestep_hr(); + +//Add profile to the GC +J_EAProfile profile = new J_EAProfile(GC_GridNode_profile, OL_EnergyCarriers.ELECTRICITY, profile_data_kWh, OL_AssetFlowCategories.fixedConsumptionElectric_kW, profileTimestep_hr); +profile.setStartTime_h(v_simStartHour_h); +profile.energyAssetName = "GridNode " + gridnode.p_gridNodeID + " profile"; + +//Set boolean has profile data true +gridnode.p_hasProfileData = true; +c_gridNodeIDsWithProfiles.add(gridnode.p_gridNodeID);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_ChargingSession</ReturnType> + <Id>1749648772203</Id> + <Name>f_createChargingSession</Name> + <X>490</X> + <Y>890</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>chargingSessionData</Name> + <Type>String</Type> + </Parameter> + <Body>String[] chargingSessionInfo = chargingSessionData.split("/"); + +double startIndex = Double.parseDouble(chargingSessionInfo[0]); +double endIndex = Double.parseDouble(chargingSessionInfo[1]); +double chargingDemand_kWh = Double.parseDouble(chargingSessionInfo[2]); +double batteryCap_kWh = Double.parseDouble(chargingSessionInfo[3]); +double chargingPower_kW = Double.parseDouble(chargingSessionInfo[5]); +int socket = Integer.parseInt(chargingSessionInfo[6]); + +//Cap charging demand to what is actual possible according to chargetime interval * charge power +chargingDemand_kWh = min(chargingPower_kW * (endIndex - startIndex) * 0.25, chargingDemand_kWh); + +return new J_ChargingSession(startIndex, endIndex, chargingDemand_kWh, batteryCap_kWh, chargingPower_kW, socket, 0.25);</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<J_ChargingSession> </ReturnType> + <Id>1749649169603</Id> + <Name>f_createNewChargerProfile</Name> + <X>470</X> + <Y>870</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>chargerProfileData</Name> + <Type>ChargerProfile_data</Type> + </Parameter> + <Body>// example: 2/54/50.3/72.1/21.8/10.8/2 +List<String> chargerProfileDataValues = chargerProfileData.valuesList(); +List<J_ChargingSession> chargerProfile = new ArrayList<J_ChargingSession>(); + +for(int i = 0; i < chargerProfileDataValues.size(); i++){ + chargerProfile.add(f_createChargingSession(chargerProfileDataValues.get(i))); +} + +return chargerProfile;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<J_ChargingSession> </ReturnType> + <Id>1749649390125</Id> + <Name>f_getChargerProfile</Name> + <X>450</X> + <Y>850</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<J_ChargingSession> chargerProfile; +int randomIndex; + +if(c_chargerProfiles_data.size()>0){ + randomIndex = uniform_discr(0, c_chargerProfiles_data.size() - 1); + chargerProfile = f_createNewChargerProfile(c_chargerProfiles_data.get(randomIndex)); + c_chargerProfiles_data.remove(randomIndex); + energyModel.c_chargerProfiles.add(chargerProfile); +} +else{ + randomIndex = uniform_discr(0, energyModel.c_chargerProfiles.size() - 1); + chargerProfile = energyModel.c_chargerProfiles.get(randomIndex); +} + +return chargerProfile;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749726189312</Id> + <Name>f_addCookingAsset</Name> + <X>900</X> + <Y>620</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>gc</Name> + <Type>GCHouse</Type> + </Parameter> + <Parameter> + <Name>CookingType</Name> + <Type>OL_EnergyAssetType</Type> + </Parameter> + <Parameter> + <Name>cookingDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Body>double yearlyCookingDemand_kWh = cookingDemand_kwhpa; + +if(cookingDemand_kwhpa == 0){ + //yearlyCookingDemand_kWh = uniform_discr(200,600); //way to high compared to referentiewoningen + yearlyCookingDemand_kWh = uniform_discr(70,130); + // traceln("Cooking demand unknown"); +} + +switch(CookingType){ + + case ELECTRIC_HOB: + new J_EAConsumption(gc, OL_EnergyAssetType.ELECTRIC_HOB, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.ELECTRICITY, energyModel.p_timeStep_h, null); + gc.p_cookingMethod = OL_HouseholdCookingMethod.ELECTRIC; + break; + + case GAS_PIT: + new J_EAConsumption(gc, OL_EnergyAssetType.GAS_PIT, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.METHANE, energyModel.p_timeStep_h, null); + gc.p_cookingMethod = OL_HouseholdCookingMethod.GAS; + break; +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749726279652</Id> + <Name>f_addHotWaterDemand</Name> + <X>900</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>houseGC</Name> + <Type>GCHouse</Type> + </Parameter> + <Parameter> + <Name>surface_m2</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>hotWaterDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Body>double yearlyHWD_kWh = hotWaterDemand_kwhpa; +if(hotWaterDemand_kwhpa == 0){ + int aantalBewoners; + if( surface_m2 > 150){ + aantalBewoners = uniform_discr(2,6); + } + else if (surface_m2 > 50){ + aantalBewoners = uniform_discr(1,4); + } + else { + aantalBewoners = uniform_discr(1,2); + } + + yearlyHWD_kWh = 1000 + aantalBewoners * 150; //Aangepast Naud 13-11-2025 omdat waardes van PBL totaal niet aansloten bij oude aantal bewoners * 600 //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix +} +else if (surface_m2 > 50){ + aantalBewoners = uniform_discr(1,4); +} +else { + aantalBewoners = uniform_discr(1,2); +} + +double yearlyHWD_kWh = aantalBewoners * 600; //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix + +J_EAConsumption hotwaterDemand = new J_EAConsumption( houseGC, OL_EnergyAssetType.HOT_WATER_CONSUMPTION, "default_house_hot_water_demand_fr", yearlyHWD_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, null); + +if( surface_m2 > 200){ + //traceln("House created with " + surface_m2 + "m2 surace area, will have large hot water demand"); +} +if (surface_m2 < 25){ + //traceln("House created with " + surface_m2 + "m2 surace area, will have low hot water demand"); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749727623536</Id> + <Name>f_addBuildingHeatModel</Name> + <X>900</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>floorArea_m2</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>heatDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Body>double maxPowerHeat_kW = 1000; //Dit is hoeveel vermogen het huis kan afgeven/opnemen, mag willekeurige waarden hebben. Wordt alleen gebruikt in rekenstap van ratio of capacity +double lossfactor_WpK; //Dit is wat bepaalt hoeveel warmte het huis verliest/opneemt per tijdstap per delta_T +double initialTemp = uniform_discr(15,22); //starttemperatuur +double heatCapacity_JpK; //hoeveel lucht zit er in je huis dat je moet verwarmen? +double solarAbsorptionFactor_m2; //hoeveel m2 effectieve dak en muur oppervlakte er is dat opwarmt door zonneinstraling + +//Heat demand from PBL referentiewoningen used for HeatCapacity and lossFactor_WpK +if(heatDemand_kwhpa > 0){ //Not missing in data + lossfactor_WpK = heatDemand_kwhpa / 63; // = manually calibrated value tested on 3 neighborhoods +} +else{ + switch (parentGC.p_energyLabel){ + case A: + lossfactor_WpK = 0.35 * floorArea_m2; + break; + case B: + lossfactor_WpK = 0.45 * floorArea_m2; + break; + case C: + lossfactor_WpK = 0.65 * floorArea_m2; + break; + case D: + lossfactor_WpK = 0.85 * floorArea_m2; + break; + case E: + lossfactor_WpK = 1.05 * floorArea_m2; + break; + case F: + lossfactor_WpK = 1.25 * floorArea_m2; + break; + case G: + lossfactor_WpK = 1.45 * floorArea_m2; + break; + case NONE: + default: + lossfactor_WpK = uniform (0.85, 1.2) * floorArea_m2; + } +} +lossfactor_WpK = roundToDecimal(lossfactor_WpK,2); +solarAbsorptionFactor_m2 = floorArea_m2 * 0.01; //solar irradiance [W/m2] + +heatCapacity_JpK = floorArea_m2 * 50000; //What is the 5000 based upon? + +parentGC.p_BuildingThermalAsset = new J_EABuilding( parentGC, maxPowerHeat_kW, lossfactor_WpK, energyModel.p_timeStep_h, initialTemp, heatCapacity_JpK, solarAbsorptionFactor_m2 ); +energyModel.c_ambientDependentAssets.add( parentGC.p_BuildingThermalAsset ); + +//FOR NOW DEFAULT NO INTERIOR/EXTERIOR HEAT BUFFERS -> NOT NECESSARY +/* +double delayHeatReleaseInteriorHeatsink_hr = 0; +double lossToExteriorFromInteriorHeatSink_fr; +if(randomTrue(0.2)){ + delayHeatReleaseInteriorHeatsink_hr = 3; +} +else { + delayHeatReleaseInteriorHeatsink_hr = 0.5; +} + +parentGC.p_BuildingThermalAsset.addInteriorHeatBuffer(delayHeatReleaseInteriorHeatsink_hr); + +double delayHeatReleaseRoofAndWall_hr = 8.0; +parentGC.p_BuildingThermalAsset.addExteriorHeatBuffer(delayHeatReleaseRoofAndWall_hr); +*/</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Building_data></ReturnType> + <Id>1749728889982</Id> + <Name>f_getBuildingsInSubScope</Name> + <X>50</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialBuildingList</Name> + <Type>List<Building_data></Type> + </Parameter> + <Body>List<Building_data> scopedBuildingList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedBuildingList.addAll(initialBuildingList); +} +else{ + for (Building_data dataBuilding : initialBuildingList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataBuilding.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedBuildingList.add(dataBuilding); + } + } + } +} +return scopedBuildingList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749728889984</Id> + <Name>f_createHouses</Name> + <Description>Creates the houses using a single GC, and their building. After creation, they will be simulated using average values.</Description> + <X>420</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<Building_data> buildingDataHouses = f_getBuildingsInSubScope(c_houseBuilding_data); + +traceln("Aantal panden met woonfunctie in BAG data: " + buildingDataHouses.size()); + +int i = 0; + + +if(buildingDataHouses.size()>0){ + //Add houses to the legend if in model + zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.HOUSE); + + //PreCalculate the probabilities for an additional Car for houses + f_calculateProbabilitiesForAdditionalCar(buildingDataHouses); +} + + + +for (Building_data houseBuildingData : buildingDataHouses) { + GCHouse GCH = energyModel.add_Houses(); + ConnectionOwner COH = energyModel.add_pop_connectionOwners(); + + //Set parameters for the Grid Connection + GCH.p_gridConnectionID = houseBuildingData.address_id(); + GCH.p_ownerID = "Woonhuis" + Integer.toString(i); //aanname : huiseigenaar is eigenbaas + + GCH.p_purposeBAG = houseBuildingData.purpose(); + + //pand gegevens + GCH.p_bouwjaar = houseBuildingData.build_year(); + GCH.p_eigenOprit = houseBuildingData.has_private_parking() != null ? houseBuildingData.has_private_parking() : false; + + //For PBL heating + GCH.p_constructionPeriod_heatingPBL = houseBuildingData.constructionPeriod_int(); + GCH.p_buildingType_heatingPBL = houseBuildingData.buildingType_int(); + GCH.p_ownership_heatingPBL = houseBuildingData.ownership_int(); + GCH.p_localFactor_heatingPBL = houseBuildingData.localFactor(); + GCH.p_regionalClimateCorrectionFactor_heatingPBL = houseBuildingData.regionalClimateCorrectionFactor(); + + + + //Nageisoleerd + if (houseBuildingData.energy_label() != null){ // && houseBuildingData.energy_label() != OL_GridConnectionIsolationLabel.NONE) { + GCH.p_energyLabel = houseBuildingData.energy_label(); + } + else { + if (GCH.p_bouwjaar < 1980) { + GCH.p_energyLabel = OL_GridConnectionIsolationLabel.D; + } + else if (GCH.p_bouwjaar < 1996) { + GCH.p_energyLabel = OL_GridConnectionIsolationLabel.C; + } + else if (GCH.p_bouwjaar < 2008) { + GCH.p_energyLabel = OL_GridConnectionIsolationLabel.B; + } + else { + GCH.p_energyLabel = OL_GridConnectionIsolationLabel.A; + } + } + //aansluiting gegevens + GCH.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; + GCH.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; + GCH.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; + + GCH.v_liveConnectionMetaData.physicalCapacityKnown = false; + GCH.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + GCH.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + + // Address data + GCH.p_address = new J_Address(); + GCH.p_address.setStreetName( houseBuildingData.streetname()); + if (houseBuildingData.house_number() == null) { + GCH.p_address.setHouseNumber( 0 ); + } else { + GCH.p_address.setHouseNumber( houseBuildingData.house_number()); + } + GCH.p_address.setHouseLetter( houseBuildingData.house_letter()); + GCH.p_address.setHouseAddition( houseBuildingData.house_addition()); + GCH.p_address.setPostalcode( houseBuildingData.postalcode()); + GCH.p_address.setCity( houseBuildingData.city()); + + //locatie + GCH.p_longitude = houseBuildingData.longitude(); + GCH.p_latitude = houseBuildingData.latitude(); + GCH.setLatLon(GCH.p_latitude, GCH.p_longitude); + + //Connect GC to grid node + GCH.p_parentNodeElectricID = houseBuildingData.gridnode_id(); + + //Set parameters for the Actor: ConnectionOwner + COH.p_actorID = GCH.p_ownerID; + COH.p_connectionOwnerType = OL_ConnectionOwnerType.HOUSEHOLD; + COH.p_detailedCompany = false; + GCH.p_owner = COH; + + + //Check wheter this building already exists + GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(houseBuildingData.building_id())); + + if(existingBuilding == null){//Create new GIS building and connect + GIS_Building b = f_createGISBuilding( houseBuildingData, GCH ); + GCH.p_roofSurfaceArea_m2 = houseBuildingData.polygon_area_m2(); + + //Style building + b.p_defaultFillColor = zero_Interface.v_houseBuildingColor; + b.p_defaultLineColor = zero_Interface.v_houseBuildingLineColor; + zero_Interface.f_styleAreas(b); + } + else{// Connect with existing building + f_connectGCToExistingBuilding(GCH, existingBuilding, houseBuildingData); + } + + //Floor surface of GC + GCH.p_floorSurfaceArea_m2 = houseBuildingData.address_floor_surface_m2(); + + //Instantiate energy assets + double annualElectricityConsumption_kwhpa; + double annualNaturalGasConsumption_kwhpa; + double annualSpaceHeatingConsumption_kwhpa; + double annualDHWConsumption_kwhpa; + double annualCookingConsumption_kwhpa; + try { + annualElectricityConsumption_kwhpa = houseBuildingData.electricity_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualElectricityConsumption_kwhpa = Double.valueOf(uniform_discr(1200, 3800)); + } + try { + annualNaturalGasConsumption_kwhpa = houseBuildingData.gas_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualNaturalGasConsumption_kwhpa = Double.valueOf(uniform_discr(600, 2000)); + } + try { + annualSpaceHeatingConsumption_kwhpa = houseBuildingData.space_heating_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualSpaceHeatingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.85; //assumed share gas space heating + traceln("DOESTHISHAPPEN??"); + } + try { + annualDHWConsumption_kwhpa = houseBuildingData.dhw_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualDHWConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.1; //assumed share gas dhw heating + } + try { + annualCookingConsumption_kwhpa = houseBuildingData.cooking_consumption_kwhpa(); + } + catch (NullPointerException e){ + annualCookingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.05; //assumed share gas cooking + } + //GCH.p_initialPVpanels = houseBuildingData.pv_default(); + GCH.v_liveAssetsMetaData.initialPV_kW = houseBuildingData.pv_installed_kwp() != null ? houseBuildingData.pv_installed_kwp() : 0; + GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.v_liveAssetsMetaData.initialPV_kW > 0 ? GCH.v_liveAssetsMetaData.initialPV_kW : houseBuildingData.pv_potential_kwp(); // To prevent sliders from changing outcomes + + // TODO: Above we load in data of gas use, but the houses always have a thermal model?? + f_addEnergyAssetsToHouses(GCH, annualElectricityConsumption_kwhpa, annualSpaceHeatingConsumption_kwhpa, annualDHWConsumption_kwhpa, annualCookingConsumption_kwhpa ); + + i ++; +} + +//Backup for when pv_potential kWp is null, needs to be after all houses have been made, so rooftop surface is distributed correctly +for(GCHouse GCH : energyModel.Houses){ + if(GCH.v_liveAssetsMetaData.PVPotential_kW == null){ + GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.p_roofSurfaceArea_m2*avgc_data.p_avgRatioRoofPotentialPV*avgc_data.p_avgPVPower_kWpm2; + } +} + +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749728889986</Id> + <Name>f_addEnergyAssetsToHouses</Name> + <Description>Initialisation of the Energy assets using average values for houses</Description> + <X>440</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>house</Name> + <Type>GCHouse</Type> + </Parameter> + <Parameter> + <Name>electricityDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>spaceHeatingDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>dhwDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>cookingDemand_kwhpa</Name> + <Type>double</Type> + </Parameter> + <Body>//Add generic electricity demand profile +GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals( house.p_parentNodeElectricID)); + +if ( ! gn.p_hasProfileData ){ + f_addElectricityDemandProfile(house, electricityDemand_kwhpa, null, false, "default_house_electricity_demand_fr"); +} + +//Add building heat model and asset +f_addBuildingHeatModel(house, house.p_floorSurfaceArea_m2, spaceHeatingDemand_kwhpa); + +//Determine required heating capacity for the heating asset +double maximalTemperatureDifference_K = 30.0; // Approximation +double maxHeatOutputPower_kW = house.p_BuildingThermalAsset.getLossFactor_WpK() * maximalTemperatureDifference_K / 1000; + + +//Add heat demand profile +OL_GridConnectionHeatingType heatingType = avgc_data.p_avgHouseHeatingMethod; +f_addHeatAsset(house, heatingType, maxHeatOutputPower_kW); +house.f_addHeatManagement(heatingType, false); +house.f_setHeatingPreferences(f_getHouseHeatingPreferences()); + +//Add hot water and cooking demand +f_addHotWaterDemand(house, house.p_floorSurfaceArea_m2, dhwDemand_kwhpa); +f_addCookingAsset(house, OL_EnergyAssetType.GAS_PIT, cookingDemand_kwhpa); + + +//Add pv +double installedRooftopSolar_kW = house.v_liveAssetsMetaData.initialPV_kW != null ? house.v_liveAssetsMetaData.initialPV_kW : 0; +if (gn.p_hasProfileData){ //dont count production if there is measured data on Node + installedRooftopSolar_kW = 0; +} + +if (installedRooftopSolar_kW > 0) { + f_addEnergyProduction(house, OL_EnergyAssetType.PHOTOVOLTAIC, "Residential Solar", installedRooftopSolar_kW ); +} + +//Add cars +f_addCarsToHouses(house); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_HeatingPreferences</ReturnType> + <Id>1749728889988</Id> + <Name>f_getHouseHeatingPreferences</Name> + <X>460</X> + <Y>700</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>double nightTimeSetPoint_degC = 18; +double dayTimeSetPoint_degC = 20; +double startOfDayTime_h = 8; +double startOfNightTime_h = 23; + +if( randomTrue(0.5) ){ //50% kans op ochtend ritme + nightTimeSetPoint_degC = uniform_discr(12,18); + dayTimeSetPoint_degC = uniform_discr(18, 24); + startOfDayTime_h = uniform_discr(5,10) + uniform_discr(0,4) / 4.0; + startOfNightTime_h = uniform_discr(21,23); + +} +else if (randomTrue(0.5) ){ // 25% kans op hele dag aan + nightTimeSetPoint_degC = uniform_discr(18,21); + dayTimeSetPoint_degC = nightTimeSetPoint_degC; + startOfDayTime_h = -1; + startOfNightTime_h = 25; + +} +else { // 25% kans op smiddags/savonds aan + nightTimeSetPoint_degC = uniform_discr(14,18); + dayTimeSetPoint_degC = uniform_discr(18, 24); + startOfDayTime_h = uniform_discr(14, 16) + uniform_discr(0,4) / 4.0; + startOfNightTime_h = uniform_discr(21,23); +} + +double maxComfortTemperature_degC = dayTimeSetPoint_degC + 2; +double minComfortTemperature_degC = dayTimeSetPoint_degC - 2; + +//Create heating preferences class +J_HeatingPreferences heatingPreferences = new J_HeatingPreferences(startOfDayTime_h, startOfNightTime_h, dayTimeSetPoint_degC, nightTimeSetPoint_degC, maxComfortTemperature_degC, minComfortTemperature_degC); + +return heatingPreferences;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1749729268458</Id> + <Name>f_createParkingSpots</Name> + <X>430</X> + <Y>950</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>List<GCEnergyProduction> carportGCList = new ArrayList<GCEnergyProduction>(); + +for (ParkingSpace_data dataParkingSpace : f_getParkingSpacesInSubScope(c_parkingSpace_data)){ + + //Create parking gis object + GIS_Object parkingSpace = f_createGISObject(dataParkingSpace.parking_id(), dataParkingSpace.latitude(), dataParkingSpace.longitude(), dataParkingSpace.polygon(), OL_GISObjectType.PARKING); + String parkingSpaceType = dataParkingSpace.type().toString().substring(0, 1).toUpperCase() + dataParkingSpace.type().toString().substring(1).toLowerCase(); + parkingSpace.p_annotation = "Parkeerplek: " + parkingSpaceType + ", " + dataParkingSpace.additional_info(); + + //Set correct color and legend collection based on parking type + switch(dataParkingSpace.type()){ + case PRIVATE: + case DISABLED: + case KISS_AND_RIDE: + parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_private; + parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_private; + zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PRIVATE); + break; + case PUBLIC: + parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_public; + parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_public; + zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PUBLIC); + break; + case ELECTRIC: + parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_electric; + parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_electric; + zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.ELECTRIC); + break; + } + + //Add to ordered collection on the interface + zero_Interface.c_orderedParkingSpaces.add(parkingSpace); + + //Style gis object + parkingSpace.f_style(null, null, null, null); + + //Get energyProduction GC + GCEnergyProduction carportGC = findFirst(carportGCList, gc -> gc.p_parentNodeElectricID.equals(dataParkingSpace.gridnode_id())); + + if(carportGC == null){ // If non existend -> Create one. + carportGC = energyModel.add_EnergyProductionSites(); + + carportGC.p_gridConnectionID = "Parking space gridconnection: " + dataParkingSpace.parking_id(); + carportGC.v_liveConnectionMetaData.physicalCapacity_kW = dataParkingSpace.pv_potential_kwp(); + carportGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = 0.0; + carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataParkingSpace.pv_potential_kwp(); + + carportGC.v_liveConnectionMetaData.physicalCapacityKnown = false; + carportGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; + carportGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; + + carportGC.p_parentNodeElectricID = dataParkingSpace.gridnode_id(); + + carportGC.p_latitude = dataParkingSpace.latitude(); + carportGC.p_longitude = dataParkingSpace.longitude(); + + //Address + carportGC.p_address = new J_Address(); + carportGC.p_address.setStreetName(dataParkingSpace.street()); + + //CO + ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company + + COC.p_actorID = "Parking space connection owner: " + dataParkingSpace.parking_id(); + COC.p_connectionOwnerType = OL_ConnectionOwnerType.PARKINGSPACE_OP; + COC.p_detailedCompany = false; + COC.b_dataSharingAgreed = true; + + carportGC.p_owner = COC; + carportGC.p_ownerID = COC.p_actorID; + + //Add to collections + parkingSpace.c_containedGridConnections.add(carportGC); + carportGC.c_connectedGISObjects.add(parkingSpace); + carportGCList.add(carportGC); + } + else{ + carportGC.v_liveConnectionMetaData.physicalCapacity_kW += dataParkingSpace.pv_potential_kwp(); + carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW += dataParkingSpace.pv_potential_kwp(); + + //Add to collections + parkingSpace.c_containedGridConnections.add(carportGC); + carportGC.c_connectedGISObjects.add(parkingSpace); + } + + //Update pv potential of carport energy production site + carportGC.v_liveAssetsMetaData.PVPotential_kW += dataParkingSpace.pv_potential_kwp() != null ? dataParkingSpace.pv_potential_kwp() : 0; +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Solarfarm_data></ReturnType> + <Id>1749739602491</Id> + <Name>f_getSolarfarmsInSubScope</Name> + <X>50</X> + <Y>700</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialSolarfarmsList</Name> + <Type>List<Solarfarm_data></Type> + </Parameter> + <Body>List<Solarfarm_data> scopedSolarfarmsList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedSolarfarmsList.addAll(initialSolarfarmsList); +} +else{ + for (Solarfarm_data dataSolarfarm : initialSolarfarmsList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataSolarfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedSolarfarmsList.add(dataSolarfarm); + } + } + } +} +return scopedSolarfarmsList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Windfarm_data></ReturnType> + <Id>1750857080998</Id> + <Name>f_getWindfarmsInSubScope</Name> + <X>50</X> + <Y>720</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialWindfarmsList</Name> + <Type>List<Windfarm_data></Type> + </Parameter> + <Body>List<Windfarm_data> scopedWindfarmsList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedWindfarmsList.addAll(initialWindfarmsList); +} +else{ + for (Windfarm_data dataWindfarm : initialWindfarmsList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataWindfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedWindfarmsList.add(dataWindfarm); + } + } + } +} +return scopedWindfarmsList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Chargingstation_data></ReturnType> + <Id>1750857082460</Id> + <Name>f_getChargingstationsInSubScope</Name> + <X>50</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialChargingstationsList</Name> + <Type>List<Chargingstation_data></Type> + </Parameter> + <Body>List<Chargingstation_data> scopedChargingstationsList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedChargingstationsList.addAll(initialChargingstationsList); +} +else{ + for (Chargingstation_data dataChargingstation : initialChargingstationsList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataChargingstation.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedChargingstationsList.add(dataChargingstation); + } + } + } +} +return scopedChargingstationsList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Electrolyser_data></ReturnType> + <Id>1750857083468</Id> + <Name>f_getElectrolysersInSubScope</Name> + <X>50</X> + <Y>760</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialElectrolysersList</Name> + <Type>List<Electrolyser_data></Type> + </Parameter> + <Body>List<Electrolyser_data> scopedElectrolysersList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedElectrolysersList.addAll(initialElectrolysersList); +} +else{ + for (Electrolyser_data dataElectrolyser : initialElectrolysersList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataElectrolyser.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedElectrolysersList.add(dataElectrolyser); + } + } + } +} +return scopedElectrolysersList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<ParkingSpace_data></ReturnType> + <Id>1750857084547</Id> + <Name>f_getParkingSpacesInSubScope</Name> + <X>50</X> + <Y>800</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialParkingSpaceList</Name> + <Type>List<ParkingSpace_data></Type> + </Parameter> + <Body>List<ParkingSpace_data> scopedParkingSpacesList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedParkingSpacesList.addAll(initialParkingSpaceList); +} +else{ + for (ParkingSpace_data dataParkingSpace : initialParkingSpaceList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataParkingSpace.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedParkingSpacesList.add(dataParkingSpace); + } + } + } +} +return scopedParkingSpacesList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Battery_data></ReturnType> + <Id>1750861476829</Id> + <Name>f_getBatteriesInSubScope</Name> + <X>50</X> + <Y>780</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>initialBatteriesList</Name> + <Type>List<Battery_data></Type> + </Parameter> + <Body>List<Battery_data> scopedBatteriesList = new ArrayList<>(); + +if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ + scopedBatteriesList.addAll(initialBatteriesList); +} +else{ + for (Battery_data dataBattery : initialBatteriesList) { + for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ + if (dataBattery.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ + scopedBatteriesList.add(dataBattery); + } + } + } +} +return scopedBatteriesList;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>List<Building_data></ReturnType> + <Id>1752239414416</Id> + <Name>f_getSurveyGCBuildingData</Name> + <X>450</X> + <Y>180</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>companyGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>vallumGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>List<Building_data> connectedBuildingsData = new ArrayList<Building_data>(); + +if ( vallumGC.getPandIds() != null && !vallumGC.getPandIds().isEmpty()) { + for (var PID : vallumGC.getPandIds() ) { + List<Building_data> buildingsDataSameID = findAll(c_companyBuilding_data, b -> b.building_id().equals(PID.getValue())); + Building_data connectedBuildingData = null; + if(buildingsDataSameID.size() == 1){ // Only one building package with same id, so this building package belongs to this GC + connectedBuildingData = buildingsDataSameID.get(0); + } + else{//Multiple building packages with this building id -> Find the right one based on address, if none are found: pick a package without address + connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() != null && buildingData.house_number() == companyGC.p_address.getHouseNumber()); + if(connectedBuildingData == null){ //If no matching house numbers, find first object that has no house number. + connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() == null); + } + } + + if (connectedBuildingData != null) { + // Remove from company building data and add to survey + c_companyBuilding_data.remove(connectedBuildingData); + c_surveyCompanyBuilding_data.add(connectedBuildingData); + // Set trafo ID + companyGC.p_parentNodeElectricID = connectedBuildingData.gridnode_id(); + } + else if (map_buildingData_Vallum != null && !map_buildingData_Vallum.isEmpty()) { + // Create new building package + connectedBuildingData = f_createBuildingData_Vallum(companyGC, PID.getValue()); + c_vallumBuilding_data.add(connectedBuildingData); + } + + if (connectedBuildingData != null) { + connectedBuildingsData.add(connectedBuildingData); + } + } +} +else {// No building connected in zorm? -> check if it is manually connected in excel (using gc_id column) + connectedBuildingsData = findAll(c_companyBuilding_data, b -> b.gc_id() != null && b.gc_id().equals(companyGC.p_gridConnectionID)); + if(connectedBuildingsData == null || connectedBuildingsData.size() == 0){ + traceln("GC %s has no building in zorm and also no manual connection with building in excel", companyGC.p_gridConnectionID); + } + else{ + c_companyBuilding_data.removeAll(connectedBuildingsData); + } +} + +return connectedBuildingsData;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>J_ProfilePointer</ReturnType> + <Id>1753349205424</Id> + <Name>f_createEngineProfile1</Name> + <Description>Functie van gillis voor inladen weer data!</Description> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2419</X> + <Y>450</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>profileID</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>arguments</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>values</Name> + <Type>double[]</Type> + </Parameter> + <Parameter> + <Name>energyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); +J_ProfilePointer profilePointer; +if (energyModel.f_findProfile(profileID)!=null) { + profilePointer=energyModel.f_findProfile(profileID); + profilePointer.setTableFunction(tf_profile); +} else { + profilePointer = new J_ProfilePointer(profileID, tf_profile); + energyModel.f_addProfile(profilePointer); +} +return profilePointer;</Body> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753349205426</Id> + <Name>f_setEngineInputDataAfterDeserialisation</Name> + <Description>Functie van gillis voor inladen weer data!</Description> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2433</X> + <Y>260</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>deserializedEnergyModel.p_truckTripsCsv = inputCSVtruckTrips; +deserializedEnergyModel.p_householdTripsCsv = inputCSVhouseholdTrips; +deserializedEnergyModel.p_cookingPatternCsv = inputCSVcookingActivities; +deserializedEnergyModel.avgc_data = energyModel.avgc_data; +deserializedEnergyModel.c_defaultHeatingStrategies = energyModel.c_defaultHeatingStrategies;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>OL_GridConnectionHeatingType</ReturnType> + <Id>1753799111185</Id> + <Name>f_heatingSurveyCompany</Name> + <X>460</X> + <Y>260</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>// Set heatingType +OL_GridConnectionHeatingType heatingType = f_getHeatingTypeSurvey(engineGC, surveyGC); + +if(heatingType == OL_GridConnectionHeatingType.CUSTOM){ + f_addCustomHeatingSetup(engineGC, surveyGC); +} +else{ + // Create building profiles, peakHeatConsumption_kW is null if there is no heat consumption + Double peakHeatConsumption_kW = f_createSurveyHeatProfiles( engineGC, surveyGC, heatingType ); + + // Create EA conversions + if (peakHeatConsumption_kW != null) { + f_addHeatAsset(engineGC, heatingType, peakHeatConsumption_kW); + } + + if (surveyGC.getStorage() != null && surveyGC.getStorage().getHasThermalStorage() != null) { + //if (surveyGC.getStorage().getThermalStorageKw() != null) { + //double storagePower_kW = surveyGC.getStorage().getThermalStorageKw(); + //} + // TODO: find a way to determine the storage capacity + // f_addStorage(parentGC, storagePower_kw, storageCapacity_kWh, storageType); + } + + // Heating management (needs: heatingType & assets such as building thermal model or profiles, survey companies never have a thermal building mdoel) + boolean isGhost = heatingType != OL_GridConnectionHeatingType.NONE && peakHeatConsumption_kW == null; + + //Add heating management + engineGC.f_addHeatManagement(heatingType, isGhost); +} + +return heatingType;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>Double</ReturnType> + <Id>1753801098736</Id> + <Name>f_createSurveyHeatProfiles</Name> + <X>480</X> + <Y>320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Body>////Gas and Heating +if (surveyGC.getNaturalGas().getHasConnection() != null && surveyGC.getNaturalGas().getHasConnection() ) { + switch (heatingType) { + case HYBRID_HEATPUMP: + // Exception for hybrid heatpumps, when it will be a ghost asset make gas profile + if (!settings.createCurrentElectricityEA() && (engineGC.v_hasQuarterHourlyValues || f_surveyHasGasData(surveyGC)) ) { + f_createGasProfileFromSurvey( engineGC, surveyGC ); + return null; + } + else { + // We know there is no data, hence we directly call the estimate function + return f_createHeatProfileFromEstimates(engineGC); + } + case GAS_BURNER: + case GAS_CHP: + // heat consumption profiel + return f_createHeatProfileFromGasSurvey( engineGC, surveyGC, heatingType ); + default: + if (surveyGC.getNaturalGas().getPercentageUsedForHeating() != null && surveyGC.getNaturalGas().getPercentageUsedForHeating() != 0.0) { + // TODO: Find a solution to surveys filled in without heatingType that is not this hacky + if (surveyGC.getNaturalGas().getEan().equals("123456789012345678")) { + return null; + } + throw new RuntimeException("Gas data used for heating in survey, but no corresponding heating type"); + } + else { + f_createGasProfileFromSurvey( engineGC, surveyGC ); + return null; + } + } +} +else if ( heatingType == OL_GridConnectionHeatingType.DISTRICTHEAT || heatingType == OL_GridConnectionHeatingType.LT_DISTRICTHEAT ) { + return f_createHeatProfileFromSurvey(engineGC, surveyGC); +} +else if ( heatingType == OL_GridConnectionHeatingType.NONE ) { + return null; +} +else { + if(!settings.createCurrentElectricityEA() && engineGC.v_hasQuarterHourlyValues){ + if(heatingType == OL_GridConnectionHeatingType.HYBRID_HEATPUMP){ + return null; // Could create an estimated gas profile here: not done for now. + } + if(heatingType == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP){ + return null; + } + } + return f_createHeatProfileFromEstimates(engineGC); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1753803212846</Id> + <Name>f_surveyHasGasData</Name> + <X>500</X> + <Y>340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>if ( surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { + return true; +} +else if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { + return true; +} +else { + return false; +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753804393557</Id> + <Name>f_createGasProfileFromGasTS</Name> + <X>520</X> + <Y>380</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>// Gas delivery profile in m3 +double[] profile_m3 = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getNaturalGas().getHourlyDelivery_m3()); + +//Calculate yearly gas delivery +double yearlyGasDelivery_m3 = Arrays.stream(profile_m3).sum(); + +// We assume all delivery is consumption and convert m3 to kWh +ZeroMath.arrayMultiply(profile_m3, avgc_data.p_gas_kWhpm3); +// Then we create the profile asset and name it +J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.METHANE, profile_m3, null, energyModel.p_timeStep_h); +j_ea.energyAssetName = engineGC.p_ownerID + " custom gas profile"; + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753449467888</Id> + <Name>f_reconstructGridConnections</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2433.333</X> + <Y>302</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>ArrayList<GridConnection> allConnections = new ArrayList<>(); +allConnections.addAll(deserializedEnergyModel.c_gridConnections); +allConnections.addAll(deserializedEnergyModel.c_pausedGridConnections); + +for(GridConnection GC : allConnections){ + GC.energyModel = deserializedEnergyModel; + if (GC instanceof GCHouse){ + //toMove.add(GC); + f_reconstructAgent(GC, deserializedEnergyModel.Houses, deserializedEnergyModel); + } else if (GC instanceof GCEnergyProduction) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyProductionSites, deserializedEnergyModel); + } else if (GC instanceof GCEnergyConversion) { + f_reconstructAgent(GC, deserializedEnergyModel.EnergyConversionSites, deserializedEnergyModel); + } else if (GC instanceof GCGridBattery) { + f_reconstructAgent(GC, deserializedEnergyModel.GridBatteries, deserializedEnergyModel); + } else if (GC instanceof GCNeighborhood) { + f_reconstructAgent(GC, deserializedEnergyModel.Neighborhoods, deserializedEnergyModel); + } else if (GC instanceof GCPublicCharger) { + f_reconstructAgent(GC, deserializedEnergyModel.PublicChargers, deserializedEnergyModel); + } else if (GC instanceof GCUtility) { + f_reconstructAgent(GC, deserializedEnergyModel.UtilityConnections, deserializedEnergyModel); + } + //GC.f_startAfterDeserialisation(); +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753883660006</Id> + <Name>f_createHeatProfileFromAnnualGasTotal</Name> + <X>900</X> + <Y>365</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Parameter> + <Name>yearlyGasDelivery_m3</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>ratioGasUsedForHeating</Name> + <Type>double</Type> + </Parameter> + <Body>// First check what the heat conversion efficiency is from gas +double gasToHeatEfficiency = f_getGasToHeatEfficiency(heatingType); +// Finally, multiply the gas delivery with the total conversion factor to get the heat consumption +double yearlyConsumptionHeat_kWh = yearlyGasDelivery_m3 * avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating; +// We assume the heat consumption follows a standard profile +String profileName = "default_building_heat_demand_fr"; +J_ProfilePointer profilePointer = energyModel.f_findProfile(profileName); +new J_EAConsumption(engineGC, OL_EnergyAssetType.HEAT_DEMAND, profileName, yearlyConsumptionHeat_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, profilePointer); + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +} + +return yearlyConsumptionHeat_kWh * max(profilePointer.getAllValues())/energyModel.p_timeStep_h;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753883738731</Id> + <Name>f_createGasProfileFromAnnualGasTotal</Name> + <X>900</X> + <Y>320</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyGasDelivery_m3</Name> + <Type>double</Type> + </Parameter> + <Body>// We assume all delivery is consumption and convert m3 to kWh +double yearlyGasConsumption_kWh = yearlyGasDelivery_m3 * avgc_data.p_gas_kWhpm3; +// We assume the gas consumption follows a standard heat consumption profile +String profileName = "default_building_heat_demand_fr"; +new J_EAConsumption(engineGC, OL_EnergyAssetType.METHANE_DEMAND, profileName, yearlyGasConsumption_kWh, OL_EnergyCarriers.METHANE, energyModel.p_timeStep_h, null); + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753449467890</Id> + <Name>f_reconstructEnergyModel</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2433.333</X> + <Y>282</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>energyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>// Code Instead of Agent.goToPopulation() (which resets all parameters to default!) +/* +try{ // Reflection trick to get to Agent.owner private field + energyModel.forceSetOwner(energyModel, pop_energyModels); +} catch (Exception e) { + e.printStackTrace(); +} +*/ + +Agent root = this.getRootAgent(); +energyModel.restoreOwner(this); + +energyModel.setEngine(getEngine()); +energyModel.instantiateBaseStructure_xjal(); +energyModel.setEnvironment(this.getEnvironment()); + +traceln("EnergyModel owner: %s", energyModel.getOwner()); + +energyModel.create(); // What does this do? Does it affect default values? +//energyModel.start(); // Why is this needed?</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753884183970</Id> + <Name>f_createGasProfileFromSurvey</Name> + <X>500</X> + <Y>360</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { + f_createGasProfileFromGasTS( engineGC, surveyGC ); +} +else if (surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { + double yearlyGasDelivery_m3 = surveyGC.getNaturalGas().getAnnualDelivery_m3(); + f_createGasProfileFromAnnualGasTotal( engineGC, yearlyGasDelivery_m3 ); +} +else { + f_createGasProfileFromEstimates( engineGC ); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753884186444</Id> + <Name>f_createHeatProfileFromGasSurvey</Name> + <X>500</X> + <Y>400</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Body>if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { + return f_createHeatProfileFromGasTS( engineGC, surveyGC, heatingType ); +} +else if ( surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { + double yearlyGasDelivery_m3 = surveyGC.getNaturalGas().getAnnualDelivery_m3(); + double ratioGasUsedForHeating = f_getRatioGasUsedForHeating(surveyGC); + return f_createHeatProfileFromAnnualGasTotal( engineGC, heatingType, yearlyGasDelivery_m3, ratioGasUsedForHeating ); +} +else { + return f_createHeatProfileFromEstimates( engineGC ); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753949286953</Id> + <Name>f_createHeatProfileFromGasTS</Name> + <X>520</X> + <Y>420</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Body>// Gas profile +double[] profile_m3 = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getNaturalGas().getHourlyDelivery_m3()); + +double yearlyGasDelivery_m3 = Arrays.stream(profile_m3).sum(); + +// First check what the heat conversion efficiency is from gas +double gasToHeatEfficiency = f_getGasToHeatEfficiency(heatingType); +// Then check which part of the gas consumption is used for heating +double ratioGasUsedForHeating = f_getRatioGasUsedForHeating(surveyGC); +// Finally, multiply the gas profile with the total conversion factor to get the heat profile +double[] profile_kWh = ZeroMath.arrayMultiply(profile_m3, avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating); +// Then we create the profile asset and name it +J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.HEAT, profile_kWh, null , energyModel.p_timeStep_h); +j_ea.energyAssetName = engineGC.p_ownerID + " custom building heat profile"; + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +} + +return max(profile_m3)/energyModel.p_timeStep_h;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753449467892</Id> + <Name>f_reconstructAgent</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2445</X> + <Y>379</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>agent</Name> + <Type>Agent</Type> + </Parameter> + <Parameter> + <Name>pop</Name> + <Type>AgentArrayList</Type> + </Parameter> + <Parameter> + <Name>energyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>/* // Code Instead of Agent.goToPopulation() (which resets many variables to default!) +try{ // Reflection trick to get to Agent.owner private field + if (agent instanceof GridNode) { + ((GridNode)agent).forceSetOwner(agent,pop); + } else if (agent instanceof GridConnection) { + ((GridConnection)agent).forceSetOwner(agent,pop); + } else if (agent instanceof Actor) { + ((Actor)agent).forceSetOwner(agent,pop); + } else if (agent instanceof GIS_Object) { + ((GIS_Object)agent).forceSetOwner(agent,pop); + } +} catch (Exception e) { + e.printStackTrace(); +}*/ + +agent.restoreOwner(energyModel); // simply sets agent.d = root, should replace reflection hack +agent.restoreCollection_xjal(pop); // simple sets agent.j = pop, should replace reflection hack + +agent.setEngine(getEngine()); +agent.instantiateBaseStructure_xjal(); +agent.setEnvironment(pop.getEnvironment()); + +pop._add(agent); // Add to the population +//int popSize = pop.size(); +//pop.callCreate(agent, popSize); // Update population object +agent.create();</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753951013582</Id> + <Name>f_getGasToHeatEfficiency</Name> + <X>920</X> + <Y>385</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>heatingType</Name> + <Type>OL_GridConnectionHeatingType</Type> + </Parameter> + <Body>switch (heatingType){ + case GAS_BURNER: + case HYBRID_HEATPUMP: + return avgc_data.p_avgEfficiencyGasBurner_fr; + case GAS_CHP: + return avgc_data.p_avgEfficiencyCHP_thermal_fr; + default: + throw new RuntimeException("Unable to find Gas to Heat efficiency of heatingType: " + heatingType); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753951039103</Id> + <Name>f_getRatioGasUsedForHeating</Name> + <X>540</X> + <Y>440</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>if (surveyGC.getNaturalGas().getPercentageUsedForHeating() != null) { + return surveyGC.getNaturalGas().getPercentageUsedForHeating() / 100.0; +} +else { + return 1.0; +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753955686832</Id> + <Name>f_createGasProfileFromEstimates</Name> + <X>900</X> + <Y>340</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>double yearlyGasDelivery_m3 = engineGC.p_floorSurfaceArea_m2 * avgc_data.p_avgCompanyGasConsumption_m3pm2; +f_createGasProfileFromAnnualGasTotal(engineGC, yearlyGasDelivery_m3); + +if(engineGC.p_owner.p_detailedCompany){ + p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753961830063</Id> + <Name>f_createHeatProfileFromEstimates</Name> + <X>900</X> + <Y>430</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Body>double yearlyGasConsumption_m3 = engineGC.p_floorSurfaceArea_m2 * avgc_data.p_avgCompanyGasConsumption_m3pm2; +double yearlyHeatConsumption_kWh = yearlyGasConsumption_m3 * avgc_data.p_gas_kWhpm3; +return f_createHeatProfileFromAnnualHeatTotal( engineGC, yearlyHeatConsumption_kWh );</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753964366889</Id> + <Name>f_createHeatProfileFromHeatTS</Name> + <X>520</X> + <Y>480</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>// Heat profile +double[] profile = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getHeat().getHeatDeliveryTimeSeries_kWh()); +// We multiply by the delivery set efficiency to go from delivery to consumption +// TODO: Fix this for LT_DISTRICTHEAT, they have a different efficiency! +ZeroMath.arrayMultiply(profile, avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr); +// Then we create the profile asset and name it +J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.HEAT, profile, null , energyModel.p_timeStep_h); +j_ea.energyAssetName = engineGC.p_ownerID + " custom building heat profile"; + +return max(profile)/energyModel.p_timeStep_h;</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753449467894</Id> + <Name>f_reconstructGridConnections1</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2420</X> + <Y>480</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>energyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>// Code Instead of Agent.goToPopulation() (which resets many variables to default!) +GC.energyModel = energyModel; +try{ // Reflection trick to get to Agent.owner private field + GC.forceSetOwner(GC,pop); +} catch (Exception e) { + e.printStackTrace(); +} + +traceln("GC owner: %s", GC.getOwner()); +GC.setEngine(getEngine()); +GC.instantiateBaseStructure_xjal(); +GC.setEnvironment(pop.getEnvironment()); + +pop._add(GC); // Add to the population +int popSize = pop.size(); +pop.callCreate(GC, popSize); // Update population object +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753451091785</Id> + <Name>f_addMixins_old</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2740</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>v_objectMapper.addMixIn(Agent.class, AgentMixin.class); +v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); +//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); +//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); +//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); +v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); + +v_objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, IgnoreClassMixin.class); +//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); + +// Weirdness regarding material handling toolbox +v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753964605708</Id> + <Name>f_createHeatProfileFromAnnualHeatTotal</Name> + <X>900</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>yearlyConsumptionHeat_kWh</Name> + <Type>double</Type> + </Parameter> + <Body>// We assume the heat consumption follows a standard profile +String profileName = "default_building_heat_demand_fr"; +J_ProfilePointer profilePointer = energyModel.f_findProfile(profileName); +new J_EAConsumption(engineGC, OL_EnergyAssetType.HEAT_DEMAND, profileName, yearlyConsumptionHeat_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, profilePointer); + +return yearlyConsumptionHeat_kWh * max(profilePointer.getAllValues())/energyModel.p_timeStep_h;</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753964654729</Id> + <Name>f_createHeatProfileFromSurvey</Name> + <X>500</X> + <Y>460</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>if (surveyGC.getHeat() != null && surveyGC.getHeat().getHeatDeliveryTimeSeries_kWh() != null) { + return f_createHeatProfileFromHeatTS(engineGC, surveyGC); +} +else if (surveyGC.getHeat() != null && surveyGC.getHeat().getAnnualDistrictHeatingDelivery_GJ() != null) { + double yearlyHeatDelivery_kWh = surveyGC.getHeat().getAnnualDistrictHeatingDelivery_GJ()*277.777778 ; + // TODO: Fix this for LT_DISTRICTHEAT, they have a different efficiency! + double yearlyHeatConsumption_kWh = yearlyHeatDelivery_kWh * avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; + return f_createHeatProfileFromAnnualHeatTotal(engineGC, yearlyHeatConsumption_kWh); +} +else { + return f_createHeatProfileFromEstimates(engineGC); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753968816374</Id> + <Name>f_setDefaultHeatingStrategies</Name> + <X>80</X> + <Y>170</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>// Triples ( heatingType, hasThermalBuilding, hasHeatBuffer ) +Triple<OL_GridConnectionHeatingType, Boolean, Boolean> triple = null; + +triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrol.class ); +triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrol.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementProfileHybridHeatPump.class ); +triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrolHybridHeatpump.class ); +triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrolHybridHeatpump.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); + +triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, false, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, true, false); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); +triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, true, true); +energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class );</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754048849906</Id> + <Name>f_addCustomHeatingSetup</Name> + <X>480</X> + <Y>300</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>engineGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>surveyGC</Name> + <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> + </Parameter> + <Body>throw new RuntimeException("HeatingType is CUSTOM. You must override the function: f_addCustomHeatingSetup!");</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753712630322</Id> + <Name>f_reconstructActors</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2433</X> + <Y>322</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Body>for(Actor AC : deserializedEnergyModel.c_actors){ + + if (AC instanceof ConnectionOwner) { + ((ConnectionOwner)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_connectionOwners, deserializedEnergyModel); + } else if (AC instanceof EnergySupplier) { + ((EnergySupplier)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energySuppliers, deserializedEnergyModel); + } else if (AC instanceof EnergyCoop) { + ((EnergyCoop)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_energyCoops, deserializedEnergyModel); + //((EnergyCoop)AC).f_startAfterDeserialisation(); + } else if (AC instanceof GridOperator) { + ((GridOperator)AC).energyModel = deserializedEnergyModel; + f_reconstructAgent(AC, deserializedEnergyModel.pop_gridOperators, deserializedEnergyModel); + } + } +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1754050106254</Id> + <Name>f_addCustomHeatAsset</Name> + <X>920</X> + <Y>520</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>parentGC</Name> + <Type>GridConnection</Type> + </Parameter> + <Parameter> + <Name>maxHeatOutputPower_kW</Name> + <Type>double</Type> + </Parameter> + <Body>throw new RuntimeException("HeatingType is CUSTOM. You must override the function: f_addCustomHeatAsset!");</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753712697685</Id> + <Name>f_reconstructGIS_Objects</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2433</X> + <Y>362</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Parameter> + <Name>c_GISObjects</Name> + <Type>ArrayList<GIS_Object></Type> + </Parameter> + <Body>for(GIS_Object GO : c_GISObjects){ + GO.gisRegion = c_GISregions.get(GO.p_id); + + if (GO instanceof GIS_Building) { + ((GIS_Building)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Buildings, deserializedEnergyModel); + } else if (GO instanceof GIS_Parcel) { + ((GIS_Parcel)GO).energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Parcels, deserializedEnergyModel); + } else { + GO.energyModel = deserializedEnergyModel; + f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Objects, deserializedEnergyModel); + //GO.f_startAfterDeserialisation(); + } + GO.f_resetStyle(); +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1753712761420</Id> + <Name>f_reconstructGridNodes</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2433</X> + <Y>342</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>deserializedEnergyModel</Name> + <Type>EnergyModel</Type> + </Parameter> + <Parameter> + <Name>c_gridNodes</Name> + <Type>ArrayList<GridNode></Type> + </Parameter> + <Body>for(GridNode GN : c_gridNodes){ + GN.energyModel = deserializedEnergyModel; + f_reconstructAgent(GN, deserializedEnergyModel.pop_gridNodes, deserializedEnergyModel); +} +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1755866291695</Id> + <Name>f_addCarsToHouses</Name> + <X>460</X> + <Y>720</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>house</Name> + <Type>GCHouse</Type> + </Parameter> + <Body>double probabilityForLeftOverCar = house.p_eigenOprit ? v_probabilityForAdditionalCar_privateParking : v_probabilityForAdditionalCar_publicParking; +int amountOfOwnedCars = (int) floor(avgc_data.p_avgNrOfCarsPerHouse) + (randomTrue(probabilityForLeftOverCar) ? 1 : 0); + +////Create Vehicles based on the amount of owned cars +for(int i = 0; i < amountOfOwnedCars ; i++){ + double tripTrackerScaling = 1; + + if(i>0){//If more than 1 car: 2+ cars all have smaller travel average travel distance + tripTrackerScaling *= avgc_data.p_avgAnnualTravelDistanceSecondVSFirstCar_fr; + } + //Oprit? -> only then you should have a chance to start with EV (public ev is not supported by sliders, public chargepoint is then used instead) + if( house.p_eigenOprit){ + if (randomTrue( avgc_data.p_shareOfElectricVehicleOwnership)){ + J_EAEV ev = f_addElectricVehicle(house, OL_EnergyAssetType.ELECTRIC_VEHICLE, true, 0, 0); + ev.tripTracker.setAnnualDistance_km(ev.tripTracker.getAnnualDistance_km()*tripTrackerScaling); + } + else{ + J_EADieselVehicle dieselVehicle = f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); + dieselVehicle.tripTracker.setAnnualDistance_km(dieselVehicle.tripTracker.getAnnualDistance_km()*tripTrackerScaling); + } + } + else { + J_EADieselVehicle dieselVehicle = f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); + dieselVehicle.tripTracker.setAnnualDistance_km(dieselVehicle.tripTracker.getAnnualDistance_km()*tripTrackerScaling); + } +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1755876470177</Id> + <Name>f_calculateProbabilitiesForAdditionalCar</Name> + <X>440</X> + <Y>660</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>buildingDataHouses</Name> + <Type>List<Building_data></Type> + </Parameter> + <Body>//Precalculate the amount of households and households that have private parking for vehicle distribution +int totalNumberOfHouses = 0; +int numberOfHousesPrivateParking = 0; +for (Building_data houseBuildingData : buildingDataHouses) { + totalNumberOfHouses++; + if(houseBuildingData.has_private_parking() != null && houseBuildingData.has_private_parking()){ + numberOfHousesPrivateParking++; + } +} + +//Determine the total cars in the area based on the average of the area +int totalCars = roundToInt(avgc_data.p_avgNrOfCarsPerHouse * totalNumberOfHouses); +int numberOfHousesPublicParking = totalNumberOfHouses - numberOfHousesPrivateParking; + +//Calculate the base number of cars that everyone gets, and the total leftover cars that should be distributed +int baseCars = (int) floor(avgc_data.p_avgNrOfCarsPerHouse); +int leftOverCars = totalCars - baseCars * totalNumberOfHouses; + +// Determine leftover cars distributed for private and public parking (bias to private parking) +int leftOverForPrivateParking = min(leftOverCars, numberOfHousesPrivateParking); +int leftOverForPublicParking = max(0, leftOverCars - leftOverForPrivateParking); + +//Calculate the leftover car probability for private and public parking +v_probabilityForAdditionalCar_privateParking = ((double) leftOverForPrivateParking) / numberOfHousesPrivateParking; // Calculate probability for leftover car for private parking +v_probabilityForAdditionalCar_publicParking = ((double) leftOverForPublicParking) / numberOfHousesPublicParking; // Calculate probability for leftover car for public parking +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1756395236522</Id> + <Name>f_initializeInterfacePointers</Name> + <X>30</X> + <Y>950</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Set parameters/pointers in the interface +zero_Interface.zero_loader = this; +zero_Interface.energyModel = energyModel; +zero_Interface.uI_Results.energyModel = energyModel; +zero_Interface.project_data = project_data; +zero_Interface.settings = settings; +zero_Interface.user = user; +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1756735137677</Id> + <Name>f_reconstructOrderedCollections</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2430</X> + <Y>400</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>saveObject</Name> + <Type>J_ModelSave</Type> + </Parameter> + <Body>zero_Interface.c_orderedPVSystemsCompanies = saveObject.c_orderedPVSystemsCompanies; +zero_Interface.c_orderedPVSystemsHouses = saveObject.c_orderedPVSystemsHouses; +zero_Interface.c_orderedVehicles = saveObject.c_orderedVehicles; +zero_Interface.c_orderedHeatingSystemsCompanies = saveObject.c_orderedHeatingSystemsCompanies; +zero_Interface.c_orderedHeatingSystemsHouses = saveObject.c_orderedHeatingSystemsHouses; +zero_Interface.c_orderedVehiclesPrivateParking = saveObject.c_orderedVehiclesPrivateParking; +zero_Interface.c_orderedParkingSpaces = saveObject.c_orderedParkingSpaces; +zero_Interface.c_orderedV1GChargers = saveObject.c_orderedV1GChargers; +zero_Interface.c_orderedV2GChargers = saveObject.c_orderedV2GChargers; +zero_Interface.c_orderedPublicChargers = saveObject.c_orderedPublicChargers; +zero_Interface.c_mappingOfVehiclesPerCharger = saveObject.c_mappingOfVehiclesPerCharger; +zero_Interface.c_scenarioMap_Current = saveObject.c_scenarioMap_Current; +zero_Interface.c_scenarioMap_Future = saveObject.c_scenarioMap_Future; + + +/* +List<ConnectionOwner> c_COCompanies = findAll(zero_Interface.energyModel.pop_connectionOwners, p -> p.p_connectionOwnerType == OL_ConnectionOwnerType.COMPANY); + + +int i = 0; +for (ConnectionOwner CO : c_COCompanies) { + UI_company companyUI = zero_Interface.c_companyUIs.get(CO.p_connectionOwnerIndexNr); + companyUI.p_company = CO; + companyUI.c_ownedGridConnections = companyUI.p_company.f_getOwnedGridConnections(); + companyUI.c_additionalVehicles = saveObject.c_additionalVehicleHashMaps.get(i); + companyUI.f_setSelectedGCSliders(); + i++; +} +*/ +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1758714675284</Id> + <Name>f_getSimulationTimeVariables</Name> + <X>80</X> + <Y>110</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//Sim start year +v_simStartYear = getExperiment().getEngine().getStartDate().getYear() + 1900; // 1900 years because of Java convention + +// Create date at start of simulation year to use to calculate v_simStartHour_h +Date d = new Date(); +d.setYear(v_simStartYear - 1900); // 1900 jaar Compenseren door anylogic bug +d.setMonth(0); +d.setHours(0); +d.setSeconds(0); +d.setMinutes(0); +d.setDate(1); + +//Calculate sim start hour +v_simStartHour_h = roundToInt((getExperiment().getEngine().getStartDate().getTime() - d.getTime())/1000.0/60/60); //Get time is in ms -> converted into hours + +//Fix for if start is within summer time, the v_simStartHour_h is not correct anymore +double summerTimeStart_h = avgc_data.map_yearlySummerWinterTimeStartHour.get(v_simStartYear).getFirst(); +double winterTimeStart_h = avgc_data.map_yearlySummerWinterTimeStartHour.get(v_simStartYear).getSecond(); +if(v_simStartHour_h > summerTimeStart_h && v_simStartHour_h < winterTimeStart_h){ + v_simStartHour_h += 1; +} + + + +//Set sim duration if it is set +if(getExperiment().getEngine().getStopDate() != null){ //If experiment has set time, it gets bias + v_simDuration_h = roundToInt(((double)getExperiment().getEngine().getStopDate().getTime() - getExperiment().getEngine().getStartDate().getTime())/1000.0/60/60); //Get time is in ms -> converted into hours + if(v_simStartHour_h > summerTimeStart_h && v_simStartHour_h + v_simDuration_h > winterTimeStart_h){//Compensate if start time is in summer time, and end time is in winter time -> simulation would otherwise have 1 hour too much + v_simDuration_h -= 1; + } + if(v_simStartHour_h < summerTimeStart_h && v_simStartHour_h + v_simDuration_h < winterTimeStart_h){//Compensate if start time is in winter time, and end time is in summer time -> simulation would otherwise have 1 hour too less + v_simDuration_h += 1; + } +} +else if(settings.simDuration_h() != null){//Else if manual set, use that instead + v_simDuration_h = settings.simDuration_h(); +} + +if (v_simStartHour_h % 24 != 0) { + throw new RuntimeException("Impossible to run a model that does not start at midnight. Please check the start in the simulation settings."); +} +if (v_simDuration_h % 24 != 0) { + throw new RuntimeException("Impossible to run a model that does not have a runtime that is an exact multiple of a day. Please check the start and endtime in the simulation settings."); +}</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1759128970777</Id> + <Name>f_addMixins</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2450</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>v_objectMapper.addMixIn(Agent.class, AgentMixin.class); +//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); + +//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); +//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); + +//Ignore classes + +v_objectMapper.addMixIn(java.awt.Font.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(java.awt.Color.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(java.awt.Paint.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeLine.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeLineFill.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ShapeText.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(DataSet.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(Level.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(TableFunction.class, IgnoreClassMixin.class); +//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeModelElementsGroup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeButton.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.analysis.TimePlot.class, IgnoreClassMixin.class); + + +// Weirdness regarding material handling toolbox +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); +v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1759133710571</Id> + <Name>f_loadScenario</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2430</X> + <Y>230</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>index</Name> + <Type>int</Type> + </Parameter> + <Body>if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { + zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's in te laden. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); + return; +} +traceln("Loading modelSave..."); +//pauseSimulation(); + +// Collect GIS_Objects into hashmap, to link to new EnergyModel. +zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +pauseSimulation(); +try { + v_objectMapper = new ObjectMapper(); + f_addMixins(); + + var repository = UserScenarioRepository.builder() + .userId(UUID.fromString(zero_Interface.user.userIdToken())) + .modelName(zero_Interface.project_data.project_name()) + .build(); + + var scenarioList = repository.listUserScenarios(); + + // Deserialize the JSON into a new EnergyModel instance: + var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(index).getId()); + + /*int n = 200; // how many characters you want + byte[] buffer = new byte[n]; + int read = jsonStream.read(buffer, 0, n); + + if (read > 0) { + String preview = new String(buffer, 0, read, "UTF-8"); + System.out.println(preview); + }*/ + + //jsonStream.close(); + + //traceln("jsonStream: %s", jsonStream.toString().substring(0,30)); + J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); + //J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); + + EnergyModel deserializedEnergyModel = saveObject.energyModel; + + // Reconstruct all Agents + f_reconstructEnergyModel(deserializedEnergyModel); + f_reconstructGridConnections(deserializedEnergyModel); + f_reconstructActors(deserializedEnergyModel); + f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); + + f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); + + // Get profilePointer tableFunctions from 'original' energyModel + deserializedEnergyModel.c_profiles.forEach(x->{ + J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); + x.setTableFunction(origProfile.getTableFunction()); + }); + // get heatingTypeHashmap from 'old' energyModel. + deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; + + zero_Interface.zero_loader.energyModel = deserializedEnergyModel; + zero_Interface.energyModel = deserializedEnergyModel; + zero_Interface.uI_Results.energyModel = deserializedEnergyModel; + uI_Results.energyModel = deserializedEnergyModel; + + deserializedEnergyModel.f_startAfterDeserialisation(); + + f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); + + + // Putting back the ordered collections in the interface + f_reconstructOrderedCollections(saveObject); + + //zero_Interface.f_clearSelectionAndSelectEnergyModel(); + + /* + zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); + uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); + zero_Interface.f_updateMainInterfaceSliders(); + + zero_Interface.f_resetSettings(); + */ + + ///button_exit.action(); + + ///zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); + // v_energyHubCoop not updated to point to 'new' coop + //uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); + + ///zero_Interface.f_simulateYearFromMainInterface(); + + v_energyHubCoop = findFirst(zero_Interface.energyModel.pop_energyCoops,x->x.p_actorID.equals("eHubConfiguratorCoop")); + if (v_energyHubCoop == null){ + throw new RuntimeException("No energyCoop found with p_actorID = eHubConfiguratorCoop"); + } + zero_Interface.v_customEnergyCoop = v_energyHubCoop; + // Update the E-Hub Dashboard with the loaded E-Hub from savefile + f_initializeEnergyHubMemberNames(); + uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); + uI_Results.f_updateResultsUI(v_energyHubCoop); + + // Update the main interface with the loaded E-Hub from savefile + zero_Interface.c_selectedGridConnections = new ArrayList<>(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()); + + // Reset all colors on the GIS map + zero_Interface.energyModel.pop_GIS_Buildings.forEach(x -> zero_Interface.f_styleAreas(x)); + zero_Interface.energyModel.pop_GIS_Objects.forEach(x -> zero_Interface.f_styleAreas(x)); + zero_Interface.energyModel.pop_GIS_Parcels.forEach(x -> zero_Interface.f_styleAreas(x)); + + // Color all selected GC + for (GridConnection gc : zero_Interface.c_selectedGridConnections) { + gc.c_connectedGISObjects.forEach(x -> x.gisRegion.setFillColor(zero_Interface.v_selectionColor)); + } + + // Simulate a year + gr_simulateYearEnergyHub.setVisible(false); + gr_loadIconYearSimulationEnergyHub.setVisible(true); + + + zero_Interface.f_simulateYearFromMainInterface(); + + traceln("ModelSave loaded succesfully!"); + + //zero_Interface.b_inEnergyHubSelectionMode = true; + //zero_Interface.f_finalizeEnergyHubConfiguration(); + + //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); + + /* + Date startDate = getExperiment().getEngine().getStartDate(); + int day = getExperiment().getEngine().getDayOfMonth(); + int month = getExperiment().getEngine().getMonth(); + traceln("day: " + day); + traceln("month: " + month); + startDate.setMonth(startDate.getMonth() - month); + startDate.setDate(startDate.getDate() - day); + getExperiment().getEngine().setStartDate(startDate); + */ + +} catch (IOException e) { + e.printStackTrace(); +} + +</Body> + </Function> + <Function AccessType="protected" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>java.util.UUID</ReturnType> + <Id>1762185034341</Id> + <Name>f_getUserUUID</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2630</X> + <Y>70</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>p_userIdToken</Name> + <Type>String</Type> + </Parameter> + <Body>java.util.UUID usedId = new JWTDecoder().jwtToUserId(p_userIdToken); +return usedId; +</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1763646792610</Id> + <Name>f_getAccessOfSurveyGC</Name> + <X>450</X> + <Y>160</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>dataSharingAgreed</Name> + <Type>boolean</Type> + </Parameter> + <Parameter> + <Name>companyUUID</Name> + <Type>UUID</Type> + </Parameter> + <Body>// If public model: only dataSharingAgreed matters +if (settings.isPublicModel()) { + return dataSharingAgreed; +} + +// If private model: several conditions allow access +return user.GCAccessType == OL_UserGCAccessType.FULL || + dataSharingAgreed || + user.accessibleCompanyIDs.contains(companyUUID.toString());</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>boolean</ReturnType> + <Id>1763648128875</Id> + <Name>f_isLocatedInActiveNBH</Name> + <X>1550</X> + <Y>440</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>lat</Name> + <Type>double</Type> + </Parameter> + <Parameter> + <Name>lon</Name> + <Type>double</Type> + </Parameter> + <Body>if(user.NBHAccessType == OL_UserNBHAccessType.FULL){ + return true; +} +else{ + for(GIS_Object activeNBH : c_activeNBH){ + if(activeNBH.gisRegion.contains(lat, lon)){ + return true; + } + } + return false; +}</Body> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1763648249772</Id> + <Name>f_removeObjectsNotInActiveNBH</Name> + <X>1550</X> + <Y>460</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body>//GridNodes +for(GridNode_data dataGN : new ArrayList<GridNode_data>(c_gridNode_data)){ + if(!dataGN.gridnode_id().equals("T0") && !f_isLocatedInActiveNBH(dataGN.latitude(), dataGN.longitude())){ + c_gridNode_data.remove(dataGN); + } +} + +//Buildings +for(Building_data dataCompanyBuilding : new ArrayList<Building_data>(c_companyBuilding_data)){ + if(!f_isLocatedInActiveNBH(dataCompanyBuilding.latitude(), dataCompanyBuilding.longitude())){ + c_companyBuilding_data.remove(dataCompanyBuilding); + } +} +for(Building_data dataCompanyBuilding : new ArrayList<Building_data>(c_houseBuilding_data)){ + if(!f_isLocatedInActiveNBH(dataCompanyBuilding.latitude(), dataCompanyBuilding.longitude())){ + c_houseBuilding_data.remove(dataCompanyBuilding); + } +} +for(Building_data dataCompanyBuilding : new ArrayList<Building_data>(c_remainingBuilding_data)){ + if(!f_isLocatedInActiveNBH(dataCompanyBuilding.latitude(), dataCompanyBuilding.longitude())){ + c_remainingBuilding_data.remove(dataCompanyBuilding); + } +} + +//EA GCs +for(Solarfarm_data dataSF : new ArrayList<Solarfarm_data>(c_solarfarm_data)){ + if(!f_isLocatedInActiveNBH(dataSF.latitude(), dataSF.longitude())){ + c_solarfarm_data.remove(dataSF); + } +} +for(Windfarm_data dataWF : new ArrayList<Windfarm_data>(c_windfarm_data)){ + if(!f_isLocatedInActiveNBH(dataWF.latitude(), dataWF.longitude())){ + c_windfarm_data.remove(dataWF); + } +} +for(Battery_data dataBattery : new ArrayList<Battery_data>(c_battery_data)){ + if(!f_isLocatedInActiveNBH(dataBattery.latitude(), dataBattery.longitude())){ + c_battery_data.remove(dataBattery); + } +} +for(Chargingstation_data dataCS : new ArrayList<Chargingstation_data>(c_chargingstation_data)){ + if(!f_isLocatedInActiveNBH(dataCS.latitude(), dataCS.longitude())){ + c_chargingstation_data.remove(dataCS); + } +} + +//Additional GIS Objects +for(ParkingSpace_data dataParking : new ArrayList<ParkingSpace_data>(c_parkingSpace_data)){ + if(!f_isLocatedInActiveNBH(dataParking.latitude(), dataParking.longitude())){ + c_parkingSpace_data.remove(dataParking); + } +} +for(Parcel_data dataParcel : new ArrayList<Parcel_data>(c_parcel_data)){ + if(!f_isLocatedInActiveNBH(dataParcel.latitude(), dataParcel.longitude())){ + c_parcel_data.remove(dataParcel); + } +} +for(Cable_data dataCable : new ArrayList<Cable_data>(c_cable_data)){ + if(!f_isLocatedInActiveNBH(dataCable.latitude(), dataCable.longitude())){ + c_cable_data.remove(dataCable); + } +} +</Body> + </Function> + <Function AccessType="private" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>OL_GISObjectType</ReturnType> + <Id>1763648931889</Id> + <Name>f_getNBHGISObjectType</Name> + <X>1570</X> + <Y>560</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name>NBH</Name> + <Type>GIS_Object</Type> + </Parameter> + <Parameter> + <Name>NBHCode</Name> + <Type>String</Type> + </Parameter> + <Parameter> + <Name>defaultGISObjectType</Name> + <Type>OL_GISObjectType</Type> + </Parameter> + <Body>if( defaultGISObjectType == OL_GISObjectType.ANTI_LAYER || + (user.NBHAccessType == OL_UserNBHAccessType.SPECIFIED && !user.accessibleNBH.contains(NBHCode)) + ){ + return OL_GISObjectType.ANTI_LAYER; +} +else{ + c_activeNBH.add(NBH); + return OL_GISObjectType.REGION; +}</Body> + </Function> + </Functions> + <Connectivity> + <TextFile> + <Id>1756980503493</Id> + <Name>inputCSVcookingActivities</Name> + <X>-369</X> + <Y>759</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <FileType>FILE</FileType> + <Url>null</Url> + <ResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>data_Generic/inputECookerPatterns.csv</ClassName> + </ResourceReference> + <FileMode>READ</FileMode> + <CharsetName>null</CharsetName> + <Separators>,</Separators> + </TextFile> + <TextFile> + <Id>1756980506290</Id> + <Name>inputCSVhouseholdTrips</Name> + <X>-369</X> + <Y>799</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <FileType>FILE</FileType> + <Url>null</Url> + <ResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>data_Generic/AlbatrossProcessedVehicleTrips.csv</ClassName> + </ResourceReference> + <FileMode>READ</FileMode> + <CharsetName>null</CharsetName> + <Separators>,</Separators> + </TextFile> + <TextFile> + <Id>1756980507645</Id> + <Name>inputCSVtruckTrips</Name> + <X>-369</X> + <Y>779</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <FileType>FILE</FileType> + <Url>null</Url> + <ResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>data_Generic/inputTruckTripPatterns.csv</ClassName> + </ResourceReference> + <FileMode>READ</FileMode> + <CharsetName>null</CharsetName> + <Separators>,</Separators> + </TextFile> + </Connectivity> + <AgentLinks> + <AgentLink> + <Id>1726584206083</Id> + <Name>connections</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <EmbeddedObjects> + <EmbeddedObject> + <Id>1726584206041</Id> + <Name>energyModel</Name> + <X>30</X> + <Y>890</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zero_engine</PackageName> + <ClassName>EnergyModel</ClassName> + </ActiveObjectClass> + <GenericParameterSubstitute> + <GenericParameterSubstituteReference> + <PackageName>zero_engine</PackageName> + <ClassName>EnergyModel</ClassName> + <ItemName>1658477103138</ItemName> + </GenericParameterSubstituteReference> + </GenericParameterSubstitute> + <Parameters> + <Parameter> + <Name>p_timeStep_h</Name> + </Parameter> + <Parameter> + <Name>p_forecastTime_h</Name> + </Parameter> + <Parameter> + <Name>p_year</Name> + </Parameter> + <Parameter> + <Name>avgc_data</Name> + </Parameter> + <Parameter> + <Name>b_parallelizeConnectionOwners</Name> + </Parameter> + <Parameter> + <Name>b_parallelizeGridConnections</Name> + </Parameter> + <Parameter> + <Name>b_enableDLR</Name> + </Parameter> + <Parameter> + <Name>p_winterWeekNumber</Name> + </Parameter> + <Parameter> + <Name>p_summerWeekNumber</Name> + </Parameter> + <Parameter> + <Name>p_runStartTime_h</Name> + </Parameter> + <Parameter> + <Name>p_runEndTime_h</Name> + </Parameter> + <Parameter> + <Name>b_isInitialized</Name> + </Parameter> + <Parameter> + <Name>b_storePreviousRapidRunData</Name> + </Parameter> + <Parameter> + <Name>p_regionName</Name> + </Parameter> + <Parameter> + <Name>p_truckTripsCsv</Name> + </Parameter> + <Parameter> + <Name>p_householdTripsCsv</Name> + </Parameter> + <Parameter> + <Name>p_cookingPatternCsv</Name> + </Parameter> + <Parameter> + <Name>b_isDeserialised</Name> + </Parameter> + </Parameters> + <ReplicationFlag>false</ReplicationFlag> + <Replication Class="CodeValue"> + <Code>100</Code> + </Replication> + <CollectionType>ARRAY_LIST_BASED</CollectionType> + <InEnvironment>true</InEnvironment> + <InitialLocationType>XYZ</InitialLocationType> + <XCode Class="CodeValue"> + <Code>0</Code> + </XCode> + <YCode Class="CodeValue"> + <Code>0</Code> + </YCode> + <ZCode Class="CodeValue"> + <Code>0</Code> + </ZCode> + <ColumnCode Class="CodeValue"> + <Code>0</Code> + </ColumnCode> + <RowCode Class="CodeValue"> + <Code>0</Code> + </RowCode> + <LocationNameCode Class="CodeValue"> + <Code>""</Code> + </LocationNameCode> + <InitializationType>SPECIFIED_NUMBER</InitializationType> + <InitializationDatabaseTableQuery> + <Id>1658477089957</Id> + <TableReference/> + </InitializationDatabaseTableQuery> + <InitializationDatabaseType>ONE_AGENT_PER_DATABASE_RECORD</InitializationDatabaseType> + <QuantityColumn/> + </EmbeddedObject> + <EmbeddedObject> + <Id>1726584829907</Id> + <Name>avgc_data</Name> + <X>-370</X> + <Y>830</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <ActiveObjectClass> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>AVGC_data</ClassName> + </ActiveObjectClass> + <GenericParameterSubstitute> + <GenericParameterSubstituteReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>AVGC_data</ClassName> + <ItemName>1726584205523</ItemName> + </GenericParameterSubstituteReference> + </GenericParameterSubstitute> + <Parameters> + <Parameter> + <Name>p_avgHouseConnectionCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgHouseHeatingMethod</Name> + </Parameter> + <Parameter> + <Name>p_avgUtilityConnectionCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgUtilityHeatingMethod</Name> + </Parameter> + <Parameter> + <Name>p_avgHouseElectricityConsumption_kWh_yr</Name> + </Parameter> + <Parameter> + <Name>p_avgHouseGasConsumption_m3_yr</Name> + </Parameter> + <Parameter> + <Name>p_shareOfElectricVehicleOwnership</Name> + </Parameter> + <Parameter> + <Name>p_ratioHouseInstalledPV</Name> + </Parameter> + <Parameter> + <Name>p_avgHousePVInstallationPower_kWp</Name> + </Parameter> + <Parameter> + <Name>p_avgEVStorageCar_kWh</Name> + </Parameter> + <Parameter> + <Name>p_avgEVMaxChargePowerCar_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgEVStorageVan_kWh</Name> + </Parameter> + <Parameter> + <Name>p_avgEVStorageTruck_kWh</Name> + </Parameter> + <Parameter> + <Name>p_avgEVMaxChargePowerVan_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgEVMaxChargePowerTruck_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgEVEnergyConsumptionCar_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgEVEnergyConsumptionVan_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgEVEnergyConsumptionTruck_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_gas_kWhpm3</Name> + </Parameter> + <Parameter> + <Name>p_hydrogenEnergyDensity_kWh_Nm3</Name> + </Parameter> + <Parameter> + <Name>p_hydrogenDensity_kg_Nm3</Name> + </Parameter> + <Parameter> + <Name>p_oxygenDensity_kg_Nm3</Name> + </Parameter> + <Parameter> + <Name>p_oxygenProduction_kgO2pkgH2</Name> + </Parameter> + <Parameter> + <Name>p_hydrogenSpecificEnergy_kWh_kg</Name> + </Parameter> + <Parameter> + <Name>p_diesel_kWhpl</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionCar_kmpl</Name> + </Parameter> + <Parameter> + <Name>p_avgGasolineConsumptionCar_kmpl</Name> + </Parameter> + <Parameter> + <Name>p_gasoline_kWhpl</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionCar_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgGasolineConsumptionCar_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionVan_kmpl</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionVan_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionTruck_kmpl</Name> + </Parameter> + <Parameter> + <Name>p_avgDieselConsumptionTruck_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgCOPHeatpump</Name> + </Parameter> + <Parameter> + <Name>p_avgUtilityPVPower_kWp</Name> + </Parameter> + <Parameter> + <Name>p_ratioElectricTrucks</Name> + </Parameter> + <Parameter> + <Name>p_avgCompanyHeatingMethod</Name> + </Parameter> + <Parameter> + <Name>p_avgPVPower_kWpm2</Name> + </Parameter> + <Parameter> + <Name>p_avgRatioBatteryCapacity_v_Power</Name> + </Parameter> + <Parameter> + <Name>p_avgHydrogenConsumptionCar_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgHydrogenConsumptionVan_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgHydrogenConsumptionTruck_kWhpkm</Name> + </Parameter> + <Parameter> + <Name>p_avgRatioRoofPotentialPV</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyHeatpump_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureElectricHeatpump_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyGasBurner_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureGasBurner_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyHydrogenBurner_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureHydrogenBurner_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgVehiclesPerChargePoint</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistanceVan_km</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistanceCompanyCar_km</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistanceTruck_km</Name> + </Parameter> + <Parameter> + <Name>p_avgFullLoadHoursPV_hr</Name> + </Parameter> + <Parameter> + <Name>p_avgCompanyElectricityConsumption_kWhpm2</Name> + </Parameter> + <Parameter> + <Name>p_avgCompanyGasConsumption_m3pm2</Name> + </Parameter> + <Parameter> + <Name>p_avgCompanyHeatConsumption_kWhpm2</Name> + </Parameter> + <Parameter> + <Name>p_avgSolarFieldPower_kWppha</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyCHP_thermal_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyCHP_electric_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureCHP_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgEfficiencyDistrictHeatingDeliverySet_fr</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureDistrictHeatingDeliverySet_degC</Name> + </Parameter> + <Parameter> + <Name>p_v2gProbability</Name> + </Parameter> + <Parameter> + <Name>p_v1gProbability</Name> + </Parameter> + <Parameter> + <Name>p_avgEVsPerPublicCharger</Name> + </Parameter> + <Parameter> + <Name>p_avgPTPower_kWpm2</Name> + </Parameter> + <Parameter> + <Name>p_avgHeatBufferWaterVolumePerHPPower_m3pkW</Name> + </Parameter> + <Parameter> + <Name>p_avgHeatBufferWaterVolumePerPTSurface_m3pm2</Name> + </Parameter> + <Parameter> + <Name>p_waterHeatCapacity_JpkgK</Name> + </Parameter> + <Parameter> + <Name>p_waterDensity_kgpm3</Name> + </Parameter> + <Parameter> + <Name>p_avgMaxHeatBufferTemperature_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgMinHeatBufferTemperature_degC</Name> + </Parameter> + <Parameter> + <Name>p_avgPTPanelSize_m2</Name> + </Parameter> + <Parameter> + <Name>p_avgRatioHouseBatteryStorageCapacity_v_PVPower</Name> + </Parameter> + <Parameter> + <Name>p_avgNrOfCarsPerHouse</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistancePrivateCar_km</Name> + </Parameter> + <Parameter> + <Name>p_avgAnnualTravelDistanceSecondVSFirstCar_fr</Name> + </Parameter> + <Parameter> + <Name>map_yearlySummerWinterTimeStartHour</Name> + </Parameter> + <Parameter> + <Name>p_minHeatpumpElectricCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_minGasBurnerOutputCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_minHydrogenBurnerOutputCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_minDistrictHeatingDeliverySetOutputCapacity_kW</Name> + </Parameter> + <Parameter> + <Name>p_avgOutputTemperatureHybridHeatpump_degC</Name> + </Parameter> + </Parameters> + <ReplicationFlag>false</ReplicationFlag> + <Replication Class="CodeValue"> + <Code>100</Code> + </Replication> + <CollectionType>ARRAY_LIST_BASED</CollectionType> + <InEnvironment>true</InEnvironment> + <InitialLocationType>XYZ</InitialLocationType> + <XCode Class="CodeValue"> + <Code>0</Code> + </XCode> + <YCode Class="CodeValue"> + <Code>0</Code> + </YCode> + <ZCode Class="CodeValue"> + <Code>0</Code> + </ZCode> + <ColumnCode Class="CodeValue"> + <Code>0</Code> + </ColumnCode> + <RowCode Class="CodeValue"> + <Code>0</Code> + </RowCode> + <LocationNameCode Class="CodeValue"> + <Code>""</Code> + </LocationNameCode> + <InitializationType>SPECIFIED_NUMBER</InitializationType> + <InitializationDatabaseTableQuery> + <Id>1658477089956</Id> + <TableReference/> + </InitializationDatabaseTableQuery> + <InitializationDatabaseType>ONE_AGENT_PER_DATABASE_RECORD</InitializationDatabaseType> + <QuantityColumn/> + </EmbeddedObject> + </EmbeddedObjects> + <Presentation> + <Level> + <Id>1726584205903</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + <Presentation> + <Rectangle> + <Id>1726584205905</Id> + <Name>rect_canvas</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16744448</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>1920</Width> + <Height>980</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1726584205907</Id> + <Name>rect_projectDataTracking</Name> + <X>1520</X> + <Y>20</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-65536</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>380</Width> + <Height>360</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1726584205909</Id> + <Name>rect_loader</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16744448</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>169</Width> + <Height>40</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205911</Id> + <Name>txt_input</Name> + <X>55</X> + <Y>7</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16744448</Color> + <Text>Loader</Text> + <Font> + <Name>SansSerif</Name> + <Size>18</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205915</Id> + <Name>rect_connectedModels</Name> + <X>0</X> + <Y>840</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-16744448</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>290</Width> + <Height>140</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205917</Id> + <Name>t_connectedModels</Name> + <X>20</X> + <Y>850</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Connected Models</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205921</Id> + <Name>txt_projectDataTracking</Name> + <X>1540</X> + <Y>40</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Time and data Tracking</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205923</Id> + <Name>rect_defaultStartup</Name> + <X>20</X> + <Y>50</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>240</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1726584205925</Id> + <Name>rect_dataCollections</Name> + <X>-440</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-360334</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>437</Width> + <Height>980</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Rectangle> + <Id>1726584205927</Id> + <Name>rect_GridNodeFunctions</Name> + <X>20</X> + <Y>500</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>120</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205929</Id> + <Name>txt_loaderStartupDefault</Name> + <X>40</X> + <Y>60</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Loader default startup:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205931</Id> + <Name>txt_createGridNodes</Name> + <X>40</X> + <Y>510</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Grid node functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205933</Id> + <Name>rect_dataInput</Name> + <X>-440</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>3</LineWidth> + <LineColor>-360334</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>169</Width> + <Height>40</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205935</Id> + <Name>text</Name> + <X>-400</X> + <Y>10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Lock>true</Lock> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-360334</Color> + <Text>Data input</Text> + <Font> + <Name>SansSerif</Name> + <Size>16</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205937</Id> + <Name>t_inputFiles</Name> + <X>-380</X> + <Y>720</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Basic Input files:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205939</Id> + <Name>t_inputFileFunctions</Name> + <X>-400</X> + <Y>60</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Read input files to database:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1726584205941</Id> + <Name>txt_dataCollectionFill</Name> + <X>-400</X> + <Y>160</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Fill the data collections:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205943</Id> + <Name>rect_ActorFunctions</Name> + <X>20</X> + <Y>420</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>60</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205945</Id> + <Name>txt_createActorFunctions</Name> + <X>40</X> + <Y>430</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Actor functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1726584205947</Id> + <Name>rect_createEnergyGC</Name> + <X>400</X> + <Y>740</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>400</Width> + <Height>230</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205949</Id> + <Name>txt_createEnergyGC</Name> + <X>410</X> + <Y>750</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Energy GC functions +</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Group> + <Id>1726584205951</Id> + <Name>gr_consumerGC_residential</Name> + <X>570</X> + <Y>610</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1726584205953</Id> + <Name>rect_createHouses</Name> + <X>-170</X> + <Y>-20</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>400</Width> + <Height>140</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205955</Id> + <Name>txt_createHouses</Name> + <X>-160</X> + <Y>-10</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Houses</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1726584205957</Id> + <Name>gr_consumerGC_businesspark</Name> + <X>570</X> + <Y>230</Y> + <Label> + <X>9.883</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1726584205959</Id> + <Name>rect_createCompanies</Name> + <X>-170</X> + <Y>-180</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>400</Width> + <Height>520</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205961</Id> + <Name>txt_createCompanies</Name> + <X>-158.134</X> + <Y>-168.134</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create Companies</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1726584205963</Id> + <Name>gr_addEAFunctions</Name> + <X>1040</X> + <Y>200</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1726584205965</Id> + <Name>rect_addEA</Name> + <X>-180</X> + <Y>-140</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>450</Width> + <Height>780</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205967</Id> + <Name>txt_addEnergyAssetFunctions</Name> + <X>-160</X> + <Y>-130</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Add EA functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Group> + <Id>1726584205969</Id> + <Name>gr_createGISObjects</Name> + <X>1700</X> + <Y>610</Y> + <Label> + <X>9.938</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Presentation> + <Rectangle> + <Id>1726584205971</Id> + <Name>rect_createGISObjects</Name> + <X>-180</X> + <Y>-120</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>380</Width> + <Height>230</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1726584205973</Id> + <Name>txt_createGISObjects</Name> + <X>-161.492</X> + <Y>-109.13</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Create GIS objects</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + </Presentation> + </Group> + <Text> + <Id>1727792637339</Id> + <Name>txt_overwriteDatabaseValues</Name> + <X>-400</X> + <Y>110</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Overwrite specific database values:</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1730217549237</Id> + <Name>rect_supportFunctions</Name> + <X>1520</X> + <Y>830</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>380</Width> + <Height>140</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1730217578770</Id> + <Name>txt_supportFunctions</Name> + <X>1540</X> + <Y>840</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Support Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1742919550888</Id> + <Name>rect_connectToFunctions</Name> + <X>1520</X> + <Y>730</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>380</Width> + <Height>80</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1742919565761</Id> + <Name>txt_connectToFunctions</Name> + <X>1540</X> + <Y>750</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Connect To Functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Text> + <Id>1744808981703</Id> + <Name>txt_DebuggingDataCollections</Name> + <X>-400</X> + <Y>870</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Data collections used for Debugging</Text> + <Font> + <Name>SansSerif</Name> + <Size>16</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1747830521606</Id> + <Name>rect_addSpecificSliderGC</Name> + <X>20</X> + <Y>300</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>100</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1747830569531</Id> + <Name>txt_addSpecificSliderGC</Name> + <X>30</X> + <Y>310</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Add specific slider GC</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1750856789809</Id> + <Name>rect_subScopeFunctions</Name> + <X>20</X> + <Y>640</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>180</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1750857047506</Id> + <Name>txt_filterSubScopeFunctions</Name> + <X>40</X> + <Y>650</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>SubScope filter functions</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Rectangle> + <Id>1753349205420</Id> + <Name>rect_defaultStartup1</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2360</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <ZHeight>10</ZHeight> + <LineWidth>2</LineWidth> + <LineColor>-16777216</LineColor> + <LineMaterial>null</LineMaterial> + <LineStyle>SOLID</LineStyle> + <Width>340</Width> + <Height>420</Height> + <Rotation>0.0</Rotation> + <FillColor>-1</FillColor> + <FillMaterial>null</FillMaterial> + </Rectangle> + <Text> + <Id>1753349205422</Id> + <Name>txt_loaderStartupDeserialisation</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2380</X> + <Y>9</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text>Loader after deserialisation (OLD)</Text> + <Font> + <Name>SansSerif</Name> + <Size>14</Size> + <Style>1</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1753449467882</Id> + <Name>deserialize2</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2413.333</X> + <Y>172</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="162" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode> +pauseSimulation(); +// Collect GIS_Objects into hashmap, to link to new EnergyModel. +c_GISregions.clear(); +energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); +energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); + +try { + v_objectMapper = new ObjectMapper(); + f_addMixins(); + + /* + String userIdToken = "6b87f0f9-fdf6-4c05-9e0f-b75e46950113"; //user.userIdToken(); + + var repository = UserScenarioRepository.builder() + //.userId(UUID.fromString("6b87f0f9-fdf6-4c05-9e0f-b75e46950113")) + .userId(UUID.fromString(userIdToken)) + .modelName("ModelTestName") + .build(); + + var scenarioList = repository.listUserScenarios(); + for (var scenario : scenarioList) { + System.out.println(scenario.getName()); + } + + var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(0).getId()); + J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); + */ + + // Deserialize the JSON into a new EnergyModel instance: + J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); + EnergyModel deserializedEnergyModel = saveObject.energyModel; + + // Reconstruct all Agents + f_reconstructEnergyModel(deserializedEnergyModel); + f_reconstructGridConnections(deserializedEnergyModel); + f_reconstructActors(deserializedEnergyModel); + f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); + + f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); + + // Get profilePointer tableFunctions from 'original' energyModel + deserializedEnergyModel.c_profiles.forEach(x->{ + J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); + x.setTableFunction(origProfile.getTableFunction()); + }); + // get heatingTypeHashmap from 'old' energyModel. + deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; + + energyModel = deserializedEnergyModel; + zero_Interface.energyModel = deserializedEnergyModel; + zero_Interface.uI_Results.energyModel = deserializedEnergyModel; + //zero_Interface.f_clearSelectionAndSelectEnergyModel(); + //uI_Results.energyModel = deserializedEnergyModel; + + deserializedEnergyModel.f_startAfterDeserialisation(); + + f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); + + // Putting back the ordered collections in the interface + f_reconstructOrderedCollections(saveObject); + + + + + /* + // Reconstruct all Agents + f_reconstructEnergyModel(deserializedEnergyModel); + + + f_reconstructGridConnections(deserializedEnergyModel); + f_reconstructActors(deserializedEnergyModel); + f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); + + f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); + + // Get profilePointer tableFunctions from 'original' energyModel + deserializedEnergyModel.c_profiles.forEach(x->{ + J_ProfilePointer origProfile = energyModel.f_findProfile(x.name); + x.setTableFunction(origProfile.getTableFunction()); + }); + + energyModel.f_startAfterDeserialisation(); + + energyModel = deserializedEnergyModel; + zero_Interface.energyModel = deserializedEnergyModel; + zero_Interface.uI_Results.energyModel = deserializedEnergyModel; + + // Reinitialize energy model + //deserializedEnergyModel.b_isInitialized = false; + //deserializedEnergyModel.f_initializeEngine(); + */ + + //zero_Interface.f_clearSelectionAndSelectEnergyModel(); + zero_Interface.uI_Tabs.f_initializeUI_Tabs(energyModel.f_getGridConnectionsCollectionPointer(), energyModel.f_getPausedGridConnectionsCollectionPointer()); + zero_Interface.f_updateMainInterfaceSliders(); + + //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); + +} catch (IOException e) { + e.printStackTrace(); +} + +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>deserialize_energy_model</LabelText> + </ExtendedProperties> + </Control> + <Control Type="Button"> + <EmbeddedIcon>false</EmbeddedIcon> + <Id>1753449467884</Id> + <Name>serialize1</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>2416.333</X> + <Y>99</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <BasicProperties Width="160" Height="30"> + <EmbeddedIcon>false</EmbeddedIcon> + <TextColor>-16777216</TextColor> + <Enabled>true</Enabled> + <ActionCode>traceln("Starting model serialisation..."); +J_ModelSave saveObject = new J_ModelSave(); +saveObject.energyModel = energyModel; + +energyModel.pop_gridNodes.forEach(x->saveObject.c_gridNodes.add(x)); +energyModel.pop_GIS_Buildings.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +energyModel.pop_GIS_Objects.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); +energyModel.pop_GIS_Parcels.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); + +/* +saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; +saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; +saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; +saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; +saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; +saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; +saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; +saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; +saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; +saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; +//saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; +*/ + +saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; +saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; +saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; +saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; +saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; +saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; +saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; +saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; +saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; +saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; +saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; +saveObject.c_scenarioMap_Current = zero_Interface.c_scenarioMap_Current; +saveObject.c_scenarioMap_Future = zero_Interface.c_scenarioMap_Future; + +List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps = new ArrayList<LinkedHashMap<String, List<J_EAVehicle>>>(); +saveObject.c_additionalVehicleHashMaps = c_additionalVehicleHashMaps; + + +v_objectMapper = new ObjectMapper(); +f_addMixins(); +v_objectMapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE); + +try { + traceln("Trying to save to file"); + //v_objectMapper.writeValue(new File("energyModel.json"), energyModel); + + v_objectMapper.writeValue(new File("ModelSave.json"), saveObject); + /* + String userIdToken = "6b87f0f9-fdf6-4c05-9e0f-b75e46950113"; //user.userIdToken(); + + var repository = UserScenarioRepository.builder() + //.userId(UUID.fromString("6b87f0f9-fdf6-4c05-9e0f-b75e46950113")) + .userId(UUID.fromString(userIdToken)) + .modelName("ModelTestName") + .build(); + + repository.saveUserScenario( + "Test Scenario", + v_objectMapper.writeValueAsBytes(saveObject) + ); + */ + +} catch (IOException e) { + e.printStackTrace(); +} +</ActionCode> + </BasicProperties> + <ExtendedProperties> + <Font Name="Dialog" Size="11" Style="0"/> + <LabelText>serialize_energy_model</LabelText> + </ExtendedProperties> + </Control> + </Presentation> + </Level> + <Level> + <Id>1726584205975</Id> + <Name>level1</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + </Level> + </Presentation> + <Areas> + <Area> + <Id>1726584206081</Id> + <Name>viewArea</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <Title/> + <Width>1920</Width> + <Height>980</Height> + </Area> + </Areas> + </ActiveObjectClass> + <ActiveObjectClass> + <Id>1709049506453</Id> + <Name>Z_UnusedAgent</Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <Generic>false</Generic> + <GenericParameter> + <Id>1709049506459</Id> + <Name>1709049506459</Name> + <GenericParameterValue Class="CodeValue"> + <Code>T extends Agent</Code> + </GenericParameterValue> + <GenericParameterLabel>Generic parameter:</GenericParameterLabel> + </GenericParameter> + <FlowChartsUsage>ENTITY</FlowChartsUsage> + <SamplesToKeep>100</SamplesToKeep> + <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> + <ElementsLimitValue>100</ElementsLimitValue> + <MakeDefaultViewArea>true</MakeDefaultViewArea> + <SceneGridColor/> + <SceneBackgroundColor>-4144960</SceneBackgroundColor> + <SceneSkybox>null</SceneSkybox> + <AgentProperties> + <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> + <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> + <RotateAnimationVertically>false</RotateAnimationVertically> + <VelocityCode Class="CodeUnitValue"> + <Code>10</Code> + <Unit Class="SpeedUnits">MPS</Unit> + </VelocityCode> + <PhysicalLength Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalLength> + <PhysicalWidth Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalWidth> + <PhysicalHeight Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="LengthUnits">METER</Unit> + </PhysicalHeight> + </AgentProperties> + <EnvironmentProperties> + <EnableSteps>false</EnableSteps> + <StepDurationCode Class="CodeUnitValue"> + <Code>1.0</Code> + <Unit Class="TimeUnits">SECOND</Unit> + </StepDurationCode> + <SpaceType>CONTINUOUS</SpaceType> + <WidthCode>500</WidthCode> + <HeightCode>500</HeightCode> + <ZHeightCode>0</ZHeightCode> + <ColumnsCountCode>100</ColumnsCountCode> + <RowsCountCode>100</RowsCountCode> + <NeigborhoodType>MOORE</NeigborhoodType> + <LayoutType>USER_DEF</LayoutType> + <NetworkType>USER_DEF</NetworkType> + <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> + <ConnectionsRangeCode>50</ConnectionsRangeCode> + <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> + <MCode>10</MCode> + </EnvironmentProperties> + <DatasetsCreationProperties> + <AutoCreate>true</AutoCreate> + <Id>1658477089955</Id> + <OccurrenceAtTime>true</OccurrenceAtTime> + <OccurrenceDate>1709107200000</OccurrenceDate> + <OccurrenceTime Class="CodeUnitValue"> + <Code>0</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </OccurrenceTime> + <RecurrenceCode Class="CodeUnitValue"> + <Code>1</Code> + <Unit Class="TimeUnits">HOUR</Unit> + </RecurrenceCode> + </DatasetsCreationProperties> + <ScaleRuler> + <Id>1709049506456</Id> + <Name>scale</Name> + <X>0</X> + <Y>-150</Y> + <PublicFlag>false</PublicFlag> + <PresentationFlag>false</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Length>100</Length> + <Rotation>0</Rotation> + <ScaleType>BASED_ON_LENGTH</ScaleType> + <ModelLength>10</ModelLength> + <LengthUnits>METER</LengthUnits> + <Scale>10</Scale> + <InheritedFromParentAgentType>true</InheritedFromParentAgentType> + </ScaleRuler> + <CurrentLevel>1709049506460</CurrentLevel> + <ConnectionsId>1709049506454</ConnectionsId> + <AgentLinks> + <AgentLink> + <Id>1709049506454</Id> + <Name>connections</Name> + <X>50</X> + <Y>-50</Y> + <Label> + <X>15</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <HandleReceiveInConnections>false</HandleReceiveInConnections> + <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> + <AgentLinkBidirectional>true</AgentLinkBidirectional> + <MessageType>Object</MessageType> + <LineStyle>SOLID</LineStyle> + <LineWidth>1</LineWidth> + <LineColor>-16777216</LineColor> + <LineZOrder>UNDER_AGENTS</LineZOrder> + <LineArrow>NONE</LineArrow> + <LineArrowPosition>END</LineArrowPosition> + </AgentLink> + </AgentLinks> + <Presentation> + <Level> + <Id>1709049506460</Id> + <Name>level</Name> + <X>0</X> + <Y>0</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D3D</DrawMode> + <Z>0</Z> + <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> + </Level> + </Presentation> + </ActiveObjectClass> + </ActiveObjectClasses> + <DifferentialEquationsMethod>EULER</DifferentialEquationsMethod> + <MixedEquationsMethod>RK45_NEWTON</MixedEquationsMethod> + <AlgebraicEquationsMethod>MODIFIED_NEWTON</AlgebraicEquationsMethod> + <AbsoluteAccuracy>1.0</AbsoluteAccuracy> + <FixedTimeStep>1.0</FixedTimeStep> + <RelativeAccuracy>1.0</RelativeAccuracy> + <TimeAccuracy>0.1</TimeAccuracy> + <InspectionWindowColorTheme>DEFAULT</InspectionWindowColorTheme> + <Frame> + <Id>1658477089982</Id> + <Width>1920</Width> + <Height>980</Height> + </Frame> + <Database> + <Id>1658477089953</Id> + <Logging>false</Logging> + <AutoExport>false</AutoExport> + <ShutdownCompact>false</ShutdownCompact> + <ImportSettings/> + <ExportSettings/> + </Database> + <RunConfiguration ActiveObjectClassId="1658477103140"> + <Id>1658477103163</Id> + <Name>RunConfiguration</Name> + <MaximumMemory>4096</MaximumMemory> + <ModelTimeProperties> + <StopOption>Stop at specified date</StopOption> + <InitialDate>1672531200000</InitialDate> + <InitialTime>0.0</InitialTime> + <FinalDate>1704067200000</FinalDate> + <FinalTime>8760.0</FinalTime> + </ModelTimeProperties> + <AnimationProperties> + <StopNever>false</StopNever> + <ExecutionMode>realTimeScaled</ExecutionMode> + <RealTimeScale>5.0</RealTimeScale> + <EnableZoomAndPanning>false</EnableZoomAndPanning> + <EnableDeveloperPanel>false</EnableDeveloperPanel> + <ShowDeveloperPanelOnStart>false</ShowDeveloperPanelOnStart> + </AnimationProperties> + <Inputs/> + <Outputs/> + </RunConfiguration> + <JavaClasses> + <JavaClass> + <Id>1715862317301</Id> + <Name>J_scenario_Current</Name> + <Folder>1761915047244</Folder> + <Text>/** + * Scenario_future + */ + +import com.fasterxml.jackson.annotation.JsonIdentityInfo; +import com.fasterxml.jackson.annotation.ObjectIdGenerators; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; + + +@JsonAutoDetect( + fieldVisibility = Visibility.ANY, // ✅ only public fields are serialized + getterVisibility = Visibility.NONE, + isGetterVisibility = Visibility.NONE, + setterVisibility = Visibility.NONE, + creatorVisibility = Visibility.NONE +) + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type" // 👈 this will be the field name in your JSON + ) +@JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = "@id") + +public class J_scenario_Current implements Serializable { + + private Agent parentAgent; + private boolean isCurrentlyActive = true; + private Double currentContractDeliveryCapacity_kW = 0.0; + private Double currentContractFeedinCapacity_kW = 0.0; + private Double currentPhysicalConnectionCapacity_kW = 0.0; + private Integer currentPV_kW = 0; + //String currentPV_orient; + private Float currentWind_kW = 0f; + private Float currentBatteryPower_kW = 0f; + private Float currentBatteryCapacity_kWh = 0f; + private OL_GridConnectionHeatingType currentHeatingType = OL_GridConnectionHeatingType.NONE; + private Integer currentDieselCars = 0; + private Integer currentDieselVans = 0; + private Integer currentDieselTrucks = 0; + private Integer currentHydrogenCars = 0; + private Integer currentHydrogenVans = 0; + private Integer currentHydrogenTrucks = 0; + private Integer currentEVCars = 0; + private Integer currentEVVans = 0; + private Integer currentEVTrucks = 0; + private Double currentEVCarChargePower_kW = 0.0; + private Double currentEVVanChargePower_kW = 0.0; + private Double currentEVTruckChargePower_kW = 0.0; + + + /** + * Default constructor + */ + public J_scenario_Current() { + } + + /** + * Constructor initializing the fields + */ + /* + public J_scenario_Current() { + } + */ + + // Setters + public void setParentAgent(Agent parentAgent) { + this.parentAgent = parentAgent; + } + + public void setIsCurrentlyActive(boolean isCurrentlyActive) { + this.isCurrentlyActive = isCurrentlyActive; + } + + public void setCurrentContractDeliveryCapacity_kW(Double currentContractDeliveryCapacity_kW) { + this.currentContractDeliveryCapacity_kW = currentContractDeliveryCapacity_kW; + } + + public void setCurrentContractFeedinCapacity_kW(Double currentContractFeedinCapacity_kW) { + this.currentContractFeedinCapacity_kW = currentContractFeedinCapacity_kW; + } + + public void setCurrentPhysicalConnectionCapacity_kW(Double currentPhysicalConnectionCapacity_kW) { + this.currentPhysicalConnectionCapacity_kW = currentPhysicalConnectionCapacity_kW; + } + + public void setCurrentPV_kW(int currentPV_kW) { + this.currentPV_kW = currentPV_kW; + } + + /* + public void setCurrentPV_orient(String currentPV_orient) { + this.currentPV_orient = currentPV_orient; + } + */ + public void setCurrentWind_kW(Float currentWind_kW) { + this.currentWind_kW = currentWind_kW; + } + + public void setCurrentBatteryPower_kW(Float currentBatteryPower_kW) { + this.currentBatteryPower_kW = currentBatteryPower_kW; + } + + public void setCurrentBatteryCapacity_kWh(Float currentBatteryCapacity_kWh) { + this.currentBatteryCapacity_kWh = currentBatteryCapacity_kWh; + } + + public void setCurrentHeatingType(OL_GridConnectionHeatingType currentHeatingType) { + this.currentHeatingType = currentHeatingType; + } + + public void setCurrentDieselCars(Integer currentDieselCars) { + this.currentDieselCars = currentDieselCars; + } + + public void setCurrentDieselVans(Integer currentDieselVans) { + this.currentDieselVans = currentDieselVans; + } + + public void setCurrentDieselTrucks(Integer currentDieselTrucks) { + this.currentDieselTrucks = currentDieselTrucks; + } + + public void setCurrentHydrogenCars(Integer currentHydrogenCars) { + this.currentHydrogenCars = currentHydrogenCars; + } + + public void setCurrentHydrogenVans(Integer currentHydrogenVans) { + this.currentHydrogenVans = currentHydrogenVans; + } + + public void setCurrentHydrogenTrucks(Integer currentHydrogenTrucks) { + this.currentHydrogenTrucks = currentHydrogenTrucks; + } + + public void setCurrentEVCars(Integer currentEVCars) { + this.currentEVCars = currentEVCars; + } + + public void setCurrentEVVans(Integer currentEVVans) { + this.currentEVVans = currentEVVans; + } + + public void setCurrentEVTrucks(Integer currentEVTrucks) { + this.currentEVTrucks = currentEVTrucks; + } + + public void setCurrentEVCarChargePower_kW(Double currentEVCarChargePower_kW) { + this.currentEVCarChargePower_kW = currentEVCarChargePower_kW; + } + + public void setCurrentEVVanChargePower_kW(Double currentEVVanChargePower_kW) { + this.currentEVVanChargePower_kW = currentEVVanChargePower_kW; + } + + public void setCurrentEVTruckChargePower_kW(Double currentEVTruckChargePower_kW) { + this.currentEVTruckChargePower_kW = currentEVTruckChargePower_kW; + } + + + // Getters + public Agent getParentAgent() { + return parentAgent; + } + + public boolean getIsCurrentlyActive() { + return isCurrentlyActive; + } + + public Double getCurrentContractDeliveryCapacity_kW() { + return currentContractDeliveryCapacity_kW; + } + + public Double getCurrentContractFeedinCapacity_kW() { + return currentContractFeedinCapacity_kW; + } + + public Double getCurrentPhysicalConnectionCapacity_kW() { + return currentPhysicalConnectionCapacity_kW; + } + + public Integer getCurrentPV_kW() { + if (currentPV_kW == null) { + return 0; + } + return currentPV_kW; + } + + /* + public String getCurrentPV_orient() { + return currentPV_orient; + } + */ + + public Float getCurrentWind_kW() { + return currentWind_kW; + } + + public Float getCurrentBatteryPower_kW() { + return currentBatteryPower_kW; + } + + public Float getCurrentBatteryCapacity_kWh() { + return currentBatteryCapacity_kWh; + } + + public OL_GridConnectionHeatingType getCurrentHeatingType() { + return currentHeatingType; + } + + public Integer getCurrentDieselCars() { + return currentDieselCars; + } + + public Integer getCurrentDieselVans() { + return currentDieselVans; + } + + public Integer getCurrentDieselTrucks() { + return currentDieselTrucks; + } + + public Integer getCurrentHydrogenCars() { + return currentHydrogenCars; + } + + public Integer getCurrentHydrogenVans() { + return currentHydrogenVans; + } + + public Integer getCurrentHydrogenTrucks() { + return currentHydrogenTrucks; + } + + public Integer getCurrentEVCars() { + return currentEVCars; + } + + public Integer getCurrentEVVans() { + return currentEVVans; + } + + public Integer getCurrentEVTrucks() { + return currentEVTrucks; + } + + public Double getCurrentEVCarChargePower_kW() { + return currentEVCarChargePower_kW; + } + + public Double getCurrentEVVanChargePower_kW() { + return currentEVVanChargePower_kW; + } + + public Double getCurrentEVTruckChargePower_kW() { + return currentEVTruckChargePower_kW; + } + + + + @Override + public String toString() { + return super.toString(); + } + + /** + * This number is here for model snapshot storing purpose<br> + * It needs to be changed when this class gets changed + */ + private static final long serialVersionUID = 1L; + +}</Text> + </JavaClass> + <JavaClass> + <Id>1715862317307</Id> + <Name>J_scenario_Future</Name> + <Folder>1761915047244</Folder> + <Text>/** + * Scenario_future + */ + +import com.fasterxml.jackson.annotation.JsonIdentityInfo; +import com.fasterxml.jackson.annotation.ObjectIdGenerators; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; + + +@JsonAutoDetect( + fieldVisibility = Visibility.ANY, // ✅ only public fields are serialized + getterVisibility = Visibility.NONE, + isGetterVisibility = Visibility.NONE, + setterVisibility = Visibility.NONE, + creatorVisibility = Visibility.NONE +) + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type" // 👈 this will be the field name in your JSON + ) +@JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = "@id") + +public class J_scenario_Future implements Serializable { + + private Agent parentAgent; + private boolean isActiveInFuture = true; //Boolean used to see if gc is active in future scenario + private Double requestedContractDeliveryCapacity_kW = 0.0; + private Double requestedContractFeedinCapacity_kW = 0.0; + private Double requestedPhysicalConnectionCapacity_kW = 0.0; + private double plannedHeatSavings_pct = 0; + private OL_GridConnectionHeatingType plannedHeatingType = OL_GridConnectionHeatingType.NONE; + private double plannedElectricitySavings_pct = 0; + private boolean plannedCurtailment = false; + private Integer plannedPV_kW = 0; + private Integer plannedPV_year; + private Float plannedWind_kW = 0f; + private Float plannedBatteryPower_kW = 0f; + private Float plannedBatteryCapacity_kWh = 0f; + //Integer plannedWind_year; + private double plannedTransportSavings_pct = 0; + private Integer plannedEVCars = 0; + private Integer plannedEVVans = 0; + private Integer plannedEVTrucks = 0; + private Integer plannedHydrogenCars = 0; + private Integer plannedHydrogenVans = 0; + private Integer plannedHydrogenTrucks = 0; + + /** + * Default constructor + */ + public J_scenario_Future() { + } + + /** + * Constructor initializing the fields + */ + /* + public J_scenario_Future(Agent parentAgent, Integer plannedPV_kW, Integer plannedPV_year, Float plannedWind_kW, Integer plannedEVCars, Integer plannedEVVans, Integer plannedEVTrucks) { + + + } + */ + + // Setters + public void setParentAgent(Agent parentAgent) { + this.parentAgent = parentAgent; + } + + public void setIsActiveInFuture(boolean isActiveInFuture) { + this.isActiveInFuture = isActiveInFuture; + } + + public void setRequestedContractDeliveryCapacity_kW(Double requestedContractDeliveryCapacity_kW) { + this.requestedContractDeliveryCapacity_kW = requestedContractDeliveryCapacity_kW; + } + + public void setRequestedContractFeedinCapacity_kW(Double requestedContractFeedinCapacity_kW) { + this.requestedContractFeedinCapacity_kW = requestedContractFeedinCapacity_kW; + } + + public void setRequestedPhysicalConnectionCapacity_kW(Double requestedPhysicalConnectionCapacity_kW) { + this.requestedPhysicalConnectionCapacity_kW = requestedPhysicalConnectionCapacity_kW; + } + + public void setPlannedHeatSavings_pct(double plannedHeatSavings_pct) { + this.plannedHeatSavings_pct = plannedHeatSavings_pct; + } + + public void setPlannedHeatingType(OL_GridConnectionHeatingType plannedHeatingType) { + this.plannedHeatingType = plannedHeatingType; + } + + public void setPlannedElectricitySavings_pct(double plannedElectricitySavings_pct) { + this.plannedElectricitySavings_pct = plannedElectricitySavings_pct; + } + + public void setPlannedCurtailment(boolean plannedCurtailment) { + this.plannedCurtailment = plannedCurtailment; + } + + public void setPlannedPV_kW(Integer plannedPV_kW) { + this.plannedPV_kW = plannedPV_kW; + } + + public void setPlannedPV_year(Integer plannedPV_year) { + this.plannedPV_year = plannedPV_year; + } + + public void setPlannedWind_kW(Float plannedWind_kW) { + this.plannedWind_kW = plannedWind_kW; + } + + public void setPlannedBatteryPower_kW(Float plannedBatteryPower_kW) { + this.plannedBatteryPower_kW = plannedBatteryPower_kW; + } + + public void setPlannedBatteryCapacity_kWh(Float plannedBatteryCapacity_kWh) { + this.plannedBatteryCapacity_kWh = plannedBatteryCapacity_kWh; + } + + public void setPlannedTransportSavings_pct(double plannedTransportSavings_pct) { + this.plannedTransportSavings_pct = plannedTransportSavings_pct; + } + + public void setPlannedEVCars(Integer plannedEVCars) { + this.plannedEVCars = plannedEVCars; + } + + public void setPlannedEVVans(Integer plannedEVVans) { + this.plannedEVVans = plannedEVVans; + } + + public void setPlannedEVTrucks(Integer plannedEVTrucks) { + this.plannedEVTrucks = plannedEVTrucks; + } + + public void setPlannedHydrogenCars(Integer plannedHydrogenCars) { + this.plannedHydrogenCars = plannedHydrogenCars; + } + + public void setPlannedHydrogenVans(Integer plannedHydrogenVans) { + this.plannedHydrogenVans = plannedHydrogenVans; + } + + public void setPlannedHydrogenTrucks(Integer plannedHydrogenTrucks) { + this.plannedHydrogenTrucks = plannedHydrogenTrucks; + } + + // Getters + public Agent getParentAgent() { + return parentAgent; + } + + public boolean getIsActiveInFuture() { + return isActiveInFuture; + } + + public Double getRequestedContractDeliveryCapacity_kW() { + return requestedContractDeliveryCapacity_kW; + } + + public Double getRequestedContractFeedinCapacity_kW() { + return requestedContractFeedinCapacity_kW; + } + + public Double getRequestedPhysicalConnectionCapacity_kW() { + return requestedPhysicalConnectionCapacity_kW; + } + + public double getPlannedHeatSavings_pct() { + return plannedHeatSavings_pct; + } + + public OL_GridConnectionHeatingType getPlannedHeatingType() { + return plannedHeatingType; + } + + public double getPlannedElectricitySavings_pct() { + return plannedElectricitySavings_pct; + } + + public boolean getPlannedCurtailment() { + return plannedCurtailment; + } + + public Integer getPlannedPV_kW() { + if (plannedPV_kW == null) { + return 0; + } + return plannedPV_kW; + } + + public Integer getPlannedPV_year() { + return plannedPV_year; + } + + public Float getPlannedWind_kW() { + return plannedWind_kW; + } + + public Float getPlannedBatteryPower_kW() { + if (plannedBatteryPower_kW == null) { + return 0f; + } + return plannedBatteryPower_kW; + } + + public Float getPlannedBatteryCapacity_kWh() { + if (plannedBatteryCapacity_kWh == null) { + return 0f; + } + return plannedBatteryCapacity_kWh; + } + + public double getPlannedTransportSavings_pct() { + return plannedTransportSavings_pct; + } + + public Integer getPlannedEVCars() { + return plannedEVCars; + } + + public Integer getPlannedEVVans() { + return plannedEVVans; + } + + public Integer getPlannedEVTrucks() { + return plannedEVTrucks; + } + + public Integer getPlannedHydrogenCars() { + return plannedHydrogenCars; + } + + public Integer getPlannedHydrogenVans() { + return plannedHydrogenVans; + } + + public Integer getPlannedHydrogenTrucks() { + return plannedHydrogenTrucks; + } + + @Override + public String toString() { + return super.toString(); + } + + /** + * This number is here for model snapshot storing purpose<br> + * It needs to be changed when this class gets changed + */ + private static final long serialVersionUID = 1L; + +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206084</Id> + <Name>Battery_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Battery_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Battery_data { + //Database column name + String gc_id; + String gc_name; + String owner_id; + String streetname; + Integer house_number; + String house_letter; + String house_addition; + String postalcode; + String city; + String gridnode_id; + boolean initially_active; + boolean isSliderGC; + double storage_capacity_kwh; + double capacity_electric_kw; + double connection_capacity_kw; + Double contracted_delivery_capacity_kw; + Double contracted_feed_in_capacity_kw; + OL_BatteryOperationMode operation_mode; + double latitude; + double longitude; + String polygon; +} +</Text> + </JavaClass> + <JavaClass> + <Id>1726584206085</Id> + <Name>Building_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Building_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Building_data { + //Database column name + String address_id; + String building_id; + String streetname; + Integer house_number; + String house_letter; + String house_addition; + String postalcode; + String city; + Integer build_year; + String status; + String purpose; + Double address_floor_surface_m2; + Double polygon_area_m2; + String gc_id; + String annotation; + String extra_info; + Double contracted_capacity_kw; + Double electricity_consumption_kwhpa; + Double gas_consumption_kwhpa; + Double space_heating_consumption_kwhpa; + Double dhw_consumption_kwhpa; + Double cooking_consumption_kwhpa; + Double pv_installed_kwp; + Double pv_potential_kwp; + OL_GridConnectionIsolationLabel energy_label; + Boolean has_private_parking; + String gridnode_id; + Double latitude; + Double longitude; + String polygon; + + Integer ownership_int; + Integer constructionPeriod_int; + Integer buildingType_int; + Double localFactor; + Double regionalClimateCorrectionFactor; +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206086</Id> + <Name>Cable_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Cable_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Cable_data { + String fid; + OL_GISObjectType type; // LV_CABLE or MV_CABLE, maybe more in future + boolean status; + Double nominal_voltage_v; + String label; + String description; + double latitude; + double longitude; + String line; +} +</Text> + </JavaClass> + <JavaClass> + <Id>1726584206087</Id> + <Name>Chargingstation_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Chargingstation_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Chargingstation_data { + //Database column name + String gc_id; + String gc_name; + String owner_id; + String streetname; + Integer house_number; + String house_letter; + String house_addition; + String postalcode; + String city; + String gridnode_id; + Double connection_capacity_kw; + boolean is_charging_centre; + OL_EnergyAssetType vehicle_type; + Integer number_of_chargers; + double power_per_charger_kw; + boolean initially_active; + double latitude; + double longitude; + String polygon; +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206088</Id> + <Name>Electrolyser_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Electrolyser_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Electrolyser_data { + String gc_id; + String gc_name; + String owner_id; + String streetname; + Integer house_number; + String house_letter; + String house_addition; + String postalcode; + String city; + String gridnode_id; + boolean initially_active; + double capacity_electric_kw; + double connection_capacity_kw; + Double contracted_delivery_capacity_kw; + Double contracted_feed_in_capacity_kw; + OL_ElectrolyserOperationMode default_operation_mode; + double conversion_efficiency; + double min_production_ratio; + double idle_consumption_power_ratio; + double start_up_time_shutdown_s; + double start_up_time_standby_s; + double start_up_time_idle_s; + double load_change_time_s; + double latitude; + double longitude; + String polygon; +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206089</Id> + <Name>GridNode_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * GridNode_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class GridNode_data { + String gridnode_id; + String fid; + boolean status; + String type; + String description; + double latitude; + double longitude; + String parent_node_id; + boolean is_capacity_available; + double capacity_kw; + String subscope; + String service_area_polygon; + double[] profile_data_kWh; +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206090</Id> + <Name>Neighbourhood_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Neighbourhood_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Neighbourhood_data { + String neighbourhoodcode; + String neighbourhoodname; + String districtcode; + OL_GISObjectType neighbourhoodtype; //REGION OR ANTILAYER (OR IN FUTURE GCNBH) + double latitude; + double longitude; + String polygon; + + //Energy totals + Double avg_house_elec_delivery_kwh_p_yr; + Double avg_house_gas_delivery_m3_p_yr; + Double avg_number_of_cars_per_house; + Double total_comp_elec_delivery_kwh_p_yr; + Double total_comp_gas_delivery_m3_p_yr; + Integer total_nr_comp_cars; + Integer total_nr_comp_vans; + Integer total_nr_comp_trucks; +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206091</Id> + <Name>Parcel_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Parcel_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Parcel_data { + String parcel_id; + String name; + String streetname; + Integer house_number; + String house_letter; + String house_addition; + String postalcode; + String city; + double polygon_area_m2; + double latitude; + double longitude; + String polygon; +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206093</Id> + <Name>Project_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Project_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Project_data { + + //Project settings + String project_name; + OL_ProjectType project_type; + OL_SurveyType survey_type; + + //Zorm project names + String[] zorm_project_names; + + //Database names + List<String[]> databaseNames; + + //Map centre coordinates + Double map_centre_latitude; + Double map_centre_longitude; + Double map_scale; + + //Project specific actors + String grid_operator; + Boolean hasCongestionPricing; + String energy_coop; + String energy_supplier; + + //Project totals + Double total_electricity_consumption_companies_kWh_p_yr; + Double total_gas_consumption_companies_m3_p_yr; + Double avg_electricity_consumption_house_kWh_p_yr; + Double avg_gas_consumption_house_m3_p_yr; + Double avg_number_of_cars_per_house; + Integer total_cars_companies; + Integer total_vans_companies; + Integer total_trucks_companies; + + //Project data parameters + Double gridnode_profile_timestep_hr; +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206094</Id> + <Name>Settings</Name> + <Text>/** + * Settings + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Settings { + + //Simulation settings + boolean reloadDatabase; // Reloads the excels into the project database + boolean createCurrentElectricityEA; // Create current Electric assets if a real electricity profile or total is present. + //--> Put on 'false' to prevent electric assets from being made on top of real + //electricity total or profile, to prevent wrong energy totals. + boolean runHeadlessAtStartup;// Runs year simulation on starting of the model + Boolean showKPISummary; // Setting used to active the KPI summary of the resultsUI. If on true, it will be shown after a year simulation + ArrayList<String> subscopesToSimulate; // Selected subscopes to simulate (used for larger models that have memory/speed problems). + OL_RadioButtonSetup resultsUIRadioButtonSetup; // Selected (radiobuttons -> graphs) setup for the resultsUI. + boolean isPublicModel; // Boolean used to control if the model should be ran in a public version mode: + // Connection owners where dataSharingAgreed = false, cant be clicked. Just like low level gridnodes. + List<OL_MapOverlayTypes> activeMapOverlayTypes; //If defined it will override the default map overlay setup as defined in the generic interface/loader. + //Add all map overlays to this list that you want to be usable in the simulation + Double simDuration_h; // If filled in it will be set as the (rapid) sim duration instead of the default setting (8760 - p_timeStep_h) IF experiment end time is not set!. +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206095</Id> + <Name>Solarfarm_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Solarfarm_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Solarfarm_data { + + String gc_id; + String gc_name; + String owner_id; + String streetname; + Integer house_number; + String house_letter; + String house_addition; + String postalcode; + String city; + String gridnode_id; + boolean initially_active; + boolean isSliderGC; + double capacity_electric_kw; + double connection_capacity_kw; + Double contracted_delivery_capacity_kw; + Double contracted_feed_in_capacity_kw; + double latitude; + double longitude; + String polygon; +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206096</Id> + <Name>User</Name> + <Text>import lombok.Builder; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@Builder(toBuilder = true) +@Accessors(fluent = true) +public class User { + + // Vallum + String PROJECT_CLIENT_ID; + String PROJECT_CLIENT_SECRET; + + public void clearVallumUser() { + this.PROJECT_CLIENT_ID = null; + this.PROJECT_CLIENT_SECRET = null; + } + + // User id token (Used for storing scenarios for example) + String userIdToken; + + // User accessible NBH + @Builder.Default + OL_UserNBHAccessType NBHAccessType = OL_UserNBHAccessType.FULL; + + List<String> accessibleNBH; + + //User GC acces type + @Builder.Default + OL_UserGCAccessType GCAccessType = OL_UserGCAccessType.FULL; + + List<String> accessibleCompanyIDs; +}</Text> + </JavaClass> + <JavaClass> + <Id>1726584206097</Id> + <Name>Windfarm_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * Windfarm_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class Windfarm_data { + + String gc_id; + String gc_name; + String owner_id; + String streetname; + Integer house_number; + String house_letter; + String house_addition; + String postalcode; + String city; + String gridnode_id; + boolean initially_active; + boolean isSliderGC; + double capacity_electric_kw; + double connection_capacity_kw; + Double contracted_delivery_capacity_kw; + Double contracted_feed_in_capacity_kw; + double latitude; + double longitude; + String polygon; +}</Text> + </JavaClass> + <JavaClass> + <Id>1737714961123</Id> + <Name>ListUtil</Name> + <Text> +public class ListUtil { + private ListUtil() { + } + + static double[] doubleListToArray(List<Double> list) { + double[] array = new double[list.size()]; + for (int i = 0; i < array.length; i++) { + array[i] = list.get(i); + } + return array; + } +} + + + + + + + + + + + + +</Text> + </JavaClass> + <JavaClass> + <Id>1744204067723</Id> + <Name>J_InfoText</Name> + <Text>/** + * J_InfoText + */ +public class J_InfoText implements Serializable { + + + public String lorumIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; + + //// Main Interface \\\\ + // TODO + + //// Public version + public String publicVersionWarning = "In de publieke variant zijn een aantal functionaliteiten uitgezet en zijn bepaalde bedrijven en hun data afgeschermd."; + + //// TABS \\\\ + //// Electricity Tab + public String electricityDemandReduction = "Met deze slider kun je het basisverbruik van stroom voor huizen en bedrijven aanpassen. Een positief percentage betekent dat ze minder verbruiken dan in het basis scenario. Een negatief percentage betekent dat het verbruik is toegenomen. Dit past niet de hoeveelheid stroombehoefte aan voor specifieke apparaten die apart in het model zitten zoals warmtepompen en elektrische auto's. Zie hiervoor de besparingsslider in de tabjes warmte of transport."; + public String householdElectricityDemandReduction = "Met deze slider kun je het basisverbruik van stroom voor huizen aanpassen. Een positief percentage betekent dat ze minder verbruiken dan in het basis scenario. Een negatief percentage betekent dat het verbruik is toegenomen. Dit past niet de hoeveelheid stroombehoefte aan voor specifieke apparaten die apart in het model zitten zoals warmtepompen en elektrische auto's. Zie hiervoor de besparingsslider in de tabjes warmte of transport."; + public String companyElectricityDemandReduction = "Met deze slider kun je het basisverbruik van stroom voor bedrijven aanpassen. Een positief percentage betekent dat ze minder verbruiken dan in het basis scenario. Een negatief percentage betekent dat het verbruik is toegenomen. Dit past niet de hoeveelheid stroombehoefte aan voor specifieke apparaten die apart in het model zitten zoals warmtepompen en elektrische auto's. Zie hiervoor de besparingsslider in de tabjes warmte of transport."; + public String householdRooftopPV = "Met deze slider kun je instellen welk aandeel van de huizen zonnepanelen op hun dak heeft liggen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String companyRooftopPV = "Met deze slider kun je instellen welk deel van alle daken van de bedrijven zonnepanelen bevat. Het aantal zonnepanelen voor een bedrijf wordt geschaald naar het dak oppervlak van het bedrijf. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String landPV = "Met deze slider kun je instellen hoeveel zonneparken er in het model zitten. 1 hectare zonnepark heeft een piek opwek van 1 MW. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String landWind = "Met deze slider kun je instellen hoeveel windmolens er in het model zitten. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String householdBatteries = "Met deze slider kun je instellen welk aandeel van de huizen die zonnepanelen op hun dak hebben liggen een batterij hebben. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String householdElectricCooking = "Met deze slider kun je instellen welk aandeel van de huizen elektrisch koken."; + public String householdElectricityConsumptionGrowth = "Met deze slider kun je het basisverbruik van stroom voor huizen aanpassen. Een positief percentage betekent dat ze meer verbruiken dan in het basis scenario. Een negatief percentage betekent dat het verbruik is afgenomen. Dit past niet de hoeveelheid stroombehoefte aan voor specifieke apparaten die apart in het model zitten zoals warmtepompen en elektrische auto's. Zie hiervoor de besparingsslider in de tabjes warmte of transport."; + public String curtailment = "Met deze knop kun je curtailment van stroom productie door huizen en bedrijven aan of uit zetten. Zet je hem aan, dan wordt alle energie productie die niet in de gecontracteerde teruglevercapaciteit past gecurtailt (oftewel: 'weggegooit')"; + public String gridBattery_default = "Met deze slider kun je instellen hoe groot de buurtbatterij is. Deze batterij probeert het profiel van het gehele model vlak te trekken."; + public String gridBattery_residential = "Met deze slider kun je instellen hoe groot de buurtbatterijen zijn. Stel je hem bijvoorbeeld in op 1 MWh, dan heeft elke trafo in het model een buurtbatterij van 1 MWh. Deze batterijen proberen vervolgens het profiel van hun eigen trafo vlak te trekken."; + + //// Heat Tab + // generic + public String heatDemandReduction = "Met deze slider kun je de behoefte aan warmte voor huizen en bedrijven aanpassen. Een positief percentage betekent dat ze minder warmte nodig hebben dan in het basis scenario. Een negatief percentage betekent dat ze meer warmte nodig hebben. Dit verandert niet de temperatuur in het gebouw, maar de benodigde hoeveelheid energie om te verwarmen. Deze slider gaat bijvoorbeeld over betere isolatie in de gebouwen."; + public String gasBoiler = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen met een gasboiler. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String electricHeatpump = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen met een elektrische warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String hybridHeatpump = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen met een hybride warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String heatGrid = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen via een warmtenet. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String electricBoiler = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen met een elektrische boiler. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + + // household + public String householdHeatDemandReduction = "Met deze slider kun je de behoefte aan warmte voor huizen aanpassen. Een positief percentage betekent dat ze minder warmte nodig hebben dan in het basis scenario. Een negatief percentage betekent dat ze meer warmte nodig hebben. Dit verandert niet de temperatuur in het gebouw, maar de benodigde hoeveelheid energie om te verwarmen. Deze slider gaat bijvoorbeeld over betere isolatie in de gebouwen."; + public String householdGasBoiler = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen met een gasboiler. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String householdElectricHeatpump = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen met een elektrische warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String householdHybridHeatpump = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen met een hybride warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String householdHeatGrid = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen via een warmtenet. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String householdElectricBoiler = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen met een elektrische boiler. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String householdHTDistrictHeating = "Met deze knop kun je alle huizen aansluiten op een hoog-temperatuur warmtenet. Als er geen warmtebron ingesteld is voor het warmtenet dan wordt de warmte als import gerekend."; + public String householdLTDistrictHeating = "Met deze knop kun je alle huizen aansluiten op een laag-temperatuur warmtenet. In de huizen wordt een warmtepomp geplaatst om de warmte verder op te waarderen. Als er geen warmtebron ingesteld is voor het warmtenet dan wordt de warmte als import gerekend."; + public String householdAirconditioning = "Met deze slider kun je instellen welk aandeel van de huizen een air conditioning unit hebben."; + public String householdAdditionalInsulation = "Met deze slider kun je instellen welk aandeel van de huizen extra geisoleerd zijn. Deze huizen hebben 30% minder warmtebehoefte voor het verwarmen van ruimtes."; + public String householdRooftopPT = "Met deze slider kun je instellen welk aandeel van de huizen PhotoThermische panelen op hun dak heeft liggen. Maar let op: Als er PT op het dak ligt, is er minder ruimte voor PV panelen, en zal de maximale potentiele opbrengst van PV voor die huizen dus verminderen."; + // company + public String companyHeatDemandReduction = "Met deze slider kun je de behoefte aan warmte voor bedrijven aanpassen. Een positief percentage betekent dat ze minder warmte nodig hebben dan in het basis scenario. Een negatief percentage betekent dat ze meer warmte nodig hebben. Dit verandert niet de temperatuur in het gebouw, maar de benodigde hoeveelheid energie om te verwarmen. Deze slider gaat bijvoorbeeld over betere isolatie in de gebouwen."; + public String companyGasBoiler = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen met een gasboiler. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String companyElectricHeatpump = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen met een elektrische warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String companyHybridHeatpump = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen met een hybride warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String companyHeatGrid = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen via een warmtenet. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String companyElectricBoiler = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen met een elektrische boiler. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String companyCustomHeating = "Deze slider is puur visueel. In deze slider is weergegeven welk aandeel van de bedrijven verwarmen met een Custom warmte systeem. Een Custom systeem betekent hier een systeem dat bestaat uit meerdere verschillende warmte producerende apparaten of andere complexe situaties. Omdat deze systemen zo complex zijn, zijn ze niet simpelweg te vervangen door een enkel ander systeem. Daarom kan je deze slider ook niet aanpassen."; + + //// Mobility Tab + //DEFAULT + public String mobilityDemandReduction = "Met deze slider kun je de hoeveelheid transportbewegingen van wagens aanpassen. Een positief percentage betekent dat ze minder kilometers per jaar rijden dan in het basis scenario. Een negatief percentage betekent dat ze meer kilometers gaan rijden. Deze slider verandert niet het aantal voertuigen."; + public String chargingBehaviour = "Hier kun je verschillende laadstrategieën selecteren. Standaard wordt er dom geladen, dat wil zeggen dat de wagen op moment van aankomst inprikt en op vol vermogen laad tot de batterij vol is. Bij Max Spread kijkt de wagen op moment van aankomst wanneer hij weer moet vertrekken en verdeelt hij zijn laadbehoefte gelijk over deze tijd. Bij Max Power probeert hij te laden op het maximale vermogen wat nog binnen de aansluiting past, echter als de accu daardoor niet vol zou zijn voordat de wagen vertrekt wordt aan het einde alsnog op vol vermogen geladen. Hierdoor kan de aansluitingscapaciteit alsnog worden overschreden."; + public String mobilitySmartCharging = "Standaard laden autos gewoon met een standaard vermogen. Vink je deze knop aan, dan gaan de autos slim laden: Voertuigen laden op met een zo vlak mogelijk profiel, waardoor ze vervolgens wel hun geplande rit kunnen maken, zonder voor grote pieken te zorgen."; + + // trucks + public String electricTrucks = "Met deze slider kun je instellen welk aandeel van alle vrachtwagens elektrisch is. Als je deze slider verhoogt dan wordt eerst geprobeerd vrachtwagens die rijden op fossiele brandstof te vervangen door elektrische vrachtwagens. Eventueel daarna worden vrachtwagens die rijden op waterstof omgezet in elektrische vrachtwagens. Als je deze slider verlaagt dan worden elektrische vrachtwagens omgezet naar vrachtwagens die rijden op fossiele brandstof. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String hydrogenTrucks = "Met deze slider kun je instellen welk aandeel van alle vrachtwagens op waterstof rijdt. Als je deze slider verhoogt dan wordt eerst geprobeerd vrachtwagens die rijden op fossiele brandstof te vervangen door vrachtwagens die rijden op waterstof. Eventueel daarna worden elektrische vrachtwagens omgezet in vrachtwagens die rijden op waterstof. Als je deze slider verlaagt dan worden vrachtwagens die rijden op waterstof omgezet naar vrachtwagens die rijden op fossiele brandstof. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String fossilTrucks = "Met deze slider kun je instellen welk aandeel van alle vrachtwagens op fossiele brandstof rijdt. Als je deze slider verhoogt dan wordt eerst geprobeerd elektrische vrachtwagens te vervangen door vrachtwagens die rijden op fossiele brandstof. Eventueel daarna worden vrachtwagens die rijden op waterstof omgezet in vrachtwagens die rijden op fossiele brandstof. Als je deze slider verlaagt dan worden vrachtwagens die rijden op fossiele brandstof omgezet naar elektrische vrachtwagens. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + // vans + public String electricVans = "Met deze slider kun je instellen welk aandeel van alle busjes elektrisch is. Als je deze slider verhoogt dan worden busjes die rijden op fossiele brandstof vervangen door elektrische busjes. Als je deze slider verlaagt dan worden elektrische busjes omgezet naar busjes die rijden op fossiele brandstof. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String fossilVans = "Met deze slider kun je instellen welk aandeel van alle busjes op fossiele brandstof rijdt. Als je deze slider verhoogt dan worden elektrische busjes vervangen door busjes die rijden op fossiele brandstof. Als je deze slider verlaagt dan worden busjes die rijden op fossiele brandstof omgezet naar elektrische busjes. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + // cars + public String electricCars = "Met deze slider kun je instellen welk aandeel van alle auto's elektrisch is. Als je deze slider verhoogt dan worden auto's die rijden op fossiele brandstof vervangen door elektrische auto's. Als je deze slider verlaagt dan worden elektrische auto's omgezet naar auto's die rijden op fossiele brandstof. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + public String fossilCars = "Met deze slider kun je instellen welk aandeel van alle auto's op fossiele brandstof rijdt. Als je deze slider verhoogt dan worden elektrische auto's vervangen door auto's die rijden op fossiele brandstof. Als je deze slider verlaagt dan worden auto's die rijden op fossiele brandstof omgezet naar elektrische auto's. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; + + //RESIDENTIAL + public String householdPublicChargersBehaviour = "Met deze knoppen kun je instellen wat het laadgedrag is van de publieke laadpalen. Met V1G wordt uitgesteld laden of 'slim' laden bedoeld. Met V2G kunnen de voertuigen ook terugleveren aan het net."; + public String householdPublicParkingV1G = "Met deze slider kun je instellen welk aandeel van de publieke laadpalen V1G ondersteunen."; + public String householdPublicParkingV2G = "Met deze slider kun je instellen welk aandeel van de publieke laadpalen V2G ondersteunen."; + public String householdPrivateParking = "Met deze slider kun je instellen welk aandeel huizen met een eigen oprit een EV heeft."; + public String householdPublicParking = "Met deze slider kun je instellen hoe veel publieke laadpalen er in het model zitten. Door meer publieke laadpalen toe te voegen verdwijnen er auto's die op fossiele brandstoffen rijden."; + + public String EVsThatSupportV2G = "Met deze slider kun je instellen welk aandeel van EVs de mogelijkheid hebben om te ontladen (V2G)"; + public String activateV2GPrivatePublicChargers = "Met deze knop kun je V2G activeren voor publieke laadpalen. Hierbij zullen alle laadpalen die het ondersteunen V2G toepassen wanneer het volgens de geselecteerde laadstrategie gewenst is."; + public String activateV2GPrivateParkedCars = "Met deze knop kun je V2G activeren voor privé geparkeerde EVs . Hierbij zullen alle EVs die het ondersteunen V2G toepassen wanneer het volgens de geselecteerde laadstrategie gewenst is."; + public String chargingStrategyPublicChargers = "Met dit drop down menu kun je uitkiezen welke laad strategie je wilt toepassen op alle actieve publieke laadpalen."; + public String chargingAttitudePrivateParkedCars = "Met dit drop down menu kun je uitkiezen welke laad strategie je wilt toepassen op alle prive geladen EVs"; + + //// E-Hub Tab + //TODO + + ////Map overlays + + //Congestion + public String i_mapOverlayLegend_congestion_Degrees = "Als een GIS-object (zoals een pand of transformator) groen wordt weergegeven, is er nog voldoende beschikbare capaciteit. Een oranje object duidt erop dat tijdens de jaarsimulatie de grens van 70% van de capaciteit (voor panden: de contractcapaciteit) is overschreden. Een rood object betekent dat de volledige capaciteit (100%) is overschreden."; + public String i_mapOverlayLegend_congestion_Types = "Met deze knoppen kun je selecteren welk type belasting je wilt visualiseren: Afname, teruglevering, of de maximum belasting van beide."; + + /** + * Default constructor + */ + public J_InfoText() { + } + + //public Pair<String, Integer> getLorumIpsum(int width_ch, String descriptionText) { + //return this.restrictWidth(descriptionText, width_ch); + //} + + public Pair<String, Integer> restrictWidth( String txt, int width_ch ) { + StringBuilder output = new StringBuilder(); + int remainingTextSize = txt.length(); + int currentIndex = 0; + int lines = 0; + while (remainingTextSize > width_ch) { + int i = 0; + while (!Character.isWhitespace(txt.charAt(currentIndex + width_ch - i))) { + i++; + if (i > width_ch) { + throw new RuntimeException("Impossible to format string to fit within width."); + } + } + output.append(txt.substring(currentIndex, currentIndex + width_ch - i)); + output.append('\n'); + currentIndex += width_ch - i + 1; + remainingTextSize -= width_ch - i + 1; + lines++; + } + output.append(txt.substring(currentIndex, txt.length())); + lines++; + return new Pair(output.toString(), lines); + } + + @Override + public String toString() { + return super.toString(); + } + + /** + * This number is here for model snapshot storing purpose<br> + * It needs to be changed when this class gets changed + */ + private static final long serialVersionUID = 1L; + +}</Text> + </JavaClass> + <JavaClass> + <Id>1749138380458</Id> + <Name>CustomProfile_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * CustomProfile_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class CustomProfile_data { + + String customProfileID; + List<Double> argumentsList; + List<Double> valuesList; + + public double[] getArgumentsArray() { + return ListUtil.doubleListToArray(argumentsList); + } + public double[] getValuesArray() { + return ListUtil.doubleListToArray(valuesList); + } + +}</Text> + </JavaClass> + <JavaClass> + <Id>1749549699201</Id> + <Name>DefaultProfiles_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * DefaultProfiles_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class DefaultProfiles_data { + + //Arguments + List<Double> arguments_hr; + + // Weather data + List<Double> ambientTemperatureProfile_degC; + List<Double> PVProductionProfile35DegSouth_fr; + List<Double> PVProductionProfile15DegEastWest_fr; + List<Double> windProductionProfile_fr; + + //EPEX data + List<Double> epexProfile_eurpMWh; + + // Various demand profiles + List<Double> defaultHouseElectricityDemandProfile_fr; + List<Double> defaultHouseHotWaterDemandProfile_fr; + List<Double> defaultHouseCookingDemandProfile_fr; + List<Double> defaultOfficeElectricityDemandProfile_fr; + List<Double> defaultBuildingHeatDemandProfile_fr; + + //Maximum getters + public double getDefaultOfficeElectricityDemandProfileMaximum_fr() { + return Collections.max(defaultOfficeElectricityDemandProfile_fr); + } + public double getDefaultBuildingHeatDemandProfileMaximum_fr() { + return Collections.max(defaultBuildingHeatDemandProfile_fr); + } +}</Text> + </JavaClass> + <JavaClass> + <Id>1749649742298</Id> + <Name>ChargerProfile_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * ChargerProfile_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class ChargerProfile_data { + + String chargerProfileID; + List<String> valuesList; + +}</Text> + </JavaClass> + <JavaClass> + <Id>1749738288352</Id> + <Name>ParkingSpace_data</Name> + <Folder>1754045711603</Folder> + <Text>/** + * ParkingSpace_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class ParkingSpace_data { + //Database column name + String parking_id; + String street; + OL_ParkingSpaceType type; + String additional_info; + + Double pv_potential_kwp; + + String gridnode_id; + + Double latitude; + Double longitude; + String polygon; +}</Text> + </JavaClass> + <JavaClass> + <Id>1753884053162</Id> + <Name>J_ModelSave</Name> + <Folder>1761915047244</Folder> + <Text>/** + * J_ModelSave + */ +public class J_ModelSave implements Serializable { + + public EnergyModel energyModel; + public ArrayList<GridNode> c_gridNodes = new ArrayList<GridNode>(); + public ArrayList<GIS_Object> c_GISObjects = new ArrayList<GIS_Object>(); + + public ArrayList<GCUtility> c_orderedPVSystemsCompanies; + public ArrayList<GCHouse> c_orderedPVSystemsHouses; + public ArrayList<J_EA> c_orderedVehicles; + public ArrayList<GCUtility> c_orderedHeatingSystemsCompanies; + public ArrayList<GCHouse> c_orderedHeatingSystemsHouses; + public ArrayList<J_EADieselVehicle> c_orderedActiveVehiclesPublicParking; + public ArrayList<J_EADieselVehicle> c_orderedNonActiveVehiclesPublicParking; + public ArrayList<J_EAVehicle> c_orderedVehiclesPrivateParking; + public ArrayList<GIS_Object> c_orderedParkingSpaces; + + public ArrayList<J_EAChargePoint> c_orderedV1GChargers; + public ArrayList<J_EAChargePoint> c_orderedV2GChargers; + public ArrayList<GCPublicCharger> c_orderedPublicChargers; + + public LinkedHashMap<String, List<J_EADieselVehicle>> c_mappingOfVehiclesPerCharger; + public LinkedHashMap<String, J_scenario_Current> c_scenarioMap_Current; + public LinkedHashMap<String, J_scenario_Future> c_scenarioMap_Future; + + public List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps; + + /** + * Default constructor + */ + public J_ModelSave() { + } + + @Override + public String toString() { + return super.toString(); + } + + /** + * This number is here for model snapshot storing purpose<br> + * It needs to be changed when this class gets changed + */ + private static final long serialVersionUID = 1L; + +}</Text> + </JavaClass> + <JavaClass> + <Id>1761122454908</Id> + <Name>J_SliderSettings_Residential</Name> + <Folder>1761915047244</Folder> + <Text>/** + * J_SliderSettings_Residential + */ +public class J_SliderSettings_Residential { + + ////Electricity + private double housesWithPV_pct; + private double pvHousesWithBattery_pct; + private double cooking_pct; + private double electricityDemandIncrease_pct; + private double averageNeighbourhoodBatterySize_kWh; + + ////Heating + private double housesWithGasBurners_pct; + private double housesWithHybridHeatpump_pct; + private double housesWithElectricHeatpump_pct; + private boolean cb_householdHTDistrictHeatingActive; + private boolean cb_householdLTDistrictHeatingActive; + private double housesWithAirco_pct; + private double housesWithImprovedInsulation_pct; + private double nbHousesWithPT_pct; + + ////Mobility + private double privateEVs_pct; + private double privateEVsThatSupportV2G_pct; + private String selectedChargingAttitudeStringPrivateEVs; + private boolean V2GActivePrivateEVs; + private double activePublicChargers_pct; + private double chargersV1G_pct; + private double chargersV2G_pct; + private String selectedChargingAttitudeStringChargers; + private boolean V2GActiveChargers; + + + + /** + * Default constructor + */ + public J_SliderSettings_Residential() { + } + + // ====== Setters ====== + public void setHousesWithPV_pct(double housesWithPV_pct) { + this.housesWithPV_pct = housesWithPV_pct; + } + + public void setPvHousesWithBattery_pct(double pvHousesWithBattery_pct) { + this.pvHousesWithBattery_pct = pvHousesWithBattery_pct; + } + + public void setCooking_pct(double cooking_pct) { + this.cooking_pct = cooking_pct; + } + + public void setElectricityDemandIncrease_pct(double electricityDemandIncrease_pct) { + this.electricityDemandIncrease_pct = electricityDemandIncrease_pct; + } + + public void setAverageNeighbourhoodBatterySize_kWh(double averageNeighbourhoodBatterySize_kWh) { + this.averageNeighbourhoodBatterySize_kWh = averageNeighbourhoodBatterySize_kWh; + } + + // Heating + public void setHousesWithGasBurners_pct(double housesWithGasBurners_pct) { + this.housesWithGasBurners_pct = housesWithGasBurners_pct; + } + + public void setHousesWithHybridHeatpump_pct(double housesWithHybridHeatpump_pct) { + this.housesWithHybridHeatpump_pct = housesWithHybridHeatpump_pct; + } + + public void setHousesWithElectricHeatpump_pct(double housesWithElectricHeatpump_pct) { + this.housesWithElectricHeatpump_pct = housesWithElectricHeatpump_pct; + } + + public void setCb_householdHTDistrictHeatingActive(boolean cb_householdHTDistrictHeatingActive) { + this.cb_householdHTDistrictHeatingActive = cb_householdHTDistrictHeatingActive; + } + + public void setCb_householdLTDistrictHeatingActive(boolean cb_householdLTDistrictHeatingActive) { + this.cb_householdLTDistrictHeatingActive = cb_householdLTDistrictHeatingActive; + } + + public void setHousesWithAirco_pct(double housesWithAirco_pct) { + this.housesWithAirco_pct = housesWithAirco_pct; + } + + public void setHousesWithImprovedInsulation_pct(double housesWithImprovedInsulation_pct) { + this.housesWithImprovedInsulation_pct = housesWithImprovedInsulation_pct; + } + + public void setNbHousesWithPT_pct(double nbHousesWithPT_pct) { + this.nbHousesWithPT_pct = nbHousesWithPT_pct; + } + + // Mobility + public void setPrivateEVs_pct(double privateEVs_pct) { + this.privateEVs_pct = privateEVs_pct; + } + + public void setPrivateEVsThatSupportV2G_pct(double privateEVsThatSupportV2G_pct) { + this.privateEVsThatSupportV2G_pct = privateEVsThatSupportV2G_pct; + } + + public void setSelectedChargingAttitudeStringPrivateEVs(String selectedChargingAttitudeStringPrivateEVs) { + this.selectedChargingAttitudeStringPrivateEVs = selectedChargingAttitudeStringPrivateEVs; + } + + public void setV2GActivePrivateEVs(boolean V2GActivePrivateEVs) { + this.V2GActivePrivateEVs = V2GActivePrivateEVs; + } + + public void setActivePublicChargers_pct(double activePublicChargers_pct) { + this.activePublicChargers_pct = activePublicChargers_pct; + } + + public void setChargersV1G_pct(double chargersV1G_pct) { + this.chargersV1G_pct = chargersV1G_pct; + } + + public void setChargersV2G_pct(double chargersV2G_pct) { + this.chargersV2G_pct = chargersV2G_pct; + } + + public void setSelectedChargingAttitudeStringChargers(String selectedChargingAttitudeStringChargers) { + this.selectedChargingAttitudeStringChargers = selectedChargingAttitudeStringChargers; + } + + public void setV2GActiveChargers(boolean V2GActiveChargers) { + this.V2GActiveChargers = V2GActiveChargers; + } + + // ====== Getters ====== + public double getHousesWithPV_pct() { + return housesWithPV_pct; + } + + public double getPvHousesWithBattery_pct() { + return pvHousesWithBattery_pct; + } + + public double getCooking_pct() { + return cooking_pct; + } + + public double getElectricityDemandIncrease_pct() { + return electricityDemandIncrease_pct; + } + + public double getAverageNeighbourhoodBatterySize_kWh() { + return averageNeighbourhoodBatterySize_kWh; + } + + // Heating + public double getHousesWithGasBurners_pct() { + return housesWithGasBurners_pct; + } + + public double getHousesWithHybridHeatpump_pct() { + return housesWithHybridHeatpump_pct; + } + + public double getHousesWithElectricHeatpump_pct() { + return housesWithElectricHeatpump_pct; + } + + public boolean getCb_householdHTDistrictHeatingActive() { + return cb_householdHTDistrictHeatingActive; + } + + public boolean getCb_householdLTDistrictHeatingActive() { + return cb_householdLTDistrictHeatingActive; + } + + public double getHousesWithAirco_pct() { + return housesWithAirco_pct; + } + + public double getHousesWithImprovedInsulation_pct() { + return housesWithImprovedInsulation_pct; + } + + public double getNbHousesWithPT_pct() { + return nbHousesWithPT_pct; + } + + // Mobility + public double getPrivateEVs_pct() { + return privateEVs_pct; + } + + public double getPrivateEVsThatSupportV2G_pct() { + return privateEVsThatSupportV2G_pct; + } + + public String getSelectedChargingAttitudeStringPrivateEVs() { + return selectedChargingAttitudeStringPrivateEVs; + } + + public boolean getV2GActivePrivateEVs() { + return V2GActivePrivateEVs; + } + + public double getActivePublicChargers_pct() { + return activePublicChargers_pct; + } + + public double getChargersV1G_pct() { + return chargersV1G_pct; + } + + public double getChargersV2G_pct() { + return chargersV2G_pct; + } + + public String getSelectedChargingAttitudeStringChargers() { + return selectedChargingAttitudeStringChargers; + } + + public boolean getV2GActiveChargers() { + return V2GActiveChargers; + } + +}</Text> + </JavaClass> + <JavaClass> + <Id>1761914526110</Id> + <Name>J_RemainingTotals</Name> + <Folder>1761915047244</Folder> + <Text>/** + * J_RemainingTotals + */ +public class J_RemainingTotals { + //Parameters + private String idNBH; + Map<OL_EnergyCarriers, Double> remainingECDeliveryCompanies_kWh = new HashMap<>(); + Map<OL_VehicleType, Integer> remainingNumberOfVehiclesCompanies = new HashMap<>(); + private double totalFloorSurfaceAnonymousCompanies_m2 = 0.0; + private int totalNumberOfAnonymousCompanies = 0; + + //Calculated values + Map<OL_EnergyCarriers, Double> ECDeliveryOfAnonymousCompanies_kWhpm2 = new HashMap<>(); + + //Distribution support values + Map<OL_VehicleType, Integer> remainingNumberOfAnonymousCompaniesPerVehicleType= new HashMap<>(); + + //Class state + private boolean isFinalized = false; + + + //TEMPORARY SOLUTION FOR NOW TO CONVERT GAS IN M3, UNTIL LOMBOK PACKAGE IS IN KWH OR OTHER SOLUTION + private AVGC_data avgc_data; + + public J_RemainingTotals(Neighbourhood_data dataNBH, AVGC_data avgc_data) { + + //TEMPORARY + this.avgc_data = avgc_data; + + this.idNBH = dataNBH.neighbourhoodname(); + + if(dataNBH.total_comp_elec_delivery_kwh_p_yr() != null && dataNBH.total_comp_elec_delivery_kwh_p_yr() >= 0){ + this.remainingECDeliveryCompanies_kWh.put(OL_EnergyCarriers.ELECTRICITY, dataNBH.total_comp_elec_delivery_kwh_p_yr()); + } + if(dataNBH.total_comp_gas_delivery_m3_p_yr() != null && dataNBH.total_comp_gas_delivery_m3_p_yr() >= 0){ + this.remainingECDeliveryCompanies_kWh.put(OL_EnergyCarriers.METHANE, dataNBH.total_comp_gas_delivery_m3_p_yr() * this.avgc_data.p_gas_kWhpm3); + } + if(dataNBH.total_nr_comp_cars() != null && dataNBH.total_nr_comp_cars() >= 0){ + this.remainingNumberOfVehiclesCompanies.put(OL_VehicleType.CAR, dataNBH.total_nr_comp_cars()); + } + if(dataNBH.total_nr_comp_vans() != null && dataNBH.total_nr_comp_vans() >= 0){ + this.remainingNumberOfVehiclesCompanies.put(OL_VehicleType.VAN, dataNBH.total_nr_comp_vans()); + } + if(dataNBH.total_nr_comp_trucks() != null && dataNBH.total_nr_comp_trucks() >= 0){ + this.remainingNumberOfVehiclesCompanies.put(OL_VehicleType.TRUCK, dataNBH.total_nr_comp_trucks()); + } + } + + ////Setters for finalization + public void setECDeliveryOfAnonymousCompanies_kWhpm2(OL_EnergyCarriers EC, double value_kWh) { + if(this.isFinalized) { + throw new RuntimeException("Trying to setECDeliveryOfAnonymousCompanies_kWhpm2 while class is finalized"); + } + if(ECDeliveryOfAnonymousCompanies_kWhpm2.containsKey(EC)) { + throw new RuntimeException("Setting ECDeliveryOfAnonymousCompanies_kWhpm2 for " + EC + " for a second time!"); + } + this.ECDeliveryOfAnonymousCompanies_kWhpm2.put(EC, value_kWh); + } + + public void setStartingNumberOfAnonymousCompaniesForVehicleDistribution() { + if(this.isFinalized) { + throw new RuntimeException("Trying to setStartingNumberOfAnonymousCompaniesForVehicleDistribution while class is finalized"); + } + //Set the starting number of anonymous companies for the vehicle distribution + for(OL_VehicleType vehicleType : remainingNumberOfVehiclesCompanies.keySet()) { + remainingNumberOfAnonymousCompaniesPerVehicleType.put(vehicleType, this.totalNumberOfAnonymousCompanies); + } + } + + public void finalize() { + //Finalize the maps + this.remainingECDeliveryCompanies_kWh = Collections.unmodifiableMap(this.remainingECDeliveryCompanies_kWh); + this.ECDeliveryOfAnonymousCompanies_kWhpm2 = Collections.unmodifiableMap(this.ECDeliveryOfAnonymousCompanies_kWhpm2); + + this.isFinalized = true; + } + + + ////Adjustment functions + public void adjustTotalFloorSurfaceAnonymousCompanies_m2(double deltaFloorSurface_m2) { + if(this.isFinalized) { + throw new RuntimeException("Trying to adjustTotalFloorSurfaceAnonymousCompanies_m2 while class is finalized"); + } + this.totalFloorSurfaceAnonymousCompanies_m2 += deltaFloorSurface_m2; + } + + public void adjustTotalNumberOfAnonymousCompanies(int deltaNumberOfAnonymousCompanies) { + if(this.isFinalized) { + throw new RuntimeException("Trying to adjustTotalNumberOfAnonymousCompanies while class is finalized"); + } + this.totalNumberOfAnonymousCompanies += deltaNumberOfAnonymousCompanies; + } + + public void adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers EC, double adjustment_kWh) { + if(this.isFinalized) { + throw new RuntimeException("Trying to adjustRemainingECDeliveryCompanies_kWh while class is finalized"); + } + remainingECDeliveryCompanies_kWh.put(EC, this.remainingECDeliveryCompanies_kWh.get(EC) + adjustment_kWh); + } + + public void adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType vehicleType, int deltaNumberOfVehicles) { + this.remainingNumberOfVehiclesCompanies.put(vehicleType, this.remainingNumberOfVehiclesCompanies.get(vehicleType) + deltaNumberOfVehicles); + } + + public void adjustRemainingNumberOfAnonymousCompaniesForVehicleType(OL_VehicleType vehicleType, int deltaNumberOfAnonymousCompanies) { + this.remainingNumberOfAnonymousCompaniesPerVehicleType.put(vehicleType, this.remainingNumberOfAnonymousCompaniesPerVehicleType.get(vehicleType) + deltaNumberOfAnonymousCompanies); + } + + + ////Getters + public String getIdNBH() { + return this.idNBH; + } + public double getTotalFloorSurfaceAnonymousCompanies_m2() { + return this.totalFloorSurfaceAnonymousCompanies_m2; + } + public int getTotalNumberOfAnonymousCompanies() { + return this.totalNumberOfAnonymousCompanies; + } + + public Double getRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers EC) { + return this.remainingECDeliveryCompanies_kWh.get(EC); + } + + public Double getECDeliveryOfAnonymousCompanies_kWhpm2(OL_EnergyCarriers EC) { + return this.ECDeliveryOfAnonymousCompanies_kWhpm2.get(EC); + } + + public Integer getRemainingNumberOfVehiclesCompanies(OL_VehicleType vehicleType) { + return this.remainingNumberOfVehiclesCompanies.get(vehicleType); + } + public Integer getRemainingNumberOfAnonymousCompaniesForVehicleType(OL_VehicleType vehicleType) { + return this.remainingNumberOfAnonymousCompaniesPerVehicleType.get(vehicleType); + } + + + @Override + public String toString() { + String completeToString = idNBH + ":"; + for(OL_EnergyCarriers EC : remainingECDeliveryCompanies_kWh.keySet()) { + if(this.remainingECDeliveryCompanies_kWh.get(EC) != null) { + completeToString += "\n" + "remaining " + EC + " DeliveryCompanies: " + this.remainingECDeliveryCompanies_kWh.get(EC) + " kWh"; + } + } + for(OL_EnergyCarriers EC : ECDeliveryOfAnonymousCompanies_kWhpm2.keySet()) { + if(this.ECDeliveryOfAnonymousCompanies_kWhpm2.get(EC) != null) { + completeToString += "\n" + EC + " Delivery Of Anonymous Companies: " + this.ECDeliveryOfAnonymousCompanies_kWhpm2.get(EC) + " kWh/m2"; + } + } + for(OL_VehicleType vehicleType : remainingNumberOfVehiclesCompanies.keySet()) { + if(this.remainingNumberOfVehiclesCompanies.get(vehicleType) != null) { + completeToString += "\n" + "remainingNumberOf" + vehicleType + "Companies: " + this.remainingNumberOfVehiclesCompanies.get(vehicleType); + } + } + completeToString += "\n" + "totalFloorSurfaceAnonymousCompanies_m2: " + this.totalFloorSurfaceAnonymousCompanies_m2; + completeToString += "\n" + "totalNumberOfAnonymousCompanies: " + this.totalNumberOfAnonymousCompanies; + return completeToString; + } +}</Text> + </JavaClass> + <JavaClass> + <Id>1762351349700</Id> + <Name>J_RemainingTotalsManager</Name> + <Text>/** + * J_RemainingTotalsManager + */ +public class J_RemainingTotalsManager { + + //Supported EC and vehicle types + List<OL_EnergyCarriers> supportedEnergyCarriers= new ArrayList<>(Arrays.asList(OL_EnergyCarriers.ELECTRICITY, + OL_EnergyCarriers.METHANE)); + List<OL_VehicleType> supportedVehicleTypes = new ArrayList<>(Arrays.asList(OL_VehicleType.CAR, + OL_VehicleType.VAN, + OL_VehicleType.TRUCK)); + + //Original Model total + private final String originalModelTotalName = "Original model total"; + + //Remaining Model total (used as backup for gc that are not in an area) + private final String remainingModelTotalName = "Remaining model total"; + + //Initialize the remainingTotalsMap + private Map<String, J_RemainingTotals> remainingTotalsMap = new HashMap<>(); + + //Class State + private boolean isInitialized = false; + private boolean isFinalized = false; + + //Total value is added total or manual input + private boolean totalElectricityConsumptionCompaniesTotalIsManualInput = false; + private boolean totalGasConsumptionCompaniesTotalIsManualInput = false; + private boolean totalCarsCompaniesTotalIsManualInput = false; + private boolean totalVansCompaniesTotalIsManualInput = false; + private boolean totalTrucksCompaniesTotalIsManualInput = false; + + //TEMPORARY SOLUTION FOR NOW TO CONVERT GAS IN M3, UNTIL LOMBOK PACKAGE IS IN KWH OR OTHER SOLUTION + private AVGC_data avgc_data; + + /** + * Default constructor + */ + public J_RemainingTotalsManager(AVGC_data avgc_data) { + this.avgc_data = avgc_data; + } + + //Initialize model totals + public void initializeModelTotals(Project_data project_data, User user) { + double avg_house_elec_delivery_kwh_p_yr = 0; + double avg_house_gas_delivery_m3_p_yr = 0; + double avg_number_of_cars_per_house = 0; + double total_comp_elec_delivery_kwh_p_yr = 0; + double total_comp_gas_delivery_m3_p_yr = 0; + int total_nr_comp_cars = 0; + int total_nr_comp_vans = 0; + int total_nr_comp_trucks = 0; + + //Energy totals + if(user.NBHAccessType == OL_UserNBHAccessType.FULL) { //Only allow total input if all NBH are loaded in, else you get a skewed distribution. + if(project_data.total_electricity_consumption_companies_kWh_p_yr() != null && project_data.total_electricity_consumption_companies_kWh_p_yr() > 0){ + total_comp_elec_delivery_kwh_p_yr = project_data.total_electricity_consumption_companies_kWh_p_yr(); + this.totalElectricityConsumptionCompaniesTotalIsManualInput = true; + } + if(project_data.total_gas_consumption_companies_m3_p_yr() != null && project_data.total_gas_consumption_companies_m3_p_yr() > 0){ + total_comp_gas_delivery_m3_p_yr = project_data.total_gas_consumption_companies_m3_p_yr(); + this.totalGasConsumptionCompaniesTotalIsManualInput = true; + } + if(project_data.total_cars_companies() != null && project_data.total_cars_companies() > 0){ + total_nr_comp_cars = project_data.total_cars_companies(); + this.totalCarsCompaniesTotalIsManualInput = true; + } + if(project_data.total_vans_companies() != null && project_data.total_vans_companies() > 0){ + total_nr_comp_vans = project_data.total_vans_companies(); + this.totalVansCompaniesTotalIsManualInput = true; + } + if(project_data.total_trucks_companies() != null && project_data.total_trucks_companies() > 0){ + total_nr_comp_trucks = project_data.total_trucks_companies(); + this.totalTrucksCompaniesTotalIsManualInput = true; + } + } + + //Initialize default remaining model total instances + List<String> defaultRemainingModelTotalNames = new ArrayList<>(List.of(this.originalModelTotalName, this.remainingModelTotalName)); + for(String defaultModelTotalInstance : defaultRemainingModelTotalNames) { + remainingTotalsMap.put(defaultModelTotalInstance, new J_RemainingTotals( + Neighbourhood_data.builder() + .neighbourhoodname(defaultModelTotalInstance) + //Energy totals + .avg_house_elec_delivery_kwh_p_yr(avg_house_elec_delivery_kwh_p_yr) + .avg_house_gas_delivery_m3_p_yr(avg_house_gas_delivery_m3_p_yr) + .avg_number_of_cars_per_house(avg_number_of_cars_per_house) + .total_comp_elec_delivery_kwh_p_yr(total_comp_elec_delivery_kwh_p_yr) + .total_comp_gas_delivery_m3_p_yr(total_comp_gas_delivery_m3_p_yr) + .total_nr_comp_cars(total_nr_comp_cars) + .total_nr_comp_vans(total_nr_comp_vans) + .total_nr_comp_trucks(total_nr_comp_trucks) + .build(), + this.avgc_data + )); + } + this.isInitialized = true; + } + + + //Initialize remaining totals for each NBH + public void addNBH(Neighbourhood_data dataNBH) { + if(!isInitialized) { + throw new RuntimeException("Adding NBH to J_RemainingTotalsManager, while the class has not been initialized, this will cause energy total mismatches and therefor is not allowed!"); + } + if(remainingTotalsMap.containsKey(dataNBH.neighbourhoodname())) { + throw new RuntimeException("Adding NBH: " + dataNBH.neighbourhoodname() + " to J_RemainingTotalsManager for the second time, This will cause energy total mismatches and therefor is not allowed!"); + } + if(isFinalized) { + throw new RuntimeException("Adding NBH: " + dataNBH.neighbourhoodname() + " to J_RemainingTotalsManager after the J_RemainingTotals has been finalized, This will cause energy total mismatches and therefor is not allowed!"); + } + + //Create remaining totals instance for the NBH and add to Map + remainingTotalsMap.put(dataNBH.neighbourhoodname(), new J_RemainingTotals(dataNBH, this.avgc_data)); + + //Manage model totals and backup + if(dataNBH.total_comp_elec_delivery_kwh_p_yr() != null && dataNBH.total_comp_elec_delivery_kwh_p_yr() >= 0){ + if(totalElectricityConsumptionCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' + remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers.ELECTRICITY, -dataNBH.total_comp_elec_delivery_kwh_p_yr()); + } + else { + remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers.ELECTRICITY, dataNBH.total_comp_elec_delivery_kwh_p_yr()); + } + } + if(dataNBH.total_comp_gas_delivery_m3_p_yr() != null && dataNBH.total_comp_gas_delivery_m3_p_yr() >= 0){ + if(totalGasConsumptionCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' + remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers.METHANE, -dataNBH.total_comp_gas_delivery_m3_p_yr()); + } + else { + remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers.METHANE, dataNBH.total_comp_gas_delivery_m3_p_yr()); + } + } + if(dataNBH.total_nr_comp_cars() != null && dataNBH.total_nr_comp_cars() >= 0){ + if(totalCarsCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' + remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.CAR, -dataNBH.total_nr_comp_cars()); + } + else { + remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.CAR, dataNBH.total_nr_comp_cars()); + } + } + if(dataNBH.total_nr_comp_vans() != null && dataNBH.total_nr_comp_vans() >= 0){ + if(totalVansCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' + remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.VAN, -dataNBH.total_nr_comp_vans()); + } + else { + remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.VAN, dataNBH.total_nr_comp_vans()); + } + } + if(dataNBH.total_nr_comp_trucks() != null && dataNBH.total_nr_comp_trucks() >= 0){ + if(totalTrucksCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' + remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.TRUCK, -dataNBH.total_nr_comp_trucks()); + } + else { + remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.TRUCK, dataNBH.total_nr_comp_trucks()); + } + } + } + + + //Adjust remaining totals + public void adjustRemainingElectricityDeliveryCompanies_kWh(GridConnection GC, double adjustment_kWh) { + adjustRemainingECDeliveryCompanies_kWh(GC, OL_EnergyCarriers.ELECTRICITY, adjustment_kWh); + } + public void adjustRemainingGasDeliveryCompanies_m3(GridConnection GC, double adjustment_m3) { + adjustRemainingECDeliveryCompanies_kWh(GC, OL_EnergyCarriers.METHANE, adjustment_m3 * avgc_data.p_gas_kWhpm3); + } + private void adjustRemainingECDeliveryCompanies_kWh(GridConnection GC, OL_EnergyCarriers EC, double adjustment_kWh) { + if(!supportedEnergyCarriers.contains(EC)) { + throw new RuntimeException("Trying to adjustRemainingECDeliveryCompanies_kWh for an unsupported EC"); + } + + String idNBH = getNBHIdOfGC(GC); + if(remainingTotalsMap.get(idNBH).getRemainingECDeliveryCompanies_kWh(EC) == null) { + idNBH = this.remainingModelTotalName; + } + remainingTotalsMap.get(idNBH).adjustRemainingECDeliveryCompanies_kWh(EC, adjustment_kWh); + + } + + public void adjustRemainingNumberOfVehiclesCompanies(GridConnection GC, OL_VehicleType vehicleType, int deltaNumberOfVehicles) { + if(!supportedVehicleTypes.contains(vehicleType)) { + throw new RuntimeException("Trying to adjustRemainingNumberOfVehiclesCompanies for an unsupported vehicleType"); + } + + String idNBH = getNBHIdOfGC(GC); + if(remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType) == null) { + idNBH = this.remainingModelTotalName; + } + remainingTotalsMap.get(idNBH).adjustRemainingNumberOfVehiclesCompanies(vehicleType, deltaNumberOfVehicles); + } + + public void adjustTotalFloorSurfaceAnonymousCompanies_m2(GridConnection GC, double deltaFloorSurface_m2) { + remainingTotalsMap.get(getNBHIdOfGC(GC)).adjustTotalFloorSurfaceAnonymousCompanies_m2(deltaFloorSurface_m2); + + //Update model total as well + remainingTotalsMap.get(this.originalModelTotalName).adjustTotalFloorSurfaceAnonymousCompanies_m2(deltaFloorSurface_m2); + } + + public void adjustTotalNumberOfAnonymousCompanies(GridConnection GC, int deltaNumberOfAnonymousCompanies) { + remainingTotalsMap.get(getNBHIdOfGC(GC)).adjustTotalNumberOfAnonymousCompanies(deltaNumberOfAnonymousCompanies); + + //Update model total as well + remainingTotalsMap.get(this.originalModelTotalName).adjustTotalNumberOfAnonymousCompanies(deltaNumberOfAnonymousCompanies); + } + + ////Getters + + //EnergyCarrier delivery getters + public double getRemainingElectricityDeliveryCompanies_kWh(GridConnection GC) { + return getRemainingECDeliveryOfAnonymousCompanies_kWh(GC, OL_EnergyCarriers.ELECTRICITY); + } + public double getRemainingGasDeliveryCompanies_m3(GridConnection GC) { + return getRemainingECDeliveryOfAnonymousCompanies_kWh(GC, OL_EnergyCarriers.METHANE); + } + private double getRemainingECDeliveryOfAnonymousCompanies_kWh(GridConnection GC, OL_EnergyCarriers EC) { + if(!supportedEnergyCarriers.contains(EC)) { + throw new RuntimeException("Trying to getRemainingECDeliveryOfAnonymousCompanies_kWh for an unsupported EC"); + } + String idNBH = getNBHIdOfGC(GC); + if(remainingTotalsMap.get(idNBH).getRemainingECDeliveryCompanies_kWh(EC) == null) { + idNBH = this.remainingModelTotalName; + } + return remainingTotalsMap.get(idNBH).getRemainingECDeliveryCompanies_kWh(EC); + } + + //Vehicle getters + public Integer getRemainingNumberOfVehiclesCompanies(GridConnection GC, OL_VehicleType vehicleType) { + if(!supportedVehicleTypes.contains(vehicleType)) { + throw new RuntimeException("Trying to getRemainingNumberOfVehiclesCompanies for an unsupported VehicleType"); + } + String idNBH = getNBHIdOfGC(GC); + if(remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType) == null) { + idNBH = this.remainingModelTotalName; + } + return remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType); + } + + //Default getters + public double getTotalFloorSurfaceAnonymousCompanies_m2(GridConnection GC) { + return remainingTotalsMap.get(getNBHIdOfGC(GC)).getTotalFloorSurfaceAnonymousCompanies_m2(); + } + public int getTotalNumberOfAnonymousCompanies(GridConnection GC) { + return remainingTotalsMap.get(getNBHIdOfGC(GC)).getTotalNumberOfAnonymousCompanies(); + } + + + ////Finalize the classes + public void finalizeRemainingTotalsDistributionCompanies() { + if(this.isFinalized) { + throw new RuntimeException("Trying to finalizeRemainingTotalsDistributionCompanies for a second time"); + } + + //Finalize the EC per m2 calculation + this.finalizeRemainingECTotalsPerM2Calculation(); + + //Set the starting number of anonymous companies for the vehicle distribution + this.setStartingNumberOfAnonymousCompaniesForVehicleDistribution(); + + //Set class state to finalized + this.remainingTotalsMap.values().forEach(remainingTotals -> remainingTotals.finalize()); + this.isFinalized = true; + } + + //Set the starting number of anonymous companies for the vehicle distribution + private void setStartingNumberOfAnonymousCompaniesForVehicleDistribution() { + if(this.isFinalized) { + throw new RuntimeException("Trying to setStartingNumberOfAnonymousCompaniesForVehicleDistribution after finalization."); + } + //Set setStartingNumberOfAnonymousCompaniesForVehicleDistribution for all that have specific vehicle totals + this.remainingTotalsMap.values().forEach(remainingTotals -> remainingTotals.setStartingNumberOfAnonymousCompaniesForVehicleDistribution()); + + //If NBH doesnt have specific vehicle total, add its total anonymous companies to the 'backup' + for(J_RemainingTotals remainingTotalsNBH : this.remainingTotalsMap.values()) { + for(OL_VehicleType vehicleType : supportedVehicleTypes) { + if(remainingTotalsNBH.getRemainingNumberOfVehiclesCompanies(vehicleType) == null) { + this.remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingNumberOfAnonymousCompaniesForVehicleType(vehicleType, remainingTotalsNBH.getTotalNumberOfAnonymousCompanies()); + } + } + } + } + + //Calculate certain remaining totals per m2 and finalize the nbh totals -> no longer adjustable + private void finalizeRemainingECTotalsPerM2Calculation() { + if(this.isFinalized) { + throw new RuntimeException("Trying to finalizeRemainingECTotalsPerM2Calculation after finalization."); + } + //Calculate the remaining EC delivery per m2 for all EC, where uknown NBH are grouped together with the backup to define the average + Map<OL_EnergyCarriers, Double> totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2= new HashMap<>(); + for(OL_EnergyCarriers supportedEC : supportedEnergyCarriers) { + totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.put(supportedEC, 0.0); + } + + for(J_RemainingTotals remainingTotalsNBH : this.remainingTotalsMap.values()) { + for(OL_EnergyCarriers EC : totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.keySet()) { + if(remainingTotalsNBH.getRemainingECDeliveryCompanies_kWh(EC) == null) { + totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.put(EC, totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.get(EC) + remainingTotalsNBH.getTotalFloorSurfaceAnonymousCompanies_m2()); + } + } + } + + for(J_RemainingTotals remainingTotalsNBH : this.remainingTotalsMap.values()) { + for(OL_EnergyCarriers EC : totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.keySet()) { + if(remainingTotalsNBH.getRemainingECDeliveryCompanies_kWh(EC) != null) { + double floorSurfaceAnonymousCompanies_m2 = remainingTotalsNBH.getTotalFloorSurfaceAnonymousCompanies_m2(); + if(remainingTotalsNBH.getIdNBH().equals(this.remainingModelTotalName)) { + floorSurfaceAnonymousCompanies_m2 += totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.get(EC); + } + if(floorSurfaceAnonymousCompanies_m2 > 0) { + remainingTotalsNBH.setECDeliveryOfAnonymousCompanies_kWhpm2(EC, remainingTotalsNBH.getRemainingECDeliveryCompanies_kWh(EC) / floorSurfaceAnonymousCompanies_m2); + } + } + } + } + } + + + ////After finalization getters + public double getElectricityDeliveryOfAnonymousCompanies_kWhpm2(GridConnection GC) { + return getECDeliveryOfAnonymousCompanies_kWhpm2(GC, OL_EnergyCarriers.ELECTRICITY); + } + public double getGasDeliveryOfAnonymousCompanies_m3pm2(GridConnection GC) { + return getECDeliveryOfAnonymousCompanies_kWhpm2(GC, OL_EnergyCarriers.METHANE) / avgc_data.p_gas_kWhpm3; + } + private double getECDeliveryOfAnonymousCompanies_kWhpm2(GridConnection GC, OL_EnergyCarriers EC) { + if(this.isFinalized){ + if(!supportedEnergyCarriers.contains(EC)) { + throw new RuntimeException("Trying to getECDeliveryOfAnonymousCompanies_kWhpm2 for an unsupported EC"); + } + + String idNBH = getNBHIdOfGC(GC); + if(remainingTotalsMap.get(idNBH).getECDeliveryOfAnonymousCompanies_kWhpm2(EC) == null) { + idNBH = this.remainingModelTotalName; + } + return remainingTotalsMap.get(idNBH).getECDeliveryOfAnonymousCompanies_kWhpm2(EC); + } + else { + throw new RuntimeException("The getter 'getEnergyCarrierDeliveryOfAnonymousCompanies_kWhpm2' is called while the calculation has not been finalized yet."); + } + } + + //Get vehicles per company per nbh + public int getCeiledRemainingNumberOfVehiclesPerCompany(GridConnection GC, OL_VehicleType vehicleType) { + if(this.isFinalized){ + if(!supportedVehicleTypes.contains(vehicleType)) { + throw new RuntimeException("Trying to getCeiledRemainingNumberOfVehiclesPerCompany for an unsupported VehicleType"); + } + String idNBH = getNBHIdOfGC(GC); + if(remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType) == null) { + idNBH = this.remainingModelTotalName; + } + + //Get remaining number of vehicles and total nr of anonymous companies left for those vehicles + int remainingNumberOfVehicles = remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType); + int remainingNumberOfAnonymousCompaniesForVehicleType = remainingTotalsMap.get(idNBH).getRemainingNumberOfAnonymousCompaniesForVehicleType(vehicleType); // -> += to add anonymous companies for remainingModelTotalName as well + + //Initialize the ceiledRemainingNumberOfCarsPerCompany + int ceiledRemainingNumberOfVehiclesPerCompany = 0; + if(remainingNumberOfVehicles != 0 && remainingNumberOfAnonymousCompaniesForVehicleType != 0) { + ceiledRemainingNumberOfVehiclesPerCompany = roundToInt(ceil((double)remainingNumberOfVehicles/(double)remainingNumberOfAnonymousCompaniesForVehicleType)); + } + + return ceiledRemainingNumberOfVehiclesPerCompany; + } + else { + throw new RuntimeException("The getter 'getCeiledRemainingNumberOfVehiclesPerCompany' is called while the RemainingTotalsClass has not been finalized yet."); + } + } + + public void adjustRemainingNumberOfAnonymousCompaniesForVehicleType(GridConnection GC, OL_VehicleType vehicleType, int deltaNumberOfAnonymousCompanies) { + if(this.isFinalized) { + if(!supportedVehicleTypes.contains(vehicleType)) { + throw new RuntimeException("Trying to adjustRemainingNumberOfAnonymousCompaniesForVehicleType for an unsupported VehicleType"); + } + + String idNBH = getNBHIdOfGC(GC); + if(remainingTotalsMap.get(idNBH).getRemainingNumberOfAnonymousCompaniesForVehicleType(vehicleType) == null) { + idNBH = this.remainingModelTotalName; + } + remainingTotalsMap.get(idNBH).adjustRemainingNumberOfAnonymousCompaniesForVehicleType(vehicleType, deltaNumberOfAnonymousCompanies); + } + else { + + } + } + + + + ////Get NBH id where GC is located in that has a 'J_RemainingTotals', if not: return backup. + private String getNBHIdOfGC(GridConnection GC) { + String idNBH = this.remainingModelTotalName; + if(GC != null) { + GIS_Object area = findFirst(GC.energyModel.pop_GIS_Objects, nbh -> nbh.p_GISObjectType == OL_GISObjectType.REGION && nbh.gisRegion.contains(GC.p_latitude, GC.p_longitude)); + if(area != null && remainingTotalsMap.containsKey(area.p_id)){ + idNBH = area.p_id; + } + } + return idNBH; + } + + + @Override + public String toString() { + String completeToString = ""; + //Put model original and remaining totals on top. + completeToString += remainingTotalsMap.get(originalModelTotalName).toString(); + completeToString += "\n" + "\n" + remainingTotalsMap.get(remainingModelTotalName).toString(); + + for(J_RemainingTotals remainingTotalsNBH : this.remainingTotalsMap.values()) { + if(remainingTotalsNBH.getIdNBH().equals(this.originalModelTotalName) || remainingTotalsNBH.getIdNBH().equals(this.remainingModelTotalName)) { + continue; + } + completeToString += "\n" + "\n" + remainingTotalsNBH.toString(); + } + return completeToString; + } +}</Text> + </JavaClass> + </JavaClasses> + <RequiredLibraryReference> + <LibraryName>zero_engine</LibraryName> + <VersionMajor>0</VersionMajor> + <VersionMinor>0</VersionMinor> + <VersionBuild>0</VersionBuild> + </RequiredLibraryReference> + <RequiredLibraryReference> + <LibraryName>digital_twin_results</LibraryName> + <VersionMajor>0</VersionMajor> + <VersionMinor>0</VersionMinor> + <VersionBuild>0</VersionBuild> + </RequiredLibraryReference> + <ClassPathEntry> + <ResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>lombok.jar</ClassName> + </ResourceReference> + <Imported>true</Imported> + <Folder>false</Folder> + </ClassPathEntry> + <ClassPathEntry> + <ResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>vallum-production-741-d257d2f-all.jar</ClassName> + </ResourceReference> + <Imported>true</Imported> + <Folder>false</Folder> + </ClassPathEntry> + <ClassPathEntry> + <ResourceReference> + <PackageName>zerointerfaceloader</PackageName> + <ClassName>uplux-3.jar</ClassName> + </ResourceReference> + <Imported>true</Imported> + <Folder>false</Folder> + </ClassPathEntry> + <CloudModelUuid>ebade042-5518-4162-8eb5-f55439c67c64</CloudModelUuid> + <ModelResources> + <Resource> + <Id>1658477089983</Id> + <Path>Export_ModelData.xlsx</Path> + <ReferencedFromUserCode>true</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183265</Id> + <Path>icon_greater_than.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183266</Id> + <Path>icon_i.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183267</Id> + <Path>icon_loading.gif</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183268</Id> + <Path>load_icon.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183270</Id> + <Path>logo_lux-energy-twin.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183271</Id> + <Path>logo_TUe_red.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183272</Id> + <Path>logo_TUe_white.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183274</Id> + <Path>lombok.jar</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183275</Id> + <Path>noun-car-1777731.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183276</Id> + <Path>noun-electricity-3408805.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183277</Id> + <Path>noun-fire-2429630.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183279</Id> + <Path>save_icon.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756975183289</Id> + <Path>vallum-production-741-d257d2f-all.jar</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756980508229</Id> + <Path>data_Generic/inputECookerPatterns.csv</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756980508234</Id> + <Path>data_Generic/AlbatrossProcessedVehicleTrips.csv</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1756980508238</Id> + <Path>data_Generic/inputTruckTripPatterns.csv</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1761557538487</Id> + <Path>logo_zenmo.png</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + <Resource> + <Id>1762182388058</Id> + <Path>uplux-3.jar</Path> + <ReferencedFromUserCode>false</ReferencedFromUserCode> + <Location>FILE_SYSTEM</Location> + </Resource> + </ModelResources> + </Model> + <ConvertersApplied> + <Uuid>9f7858c9-b2c8-4ead-9244-fd08833f642b</Uuid> + <Uuid>404652e6-561a-404c-aab2-ab7415f40ef5</Uuid> + <Uuid>6fd6cd57-6dfe-4fc6-be0b-c74065351957</Uuid> + <Uuid>3325dc48-3ad4-41e3-836f-dfd0e98fe1ed</Uuid> + <Uuid>3f69ef3d-706e-41a6-8af0-11658c5eef68</Uuid> + <Uuid>3f6fe405-e047-4304-91d6-6eee206d1106</Uuid> + <Uuid>820d2b51-5b4a-48e7-b0b6-e46418e3c0f2</Uuid> + <Uuid>630818fa-8975-4b70-976f-03180dce01db</Uuid> + <Uuid>7c7e471c-004e-495e-a4ad-d840620ab38e</Uuid> + <Uuid>3e38ff63-1f70-4ec0-b42c-e879b146785d</Uuid> + <Uuid>b1eb86e4-14b3-405c-8257-56b80f1b485d</Uuid> + <Uuid>d55f9fb6-86bb-45ea-9db1-79cecfa0ce91</Uuid> + <Uuid>ab77aafd-8f02-4354-b789-928d45b1f73c</Uuid> + <Uuid>e4f14fd7-1c4a-42e9-b91d-db2415f475db</Uuid> + <Uuid>6d208120-6c7a-45a6-b411-402f18890d9b</Uuid> + <Uuid>1816cdd0-177c-4973-9e88-dd8b95318556</Uuid> + <Uuid>5c23f62f-06dc-46ad-8ead-688ec434e3e5</Uuid> + <Uuid>5c7d7990-3f35-41eb-ae16-d0c16098acc6</Uuid> + <Uuid>02a16c52-a834-4f30-b6af-a6aee51a294e</Uuid> + <Uuid>f0988929-2718-4984-a1b6-c1f2ce152f1f</Uuid> + <Uuid>1c9d9cfe-ea2b-43f9-8f62-dc31d8ed3ae1</Uuid> + <Uuid>34cb742a-8ba4-47a7-87e6-f2685fe69e97</Uuid> + <Uuid>4fe10751-c399-4752-94b7-30113ad45070</Uuid> + <Uuid>c13fe5ac-6466-446e-886a-12df1431b1eb</Uuid> + <Uuid>714f9ca2-426e-4bff-8569-2d18f58fdcf8</Uuid> + <Uuid>045aeb5f-1087-4ac7-9702-a49404e7f7e8</Uuid> + <Uuid>840e9a0a-de98-4b7d-a172-f9bbda2d6b98</Uuid> + <Uuid>e342358b-75ed-4812-9376-6043fb6cb473</Uuid> + <Uuid>f3d5ccdc-1bb3-466f-871d-f6b92a26cbb4</Uuid> + <Uuid>59acb6fb-561c-4038-b722-a596a748b3c7</Uuid> + <Uuid>be7e6726-05c0-4228-821d-a8df91aeb5bc</Uuid> + <Uuid>df4a6a60-9ce8-4c6c-91c0-ad5a5d732259</Uuid> + <Uuid>47491eb9-4606-42bd-8399-125a2b95fded</Uuid> + <Uuid>9b2d1306-5d19-439a-8f2c-b144dd7e22fa</Uuid> + <Uuid>ef421152-8732-4f97-9acb-c8e9a6890d5e</Uuid> + <Uuid>d48f8080-25b1-44f5-8322-7bf2712ff974</Uuid> + <Uuid>6c4de826-daad-4cd4-b703-51dfe803e822</Uuid> + <Uuid>01af22d6-6889-4e98-a3df-e6eddc40fc92</Uuid> + <Uuid>ea3b3dbe-cca2-4bde-957b-feaef7e18789</Uuid> + <Uuid>e737c8c6-b526-4f88-b89e-554e205b0614</Uuid> + <Uuid>efd24e87-d7f7-425f-9cb0-3ee17c7b2116</Uuid> + <Uuid>a62607e6-047e-4910-a1ec-5426bf9283b5</Uuid> + <Uuid>64dceb5b-de05-47c7-8e40-e9b293e80d75</Uuid> + <Uuid>8d51c652-6aee-4de8-ba03-47b289a13ec5</Uuid> + <Uuid>51d7b5ce-5664-4750-b1a0-fabcdc31e49a</Uuid> + <Uuid>6522e3af-aa9e-421c-b667-e11db73cd8ca</Uuid> + <Uuid>9ac073a0-7abf-4dff-826f-9c44d4780590</Uuid> + <Uuid>2da9c21c-adc7-405a-a36e-46fbd9dfcd42</Uuid> + <Uuid>fe4d1053-9c84-4221-bac7-cb489a7064ff</Uuid> + <Uuid>1f005f88-e6d7-4bdc-81fa-3acf4c89cf64</Uuid> + <Uuid>42dc5a7c-d7b1-4653-92b9-9359b46cc2d4</Uuid> + <Uuid>e25721a9-34f9-479c-a4c3-31f5ec9e117d</Uuid> + <Uuid>506d1de3-06df-4131-9e88-e43f1768e3d8</Uuid> + <Uuid>e6625695-25a2-43d0-9056-1e9a1a594b1e</Uuid> + <Uuid>91990287-4edf-4e38-aa6c-66d0e906807b</Uuid> + <Uuid>2216cdd0-177c-5678-9e88-dd8b95312234</Uuid> + <Uuid>1737c8c6-b526-4dd8-589e-ee4e205b06f4</Uuid> + <Uuid>6a43bef6-8b70-4253-a828-82c3ab399655</Uuid> + <Uuid>0a27038a-0f3a-48bb-b235-4a44066a1402</Uuid> + </ConvertersApplied> +</AnyLogicWorkspace> diff --git a/_alp/Agents/Zero_Interface/Code/Functions.java b/_alp/Agents/Zero_Interface/Code/Functions.java index b58c9c6..5f754a6 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.java +++ b/_alp/Agents/Zero_Interface/Code/Functions.java @@ -3129,25 +3129,27 @@ ShapeRadioButtonGroup f_getScenarioButtons() double f_setCompaniesScenario(LinkedHashMap scenarioMap) {/*ALCODESTART::1761060882101*/ -//Solution for now -int companyUIScenarioRBIndex = 0; -if(scenarioMap == c_scenarioMap_Current){ - companyUIScenarioRBIndex = 0; -} -else if(scenarioMap == c_scenarioMap_Future){ - companyUIScenarioRBIndex = 1; -} -else{ - throw new RuntimeException("Tried to call the setCompaniesScenario function with a non existing companyUI scenario"); -} - -//Set companyUI to correct radio button setting -uI_Company.b_runningMainInterfaceScenarioSettings = true; -for (GCUtility GC : energyModel.UtilityConnections){ - uI_Company.f_setCompanyUI(GC); - uI_Company.getRb_scenariosPrivateUI().setValue(companyUIScenarioRBIndex, true); +if(!energyModel.UtilityConnections.isEmpty()){ + //Solution for now + int companyUIScenarioRBIndex = 0; + if(scenarioMap == c_scenarioMap_Current){ + companyUIScenarioRBIndex = 0; + } + else if(scenarioMap == c_scenarioMap_Future){ + companyUIScenarioRBIndex = 1; + } + else{ + throw new RuntimeException("Tried to call the setCompaniesScenario function with a non existing companyUI scenario"); + } + + //Set companyUI to correct radio button setting + uI_Company.b_runningMainInterfaceScenarioSettings = true; + for (GCUtility GC : energyModel.UtilityConnections){ + uI_Company.f_setCompanyUI(GC); + uI_Company.getRb_scenariosPrivateUI().setValue(companyUIScenarioRBIndex, true); + } + uI_Company.b_runningMainInterfaceScenarioSettings = false; } -uI_Company.b_runningMainInterfaceScenarioSettings = false; /*ALCODEEND*/} double f_initializeScenarioRadioButton() @@ -3258,6 +3260,7 @@ else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ double f_setScenario_Current() {/*ALCODESTART::1761119479233*/ +//if(project_data.project_type() == OL_ProjectType.BUSINESSPARK && c_scenarioMap_Current != null){ if(c_scenarioMap_Current != null){ f_setCompaniesScenario(c_scenarioMap_Current); } diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index 21f2d95..7f93c02 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -3233,8 +3233,8 @@ List<J_ChargingSession> f_getChargerProfile() double f_addHotWaterDemand(GCHouse houseGC,double surface_m2,double hotWaterDemand_kwhpa) {/*ALCODESTART::1749726279652*/ double yearlyHWD_kWh = hotWaterDemand_kwhpa; +int aantalBewoners; if(hotWaterDemand_kwhpa == 0){ - int aantalBewoners; if( surface_m2 > 150){ aantalBewoners = uniform_discr(2,6); } @@ -3254,7 +3254,7 @@ else if (surface_m2 > 50){ aantalBewoners = uniform_discr(1,2); } -double yearlyHWD_kWh = aantalBewoners * 600; //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix +yearlyHWD_kWh = aantalBewoners * 600; //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix J_EAConsumption hotwaterDemand = new J_EAConsumption( houseGC, OL_EnergyAssetType.HOT_WATER_CONSUMPTION, "default_house_hot_water_demand_fr", yearlyHWD_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, null); @@ -3276,7 +3276,7 @@ else if (surface_m2 > 50){ //Heat demand from PBL referentiewoningen used for HeatCapacity and lossFactor_WpK if(heatDemand_kwhpa > 0){ //Not missing in data - lossfactor_WpK = heatDemand_kwhpa / 63; // = manually calibrated value tested on 3 neighborhoods + lossfactor_WpK = heatDemand_kwhpa / 67; // = manually calibrated value tested on 3 neighborhoods } else{ switch (parentGC.p_energyLabel){ @@ -3309,7 +3309,8 @@ else if (surface_m2 > 50){ lossfactor_WpK = roundToDecimal(lossfactor_WpK,2); solarAbsorptionFactor_m2 = floorArea_m2 * 0.01; //solar irradiance [W/m2] -heatCapacity_JpK = floorArea_m2 * 50000; //What is the 5000 based upon? +heatCapacity_JpK = ((25000 * 100) + floorArea_m2 * 25000) * 5; //oud 50k was te groot verschil per floor area, 100 is avg floor area deel fixed, 2de deel o.b.v. floor area + parentGC.p_BuildingThermalAsset = new J_EABuilding( parentGC, maxPowerHeat_kW, lossfactor_WpK, energyModel.p_timeStep_h, initialTemp, heatCapacity_JpK, solarAbsorptionFactor_m2 ); energyModel.c_ambientDependentAssets.add( parentGC.p_BuildingThermalAsset ); @@ -3386,6 +3387,7 @@ List<Building_data> f_getBuildingsInSubScope(List<Building_data> initialBuilding //For PBL heating GCH.p_constructionPeriod_heatingPBL = houseBuildingData.constructionPeriod_int(); + GCH.p_schillabel_heatingPBL = houseBuildingData.energy_label(); GCH.p_buildingType_heatingPBL = houseBuildingData.buildingType_int(); GCH.p_ownership_heatingPBL = houseBuildingData.ownership_int(); GCH.p_localFactor_heatingPBL = houseBuildingData.localFactor(); @@ -3489,8 +3491,7 @@ else if (GCH.p_bouwjaar < 2008) { annualSpaceHeatingConsumption_kwhpa = houseBuildingData.space_heating_consumption_kwhpa(); } catch (NullPointerException e){ - annualSpaceHeatingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.85; //assumed share gas space heating - traceln("DOESTHISHAPPEN??"); + annualSpaceHeatingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.85; //assumed share gas space heating } try { annualDHWConsumption_kwhpa = houseBuildingData.dhw_consumption_kwhpa(); @@ -3504,6 +3505,8 @@ else if (GCH.p_bouwjaar < 2008) { catch (NullPointerException e){ annualCookingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.05; //assumed share gas cooking } + + //GCH.p_initialPVpanels = houseBuildingData.pv_default(); GCH.v_liveAssetsMetaData.initialPV_kW = houseBuildingData.pv_installed_kwp() != null ? houseBuildingData.pv_installed_kwp() : 0; GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.v_liveAssetsMetaData.initialPV_kW > 0 ? GCH.v_liveAssetsMetaData.initialPV_kW : houseBuildingData.pv_potential_kwp(); // To prevent sliders from changing outcomes @@ -3511,7 +3514,7 @@ else if (GCH.p_bouwjaar < 2008) { // TODO: Above we load in data of gas use, but the houses always have a thermal model?? f_addEnergyAssetsToHouses(GCH, annualElectricityConsumption_kwhpa, annualSpaceHeatingConsumption_kwhpa, annualDHWConsumption_kwhpa, annualCookingConsumption_kwhpa ); - i ++; + i++; } //Backup for when pv_potential kWp is null, needs to be after all houses have been made, so rooftop surface is distributed correctly From f8c31929344a5d85fd2ccaa0ba58c98f738b87f0 Mon Sep 17 00:00:00 2001 From: Ate Hempenius <ate@zenmo.com> Date: Fri, 19 Dec 2025 12:56:36 +0100 Subject: [PATCH 7/8] m3pa refactor was reversed -> reversed back to what it should be again. Also a 'null' check has been added to certain parameters. --- Zero_Interface-Loader.alpx | 2 +- _alp/Agents/Zero_Loader/Code/Functions.java | 19 ++++++++++--------- _alp/Classes/Class.Building_data.java | 4 +++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Zero_Interface-Loader.alpx b/Zero_Interface-Loader.alpx index e033b5d..d78122b 100644 --- a/Zero_Interface-Loader.alpx +++ b/Zero_Interface-Loader.alpx @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <AnyLogicWorkspace splitVersion="1" WorkspaceVersion="1.9" - AnyLogicVersion="8.9.7.202512010500" + AnyLogicVersion="8.9.7.202512010504" AlpVersion="8.9.7"> <Model> <Id>1658477103134</Id> diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index f565333..8166d64 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -3441,13 +3441,14 @@ List<Building_data> f_getBuildingsInSubScope(List<Building_data> initialBuilding GCH.p_eigenOprit = houseBuildingData.has_private_parking() != null ? houseBuildingData.has_private_parking() : false; //For PBL heating - GCH.p_constructionPeriod_heatingPBL = houseBuildingData.constructionPeriod_int(); - GCH.p_schillabel_heatingPBL = houseBuildingData.energy_label(); - GCH.p_buildingType_heatingPBL = houseBuildingData.buildingType_int(); - GCH.p_ownership_heatingPBL = houseBuildingData.ownership_int(); - GCH.p_localFactor_heatingPBL = houseBuildingData.localFactor(); - GCH.p_regionalClimateCorrectionFactor_heatingPBL = houseBuildingData.regionalClimateCorrectionFactor(); - + if(houseBuildingData.pbl_data_available()){ + GCH.p_constructionPeriod_heatingPBL = houseBuildingData.constructionPeriod_int(); + GCH.p_schillabel_heatingPBL = houseBuildingData.energy_label(); + GCH.p_buildingType_heatingPBL = houseBuildingData.buildingType_int(); + GCH.p_ownership_heatingPBL = houseBuildingData.ownership_int(); + GCH.p_localFactor_heatingPBL = houseBuildingData.localFactor(); + GCH.p_regionalClimateCorrectionFactor_heatingPBL = houseBuildingData.regionalClimateCorrectionFactor(); + } //Nageisoleerd @@ -3537,10 +3538,10 @@ else if (GCH.p_bouwjaar < 2008) { annualElectricityConsumption_kwhpa = Double.valueOf(uniform_discr(1200, 3800)); } try { - annualNaturalGasConsumption_kwhpa = houseBuildingData.gas_consumption_kwhpa(); + annualNaturalGasConsumption_kwhpa = houseBuildingData.gas_consumption_m3pa() * avgc_data.p_gas_kWhpm3; } catch (NullPointerException e){ - annualNaturalGasConsumption_kwhpa = Double.valueOf(uniform_discr(600, 2000)); + annualNaturalGasConsumption_kwhpa = Double.valueOf(uniform_discr(600, 2000)) * avgc_data.p_gas_kWhpm3; } try { annualSpaceHeatingConsumption_kwhpa = houseBuildingData.space_heating_consumption_kwhpa(); diff --git a/_alp/Classes/Class.Building_data.java b/_alp/Classes/Class.Building_data.java index d9f93e6..d6c2955 100644 --- a/_alp/Classes/Class.Building_data.java +++ b/_alp/Classes/Class.Building_data.java @@ -24,7 +24,7 @@ public class Building_data { String extra_info; Double contracted_capacity_kw; Double electricity_consumption_kwhpa; - Double gas_consumption_kwhpa; + Double gas_consumption_m3pa; Double space_heating_consumption_kwhpa; Double dhw_consumption_kwhpa; Double cooking_consumption_kwhpa; @@ -37,6 +37,8 @@ public class Building_data { Double longitude; String polygon; + //PBL data + boolean pbl_data_available; Integer ownership_int; Integer constructionPeriod_int; Integer buildingType_int; From 5e3566e26802dd22028e6dd0a5774dffbf84bba8 Mon Sep 17 00:00:00 2001 From: Ate Hempenius <ate@zenmo.com> Date: Tue, 13 Jan 2026 18:19:45 +0100 Subject: [PATCH 8/8] pbl updates IN PROGRESS --- Zero_Interface-Loader.alpx | 10 + Zero_Interface-Loader.original.alp | 68542 ---------------- _alp/Agents/AVGC_data/Code/Functions.java | 1 + _alp/Agents/AVGC_data/Levels/Level.level.xml | 49 +- _alp/Agents/AVGC_data/Variables.xml | 208 +- _alp/Agents/Zero_Loader/AOC.Zero_Loader.xml | 8 +- _alp/Agents/Zero_Loader/Code/Functions.java | 242 +- _alp/Agents/Zero_Loader/Code/Functions.xml | 407 +- _alp/Agents/Zero_Loader/EmbeddedObjects.xml | 14 +- .../Agents/Zero_Loader/Levels/Level.level.xml | 74 +- _alp/Agents/Zero_Loader/Variables.xml | 94 +- .../Classes/Class.PBL_DHWAndCooking_data.java | 13 + _alp/Classes/Class.PBL_SpaceHeating_data.java | 17 + 13 files changed, 848 insertions(+), 68831 deletions(-) delete mode 100644 Zero_Interface-Loader.original.alp create mode 100644 _alp/Classes/Class.PBL_DHWAndCooking_data.java create mode 100644 _alp/Classes/Class.PBL_SpaceHeating_data.java diff --git a/Zero_Interface-Loader.alpx b/Zero_Interface-Loader.alpx index d78122b..4a8e9ff 100644 --- a/Zero_Interface-Loader.alpx +++ b/Zero_Interface-Loader.alpx @@ -392,6 +392,16 @@ <Id>1762351349700</Id> <Name><![CDATA[J_RemainingTotalsManager]]></Name> </JavaClass> + <JavaClass> + <Id>1768318918209</Id> + <Name><![CDATA[PBL_SpaceHeating_data]]></Name> + <Folder>1754045711603</Folder> + </JavaClass> + <JavaClass> + <Id>1768318961854</Id> + <Name><![CDATA[PBL_DHWAndCooking_data]]></Name> + <Folder>1754045711603</Folder> + </JavaClass> </JavaClasses> <RequiredLibraryReference> <LibraryName>zero_engine</LibraryName> diff --git a/Zero_Interface-Loader.original.alp b/Zero_Interface-Loader.original.alp deleted file mode 100644 index 19bcd53..0000000 --- a/Zero_Interface-Loader.original.alp +++ /dev/null @@ -1,68542 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<AnyLogicWorkspace splitVersion="1" - WorkspaceVersion="1.9" - AnyLogicVersion="8.9.7.202512010504" - AlpVersion="8.9.7"> - <Model xmlns:al="http://anylogic.com"> - <Id>1658477103134</Id> - <Name>Zero_Interface-Loader</Name> - <EngineVersion>6</EngineVersion> - <JavaPackageName>zerointerfaceloader</JavaPackageName> - <ModelTimeUnit>Hour</ModelTimeUnit> - <OptionLists> - <OptionList> - <Id>1658478100573</Id> - <Name>OL_FilterOptionsGC</Name> - <Option> - <Id>1734448498882</Id> - <Name>COMPANIES</Name> - </Option> - <Option> - <Id>1734442884762</Id> - <Name>HOUSES</Name> - </Option> - <Option> - <Id>1734442348652</Id> - <Name>DETAILED</Name> - </Option> - <Option> - <Id>1734442871159</Id> - <Name>NONDETAILED</Name> - </Option> - <Option> - <Id>1734442372415</Id> - <Name>HAS_PV</Name> - </Option> - <Option> - <Id>1734442386815</Id> - <Name>HAS_TRANSPORT</Name> - </Option> - <Option> - <Id>1760086039728</Id> - <Name>HAS_EV</Name> - </Option> - <Option> - <Id>1734444382736</Id> - <Name>GRIDTOPOLOGY_SELECTEDLOOP</Name> - </Option> - <Option> - <Id>1734442896763</Id> - <Name>ENERGYASSETS</Name> - </Option> - <Option> - <Id>1737653098541</Id> - <Name>SELECTED_NEIGHBORHOOD</Name> - </Option> - <Option> - <Id>1737656249784</Id> - <Name>SELECTED_MUNICIPALITY</Name> - </Option> - <Option> - <Id>1741874937291</Id> - <Name>FARMER</Name> - </Option> - <Option> - <Id>1742233248626</Id> - <Name>MANUAL_SELECTION</Name> - </Option> - </OptionList> - <OptionList> - <Id>1660743989698</Id> - <Name>OL_GISBuildingTypes</Name> - <Option> - <Id>1750173978462</Id> - <Name>DETAILED_COMPANY</Name> - </Option> - <Option> - <Id>1750173986048</Id> - <Name>DEFAULT_COMPANY</Name> - </Option> - <Option> - <Id>1750173990031</Id> - <Name>HOUSE</Name> - </Option> - <Option> - <Id>1750173992447</Id> - <Name>REMAINING</Name> - </Option> - </OptionList> - <OptionList> - <Id>1660743989798</Id> - <Name>OL_ProjectType</Name> - <Option> - <Id>1660743990769</Id> - <Name>BUSINESSPARK</Name> - </Option> - <Option> - <Id>1676307694256</Id> - <Name>RESIDENTIAL</Name> - </Option> - </OptionList> - <OptionList> - <Id>1667742453792</Id> - <Name>OL_UNUSED3</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - </OptionList> - <OptionList> - <Id>1675025163072</Id> - <Name>OL_UNUSED4</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - </OptionList> - <OptionList> - <Id>1709718356700</Id> - <Name>EnergyDemandTab</Name> - <Option> - <Id>1709718356702</Id> - <Name>MOBILITY</Name> - </Option> - <Option> - <Id>1709718356704</Id> - <Name>ELECTRICITY</Name> - </Option> - <Option> - <Id>1709718356706</Id> - <Name>HEAT</Name> - </Option> - <Option> - <Id>1714324722851</Id> - <Name>HUB</Name> - </Option> - <Option> - <Id>1721039647716</Id> - <Name>NFATO</Name> - </Option> - </OptionList> - <OptionList> - <Id>1726584216682</Id> - <Name>OL_SurveyType</Name> - <Option> - <Id>1726584216684</Id> - <Name>ZORM</Name> - </Option> - <Option> - <Id>1726584216686</Id> - <Name>EXCEL</Name> - </Option> - <Option> - <Id>1726584216688</Id> - <Name>NONE</Name> - </Option> - </OptionList> - <OptionList> - <Id>1753086929090</Id> - <Name>OL_MapOverlayTypes</Name> - <Option> - <Id>1753086938862</Id> - <Name>DEFAULT</Name> - </Option> - <Option> - <Id>1753086944014</Id> - <Name>ELECTRICITY_CONSUMPTION</Name> - </Option> - <Option> - <Id>1753086951601</Id> - <Name>PV_PRODUCTION</Name> - </Option> - <Option> - <Id>1753086958969</Id> - <Name>GRID_NEIGHBOURS</Name> - </Option> - <Option> - <Id>1753086978373</Id> - <Name>CONGESTION</Name> - </Option> - <Option> - <Id>1753108825070</Id> - <Name>ENERGY_LABEL</Name> - </Option> - <Option> - <Id>1754312700674</Id> - <Name>PARKING_TYPE</Name> - </Option> - </OptionList> - <OptionList> - <Id>1763646420469</Id> - <Name>OL_UserGCAccessType</Name> - <Option> - <Id>1763646670204</Id> - <Name>FULL</Name> - </Option> - <Option> - <Id>1763646670205</Id> - <Name>SPECIFIED</Name> - </Option> - <Option> - <Id>1763646670206</Id> - <Name>PUBLIC_ONLY</Name> - </Option> - </OptionList> - <OptionList> - <Id>1763648379983</Id> - <Name>OL_UserNBHAccessType</Name> - <Option> - <Id>1763648379984</Id> - <Name>FULL</Name> - </Option> - <Option> - <Id>1763648379985</Id> - <Name>SPECIFIED</Name> - </Option> - </OptionList> - </OptionLists> - <Folders> - <Folder> - <Id>1754045642067</Id> - <Name>Tabs</Name> - </Folder> - <Folder> - <Id>1754045666929</Id> - <Name>Dashboards</Name> - </Folder> - <Folder> - <Id>1754045711603</Id> - <Name>DatabasePackages</Name> - </Folder> - <Folder> - <Id>1761915047244</Id> - <Name>DataClasses</Name> - </Folder> - </Folders> - <ActiveObjectClasses> - <ActiveObjectClass> - <Id>1726584205528</Id> - <Name>AVGC_data</Name> - <Generic>false</Generic> - <GenericParameter> - <Id>1726584205523</Id> - <Name>1726584205523</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089981</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1710835200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1726584205524</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1726584205534</CurrentLevel> - <ConnectionsId>1726584205728</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1726584205532</Id> - <Name>hourOfYearPerMonth</Name> - <Description>Hour of year per month (not leap year) --> Houdt dit rekening met zomer/winter tijd?</Description> - <X>1070</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int[]</Type> - <InitialValue Class="CodeValue"> - <Code>new int[] {0, 744, 1392, 2136, 2856, 3600, 4320, 5064, 5808, 6528, 7272, 7992}</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205579</Id> - <Name>p_avgHouseConnectionCapacity_kW</Name> - <Description>https://www.enexis.nl/aansluitingen/welke-aansluiting-heb-ik-nodig -3*25 A --> 3*25*230 = 17.25 kW</Description> - <X>50</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>17.25</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205577</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205582</Id> - <Name>p_avgHouseHeatingMethod</Name> - <X>50</X> - <Y>168.976</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>OL_GridConnectionHeatingType</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>OL_GridConnectionHeatingType.GAS_BURNER</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205580</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205585</Id> - <Name>p_avgUtilityConnectionCapacity_kW</Name> - <Description>https://www.enexis.nl/aansluitingen/welke-aansluiting-heb-ik-nodig --> 17.25 -> set to 17, to prevent slider errors (stepsize cant be double, otherwise to small for user experience) - ---> 17.25 is way to small -> 3x80 is taken : 55 kW</Description> - <X>50</X> - <Y>330</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>55</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205583</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205588</Id> - <Name>p_avgUtilityHeatingMethod</Name> - <X>50</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>OL_GridConnectionHeatingType</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>OL_GridConnectionHeatingType.GAS_BURNER</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205586</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205591</Id> - <Name>p_avgHouseElectricityConsumption_kWh_yr</Name> - <Description>- https://www.milieucentraal.nl/energie-besparen/inzicht-in-je-energierekening/gemiddeld-energieverbruik/ -- https://www.overstappen.nl/energie/gemiddeld-energieverbruik/ ---> 2479 kWh/yr is the average of NL ---> Overwrite if numbers are available in the project selection agent -</Description> - <X>50</X> - <Y>128.976</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>2479</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205589</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205594</Id> - <Name>p_avgHouseGasConsumption_m3_yr</Name> - <Description>- https://www.overstappen.nl/energie/gemiddeld-energieverbruik/ -- https://www.milieucentraal.nl/energie-besparen/inzicht-in-je-energierekening/gemiddeld-energieverbruik/ - --> 1169 m3 is the average of NL ---> Overwrite if numbers are available in the project selection agent -</Description> - <X>50</X> - <Y>108.976</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1169</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205592</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205597</Id> - <Name>p_shareOfElectricVehicleOwnership</Name> - <Description>share of EVs in the netherlands. --> 5% (feb 2024). - -https://www.rvo.nl/onderwerpen/elektrisch-vervoer/stand-van-zaken </Description> - <X>50</X> - <Y>188.976</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.05</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205595</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205600</Id> - <Name>p_ratioHouseInstalledPV</Name> - <Description>How many houses have installed PV in The Netherlands: 25% (end of 2022) -https://solarmagazine.nl/nieuws-zonne-energie/i34591/de-harde-cijfers-drenthe-verstevigt-koppositie-38-procent-woningen-heeft-zonnepanelen</Description> - <X>50</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.25</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205598</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205603</Id> - <Name>p_avgHousePVInstallationPower_kWp</Name> - <Description>volgens gegevens van het CBS (Centraal Bureau voor de Statistiek) en RVO (Rijksdienst voor Ondernemend Nederland), was het gemiddelde geïnstalleerde piekvermogen van residentiële zonnepanelen in Nederland in 2020 ongeveer 4 kilowatt piek (kWp) per huishouden. --> 4kWp</Description> - <X>50</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>4</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205601</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205606</Id> - <Name>p_avgEVStorageCar_kWh</Name> - <Description>-https://www.eonenergy.com/electric-vehicle-charging/running-costs-and-benefits/battery-capacity-and-lifespan.html - --https://www.edi.be/blog/laadstation-3/hoe-is-het-gesteld-met-de-autonomie-van-de-elektrische-auto-in-2023-12 - -40 kWh (kleine autos) - -50-80 kWh (middel grote autos) - -80-100 kWh (grote autos) - -Minimaal: 116 kWh minimum nodig, anders soms negatieve SOC.</Description> - <X>570</X> - <Y>220</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>116</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205604</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205609</Id> - <Name>p_avgEVMaxChargePowerCar_kW</Name> - <Description>Bron???</Description> - <X>570</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>11</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205607</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205612</Id> - <Name>p_avgEVStorageVan_kWh</Name> - <Description>????</Description> - <X>570</X> - <Y>240</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>200</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205610</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205615</Id> - <Name>p_avgEVStorageTruck_kWh</Name> - <Description>??</Description> - <X>570</X> - <Y>260</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>500</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205613</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205618</Id> - <Name>p_avgEVMaxChargePowerVan_kW</Name> - <Description>Bron???</Description> - <X>570</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>11</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205616</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205621</Id> - <Name>p_avgEVMaxChargePowerTruck_kW</Name> - <Description>Bron???</Description> - <X>570</X> - <Y>190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>200</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205619</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205624</Id> - <Name>p_avgEVEnergyConsumptionCar_kWhpkm</Name> - <Description>https://ev-database.org/nl/auto/1555/Tesla-Model-3: 0.142 kWh/km - -https://www.vattenfall.nl/elektrische-auto/verbruik/ - ---> Tesla model 3: 15.1 kWh per 100 km --> 0.151 kWh/km ---> Kia niro: 17.1 kWh per 100 km --> 0.171 kWh/km ---> taking 0.16 kWh/km as the average</Description> - <X>570</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.16</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205622</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205627</Id> - <Name>p_avgEVEnergyConsumptionVan_kWhpkm</Name> - <Description>praktijkverbruik van 26,9 kWh per 100 kilometer: -https://www.debedrijfswagenadviseurs.nl/praktijkverbruik-elektrische-bedrijfswagen/ </Description> - <X>570</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.269</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205625</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205630</Id> - <Name>p_avgEVEnergyConsumptionTruck_kWhpkm</Name> - <Description>https://www.elektrischevrachtwagen.nl/post/hoe-ver-kan-een-elektrische-vrachtwagen-rijden, https://topsectorlogistiek.nl/wp-content/uploads/2024/06/20240126_Stappenplan-ZE-vrachtwagens.pdf -0.9 - 1.7 kWh/km ---> pak gemiddelde: 1.3</Description> - <X>570</X> - <Y>330</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.3</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205628</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205633</Id> - <Name>p_gas_kWhpm3</Name> - <Description>- https://www.greenchoice.nl/stroom-en-gas/bosgecompenseerd-gas/hoeveel-is-1-kuub-gas/ -- https://econvice.nl/op-gas-of-elektra-verwarmen-wat-is-gunstig/ -- https://www.joostdevree.nl/shtmls/calorische_waarde.shtml</Description> - <X>1070</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>9.77</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205631</Id> - <Label>p_gas_kWh_per_m3</Label> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205636</Id> - <Name>p_hydrogenEnergyDensity_kWh_Nm3</Name> - <Description>https://www.enapter.com/kb_post/what-is-the-energy-content-of-hydrogen - -LHV = 3.00 kWh/Nm3 -HHV = 3.54 kWh/Nm3</Description> - <X>1590</X> - <Y>160</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>3.00</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205634</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205639</Id> - <Name>p_hydrogenDensity_kg_Nm3</Name> - <Description>https://keengas.com/gases/hydrogen/</Description> - <X>1590</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.08988</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205637</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205642</Id> - <Name>p_oxygenDensity_kg_Nm3</Name> - <Description>http://www.uigi.com/o2_conv.html</Description> - <X>1590</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.4291</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205640</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205645</Id> - <Name>p_oxygenProduction_kgO2pkgH2</Name> - <Description>H20 = 2H + O -MM H = 1.008 g/mol -MM O = 16 g/mol ---> 1.008*2/16 = 0.126. -0.126 g waterstof per g water conversie. -1-0.126 = 0.874 g zuurstof per gram water conversie. - ---> 1/0.126 =7.9365 gram zuurstof productie per gram waterstof productie.</Description> - <X>1590</X> - <Y>260</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>7.9365</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205643</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205648</Id> - <Name>p_hydrogenSpecificEnergy_kWh_kg</Name> - <Description>https://www.cenex.co.uk/app/uploads/2021/05/Intro-to-hydrogen-1.pdf --> 33.6</Description> - <X>1590</X> - <Y>180</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>33.6</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205646</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205651</Id> - <Name>p_diesel_kWhpl</Name> - <Description>https://www.joostdevree.nl/shtmls/calorische_waarde.shtml</Description> - <X>1070</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>10</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205649</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205654</Id> - <Name>p_avgDieselConsumptionCar_kmpl</Name> - <Description>https://www.unitedconsumers.com/blog/auto/zuinig-rijden.jsp</Description> - <X>570</X> - <Y>400</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>21</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205652</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205657</Id> - <Name>p_avgGasolineConsumptionCar_kmpl</Name> - <Description>https://www.unitedconsumers.com/blog/auto/zuinig-rijden.jsp</Description> - <X>570</X> - <Y>420</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>15</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205655</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205660</Id> - <Name>p_gasoline_kWhpl</Name> - <Description>https://www.joostdevree.nl/shtmls/calorische_waarde.shtml</Description> - <X>1070</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>8.8</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205658</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205663</Id> - <Name>p_avgDieselConsumptionCar_kWhpkm</Name> - <X>570</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>p_diesel_kWhpl/p_avgDieselConsumptionCar_kmpl</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205661</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205666</Id> - <Name>p_avgGasolineConsumptionCar_kWhpkm</Name> - <X>570</X> - <Y>470</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>p_gasoline_kWhpl/p_avgGasolineConsumptionCar_kmpl</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205664</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205669</Id> - <Name>p_avgDieselConsumptionVan_kmpl</Name> - <Description>https://www.webfleet.com/nl_nl/webfleet/blog/hoeveel-diesel-verbruikt-een-vrachtwagen-per-kilometer/ - -11 liter per 100 km = 9.1 km per liter. -</Description> - <X>570</X> - <Y>510</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>9.1</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205667</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205672</Id> - <Name>p_avgDieselConsumptionVan_kWhpkm</Name> - <X>570</X> - <Y>530</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>p_diesel_kWhpl/p_avgDieselConsumptionVan_kmpl</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205670</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205675</Id> - <Name>p_avgDieselConsumptionTruck_kmpl</Name> - <Description>https://www.webfleet.com/nl_nl/webfleet/blog/hoeveel-diesel-verbruikt-een-vrachtwagen-per-kilometer/ - ---> 25 - 30 - 40 liter per 100 km. = 4 - 3.33 - 2.5 km per l -Heavely dependend on load, city/highway, etc. -For now: Picking 3.33 km per l</Description> - <X>570</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>3.33</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205673</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205678</Id> - <Name>p_avgDieselConsumptionTruck_kWhpkm</Name> - <X>570</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>p_diesel_kWhpl/p_avgDieselConsumptionTruck_kmpl</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205676</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205681</Id> - <Name>p_avgCOPHeatpump</Name> - <Description>https://www.vaillant.be/consumenten/ons-advies/blog/het-rendement-van-een-warmtepomp/ - -Gemiddelde COP is 4.</Description> - <X>70</X> - <Y>520</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>4</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205679</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205684</Id> - <Name>p_avgUtilityPVPower_kWp</Name> - <Description>FIND SOURCE!!! ????????</Description> - <X>50</X> - <Y>350</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205682</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205687</Id> - <Name>p_ratioElectricTrucks</Name> - <Description>Ratio of how many trucks are electric vs diesel. -??? -https://nos.nl/artikel/2483604-elektrische-vrachtwagens-blijven-achter-door-complexe-serie-aan-uitdagingen --> 'volgens cbs nog geen half procent.'</Description> - <X>50</X> - <Y>370</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.005</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205685</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205690</Id> - <Name>p_avgCompanyHeatingMethod</Name> - <Description>Source?? --> Should definatly be still the case in 2024</Description> - <X>50</X> - <Y>390</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>OL_GridConnectionHeatingType</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>OL_GridConnectionHeatingType.GAS_BURNER</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205688</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205693</Id> - <Name>p_avgPVPower_kWpm2</Name> - <Description>https://hallostroom.nl/zonnepanelen/opbrengst/per-m2/ --> 177 W/m2 -https://www.zonneplan.nl/kenniscentrum/zonnepanelen/vermogen --> 212 W/m2 -https://www.zonnepanelennoord.nl/vermogen-zonnepanelen/ --> 215 W/m2</Description> - <X>50</X> - <Y>1020</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205691</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205696</Id> - <Name>p_avgRatioBatteryCapacity_v_Power</Name> - <Description>Average ratio of battery capacity over battery power. ---> If battery capacity (in kWh) is twice the battery power (in kW) --> ratio = 2.</Description> - <X>50</X> - <Y>1120</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205694</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205699</Id> - <Name>p_avgHydrogenConsumptionCar_kWhpkm</Name> - <Description>https://magnuscmd.com/hydrogen-fuel-cell-vehicles-a-threat-to-the-electric-car/ - ---> avg: 29 kWh per 100 km --> 0.29 kWh/km -</Description> - <X>570</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.29</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205697</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205702</Id> - <Name>p_avgHydrogenConsumptionVan_kWhpkm</Name> - <Description>https://www.huiskes-kokkeler.nl/bedrijfswagens/volkswagen-bedrijfswagens/modellen/crafter-hymotion-concept ---> 1.4 kg Waterstof per 100 km = 0.014 kg/km ---> 0.014 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 0.47 kWh/kg</Description> - <X>570</X> - <Y>660</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.47</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205700</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205705</Id> - <Name>p_avgHydrogenConsumptionTruck_kWhpkm</Name> - <Description>https://transportenmilieu.nl/nieuwsarchief/item/hyundai-op-waterstof-voor-havi-zwitserland ---> 6.6 kg Waterstof per 100 km = 0.066 kg/km ---> 0.066 * 33.6 (p_hydrogenSpecificEnergy_kWh_kg = 2.22 kWh/kg</Description> - <X>570</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>2.22</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205703</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205708</Id> - <Name>p_avgRatioRoofPotentialPV</Name> - <Description>value for the ratio of the avg Usable Roof Area For PV fr</Description> - <X>50</X> - <Y>1040</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205706</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205711</Id> - <Name>p_avgEfficiencyHeatpump_fr</Name> - <Description>Efficiency (eta_r) used to calculate the COP in the energy asset based on temperature differences. - -'0.5' comes from old code, no source found for it yet.</Description> - <X>70</X> - <Y>540</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205709</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205714</Id> - <Name>p_avgOutputTemperatureElectricHeatpump_degC</Name> - <Description>https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/?utm_source=chatgpt.com - max 45-55 -https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 graden afgifte bij -10 graden. - --> Voor nu gemiddeld 40 genomen.</Description> - <X>70</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>40</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205712</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205717</Id> - <Name>p_avgEfficiencyGasBurner_fr</Name> - <Description>Average heating efficiency of a gas burner. -https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas energy density of 8.8 kWh/m3 (lower heating value), we use higher heating value: 9.77 -> 8.8*1.04/9.77 = 0.94</Description> - <X>70</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.94</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205715</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205720</Id> - <Name>p_avgOutputTemperatureGasBurner_degC</Name> - <Description>Average output temperature of a gas burner unit in degC. - ---> Source?</Description> - <X>70</X> - <Y>670</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>90</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205718</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205723</Id> - <Name>p_avgEfficiencyHydrogenBurner_fr</Name> - <Description>Average heating efficiency of a hydrogen burner. - -- https://h2sciencecoalition.com/blog/hydrogen-for-heating-a-comparison-with-heat-pumps-part-1/ - -- https://www.csrf.ac.uk/blog/hydrogen-for-heating/</Description> - <X>70</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.90</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205721</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584205726</Id> - <Name>p_avgOutputTemperatureHydrogenBurner_degC</Name> - <Description>Average output temperature of a hydrogen burner unit in degC. - ---> Source?</Description> - <X>70</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>90</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726584205724</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726746753360</Id> - <Name>p_avgVehiclesPerChargePoint</Name> - <X>50</X> - <Y>1190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1726746753358</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728032263201</Id> - <Name>p_avgAnnualTravelDistanceVan_km</Name> - <Description>https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-bestelautos -> 4 jaar oude bestlbussen gemiddeld 22.2 duizend km in een jaar.</Description> - <X>570</X> - <Y>790</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>22200</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728032263199</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728032304301</Id> - <Name>p_avgAnnualTravelDistanceCompanyCar_km</Name> - <Description>https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-personenautos</Description> - <X>570</X> - <Y>770</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>20500</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728032304299</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728032305440</Id> - <Name>p_avgAnnualTravelDistanceTruck_km</Name> - <Description>https://www.cbs.nl/nl-nl/cijfers/detail/84651NED</Description> - <X>570</X> - <Y>810</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>54505</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728032305438</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728034204646</Id> - <Name>p_avgFullLoadHoursPV_hr</Name> - <Description>Parameter used to estimate the total solar production in a year in a function like: -p_avgFullLoadHoursPV_hr * kWp_of_PV_panels = XXX kWh pv production in a year.</Description> - <X>50</X> - <Y>1060</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>920</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728034204644</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728390983761</Id> - <Name>p_avgCompanyElectricityConsumption_kWhpm2</Name> - <Description>https://www.odyssee-mure.eu/publications/efficiency-by-sector/services/offices-specific-energy-and-electricity-consumption.html - ---> 188 kWh/m2 for offices in NL</Description> - <X>50</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>188</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728390983759</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728391035656</Id> - <Name>p_avgCompanyGasConsumption_m3pm2</Name> - <Description>https://publications.tno.nl/publication/34629408/3xJn98/e16056.pdf -> page 28 - -9 m3 p m2 for label A -12 m3 p m2 for label B -to 18 m3 p m2 for label G - ---> take 7 for now.</Description> - <X>50</X> - <Y>430</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>7</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728391035654</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1728394646404</Id> - <Name>p_avgCompanyHeatConsumption_kWhpm2</Name> - <Description>https://www.wearepossible.org/parks-toolkit/5-investigating-heat-demand - ---> estimated benchmark 100 kWh/m2</Description> - <X>50</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>100</Code> - </DefaultValue> - <ParameterEditor> - <Id>1728394646402</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1733155392379</Id> - <Name>p_avgSolarFieldPower_kWppha</Name> - <Description>1000</Description> - <X>50</X> - <Y>1080</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1000</Code> - </DefaultValue> - <ParameterEditor> - <Id>1733155392377</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1745316053417</Id> - <Name>p_avgEfficiencyCHP_thermal_fr</Name> - <Description>50% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) -Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf</Description> - <X>70</X> - <Y>830</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745316053415</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1745316110677</Id> - <Name>p_avgEfficiencyCHP_electric_fr</Name> - <Description>42% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) -Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf</Description> - <X>70</X> - <Y>850</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.42</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745316110675</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1745326622582</Id> - <Name>p_avgOutputTemperatureCHP_degC</Name> - <Description>Average output temperature of a hydrogen burner unit in degC. - ---> Source?</Description> - <X>70</X> - <Y>870</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>90</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745326622580</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1747314895126</Id> - <Name>p_avgEfficiencyDistrictHeatingDeliverySet_fr</Name> - <Description>Average heating efficiency of a district heating delivery set -Set as 0.8 to account for the losses of the heatgrid, as they are not yet part of our model. -https://www.grundfos.com/nl/learn/research-and-insights/pipe-heat-loss -https://www.klimaat030.nl/warmteverlies-van-stadsverwarming-gigantisch/</Description> - <X>70</X> - <Y>920</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.8</Code> - </DefaultValue> - <ParameterEditor> - <Id>1747314895124</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1747314895129</Id> - <Name>p_avgOutputTemperatureDistrictHeatingDeliverySet_degC</Name> - <Description>Average output temperature of a districtheating delivery set in degC. - -70 -> https://www.nplw.nl/warmtenet/warmtetechnieken/middentemperatuur-warmtenet</Description> - <X>70</X> - <Y>940</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>70</Code> - </DefaultValue> - <ParameterEditor> - <Id>1747314895127</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1749653366667</Id> - <Name>p_v2gProbability</Name> - <Description>SOURCE!?!?!?!</Description> - <X>570</X> - <Y>125</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1749653366665</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1750246849611</Id> - <Name>p_v1gProbability</Name> - <Description>SOURCE!?!?!?!</Description> - <X>570</X> - <Y>105</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.8</Code> - </DefaultValue> - <ParameterEditor> - <Id>1750246849609</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1750341289733</Id> - <Name>p_avgEVsPerPublicCharger</Name> - <Description>TODO: Determine this value</Description> - <X>570</X> - <Y>860</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1750341289731</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751893521012</Id> - <Name>p_avgPTPower_kWpm2</Name> - <X>570</X> - <Y>930</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.5</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751893521010</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751893540583</Id> - <Name>p_avgHeatBufferWaterVolumePerHPPower_m3pkW</Name> - <Description>https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 25 liter per kW warmtepomp vermogen = 0.025 m3/kW</Description> - <X>570</X> - <Y>1080</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.025</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751893540581</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751893810778</Id> - <Name>p_avgHeatBufferWaterVolumePerPTSurface_m3pm2</Name> - <Description>https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 50 liter per m2 zonnecollector = 0.050 m3/m2</Description> - <X>570</X> - <Y>1060</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.05</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751893810776</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751896032002</Id> - <Name>p_waterHeatCapacity_JpkgK</Name> - <Description>https://www.engineeringtoolbox.com/water-thermal-properties-d_162.html -> 4185 J/kg K bij 20 *C - --> Verschilt eigenlijk met temperatuur, weer net iets lager bij 40 graden (4180), weer 4185 bij 60*C en net iets hoger bij 80 graden. (4197 bij 80 *C). - -Voor nu gekozen voor 4185. -</Description> - <X>1070</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>4185</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751896032000</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751905820546</Id> - <Name>p_waterDensity_kgpm3</Name> - <Description>https://www.sigmaaldrich.com/NL/en/substance/densitystandard998kgm318027732185 --> 998 kg/m3</Description> - <X>1070</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>998</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751905820544</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751906112800</Id> - <Name>p_avgMaxHeatBufferTemperature_degC</Name> - <Description>???</Description> - <X>570</X> - <Y>1010</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>85</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751906112798</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1751906126857</Id> - <Name>p_avgMinHeatBufferTemperature_degC</Name> - <X>570</X> - <Y>1030</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>60</Code> - </DefaultValue> - <ParameterEditor> - <Id>1751906126855</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1753950741783</Id> - <Name>p_avgPTPanelSize_m2</Name> - <Description>https://www.econo.nl/m24hpcpc-400-h2-heatpipe-zonnecollector-prisma-pro-24-cpc -> +- 4 m2</Description> - <X>570</X> - <Y>950</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>4</Code> - </DefaultValue> - <ParameterEditor> - <Id>1753950741781</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1754309475986</Id> - <Name>p_avgRatioHouseBatteryStorageCapacity_v_PVPower</Name> - <Description>https://www.essent.nl/thuisbatterij/capaciteit-thuisbatterij : Essent: "Over het algemeen kun je ervan uitgaan dat een thuisbatterij zo'n 1 à 1,5 kWh capaciteit nodig heeft per kWp zonnepanelen vermogen. " </Description> - <X>50</X> - <Y>1140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.25</Code> - </DefaultValue> - <ParameterEditor> - <Id>1754309475984</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1755767836354</Id> - <Name>p_avgNrOfCarsPerHouse</Name> - <Description>https://opendata.cbs.nl/#/CBS/nl/dataset/85039NED/table?searchKeywords=motorvoertuigen -> 1.1</Description> - <X>50</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.1</Code> - </DefaultValue> - <ParameterEditor> - <Id>1755767836352</Id> - <Label>p_avgHousePVInstallationPower_kWp1</Label> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1755873729807</Id> - <Name>p_avgAnnualTravelDistancePrivateCar_km</Name> - <Description>https://www.cbs.nl/nl-nl/visualisaties/verkeer-en-vervoer/verkeer/verkeersprestaties-personenautos</Description> - <X>570</X> - <Y>730</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>11200</Code> - </DefaultValue> - <ParameterEditor> - <Id>1755873729805</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1755874747343</Id> - <Name>p_avgAnnualTravelDistanceSecondVSFirstCar_fr</Name> - <Description>Scaling factor used to scale down the average annual travel distance of the additional cars for households that have multiple cars. SOURCE!???</Description> - <X>570</X> - <Y>750</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0.6</Code> - </DefaultValue> - <ParameterEditor> - <Id>1755874747341</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1759233211509</Id> - <Name>map_yearlySummerWinterTimeStartHour</Name> - <Description>Map that contains data, with key per year, and value a pair where pair.getFirst() == summertimeStartHour and pair.getSecond() == winterTimeStartHour.</Description> - <X>1070</X> - <Y>400</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>Map<Integer, Pair<Double, Double>></Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>Map.of( -2023, new Pair<>(2018.0, 7247.0), -2024, new Pair<>(2162.0, 7203.0), -2025, new Pair<>(2114.0, 7131.0) -)</Code> - </DefaultValue> - <ParameterEditor> - <Id>1759233211507</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1760435457613</Id> - <Name>p_minHeatpumpElectricCapacity_kW</Name> - <Description>https://comfortklimaat.nl/collectie/warmtepompen -> Thermisch vermogen is minimaal 4. -https://www.bluesolid.nl/warmtepomp-monoblock-9-kw-1ph.html -> Thermisch vermogen van minimaal 5. -https://www.dewarmte.nl/all-electric-warmtepomp/ -> thermisch vermogen van 2-8 kW. - --> (4+5+2)/3 -> Gemiddeld ongeveer 3.6 thermisch-> 3.6/3 = 1.2 elektrisch</Description> - <X>70</X> - <Y>600</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>1.2</Code> - </DefaultValue> - <ParameterEditor> - <Id>1760435457611</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1760435475991</Id> - <Name>p_minGasBurnerOutputCapacity_kW</Name> - <Description>https://www.warmteservice.nl/Verwarming/CV-ketel/HR-Combiketel/c/163 -> Minimum ranged van 4 - 7.8 -> gekozen voor 6 </Description> - <X>70</X> - <Y>690</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>6</Code> - </DefaultValue> - <ParameterEditor> - <Id>1760435475989</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1760435486680</Id> - <Name>p_minHydrogenBurnerOutputCapacity_kW</Name> - <Description>Zelfde gekozen als gasbrander.</Description> - <X>70</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>6</Code> - </DefaultValue> - <ParameterEditor> - <Id>1760435486678</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1760435497667</Id> - <Name>p_minDistrictHeatingDeliverySetOutputCapacity_kW</Name> - <Description>25 kw is a default set: https://www.acm.nl/nl/energie/warmte-en-koude/warmtetarieven/tarieven-warmte-en-koude</Description> - <X>70</X> - <Y>960</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>25</Code> - </DefaultValue> - <ParameterEditor> - <Id>1760435497665</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1763396237774</Id> - <Name>p_avgOutputTemperatureHybridHeatpump_degC</Name> - <Description>https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/?utm_source=chatgpt.com - max 45-55 -https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 graden afgifte bij -10 graden. - --> Voor nu gemiddeld 40 genomen.</Description> - <X>70</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>40</Code> - </DefaultValue> - <ParameterEditor> - <Id>1763396237772</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205530</Id> - <Name>f_setAVGC_data</Name> - <X>30</X> - <Y>50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>J_AVGC_data dataAVGC = new J_AVGC_data(); -zero_Loader.energyModel.avgc_data = dataAVGC; - -dataAVGC.p_avgHouseGasConsumption_m3_yr = p_avgHouseGasConsumption_m3_yr; -dataAVGC.p_avgHouseElectricityConsumption_kWh_yr = p_avgHouseElectricityConsumption_kWh_yr; -dataAVGC.p_avgEVMaxChargePowerVan_kW = p_avgEVMaxChargePowerVan_kW; -dataAVGC.p_avgHouseConnectionCapacity_kW = p_avgHouseConnectionCapacity_kW; -dataAVGC.p_avgHouseHeatingMethod = p_avgHouseHeatingMethod; -dataAVGC.p_avgNrOfCarsPerHouse = p_avgNrOfCarsPerHouse; -dataAVGC.p_ratioEVHousePersonalCars = p_shareOfElectricVehicleOwnership; -dataAVGC.p_avgEVMaxChargePowerCar_kW = p_avgEVMaxChargePowerCar_kW; -dataAVGC.p_avgEVMaxChargePowerTruck_kW = p_avgEVMaxChargePowerTruck_kW; -dataAVGC.p_avgEVStorageCar_kWh = p_avgEVStorageCar_kWh; -dataAVGC.p_avgEVStorageVan_kWh = p_avgEVStorageVan_kWh; -dataAVGC.p_avgHousePVInstallationPower_kWp = p_avgHousePVInstallationPower_kWp; -dataAVGC.p_avgEVStorageTruck_kWh = p_avgEVStorageTruck_kWh; -dataAVGC.p_ratioHouseInstalledPV = p_ratioHouseInstalledPV; -dataAVGC.p_gas_kWhpm3 = p_gas_kWhpm3; -dataAVGC.p_diesel_kWhpl = p_diesel_kWhpl; -dataAVGC.p_gasoline_kWhpl = p_gasoline_kWhpl; -dataAVGC.p_waterHeatCapacity_JpkgK = p_waterHeatCapacity_JpkgK; -dataAVGC.p_waterDensity_kgpm3 = p_waterDensity_kgpm3; -dataAVGC.p_avgUtilityHeatingMethod = p_avgUtilityHeatingMethod; -dataAVGC.p_avgUtilityConnectionCapacity_kW = p_avgUtilityConnectionCapacity_kW; -dataAVGC.p_avgUtilityPVPower_kWp = p_avgUtilityPVPower_kWp; -dataAVGC.p_ratioElectricTrucks = p_ratioElectricTrucks; -dataAVGC.p_avgCompanyHeatingMethod = p_avgCompanyHeatingMethod; -dataAVGC.p_avgEVEnergyConsumptionCar_kWhpkm = p_avgEVEnergyConsumptionCar_kWhpkm; -dataAVGC.p_avgEVEnergyConsumptionVan_kWhpkm = p_avgEVEnergyConsumptionVan_kWhpkm; -dataAVGC.p_avgEVEnergyConsumptionTruck_kWhpkm = p_avgEVEnergyConsumptionTruck_kWhpkm; -dataAVGC.p_hydrogenEnergyDensity_kWh_Nm3 = p_hydrogenEnergyDensity_kWh_Nm3; -dataAVGC.p_avgDieselConsumptionCar_kmpl = p_avgDieselConsumptionCar_kmpl; -dataAVGC.p_avgGasolineConsumptionCar_kmpl = p_avgGasolineConsumptionCar_kmpl; -dataAVGC.p_hydrogenSpecificEnergy_kWh_kg = p_hydrogenSpecificEnergy_kWh_kg; -dataAVGC.p_hydrogenDensity_kg_Nm3 = p_hydrogenDensity_kg_Nm3; -dataAVGC.p_oxygenDensity_kg_Nm3 = p_oxygenDensity_kg_Nm3; -dataAVGC.p_avgCOPHeatpump = p_avgCOPHeatpump; -dataAVGC.p_avgEfficiencyHeatpump_fr = p_avgEfficiencyHeatpump_fr; -dataAVGC.p_avgDieselConsumptionCar_kWhpkm = p_avgDieselConsumptionCar_kWhpkm; -dataAVGC.p_oxygenProduction_kgO2pkgH2 = p_oxygenProduction_kgO2pkgH2; -dataAVGC.p_avgGasolineConsumptionCar_kWhpkm = p_avgGasolineConsumptionCar_kWhpkm; -dataAVGC.p_avgDieselConsumptionVan_kmpl = p_avgDieselConsumptionVan_kmpl; -dataAVGC.p_avgDieselConsumptionVan_kWhpkm = p_avgDieselConsumptionVan_kWhpkm; -dataAVGC.p_avgDieselConsumptionTruck_kmpl = p_avgDieselConsumptionTruck_kmpl; -dataAVGC.p_avgDieselConsumptionTruck_kWhpkm = p_avgDieselConsumptionTruck_kWhpkm; -dataAVGC.p_avgOutputTemperatureElectricHeatpump_degC = p_avgOutputTemperatureElectricHeatpump_degC; -dataAVGC.p_avgOutputTemperatureHybridHeatpump_degC = p_avgOutputTemperatureHybridHeatpump_degC; -dataAVGC.p_avgHydrogenConsumptionCar_kWhpkm = p_avgHydrogenConsumptionCar_kWhpkm; -dataAVGC.p_avgEfficiencyGasBurner_fr = p_avgEfficiencyGasBurner_fr; -dataAVGC.p_avgHydrogenConsumptionVan_kWhpkm = p_avgHydrogenConsumptionVan_kWhpkm; -dataAVGC.p_avgHydrogenConsumptionTruck_kWhpkm = p_avgHydrogenConsumptionTruck_kWhpkm; -dataAVGC.p_avgOutputTemperatureGasBurner_degC = p_avgOutputTemperatureGasBurner_degC; -dataAVGC.p_avgEfficiencyHydrogenBurner_fr = p_avgEfficiencyHydrogenBurner_fr; -dataAVGC.p_avgOutputTemperatureHydrogenBurner_degC = p_avgOutputTemperatureHydrogenBurner_degC; -dataAVGC.p_minHeatpumpElectricCapacity_kW = p_minHeatpumpElectricCapacity_kW; -dataAVGC.p_minGasBurnerOutputCapacity_kW = p_minGasBurnerOutputCapacity_kW; -dataAVGC.p_minHydrogenBurnerOutputCapacity_kW = p_minHydrogenBurnerOutputCapacity_kW; -dataAVGC.p_minDistrictHeatingDeliverySetOutputCapacity_kW = p_minDistrictHeatingDeliverySetOutputCapacity_kW; -dataAVGC.p_avgPVPower_kWpm2= p_avgPVPower_kWpm2; -dataAVGC.p_avgRatioRoofPotentialPV = p_avgRatioRoofPotentialPV; -dataAVGC.p_avgRatioBatteryCapacity_v_Power = p_avgRatioBatteryCapacity_v_Power; -dataAVGC.p_avgRatioHouseBatteryStorageCapacity_v_PVPower = p_avgRatioHouseBatteryStorageCapacity_v_PVPower; -dataAVGC.p_avgSolarFieldPower_kWppha = p_avgSolarFieldPower_kWppha; -dataAVGC.p_avgEfficiencyCHP_thermal_fr = p_avgEfficiencyCHP_thermal_fr; -dataAVGC.p_avgEfficiencyCHP_electric_fr = p_avgEfficiencyCHP_thermal_fr; -dataAVGC.p_avgOutputTemperatureCHP_degC = p_avgEfficiencyCHP_thermal_fr; -dataAVGC.p_avgEfficiencyDistrictHeatingDeliverySet_fr = p_avgEfficiencyDistrictHeatingDeliverySet_fr; -dataAVGC.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC = p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; -dataAVGC.p_v1gProbability = p_v1gProbability; -dataAVGC.p_v2gProbability = p_v2gProbability; -dataAVGC.p_avgEVsPerPublicCharger = p_avgEVsPerPublicCharger; -dataAVGC.p_avgPTPower_kWpm2 = p_avgPTPower_kWpm2; -dataAVGC.p_avgPTPanelSize_m2 = p_avgPTPanelSize_m2; -dataAVGC.p_avgMaxHeatBufferTemperature_degC = p_avgMaxHeatBufferTemperature_degC; -dataAVGC.p_avgMinHeatBufferTemperature_degC = p_avgMinHeatBufferTemperature_degC; -dataAVGC.p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 = p_avgHeatBufferWaterVolumePerPTSurface_m3pm2; -dataAVGC.p_avgHeatBufferWaterVolumePerHPPower_m3pkW = p_avgHeatBufferWaterVolumePerHPPower_m3pkW; -dataAVGC.p_avgAnnualTravelDistancePrivateCar_km = p_avgAnnualTravelDistancePrivateCar_km; -dataAVGC.p_avgAnnualTravelDistanceCompanyCar_km = p_avgAnnualTravelDistanceCompanyCar_km; -dataAVGC.p_avgAnnualTravelDistanceVan_km = p_avgAnnualTravelDistanceVan_km; -dataAVGC.p_avgAnnualTravelDistanceTruck_km = p_avgAnnualTravelDistanceTruck_km;</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1726584205728</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1726584830548</Id> - <Name>zero_Loader</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Loader</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1726584205534</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1726584205536</Id> - <Name>rect_constants</Name> - <X>1020</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>896.894</Width> - <Height>1400</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205538</Id> - <Name>rect_avg</Name> - <X>0.737</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>1019.263</Width> - <Height>1400</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205540</Id> - <Name>txt_houses</Name> - <X>40</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for houses</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205542</Id> - <Name>txt_avgCompanies</Name> - <X>40</X> - <Y>280</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for companies/utilities</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205544</Id> - <Name>txt_avgEV</Name> - <X>560</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for Electric Vehicles</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205546</Id> - <Name>text3</Name> - <X>1440</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>24</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1726584205548</Id> - <Name>text4</Name> - <X>1060</X> - <Y>200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Energy conversion constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205550</Id> - <Name>text5</Name> - <X>480</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Averages</Text> - <Font> - <Name>SansSerif</Name> - <Size>24</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1726584205552</Id> - <Name>rect_hydrogenC</Name> - <X>1560</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16711681</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>200</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205554</Id> - <Name>txt_hydrogenC</Name> - <X>1580</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hydrogen constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205556</Id> - <Name>txt_avgFossil</Name> - <X>560</X> - <Y>360</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for Fossil fueled vehicles</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205558</Id> - <Name>txt_Heatassets</Name> - <X>40</X> - <Y>470</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heat assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205560</Id> - <Name>txt_avgPV</Name> - <X>40</X> - <Y>990</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>PV panels</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205562</Id> - <Name>txt_avgBat</Name> - <X>40</X> - <Y>1095</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batteries</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205564</Id> - <Name>txt_avgFCV</Name> - <X>560</X> - <Y>610</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average values for Hydrogen vehicles</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205566</Id> - <Name>txt_heatpumps</Name> - <X>60</X> - <Y>490</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heatpumps</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205568</Id> - <Name>txt_gasburners</Name> - <X>60</X> - <Y>620</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Gasburners</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205570</Id> - <Name>txt_hydrogenburners</Name> - <X>60</X> - <Y>710</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hydrogenburners</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205572</Id> - <Name>rect_sendToEngine</Name> - <X>10</X> - <Y>10</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-65536</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>170</Width> - <Height>60</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205574</Id> - <Name>txt_valuesToEngine</Name> - <X>20</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Send values to Engine</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205576</Id> - <Name>txt_timeC</Name> - <X>1060</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Time constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726743791200</Id> - <Name>text</Name> - <X>40</X> - <Y>1160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Chargingcentres</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728032240347</Id> - <Name>txt_avgTravelDistances</Name> - <X>560</X> - <Y>700</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Average travel distances per vehicle type</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1745316061345</Id> - <Name>txt_CHP</Name> - <X>60</X> - <Y>800</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>CHP</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1747314897311</Id> - <Name>txt_districtHeatingDeliverySet</Name> - <X>60</X> - <Y>890</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>District Heating delivery set</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1751906160194</Id> - <Name>txt_avgHeatBuffer</Name> - <X>560</X> - <Y>980</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heat Buffer</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1751906173848</Id> - <Name>txt_avgPT</Name> - <X>560</X> - <Y>900</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>PT panels</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1759233222368</Id> - <Name>txt_timeConstants</Name> - <X>1060</X> - <Y>370</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Time constants</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1709049506453</Id> - <Name>tabArea</Name> - <Folder>1754045642067</Folder> - <Generic>false</Generic> - <GenericParameter> - <Id>1709049506461</Id> - <Name>1709049506461</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089980</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709107200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1709049506456</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1709049506460</CurrentLevel> - <ConnectionsId>1709049506454</ConnectionsId> - <AgentLinks> - <AgentLink> - <Id>1709049506454</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <Presentation> - <Level> - <Id>1709049506460</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1722253463895</Id> - <Name>tabEHub</Name> - <AdditionalClassCode>public ShapeGroup getGroupHubSliders() { - return this.gr_hubSliders; -} - -public ShapeButton getButton_remove_nfato() { - return this.button_remove_nfato; -} - -public ShapeButton getButton_createEnergyHub() { - return this.button_createEnergyHub; -}</AdditionalClassCode> - <Folder>1754045642067</Folder> - <ExtendsReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>tabArea</ClassName> - </ExtendsReference> - <Generic>false</Generic> - <GenericParameter> - <Id>1722253463901</Id> - <Name>1722253463901</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089979</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1722326400000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1722253463898</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1722253463902</CurrentLevel> - <ConnectionsId>1722253463896</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1722256365490</Id> - <Name>b_NFATOListener</Name> - <X>740</X> - <Y>915</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>boolean</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1722256365499</Id> - <Name>v_nfatoFirstGC</Name> - <X>740</X> - <Y>855</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>GridConnection</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1722256365507</Id> - <Name>v_nfatoSecondGC</Name> - <X>740</X> - <Y>875</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>GridConnection</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1722256365515</Id> - <Name>b_nfatoWeekendDistinction</Name> - <X>740</X> - <Y>895</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>boolean</Type> - <InitialValue Class="CodeValue"> - <Code>false</Code> - </InitialValue> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1722256365452</Id> - <Name>f_setNFATO</Name> - <Description>Sets the relevant parameters in the engine for the NFATO. The first selected GC will receive capacity from the second GC.</Description> - <X>740</X> - <Y>790</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>weekCapacities</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>weekendCapacities</Name> - <Type>double[]</Type> - </Parameter> - <Body>GridConnection gc1 = v_nfatoFirstGC; -GridConnection gc2 = v_nfatoSecondGC; - -// Reset the GC Capacities if they already had a NF-ATO -gc1.f_nfatoSetConnectionCapacity(true); -gc2.f_nfatoSetConnectionCapacity(true); - -switch (rb_deliveryOrFeedin.getValue()) { - case 0: // Delivery - // Set the variables of the GCs - for (int i = 0; i < 24; i++) { - gc1.v_nfatoWeekDeliveryCapacity_kW[i] += weekCapacities[i]; - gc2.v_nfatoWeekDeliveryCapacity_kW[i] += -weekCapacities[i]; - gc1.v_nfatoWeekendDeliveryCapacity_kW[i] += weekendCapacities[i]; - gc2.v_nfatoWeekendDeliveryCapacity_kW[i] += -weekendCapacities[i]; - } - break; - - case 1: // Feed In - // Set the variables of the GCs - for (int i = 0; i < 24; i++) { - gc1.v_nfatoWeekFeedinCapacity_kW[i] += weekCapacities[i]; - gc2.v_nfatoWeekFeedinCapacity_kW[i] += -weekCapacities[i]; - gc1.v_nfatoWeekendFeedinCapacity_kW[i] += weekendCapacities[i]; - gc2.v_nfatoWeekendFeedinCapacity_kW[i] += -weekendCapacities[i]; - } - break; - - case 2: // Both - // Set the variables of the GCs - for (int i = 0; i < 24; i++) { - gc1.v_nfatoWeekDeliveryCapacity_kW[i] += weekCapacities[i]; - gc2.v_nfatoWeekDeliveryCapacity_kW[i] += -weekCapacities[i]; - gc1.v_nfatoWeekendDeliveryCapacity_kW[i] += weekendCapacities[i]; - gc2.v_nfatoWeekendDeliveryCapacity_kW[i] += -weekendCapacities[i]; - - gc1.v_nfatoWeekFeedinCapacity_kW[i] += weekCapacities[i]; - gc2.v_nfatoWeekFeedinCapacity_kW[i] += -weekCapacities[i]; - gc1.v_nfatoWeekendFeedinCapacity_kW[i] += weekendCapacities[i]; - gc2.v_nfatoWeekendFeedinCapacity_kW[i] += -weekendCapacities[i]; - } - break; - - default: - throw new IllegalStateException("Invalid Setting in rb_deliveryOrFeedin"); -} - -// Update the Connection Capacity if it is needed at the current time -gc1.f_nfatoSetConnectionCapacity(false); -gc2.f_nfatoSetConnectionCapacity(false); - -gc1.v_enableNFato = true; -gc2.v_enableNFato = true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256365459</Id> - <Name>f_checkGISRegion</Name> - <Description>When b_NFATOListener is true checks wether the selected coordinates are a valid GC for the NFATO. If so saves the GC and updates the text fields</Description> - <X>740</X> - <Y>700</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>clickx</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>clicky</Name> - <Type>double</Type> - </Parameter> - <Body>//Check if click was on Building -for ( GIS_Building b : zero_Interface.energyModel.pop_GIS_Buildings ){ - if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ - if (b.gisRegion.isVisible()) { - GridConnection GC = b.c_containedGridConnections.get(0); - if (GC != null && GC != v_nfatoFirstGC) { - // found a valid GC - // Check if it is the first GC - if (v_nfatoFirstGC == null) { - t_nfatoFirstBuilding.setText(GC.p_ownerID + " zal ontvangen"); - t_nfatoSecondBuilding.setText("Klik op een gebouw dat zijn capaciteit gaat afstaan"); - v_nfatoFirstGC = GC; - //for (GIS_Building b : GC.c_connectedBuildings) { - //b.gisRegion.setFillColor(v_selectionColorAddBuildings); - //} - } - else { - v_nfatoSecondGC = GC; - t_nfatoSecondBuilding.setText(GC.p_ownerID + " zal leveren"); - //for (GIS_Building b : GC.c_connectedBuildings) { - //b.gisRegion.setFillColor(v_selectionColorAddBuildings); - //} - // We found two buildings, return to the default clicking functionality - b_NFATOListener = false; - } - } - } - } -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1722256365466</Id> - <Name>f_checkNFATO</Name> - <Description>Checks if the current NFATO settings could generate a valid contract. Returns true if NFATO is possible.</Description> - <X>740</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>weekCapacities</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>weekendCapacities</Name> - <Type>double[]</Type> - </Parameter> - <Body>GridConnection gc1 = v_nfatoFirstGC; -GridConnection gc2 = v_nfatoSecondGC; - -if (gc1 == null || gc2 == null || gc1 == gc2) { - throw new IllegalStateException("Invalid Non-Firm ATO Settings, Please select two gridconnections"); -} - -double[] weekTestDelivery = new double[24]; -double[] weekendTestDelivery = new double[24]; -double[] weekTestFeedin = new double[24]; -double[] weekendTestFeedin = new double[24]; - -double maxDeliveryCapacity_kW; -double maxFeedinCapacity_kW; - -switch (rb_deliveryOrFeedin.getValue()) { - case 0: // Delivery - for (int i = 0; i < 24; i++) { - weekTestDelivery[i] = weekCapacities[i] - gc2.v_nfatoWeekDeliveryCapacity_kW[i]; - weekendTestDelivery[i] = weekendCapacities[i] - gc2.v_nfatoWeekendDeliveryCapacity_kW[i]; - } - maxDeliveryCapacity_kW = max(max(weekTestDelivery), max(weekendTestDelivery)); - // Reset the GC Capacity in case they already had a NF-ATO - gc2.f_nfatoSetConnectionCapacity(true); - // Check if gc2 has enough capacity with the original connection capacity - if ( maxDeliveryCapacity_kW > gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); - } - else { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - return true; - } - - case 1: // Feed In - for (int i = 0; i < 24; i++) { - weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; - weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; - } - maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); - // Reset the GC Capacity in case they already had a NF-ATO - gc2.f_nfatoSetConnectionCapacity(true); - // Check if gc2 has enough capacity with the original connection capacity - if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); - } - else { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - return true; - } - - case 2: // Both - for (int i = 0; i < 24; i++) { - weekTestDelivery[i] = weekCapacities[i] - gc2.v_nfatoWeekDeliveryCapacity_kW[i]; - weekendTestDelivery[i] = weekendCapacities[i] - gc2.v_nfatoWeekendDeliveryCapacity_kW[i]; - } - for (int i = 0; i < 24; i++) { - weekTestFeedin[i] = weekCapacities[i] - gc2.v_nfatoWeekFeedinCapacity_kW[i]; - weekendTestFeedin[i] = weekendCapacities[i] - gc2.v_nfatoWeekendFeedinCapacity_kW[i]; - } - - maxDeliveryCapacity_kW = max(max(weekTestDelivery), max(weekendTestDelivery)); - maxFeedinCapacity_kW = max(max(weekTestFeedin), max(weekendTestFeedin)); - // Reset the GC Capacity in case they already had a NF-ATO - gc2.f_nfatoSetConnectionCapacity(true); - // Check if gc2 has enough capacity with the original connection capacity - if ( maxDeliveryCapacity_kW > gc2.v_liveConnectionMetaData.contractedDeliveryCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a delivery capacity of " + maxDeliveryCapacity_kW + " kW available"); - } - else if ( maxFeedinCapacity_kW > gc2.v_liveConnectionMetaData.contractedFeedinCapacity_kW ) { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - throw new IllegalStateException("Invalid Non-Firm ATO Settings, " + gc2.p_ownerID + " does not have a feed in capacity of " + maxFeedinCapacity_kW + " kW available"); - } - else { - // Restore previous NF-ATO - gc2.f_nfatoSetConnectionCapacity(false); - return true; - } - - default: - throw new IllegalStateException("Invalid Setting in rb_deliveryOrFeedin"); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[][]</ReturnType> - <Id>1722256365474</Id> - <Name>f_constructNFATOArrays</Name> - <Description>Uses the NFATO slider values to construct two arrays of the change in capacity at every hour. One array for weekdays, one for weekends</Description> - <X>740</X> - <Y>730</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>// Construct arrays from slider values -// Week -int weekStart_h = (int) sl_nfatoWeekStartTime.getValue(); -int weekEnd_h = (int) sl_nfatoWeekEndTime.getValue(); -int weekCapacity_kW = (int) sl_nfatoWeekCapacity.getValue(); - -double[] weekCapacities = new double[24]; -double[] weekendCapacities = new double[24]; - -if (weekStart_h < weekEnd_h) { - for (int i = 0; i < weekStart_h; i++) { - weekCapacities[i] = 0; - } - for (int j = weekStart_h; j < weekEnd_h; j ++) { - weekCapacities[j] = weekCapacity_kW; - } - for (int k = weekEnd_h; k < 24; k ++) { - weekCapacities[k] = 0; - } -} -else { // If the start time is higher than the end time we share capacity at night - for (int i = 0; i < weekEnd_h; i++) { - weekCapacities[i] = weekCapacity_kW; - } - for (int j = weekEnd_h; j < weekStart_h ; j ++) { - weekCapacities[j] = 0; - } - for (int k = weekStart_h; k < 24; k ++) { - weekCapacities[k] = weekCapacity_kW; - } -} - -if (b_nfatoWeekendDistinction) { - // repeat above code for weekend - int weekendStart_h = (int) sl_nfatoWeekendStartTime.getValue(); - int weekendEnd_h = (int) sl_nfatoWeekendEndTime.getValue(); - int weekendCapacity_kW = (int) sl_nfatoWeekendCapacity.getValue(); - - - if (weekendStart_h < weekendEnd_h) { - for (int i = 0; i < weekendStart_h; i++) { - weekendCapacities[i] = 0; - } - for (int j = weekendStart_h; j < weekendEnd_h; j ++) { - weekendCapacities[j] = weekendCapacity_kW; - } - for (int k = weekendEnd_h; k < 24; k ++) { - weekendCapacities[k] = 0; - } - } - else { // If the start time is higher than the end time we share capacity at night - for (int i = 0; i < weekendEnd_h; i++) { - weekendCapacities[i] = weekendCapacity_kW; - } - for (int j = weekendEnd_h; j < weekendStart_h; j ++) { - weekendCapacities[j] = 0; - } - for (int k = weekendStart_h; k < 24; k ++) { - weekendCapacities[k] = weekendCapacity_kW; - } - } -} -else { - // no distinction means the settings are the same during the weekend - weekendCapacities = weekCapacities; -} - -double[][] arr = {weekCapacities, weekendCapacities}; -return arr;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256365483</Id> - <Name>f_resetNFATOSettings</Name> - <Description>Resets the group of NFATO Settings after a contract is added or canceled.</Description> - <X>740</X> - <Y>820</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>t_nfatoFirstBuilding.setText("Klik op een gebouw dat capaciteit gaat ontvangen"); -t_nfatoSecondBuilding.setText(""); -v_nfatoFirstGC = null; -v_nfatoSecondGC = null; -b_NFATOListener = false;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256998182</Id> - <Name>f_setTab</Name> - <Description>Function that ensures the correct tab is visible</Description> - <X>460</X> - <Y>710</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>selectedTabType</Name> - <Type>EnergyDemandTab</Type> - </Parameter> - <Body>if (selectedTabType == EnergyDemandTab.NFATO) { - gr_nfatoSettings.setVisible(true); - gr_hubSliders.setVisible(false); -} -else { - gr_nfatoSettings.setVisible(false); - gr_hubSliders.setVisible(true); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754923608234</Id> - <Name>f_updateSliders_EHub</Name> - <X>460</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Function that can be used to update sliders/buttons to the engine state -//--> empty for now</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1722253463896</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1722253479511</Id> - <Name>uI_Tabs</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_Tabs</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1722253479513</Id> - <Name>zero_Interface</Name> - <X>150</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1753694295449</Id> - <Name>uI_EnergyHub</Name> - <X>310</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_EnergyHub</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1722253463902</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1722344806530</Id> - <Name>rect_generalFunctions</Name> - <X>430</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>230</Width> - <Height>170</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1722344586686</Id> - <Name>rect_nfatoFunctions</Name> - <X>700</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16711936</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>300</Width> - <Height>300</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Group> - <Id>1722253487925</Id> - <Name>gr_hubSliders</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722253487927</Id> - <Name>rect_hubSliders</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-3736634</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253487949</Id> - <Name>button_add_nfato</Name> - <X>20</X> - <Y>45</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="160" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <VisibleCode>//!zero_Interface.settings.isPublicModel()</VisibleCode> - <Enabled>true</Enabled> - <EnableExpression>!zero_Interface.settings.isPublicModel()</EnableExpression> - <ActionCode>/* -if (v_NFATOListener) { - // This should not be reachable anymore - traceln("Quitting NF ATO settings"); - v_NFATOListener = false; - return; -} -*/ - -if (zero_Interface.v_clickedObjectType != null && zero_Interface.v_clickedObjectType == OL_GISObjectType.BUILDING && zero_Interface.c_selectedGridConnections.size() != 0) { - v_nfatoFirstGC = zero_Interface.c_selectedGridConnections.get(0); - t_nfatoFirstBuilding.setText(v_nfatoFirstGC.p_ownerID + " zal ontvangen"); - t_nfatoSecondBuilding.setText("Klik op een gebouw dat zijn capaciteit gaat afstaan"); -} - -// When this boolean is true clicking on the GIS Map will select another building for the NF ATO -b_NFATOListener = true; -f_setTab(NFATO); - - -if (b_nfatoWeekendDistinction) { - t_nfatoWeek.setVisible(true); - t_nfatoWeekend.setVisible(true); - sl_nfatoWeekendStartTime.setVisible(true); - sl_nfatoWeekendEndTime.setVisible(true); - sl_nfatoWeekendCapacity.setVisible(true); -} -else { - t_nfatoWeek.setVisible(false); - t_nfatoWeekend.setVisible(false); - sl_nfatoWeekendStartTime.setVisible(false); - sl_nfatoWeekendEndTime.setVisible(false); - sl_nfatoWeekendCapacity.setVisible(false); -} - - -// TODO: Color the companies on the GIS Map (e.g. according to grid topology)</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Voeg Non-Firm ATO toe</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253487951</Id> - <Name>button_remove_nfato</Name> - <X>190</X> - <Y>45</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="160" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <VisibleCode>!zero_Interface.settings.isPublicModel()</VisibleCode> - <Enabled>true</Enabled> - <ActionCode>for (GridConnection GC : zero_Interface.energyModel.f_getActiveGridConnections()) { - GC.f_nfatoSetConnectionCapacity(true); - GC.v_enableNFato = false; - GC.v_nfatoWeekDeliveryCapacity_kW = new double[24]; - GC.v_nfatoWeekendDeliveryCapacity_kW = new double[24]; - GC.v_nfatoWeekFeedinCapacity_kW = new double[24]; - GC.v_nfatoWeekendFeedinCapacity_kW = new double[24]; -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -button_remove_nfato.setEnabled(false); - -zero_Interface.f_resetSettings();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Verwijder alle NF ATOs</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1753434467432</Id> - <Name>button_createEnergyHub</Name> - <X>40</X> - <Y>130</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="290" Height="70"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <EnableExpression>!zero_Interface.settings.isPublicModel()</EnableExpression> - <ActionCode>zero_Interface.f_startEnergyHubConfiguration();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Creeër je eigen Energie Hub</LabelText> - </ExtendedProperties> - </Control> - <Text> - <Id>1754990508102</Id> - <Name>txt_NonFirmAtoOptions</Name> - <X>185</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Non-Firm ATO opties</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1754990563477</Id> - <Name>txt_energyHubOptions</Name> - <X>185</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Energie Hub</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1762248467148</Id> - <Name>button_loadScenario</Name> - <X>40</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="290" Height="70"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <EnableExpression>!zero_Interface.settings.isPublicModel()</EnableExpression> - <ActionCode>// First check if there are any save files, if there are none we display an error screen - -zero_Interface.uI_EnergyHub.f_initializeUserSavedScenarios(zero_Interface.uI_EnergyHub.combobox_selectScenario); -if (zero_Interface.uI_EnergyHub.combobox_selectScenario.getItems().length == 0) { - zero_Interface.f_setErrorScreen("Er zijn nog geen scenario's opgeslagen.", 0, 0); - return; -} - -zero_Interface.f_setLoadingScreen(true, 0, 0); - -new Thread( () -> { - // Opens the filter menu on the main interface - zero_Interface.f_startEnergyHubConfiguration(); - - // Add a manual select to the filter with all (active) gridconnections - // We should follow the usual procedure of creating an E-Hub so that the user could cancel and reconfigure - zero_Interface.f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); - zero_Interface.c_selectedGridConnections = zero_Interface.energyModel.f_getActiveGridConnections(); - zero_Interface.f_applyFilter(OL_FilterOptionsGC.MANUAL_SELECTION, ""); - - zero_Interface.f_setLoadingScreen(false, 0, 0); - - // Create a coop with the selection - zero_Interface.f_finalizeEnergyHubConfiguration(); - - // Select load scenario in the E-Hub configurator - zero_Interface.uI_EnergyHub.button_loadScenario.action(); - -}).start(); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Laad een opgeslagen scenario in</LabelText> - </ExtendedProperties> - </Control> - <Text> - <Id>1762248467153</Id> - <Name>txt_loadScenario</Name> - <X>180</X> - <Y>230</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Opgeslagen Scenario's</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1722253509588</Id> - <Name>gr_nfatoSettings</Name> - <X>0</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <YCode>0</YCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722253509590</Id> - <Name>rect_nfatoSettings</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-3736634</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722253509592</Id> - <Name>t_nfatoFirstBuilding</Name> - <X>25</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Klik op een gebouw dat capaciteit gaat ontvangen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509594</Id> - <Name>t_nfatoSecondBuilding</Name> - <X>25</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text/> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509596</Id> - <Name>sl_nfatoWeekStartTime</Name> - <X>125</X> - <Y>180</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>8</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>24</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509598</Id> - <Name>cb_nfatoWeekendDistinction</Name> - <X>25</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="190" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>if (b_nfatoWeekendDistinction) { - t_nfatoWeek.setVisible(true); - t_nfatoWeekend.setVisible(true); - sl_nfatoWeekendStartTime.setVisible(true); - sl_nfatoWeekendEndTime.setVisible(true); - sl_nfatoWeekendCapacity.setVisible(true); -} -else { - t_nfatoWeek.setVisible(false); - t_nfatoWeekend.setVisible(false); - sl_nfatoWeekendStartTime.setVisible(false); - sl_nfatoWeekendEndTime.setVisible(false); - sl_nfatoWeekendCapacity.setVisible(false); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="14" Style="0"/> - <LabelText>verschil week & weekend</LabelText> - <LinkTo>true</LinkTo> - <Link>b_nfatoWeekendDistinction</Link> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509600</Id> - <Name>sl_nfatoWeekEndTime</Name> - <X>125</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>20</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>24</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509602</Id> - <Name>sl_nfatoWeekCapacity</Name> - <X>125</X> - <Y>245</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>100</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>2000</MaxValue> - <Step>10</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509604</Id> - <Name>button_confirm_nfato</Name> - <X>45</X> - <Y>285</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="155" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>if (sl_nfatoWeekStartTime.getValue() == sl_nfatoWeekEndTime.getValue()) { - traceln("Week start time is the same as end time"); -} -else if (sl_nfatoWeekendStartTime.getValue() == sl_nfatoWeekendEndTime.getValue()) { - traceln("Weekend start time is the same as end time"); -} -else { - double[][] arr = f_constructNFATOArrays(); - //traceln("f_constructNFATOArraysFromSliders: " + Arrays.toString(arr[0])); - //traceln("f_constructNFATOArraysFromSliders: " + Arrays.toString(arr[1])); - - double[] weekCapacities = arr[0]; - double[] weekendCapacities = arr[1]; - - if (f_checkNFATO(weekCapacities, weekendCapacities)) { - f_setNFATO(weekCapacities, weekendCapacities); - f_setTab(HUB); - // reset the nfato settings - f_resetNFATOSettings(); - zero_Interface.f_resetSettings(); - - button_remove_nfato.setEnabled(true); - - //Update variable to change to custom scenario - if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); - } - } -} - -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Voeg Non-Firm ATO toe</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509606</Id> - <Name>button_cancel_nfato</Name> - <X>275</X> - <Y>285</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="75" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setTab(HUB); -f_resetNFATOSettings();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>cancel</LabelText> - </ExtendedProperties> - </Control> - <Text> - <Id>1722253509608</Id> - <Name>t_nfatoWeekStartTime</Name> - <X>20</X> - <Y>185</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Start tijd (uur)</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509610</Id> - <Name>t_nfatoWeekEndTime</Name> - <X>20</X> - <Y>215</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Eind tijd (uur)</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509612</Id> - <Name>t_nfatoWeekStartTime2</Name> - <X>10</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Capaciteit (kW)</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509614</Id> - <Name>t_nfatoWeek</Name> - <X>155</X> - <Y>155</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Week -</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253509616</Id> - <Name>t_nfatoWeekend</Name> - <X>265</X> - <Y>155</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Weekend -</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509618</Id> - <Name>sl_nfatoWeekendStartTime</Name> - <X>247</X> - <Y>180</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>8</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>24</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509620</Id> - <Name>sl_nfatoWeekendEndTime</Name> - <X>247</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>20</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>24</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253509622</Id> - <Name>sl_nfatoWeekendCapacity</Name> - <X>247</X> - <Y>245</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>100</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>2000</MaxValue> - <Step>10</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1725970287541</Id> - <Name>rb_deliveryOrFeedin</Name> - <X>25</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="70" Height="70"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <DefaultValueCode>2</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Delivery</Button> - <Button>Feed in</Button> - <Button>Both</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - </Presentation> - </Group> - <Text> - <Id>1722256365442</Id> - <Name>t_nfatoFunctionsDescription</Name> - <X>850</X> - <Y>655</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>NF ATO Functions</Text> - <Font> - <Name>Dialog</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722344870135</Id> - <Name>t_generalFunctionsDescription</Name> - <X>460</X> - <Y>660</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>General Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1722247653561</Id> - <Name>tabElectricity</Name> - <AdditionalClassCode>// Default Sliders -public ShapeGroup getGroupElectricityDemandSliders() { - return this.gr_electricitySliders_default; -} - -public ShapeGroup getGroupElectricityDemandSliders_Businesspark() { - return this.gr_electricitySliders_businesspark; -} - -public ShapeGroup getGroupElectricityDemandSliders_ResidentialArea() { - return this.gr_electricitySliders_residential; -} -public ShapeSlider getSliderElectricityDemandReduction_pct() { - return this.sl_electricityDemandReduction_pct; -} - -public ShapeSlider getSliderRooftopPVCompanies_pct(){ - return this.sl_rooftopPVCompanies_pct; -} - -public ShapeSlider getSliderLargeScalePV_ha(){ - return this.sl_largeScalePV_ha; -} - -public ShapeSlider getSliderLargeScalePV_ha_Businesspark(){ - return this.sl_largeScalePV_ha_Businesspark; -} - -public ShapeSlider getSliderRooftopPVHouses_pct(){ - return this.sl_rooftopPVHouses_pct; -} - -public ShapeSlider getWindSlider(){ - return this.sl_largeScaleWind_MW; -} - -public ShapeSlider getSl_rooftopPVCompanies_pct_Businesspark(){ - return this.sl_rooftopPVCompanies_pct_Businesspark; -}</AdditionalClassCode> - <Folder>1754045642067</Folder> - <Import>import zeroPackage.ZeroMath;</Import> - <ExtendsReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>tabArea</ClassName> - </ExtendsReference> - <Generic>false</Generic> - <GenericParameter> - <Id>1722247653567</Id> - <Name>1722247653567</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089978</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1722326400000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1722247653564</Id> - <Name>scale</Name> - <X>0</X> - <Y>-240</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1722247653568</CurrentLevel> - <ConnectionsId>1722247653562</ConnectionsId> - <Variables> - <Variable Class="Parameter"> - <Id>1745483322704</Id> - <Name>p_currentPVOnLand_ha</Name> - <X>50</X> - <Y>1270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745483322702</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1745483371462</Id> - <Name>p_currentWindTurbines_MW</Name> - <X>50</X> - <Y>1290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0</Code> - </DefaultValue> - <ParameterEditor> - <Id>1745483371460</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1765276731422</Id> - <Name>p_currentTotalGridBatteryCapacity_MWh</Name> - <X>50</X> - <Y>1340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>double</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>0</Code> - </DefaultValue> - <ParameterEditor> - <Id>1765276731420</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1765206938406</Id> - <Name>c_electricityTabEASliderGCs</Name> - <X>-330</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GridConnection</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256117103</Id> - <Name>f_setPVOnLand</Name> - <Description>Function that changes the electric capacity of the energy asset of the "Solar field". Takes an area size in hectares as a parameter and assumes that 1 MWp of solarpannels fits on 1 ha. The variables for amount of installed PV are updated automatically in the zero_engine. The function also modifies the connection capacity of the energy production site to match the new installed PV Power. Passing a list of gcs sets all gcs to the same input value.</Description> - <X>70</X> - <Y>840</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>hectare</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>gcListProduction</Name> - <Type>List<GCEnergyProduction></Type> - </Parameter> - <Body>// TODO: Change to work for multiple solar fields in one model. -// to do so it should probably first calculate the total installed pv in all solar fields -for ( GCEnergyProduction GCEP : gcListProduction) { - for(J_EAProduction j_ea : GCEP.c_productionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC) { - if (!GCEP.v_isActive) { - GCEP.f_setActive(true); - } - - double solarFieldPower = (double)roundToInt(hectare * zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha); - j_ea.setCapacityElectric_kW(solarFieldPower); - GCEP.v_liveConnectionMetaData.physicalCapacity_kW = solarFieldPower; - GCEP.v_liveConnectionMetaData.contractedFeedinCapacity_kW = solarFieldPower; - - if(hectare == 0){ - GCEP.f_setActive(false); - } - - break; - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256142375</Id> - <Name>f_setPVSystemHouses</Name> - <Description>Function that adds or removes photovoltaic production assets to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a PV asset. If a new asset is created it takes as its electric capacity a random value between 3 and 6 kW. The variables for amount of installed PV are updated automatically in the zero_engine. -</Description> - <X>70</X> - <Y>810</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>PV_pct</Name> - <Type>double</Type> - </Parameter> - <Body>ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedPVSystemsHouses.stream().filter(gcList::contains).toList()); -int nbHouses = houses.size(); -int nbHousesWithPV = count(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); -int nbHousesWithPVGoal = roundToInt(PV_pct / 100.0 * nbHouses); - -while ( nbHousesWithPVGoal < nbHousesWithPV ) { // remove excess PV systems - GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); - J_EA pvAsset = findFirst(house.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); - if (pvAsset != null) { - pvAsset.removeEnergyAsset(); - houses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.add(0, house); - nbHousesWithPV --; - - if(house.p_batteryAsset != null ){ - house.p_batteryAsset.removeEnergyAsset(); - house.f_setBatteryManagement(null); - } - } - else { - traceln(" cant find PV asset in house that should have PV asset in f_setPVHouses (Interface)"); - } -} - -while ( nbHousesWithPVGoal > nbHousesWithPV ) { - GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) == false); - if (house == null){ - traceln("No gridconnection without PV panels found! Current PVsystems count: %s", nbHousesWithPV); - break; - } - else { - String assetName = "Rooftop PV"; - double capacityHeat_kW = 0.0; - double yearlyProductionHydrogen_kWh = 0.0; - double yearlyProductionMethane_kWh = 0.0; - double installedPVCapacity_kW = house.v_liveAssetsMetaData.PVPotential_kW;//roundToDecimal(uniform(3,6),2); - - //Compensate for pt if it is present - if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)){ - installedPVCapacity_kW = max(0, installedPVCapacity_kW-zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); //For now just 1 panel - } - J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOVOLTAIC, assetName, OL_EnergyCarriers.ELECTRICITY, installedPVCapacity_kW, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); - houses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.remove(house); - zero_Interface.c_orderedPVSystemsHouses.add(0, house); - nbHousesWithPV ++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256248965</Id> - <Name>f_setWindTurbines</Name> - <Description>Function that changes the electric capacity of the energy asset of the "Wind Farm". Takes an amount of MW as a parameter. The variables for amount of installed Wind are updated automatically in the zero_engine. The function also modifies the connection capacity of the energy production site to match the new installed Wind Power. Passing a list of gcs sets all gcs to the same input value.</Description> - <X>70</X> - <Y>870</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>AllocatedWindPower_MW</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>gcListProduction</Name> - <Type>List<GCEnergyProduction></Type> - </Parameter> - <Body>// TODO: Change to work for multiple wind farms in one model. -// to do so it should probably first calculate the total installed wind power in all wind farms - -for ( GCEnergyProduction GCEP : gcListProduction) { - for(J_EAProduction j_ea : GCEP.c_productionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL) { - if (!GCEP.v_isActive) { - GCEP.f_setActive(true); - } - j_ea.setCapacityElectric_kW(roundToInt(1000*AllocatedWindPower_MW)); - GCEP.v_liveConnectionMetaData.physicalCapacity_kW = (double)roundToInt(1000*AllocatedWindPower_MW); - GCEP.v_liveConnectionMetaData.contractedFeedinCapacity_kW = (double)roundToInt(1000*AllocatedWindPower_MW); - - if(AllocatedWindPower_MW == 0){ - GCEP.f_setActive(false); - } - break; - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722335253834</Id> - <Name>f_setDemandReduction</Name> - <Description>Function that reduces the electricity demand of all consumption assets. Takes as an argument a percentage to reduce by compared to the default value of the consumption assets.</Description> - <X>60</X> - <Y>590</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>demandReduction_pct</Name> - <Type>double</Type> - </Parameter> - <Body>double scalingFactor = 1 - demandReduction_pct/100; - -for (GridConnection gc : gcList) { - // Set Consumption Assets - for (J_EAConsumption j_ea : gc.c_consumptionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.ELECTRICITY_DEMAND) { - j_ea.setConsumptionScaling_fr( scalingFactor ); - } - } - // Set Profile Assets - for (J_EAProfile j_ea : gc.c_profileAssets) { - if (j_ea.energyCarrier == OL_EnergyCarriers.ELECTRICITY) { - j_ea.setProfileScaling_fr( scalingFactor ); - } - } -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1745483988251</Id> - <Name>f_getCurrentPVOnLandAndWindturbineValues</Name> - <X>30</X> - <Y>1250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>p_currentPVOnLand_ha = 0; -p_currentWindTurbines_MW = 0; -for(GCEnergyProduction GCProd : uI_Tabs.f_getAllSliderGridConnections_production()){ - if(!c_electricityTabEASliderGCs.contains(GCProd) && GCProd.v_isActive){ - for(J_EAProduction ea : GCProd.c_productionAssets){ - if(ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC){ - p_currentPVOnLand_ha += ea.getCapacityElectric_kW()/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha; - } - else if(ea.energyAssetType == OL_EnergyAssetType.WINDMILL){ - p_currentWindTurbines_MW += ea.getCapacityElectric_kW()/1000; - } - } - } -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Pair<Double, Double></ReturnType> - <Id>1747294812333</Id> - <Name>f_getPVSystemPercentage</Name> - <Description>Calculates the amount of installed PV compared to the total potential based on roof surface area. Assumes that 50% of the roof surface is available for PV. If a GridConnection already has more than this installed it takes the installed capacity instead.</Description> - <X>90</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>double installedPV_kWp = 0.0; -double PVPotential_kWp = 0.0; -double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; - -for (GridConnection gc : gcList ) { - double gcInstalledPV_kWp = 0.0; - if ( gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ) { - for ( J_EAProduction j_ea : gc.c_productionAssets ) { - if ( j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC ) { - gcInstalledPV_kWp += j_ea.getCapacityElectric_kW(); - } - } - } - installedPV_kWp += gcInstalledPV_kWp; - PVPotential_kWp += max( gcInstalledPV_kWp, max(0.1, gc.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2) ); -} - -return new Pair(installedPV_kWp, PVPotential_kWp);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747297871195</Id> - <Name>f_setPVSystemCompanies</Name> - <Description>Adds or removes photovoltaic production assets to GridConnections. Takes as arguments a list of Gridconnections and a target percentage. It runs untill that list of GCs has that percentage of PV installed, compared to the total potential PV. If a new asset is created it determines its electric capacity by the total roof area of all the buildings connected to the GC. The function also updates the PV slider in the company UI if the GC is a company. The variables in the engine that keep track of the amount of installed PV are updated automatically.</Description> - <X>70</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCUtility></Type> - </Parameter> - <Parameter> - <Name>target_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>slider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>List<GCUtility> activeGCs = new ArrayList<GCUtility>(zero_Interface.c_orderedPVSystemsCompanies.stream().filter(x -> x.v_isActive).filter(gcList::contains).toList()); -Pair<Double, Double> pair = f_getPVSystemPercentage( new ArrayList<GridConnection>(activeGCs) ); -double remaining_kWp = target_pct / 100 * pair.getSecond() - pair.getFirst(); -double averageEffectivePV_kWppm2 = zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV * zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2; -if ( remaining_kWp > 0 ) { - // add more PV - for ( GCUtility company : new ArrayList<GCUtility>(activeGCs) ) { - double remainingPotential_kWp = min( remaining_kWp, company.p_roofSurfaceArea_m2 * averageEffectivePV_kWppm2 - company.v_liveAssetsMetaData.totalInstalledPVPower_kW ); - - if ( remainingPotential_kWp > 0 ) { - remaining_kWp -= remainingPotential_kWp; - f_addPVSystem( company, remainingPotential_kWp ); - } - - if ( remaining_kWp <= 0 ) { - // Update variable to change to custom scenario - if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); - } - zero_Interface.f_resetSettings(); - return; - } - } -} -else { - // remove pv - for ( GCUtility company : new ArrayList<GCUtility>(activeGCs) ) { - if ( company.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ) { - // find companyUI to check if the company already has PV on model startup - remaining_kWp += company.v_liveAssetsMetaData.totalInstalledPVPower_kW; - f_removePVSystem( company ); - double PVAtStartup_kWp = zero_Interface.c_scenarioMap_Current.get(company.p_uid).getCurrentPV_kW(); - if (PVAtStartup_kWp != 0) { - f_addPVSystem( company, PVAtStartup_kWp ); - remaining_kWp -= PVAtStartup_kWp; - } - } - if ( remaining_kWp >= 0 ) { - // removed slightly too much pv - f_addPVSystem( company, remaining_kWp ); - - // Update variable to change to custom scenario - if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); - } - - zero_Interface.f_resetSettings(); - return; - } - } - // All companies are at the starting PV amount. Set slider to corresponding value. - pair = f_getPVSystemPercentage( new ArrayList<GridConnection>( activeGCs ) ); - int installed_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); - slider.setValue(installed_pct, false); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747306690517</Id> - <Name>f_addPVSystem</Name> - <Description>Takes as an argument a GridConnection and a capacity. If the GC already has a solar panel, it adds the capacity to the existing one. Otherwise it creates a new energy asset. If the GridConnection is a GCUtility it also updates the companyUI if it exists.</Description> - <X>90</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gc</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>capacity_kWp</Name> - <Type>double</Type> - </Parameter> - <Body>J_EAProduction pvAsset = findFirst(gc.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); -if (pvAsset != null) { - capacity_kWp += pvAsset.getCapacityElectric_kW(); - pvAsset.setCapacityElectric_kW( capacity_kWp ); -} -else { - // Create a new asset - OL_EnergyAssetType assetType = OL_EnergyAssetType.PHOTOVOLTAIC; - String assetName = "Rooftop PV"; - double capacityHeat_kW = 0.0; - double yearlyProductionMethane_kWh = 0.0; - double yearlyProductionHydrogen_kWh = 0.0; - double outputTemperature_degC = 0.0; - - J_EAProduction productionAsset = new J_EAProduction ( gc, assetType, assetName, OL_EnergyCarriers.ELECTRICITY, capacity_kWp, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); -} - -// Update the ordered collection -if ( gc instanceof GCHouse ) { - zero_Interface.c_orderedPVSystemsHouses.remove(gc); - zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); -} -else if ( gc instanceof GCUtility ) { - zero_Interface.c_orderedPVSystemsCompanies.remove(gc); - zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); -} -else { - throw new RuntimeException("Unknown GridConnection type passed to f_addPVSystem."); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747306699629</Id> - <Name>f_removePVSystem</Name> - <X>90</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gc</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>J_EAProduction pvAsset = findFirst(gc.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); -if ( pvAsset != null ) { - pvAsset.removeEnergyAsset(); - - if ( gc instanceof GCHouse ) { - zero_Interface.c_orderedPVSystemsHouses.remove(gc); - zero_Interface.c_orderedPVSystemsHouses.add(0, (GCHouse)gc); - } - else if ( gc instanceof GCUtility ) { - zero_Interface.c_orderedPVSystemsCompanies.remove(gc); - zero_Interface.c_orderedPVSystemsCompanies.add(0, (GCUtility)gc); - } -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1750063382310</Id> - <Name>f_setResidentialBatteries</Name> - <X>90</X> - <Y>1000</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>homeBatteries_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>// Setting houseBatteries -double nbHouseBatteries = count(gcListHouses, h -> h.p_batteryAsset != null); //f_getEnergyAssets(), p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC && p.getParentAgent() instanceof GCHouse); -double nbHousesWithPV = count(gcListHouses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); //count(energyModel.f_getGridConnections(), p->p instanceof GCHouse); -double nbHousesWithBatteryGoal = roundToInt(nbHousesWithPV * homeBatteries_pct / 100); - -if( nbHousesWithPV > 0 ){ - while ( nbHouseBatteries > nbHousesWithBatteryGoal ) { - GCHouse house = findFirst(gcListHouses, p -> p.p_batteryAsset != null ); - house.p_batteryAsset.removeEnergyAsset(); - house.f_setBatteryManagement(null); - nbHouseBatteries--; - } - while ( nbHouseBatteries < nbHousesWithBatteryGoal) { - GCHouse house = findFirst(gcListHouses, p -> p.p_batteryAsset == null && p.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); - - double batteryStorageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgRatioHouseBatteryStorageCapacity_v_PVPower*house.v_liveAssetsMetaData.totalInstalledPVPower_kW; - double batteryCapacity_kW = batteryStorageCapacity_kWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - double batteryStateOfCharge = 0.5; - - new J_EAStorageElectric(house, batteryCapacity_kW, batteryStorageCapacity_kWh, batteryStateOfCharge, zero_Interface.energyModel.p_timeStep_h ); - house.f_setBatteryManagement(new J_BatteryManagementSelfConsumption( house )); - nbHouseBatteries++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1750063382312</Id> - <Name>f_setGridBatteries</Name> - <Description>Passing a list of gcs sets all gcs to the same input value.</Description> - <X>90</X> - <Y>980</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>storageCapacity_kWh</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>gcListGridBatteries</Name> - <Type>List<GCGridBattery></Type> - </Parameter> - <Body>for ( GCGridBattery battery : gcListGridBatteries) { - if(battery.p_batteryAsset == null){ - throw new RuntimeException("GCGridBattery found without p_batteryAsset"); - } - - J_EAStorageElectric batteryAsset = battery.p_batteryAsset; - if (!battery.v_isActive) { - battery.f_setActive(true); - } - - - double capacity_kW = storageCapacity_kWh / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - if(batteryAsset.getCapacityElectric_kW() > 0 && batteryAsset.getStorageCapacity_kWh() > 0){ //If already existing power present: keep relation between power and storage capacity the same. - capacity_kW = storageCapacity_kWh * ( batteryAsset.getStorageCapacity_kWh() / batteryAsset.getCapacityElectric_kW()); - } - batteryAsset.setCapacityElectric_kW( capacity_kW ); - batteryAsset.setStorageCapacity_kWh( storageCapacity_kWh ); - battery.v_liveConnectionMetaData.physicalCapacity_kW = capacity_kW; - battery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = capacity_kW; - battery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = capacity_kW; - - if(storageCapacity_kWh == storageCapacity_kWh){ - battery.f_setActive(false); - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1750063382324</Id> - <Name>f_setElectricCooking</Name> - <X>60</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>electricCookingGoal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>int nbHousesWithElectricCooking = findAll(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC).size(); -int nbHousesWithElectricCookingGoal = roundToInt(electricCookingGoal_pct / 100 * gcListHouses.size()); - - -while ( nbHousesWithElectricCooking > nbHousesWithElectricCookingGoal ) { // remove excess cooking systems - GCHouse house = randomWhere(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); - J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_HOB ); - if (cookingAsset != null) { - double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; - cookingAsset.removeEnergyAsset(); - - new J_EAConsumption(house, OL_EnergyAssetType.GAS_PIT, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.METHANE, zero_Interface.energyModel.p_timeStep_h, null); - house.p_cookingMethod = OL_HouseholdCookingMethod.GAS; - nbHousesWithElectricCooking --; - } - else { - throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); - } -} - -while ( nbHousesWithElectricCooking < nbHousesWithElectricCookingGoal) { - GCHouse house = randomWhere(gcListHouses, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.GAS); - if (house == null){ - throw new RuntimeException("No gridconnection without GAS cooking asset found! Current electric cooking count: " + nbHousesWithElectricCooking); - } - else { - J_EAConsumption cookingAsset = findFirst(house.c_consumptionAssets, p -> p.energyAssetType == OL_EnergyAssetType.GAS_PIT ); - if (cookingAsset != null) { - double yearlyCookingDemand_kWh = cookingAsset.yearlyDemand_kWh; - cookingAsset.removeEnergyAsset(); - - new J_EAConsumption(house, OL_EnergyAssetType.ELECTRIC_HOB, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.ELECTRICITY, zero_Interface.energyModel.p_timeStep_h, null); - house.p_cookingMethod = OL_HouseholdCookingMethod.ELECTRIC; - nbHousesWithElectricCooking ++; - } - else { - throw new RuntimeException("Cant find cooking asset in house that should have cooking asset in f_ElectricCooking (tabElectricity)"); - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1750326729005</Id> - <Name>f_setDemandIncrease</Name> - <X>60</X> - <Y>610</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>demandReduction_pct</Name> - <Type>double</Type> - </Parameter> - <Body>f_setDemandReduction(gcList, -demandReduction_pct);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103683</Id> - <Name>f_updateSliders_Electricity</Name> - <X>-350</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>if(gr_electricitySliders_default.isVisible()){ - f_updateElectricitySliders_default(); -} -else if(gr_electricitySliders_businesspark.isVisible()){ - f_updateElectricitySliders_businesspark(); -} -else if(gr_electricitySliders_residential.isVisible()){ - f_updateElectricitySliders_residential(); -} -else{ - f_updateElectricitySliders_custom(); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103685</Id> - <Name>f_updateElectricitySliders_default</Name> - <X>-330</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GridConnection> allConsumerGridConnections = uI_Tabs.f_getActiveSliderGridConnections_consumption(); - - -//Savings -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GridConnection GC : allConsumerGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - } -} - -double electricitySavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; -sl_electricityDemandReduction_pct.setValue(roundToInt(electricitySavings_pct), false); - - -//Companies rooftop PV -List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); - -List<GridConnection> utilityGridConnections_GC = new ArrayList<>(utilityGridConnections); -Pair<Double, Double> pair = f_getPVSystemPercentage( utilityGridConnections_GC ); -int PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); -sl_rooftopPVCompanies_pct.setValue(PV_pct, false); - -//Houses rooftop PV -List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); - -List<GridConnection> houseGridConnections_GC = new ArrayList<>(utilityGridConnections); -pair = f_getPVSystemPercentage( houseGridConnections_GC ); -PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); -sl_rooftopPVHouses_pct.setValue(PV_pct, false); - -//Large scale EA production systems (PV on land And Wind) -f_getCurrentPVOnLandAndWindturbineValues(); // Used for slider minimum: non adjustable GCProductions - -double totalPVOnLand_kW = 0; // Of movable slider GC -double totalWind_kW = 0; // Of movable slider GC - -for(GridConnection productionGC : c_electricityTabEASliderGCs){ - if(productionGC instanceof GCEnergyProduction && productionGC.v_isActive){ - for(J_EAProduction productionEA : productionGC.c_productionAssets){ - if(productionEA.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC){ - totalPVOnLand_kW += productionEA.getCapacityElectric_kW(); - break; - } - else if(productionEA.getEAType() == OL_EnergyAssetType.WINDMILL){ - totalWind_kW += productionEA.getCapacityElectric_kW(); - break; - } - } - } -} -sl_largeScalePV_ha_Businesspark.setRange(0, 1000); // Needed to prevent anylogic range bug -sl_largeScalePV_ha.setValue((totalPVOnLand_kW/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha) + p_currentPVOnLand_ha, false); -sl_largeScaleWind_MW.setRange(0, 1000); // Needed to prevent anylogic range bug -sl_largeScaleWind_MW.setValue((totalWind_kW/1000) + p_currentWindTurbines_MW, false); - -//Curtailment -boolean curtailment = true; -for(GridConnection GC : allConsumerGridConnections){ - if(!GC.v_enableCurtailment){ - curtailment = false; - break; - } -} -cb_curtailment_default.setSelected(curtailment, false); - - -//Large scale battery systems -f_getCurrentGridBatterySize(); // Used for slider minimum: non adjustable GCGridBatteries - -double totalBatteryStorage_kWh = 0; -for(GridConnection batteryGC : c_electricityTabEASliderGCs){ - if(batteryGC instanceof GCGridBattery && batteryGC.v_isActive){ - totalBatteryStorage_kWh += batteryGC.p_batteryAsset.getStorageCapacity_kWh(); - } -} -sl_collectiveBattery_MWh_default.setRange(0, 1000); -sl_collectiveBattery_MWh_default.setValue((totalBatteryStorage_kWh/1000.0) + p_currentTotalGridBatteryCapacity_MWh, false); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103687</Id> - <Name>f_updateElectricitySliders_residential</Name> - <X>-330</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); - -int nbHouses = houseGridConnections.size(); -int nbHousesWithPV = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)); -double pv_pct = 100.0 * nbHousesWithPV / nbHouses; -sl_householdPVResidentialArea_pct.setValue(roundToInt(pv_pct), false); - -if ( nbHousesWithPV != 0 ) { - int nbHousesWithHomeBattery = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) && x.p_batteryAsset != null); - double battery_pct = 100.0 * nbHousesWithHomeBattery / nbHousesWithPV; - sl_householdBatteriesResidentialArea_pct.setValue(roundToInt(battery_pct), false); -} - -//Electric cooking -int nbHousesWithElectricCooking = count(houseGridConnections, x -> x.p_cookingMethod == OL_HouseholdCookingMethod.ELECTRIC); -double cooking_pct = 100.0 * nbHousesWithElectricCooking / nbHouses; -sl_householdElectricCookingResidentialArea_pct.setValue(roundToInt(cooking_pct), false); - -//Consumption growth -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GCHouse GC : houseGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - } -} - -double electricityDemandIncrease_pct = totalBaseConsumption_kWh > 0 ? ( (- totalSavedConsumption_kWh)/totalBaseConsumption_kWh * 100) : 0; -sl_electricityDemandIncreaseResidentialArea_pct.setValue(roundToInt(electricityDemandIncrease_pct), false); - - -//Gridbatteries -List<GCGridBattery> sliderGridBatteryGridConnections = new ArrayList<>(); -for(GridConnection sliderGC : c_electricityTabEASliderGCs){ - if(sliderGC.v_isActive && sliderGC instanceof GCGridBattery sliderGridBattery){ - sliderGridBatteryGridConnections.add(sliderGridBattery); - } -} - -double averageNeighbourhoodBatterySize_kWh = 0; -for (GCGridBattery gc : sliderGridBatteryGridConnections) { - averageNeighbourhoodBatterySize_kWh += gc.p_batteryAsset.getStorageCapacity_kWh()/sliderGridBatteryGridConnections.size(); -} -sl_gridBatteriesResidentialArea_kWh.setValue(averageNeighbourhoodBatterySize_kWh, false); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103689</Id> - <Name>f_updateElectricitySliders_businesspark</Name> - <X>-330</X> - <Y>130</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Get the utility connections -List<GridConnection> utilityGridConnections = new ArrayList<>(uI_Tabs.f_getActiveSliderGridConnections_utilities()); - - -//Savings -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GridConnection GC : utilityGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - } -} - -double electricitySavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; -sl_electricityDemandReduction_pct_Businesspark.setValue(roundToInt(electricitySavings_pct), false); - -// Rooftop PV SYSTEMS: -Pair<Double, Double> pair = f_getPVSystemPercentage( utilityGridConnections ); -int PV_pct = roundToInt(100.0 * pair.getFirst() / pair.getSecond()); -sl_rooftopPVCompanies_pct_Businesspark.setValue(PV_pct, false); - -//Large scale EA production systems (PV on land And Wind) -f_getCurrentPVOnLandAndWindturbineValues(); // Used for slider minimum: non adjustable GCProductions - -double totalPVOnLand_kW = 0; // Of movable slider GC -double totalWind_kW = 0; // Of movable slider GC - -for(GridConnection productionGC : c_electricityTabEASliderGCs){ - if(productionGC instanceof GCEnergyProduction && productionGC.v_isActive){ - for(J_EAProduction productionEA : productionGC.c_productionAssets){ - if(productionEA.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC){ - totalPVOnLand_kW += productionEA.getCapacityElectric_kW(); - break; - } - else if(productionEA.getEAType() == OL_EnergyAssetType.WINDMILL){ - totalWind_kW += productionEA.getCapacityElectric_kW(); - break; - } - } - } -} -sl_largeScalePV_ha_Businesspark.setRange(0, 1000); // Needed to prevent anylogic range bug -sl_largeScalePV_ha_Businesspark.setValue((totalPVOnLand_kW/zero_Interface.energyModel.avgc_data.p_avgSolarFieldPower_kWppha) + p_currentPVOnLand_ha, false); -sl_largeScaleWind_MW_Businesspark.setRange(0, 1000); // Needed to prevent anylogic range bug -sl_largeScaleWind_MW_Businesspark.setValue((totalWind_kW/1000) + p_currentWindTurbines_MW, false); - -//Curtailment -boolean curtailment = true; -for(GridConnection GC : utilityGridConnections){ - if(!GC.v_enableCurtailment){ - curtailment = false; - break; - } -} -cb_curtailment_businesspark.setSelected(curtailment, false); - - -//Large scale battery systems -f_getCurrentGridBatterySize(); // Used for slider minimum: non adjustable GCGridBatteries - -double totalBatteryStorage_kWh = 0; -for(GridConnection batteryGC : c_electricityTabEASliderGCs){ - if(batteryGC instanceof GCGridBattery && batteryGC.v_isActive){ - totalBatteryStorage_kWh += batteryGC.p_batteryAsset.getStorageCapacity_kWh(); - } -} -sl_collectiveBattery_MWh_businesspark.setRange(0, 1000); // Needed to prevent anylogic range bug -sl_collectiveBattery_MWh_businesspark.setValue((totalBatteryStorage_kWh/1000.0) + p_currentTotalGridBatteryCapacity_MWh, false); - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754926103691</Id> - <Name>f_updateElectricitySliders_custom</Name> - <X>-330</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//If you have a custom tab, -//override this function to make it update automatically -traceln("Forgot to override the update custom electricity sliders functionality");</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754986167346</Id> - <Name>f_setCurtailment</Name> - <X>70</X> - <Y>900</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>activateCurtailment</Name> - <Type>boolean</Type> - </Parameter> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>for (GridConnection GC : gcList) { - GC.v_enableCurtailment = activateCurtailment; -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1756302457919</Id> - <Name>f_initializeTab_Electricity</Name> - <X>-350</X> - <Y>30</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>electricityTabEASliderGCs</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>c_electricityTabEASliderGCs.addAll(electricityTabEASliderGCs); - -f_getCurrentPVOnLandAndWindturbineValues(); -f_getCurrentGridBatterySize();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1765276703854</Id> - <Name>f_getCurrentGridBatterySize</Name> - <X>30</X> - <Y>1320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>p_currentTotalGridBatteryCapacity_MWh = 0; -for(GCGridBattery GCBat : uI_Tabs.f_getAllSliderGridConnections_gridBatteries()){ - if(!c_electricityTabEASliderGCs.contains(GCBat) && GCBat.v_isActive){ - p_currentTotalGridBatteryCapacity_MWh += (GCBat.p_batteryAsset.getStorageCapacity_kWh()/1000.0); - } -}</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1722247653562</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1744962391299</Id> - <Name>uI_Tabs</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_Tabs</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1744962391306</Id> - <Name>zero_Interface</Name> - <X>150</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1753694295451</Id> - <Name>uI_EnergyHub</Name> - <X>300</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_EnergyHub</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1722247653568</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1722349953637</Id> - <Name>rect_genericFunctions</Name> - <X>10</X> - <Y>480</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-4144960</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>730</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Group> - <Id>1722328776701</Id> - <Name>gr_electricitySliders_default</Name> - <X>-10</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722328776703</Id> - <Name>rect_electricityDemandSliders</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-32</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722328776711</Id> - <Name>t_electricityDemandReduction_pct</Name> - <X>240</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricityDemandReduction_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722328776713</Id> - <Name>sl_electricityDemandReduction_pct</Name> - <X>260</X> - <Y>15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricityDemandReduction_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722328776715</Id> - <Name>t_electricityDemandReductionDescription</Name> - <X>10</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing verbruik</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776717</Id> - <Name>txt_productionDescription</Name> - <X>15</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Opwek</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776719</Id> - <Name>t_rooftopPVCompanies_pct</Name> - <X>240</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_rooftopPVCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722328776721</Id> - <Name>sl_rooftopPVCompanies_pct</Name> - <X>260</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVSystemCompanies( uI_Tabs.f_getActiveSliderGridConnections_utilities(), sl_rooftopPVCompanies_pct.getValue(), sl_rooftopPVCompanies_pct ); - -if(zero_Interface.rb_mapOverlay != null && zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722328776723</Id> - <Name>t_rooftopPVCompaniesDescription</Name> - <X>15</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op dak bedrijven</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776725</Id> - <Name>t_largeScalePV_ha</Name> - <X>240</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_largeScalePV_ha.getValue() + " ha"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722328776727</Id> - <Name>sl_largeScalePV_ha</Name> - <X>260</X> - <Y>140</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>List<GCEnergyProduction> sliderPVFarmGCList = new ArrayList<>(); -for(GridConnection gc : c_electricityTabEASliderGCs){ - if(gc instanceof GCEnergyProduction energyProductionSite){ - for(J_EAProduction j_ea : energyProductionSite.c_productionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC) { - sliderPVFarmGCList.add(energyProductionSite); - break; - } - } - } -} - -if(sliderPVFarmGCList.size() == 0){ - throw new IllegalStateException("Model does not contain any PVFarmSliderGC agent"); -} - - -f_setPVOnLand(sl_largeScalePV_ha.getValue() - p_currentPVOnLand_ha, sliderPVFarmGCList);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentPVOnLand_ha</MinValue> - <MaxValue>p_currentPVOnLand_ha + 50</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722328776729</Id> - <Name>t_largeScalePVDescription</Name> - <X>15</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op land</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776731</Id> - <Name>txt_batteryDescription_default</Name> - <X>15</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batterijen</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722328776737</Id> - <Name>sl_largeScaleWind_MW</Name> - <X>260</X> - <Y>170</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>List<GCEnergyProduction> sliderWindFarmGCList = new ArrayList<>(); -for(GridConnection gc : c_electricityTabEASliderGCs){ - if(gc instanceof GCEnergyProduction energyProductionSite){ - for(J_EAProduction j_ea : energyProductionSite.c_productionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL) { - sliderWindFarmGCList.add(energyProductionSite); - break; - } - } - } -} - -if(sliderWindFarmGCList.size() == 0){ - throw new IllegalStateException("Model does not contain any sliderWindFarmGC agent"); -} - -f_setWindTurbines( sl_largeScaleWind_MW.getValue() - p_currentWindTurbines_MW, sliderWindFarmGCList);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentWindTurbines_MW</MinValue> - <MaxValue>p_currentWindTurbines_MW + 10</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722328776739</Id> - <Name>t_largeScaleWindDescription</Name> - <X>15</X> - <Y>175</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Wind op land</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722328776741</Id> - <Name>t_largeScaleWind_MW</Name> - <X>240</X> - <Y>175</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_largeScaleWind_MW.getValue() + " MW"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Text> - <Id>1722329161559</Id> - <Name>t_rooftopPVHouses_pct</Name> - <X>240</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_rooftopPVHouses_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_rooftopPVHouses_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722329161561</Id> - <Name>sl_rooftopPVHouses_pct</Name> - <X>260</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_rooftopPVHouses_pct.getValue() ); - -if(zero_Interface.rb_mapOverlay != null && zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722329161563</Id> - <Name>t_rooftopPVHousesDescription</Name> - <X>15</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_rooftopPVHouses_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op dak huizen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1746091167061</Id> - <Name>i_householdPV</Name> - <X>160</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_rooftopPVHouses_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPV, zero_Interface.v_infoText.householdRooftopPV, i_householdPV.getX() + uI_Tabs.v_presentationXOffset, i_householdPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091167075</Id> - <Name>i_landPV</Name> - <X>160</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_landPV, zero_Interface.v_infoText.landPV, i_landPV.getX() + uI_Tabs.v_presentationXOffset, i_landPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091167087</Id> - <Name>i_companyPV</Name> - <X>160</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyPV, zero_Interface.v_infoText.companyRooftopPV, i_companyPV.getX() + uI_Tabs.v_presentationXOffset, i_companyPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091167099</Id> - <Name>i_electricityReduction</Name> - <X>160</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricityReduction, zero_Interface.v_infoText.electricityDemandReduction, i_electricityReduction.getX() + uI_Tabs.v_presentationXOffset, i_electricityReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091167111</Id> - <Name>i_landWind</Name> - <X>160</X> - <Y>175</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_landWind, zero_Interface.v_infoText.landWind, i_landWind.getX() + uI_Tabs.v_presentationXOffset, i_landWind.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1754984198964</Id> - <Name>t_collectiveBatteries_default</Name> - <X>240</X> - <Y>275</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_collectiveBattery_MWh_default.getIntValue() + " MWh"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754984198968</Id> - <Name>sl_collectiveBattery_MWh_default</Name> - <X>260</X> - <Y>270</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>List<GCGridBattery> gcListGridBatteries = new ArrayList<>(); -for(GridConnection gc : c_electricityTabEASliderGCs){ - if(gc instanceof GCGridBattery gridbattery){ - gcListGridBatteries.add(gridbattery); - } -} - -if(gcListGridBatteries.size() == 0){ - throw new IllegalStateException("Model does not contain any GCGridBattery agent"); -} - -f_setGridBatteries(sl_collectiveBattery_MWh_default.getValue() * 1000, gcListGridBatteries);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentTotalGridBatteryCapacity_MWh</MinValue> - <MaxValue>p_currentTotalGridBatteryCapacity_MWh + 50</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1754984198970</Id> - <Name>txt_curtailmentDescription_default</Name> - <X>15</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Curtailment opwek</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1754984198972</Id> - <Name>txt_collectiveBatteryDescription_default</Name> - <X>15</X> - <Y>275</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Collectieve batterijen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754984198974</Id> - <Name>cb_curtailment_default</Name> - <X>300</X> - <Y>202</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="40" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setCurtailment(cb_curtailment_default.isSelected(), uI_Tabs.f_getActiveSliderGridConnections_consumption());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1754984362078</Id> - <Name>i_curtailment_default</Name> - <X>160</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_curtailment_default, zero_Interface.v_infoText.curtailment, i_curtailment_default.getX() + uI_Tabs.v_presentationXOffset, i_curtailment_default.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1754984365522</Id> - <Name>i_collectiveBatteries_default</Name> - <X>160</X> - <Y>275</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_collectiveBatteries_default, zero_Interface.v_infoText.gridBattery_default, i_collectiveBatteries_default.getX() + uI_Tabs.v_presentationXOffset, i_collectiveBatteries_default.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Rectangle> - <Id>1722334503404</Id> - <Name>rect_PVFunctions</Name> - <X>40</X> - <Y>670</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-10496</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>310</Width> - <Height>250</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722334611918</Id> - <Name>txt_ProductionFunctionsDescription</Name> - <X>190</X> - <Y>680</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Production Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1722335253828</Id> - <Name>rect_demandFunctions</Name> - <X>40</X> - <Y>540</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-8355840</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>310</Width> - <Height>120</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722335253832</Id> - <Name>t_demandFunctionsDescription</Name> - <X>190</X> - <Y>550</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Demand Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722349990233</Id> - <Name>t_genericFunctions</Name> - <X>100</X> - <Y>500</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Generic Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>22</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1728384392418</Id> - <Name>gr_electricitySliders_businesspark</Name> - <X>400</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1728384392420</Id> - <Name>rect_electricityDemandSliders_Businesspark</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-32</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1728384392422</Id> - <Name>t_electricityDemandReduction_pct_Businesspark</Name> - <X>240</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricityDemandReduction_pct_Businesspark.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1728384392424</Id> - <Name>sl_electricityDemandReduction_pct_Businesspark</Name> - <X>260</X> - <Y>15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricityDemandReduction_pct_Businesspark.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1728384392426</Id> - <Name>txt_electricityDemandReductionDescription_Businesspark</Name> - <X>10</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing verbruik</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392428</Id> - <Name>txt_productionDescription_Businesspark</Name> - <X>15</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Opwek</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392430</Id> - <Name>t_rooftopPVCompanies_pct_Businesspark</Name> - <X>240</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_rooftopPVCompanies_pct_Businesspark.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1728384392432</Id> - <Name>sl_rooftopPVCompanies_pct_Businesspark</Name> - <X>260</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVSystemCompanies( uI_Tabs.f_getActiveSliderGridConnections_utilities(), sl_rooftopPVCompanies_pct_Businesspark.getValue(), sl_rooftopPVCompanies_pct_Businesspark ); - -//If on pv map overlay, adjust colouring -if(zero_Interface.rb_mapOverlay != null && zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1728384392434</Id> - <Name>txt_rooftopPVCompaniesDescription_Businesspark</Name> - <X>15</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op dak bedrijven</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392436</Id> - <Name>t_largeScalePV_ha_Businesspark</Name> - <X>240</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_largeScalePV_ha_Businesspark.getIntValue() + " ha"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1728384392438</Id> - <Name>sl_largeScalePV_ha_Businesspark</Name> - <X>260</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>List<GCEnergyProduction> sliderPVFarmGCList = new ArrayList<>(); -for(GridConnection gc : c_electricityTabEASliderGCs){ - if(gc instanceof GCEnergyProduction energyProductionSite){ - for(J_EAProduction j_ea : energyProductionSite.c_productionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC) { - sliderPVFarmGCList.add(energyProductionSite); - break; - } - } - } -} - -if(sliderPVFarmGCList.size() == 0){ - throw new IllegalStateException("Model does not contain any PVFarmSliderGC agent"); -} - - -f_setPVOnLand(sl_largeScalePV_ha_Businesspark.getValue() - p_currentPVOnLand_ha, sliderPVFarmGCList);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentPVOnLand_ha</MinValue> - <MaxValue>p_currentPVOnLand_ha + 50</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1728384392440</Id> - <Name>txt_largeScalePVDescription_Businesspark</Name> - <X>15</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Zon op land</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392442</Id> - <Name>txt_batteryDescription_businesspark</Name> - <X>15</X> - <Y>230</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batterijen</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1728384392444</Id> - <Name>sl_largeScaleWind_MW_Businesspark</Name> - <X>260</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>List<GCEnergyProduction> sliderWindFarmGCList = new ArrayList<>(); -for(GridConnection gc : c_electricityTabEASliderGCs){ - if(gc instanceof GCEnergyProduction energyProductionSite){ - for(J_EAProduction j_ea : energyProductionSite.c_productionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL) { - sliderWindFarmGCList.add(energyProductionSite); - break; - } - } - } -} - -if(sliderWindFarmGCList.size() == 0){ - throw new IllegalStateException("Model does not contain any sliderWindFarmGC agent"); -} - -f_setWindTurbines( sl_largeScaleWind_MW_Businesspark.getValue() - p_currentWindTurbines_MW, sliderWindFarmGCList);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentWindTurbines_MW</MinValue> - <MaxValue>p_currentWindTurbines_MW + 10</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1728384392446</Id> - <Name>txt_largeScaleWindDescription_Businesspark</Name> - <X>15</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Wind op land</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1728384392448</Id> - <Name>t_largeScaleWind_MW_Businesspark</Name> - <X>240</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_largeScaleWind_MW_Businesspark.getIntValue() + " MW"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Image> - <Id>1746091438812</Id> - <Name>i_landPV_Businesspark</Name> - <X>160</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_landPV_Businesspark, zero_Interface.v_infoText.landPV, i_landPV_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_landPV_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091438857</Id> - <Name>i_companyPV_Businesspark</Name> - <X>160</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyPV_Businesspark, zero_Interface.v_infoText.companyRooftopPV, i_companyPV_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_companyPV_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091438909</Id> - <Name>i_electricityReduction_Businesspark</Name> - <X>160</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricityReduction_Businesspark, zero_Interface.v_infoText.electricityDemandReduction, i_electricityReduction_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_electricityReduction_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746091438954</Id> - <Name>i_landWind_Businesspark</Name> - <X>160</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_landWind_Businesspark, zero_Interface.v_infoText.landWind, i_landWind_Businesspark.getX() + uI_Tabs.v_presentationXOffset, i_landWind_Businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1754985531354</Id> - <Name>txt_curtailmentDescription_businesspark</Name> - <X>15</X> - <Y>185</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Curtailment opwek</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754985531358</Id> - <Name>cb_curtailment_businesspark</Name> - <X>300</X> - <Y>177</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="40" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setCurtailment(cb_curtailment_businesspark.isSelected(), new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()));</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1754985531361</Id> - <Name>i_curtailment_businesspark</Name> - <X>160</X> - <Y>185</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_curtailment_businesspark, zero_Interface.v_infoText.curtailment, i_curtailment_businesspark.getX() + uI_Tabs.v_presentationXOffset, i_curtailment_businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1754985653985</Id> - <Name>i_collectiveBatteries_businesspark</Name> - <X>160</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_collectiveBatteries_businesspark, zero_Interface.v_infoText.gridBattery_default, i_collectiveBatteries_businesspark.getX() + uI_Tabs.v_presentationXOffset, i_collectiveBatteries_businesspark.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1754985653994</Id> - <Name>txt_collectiveBatteryDescription_businesspark</Name> - <X>15</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Collectieve batterijen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1754985653996</Id> - <Name>t_collectiveBatteries_businesspark</Name> - <X>240</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_collectiveBattery_MWh_businesspark.getIntValue() + " MWh"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754985653998</Id> - <Name>sl_collectiveBattery_MWh_businesspark</Name> - <X>260</X> - <Y>255</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>List<GCGridBattery> gcListGridBatteries = new ArrayList<>(); -for(GridConnection gc : c_electricityTabEASliderGCs){ - if(gc instanceof GCGridBattery gridbattery){ - gcListGridBatteries.add(gridbattery); - } -} - -if(gcListGridBatteries.size() == 0){ - throw new IllegalStateException("Model does not contain any GCGridBattery agent"); -} - -f_setGridBatteries(sl_collectiveBattery_MWh_businesspark.getValue() * 1000, gcListGridBatteries);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>p_currentTotalGridBatteryCapacity_MWh</MinValue> - <MaxValue>p_currentTotalGridBatteryCapacity_MWh + 50</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - </Presentation> - </Group> - <Group> - <Id>1750063382217</Id> - <Name>gr_electricitySliders_residential</Name> - <X>800</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1750063382219</Id> - <Name>rect_electricityDemandSlidersResidentialArea</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>5</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-32</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1750063382221</Id> - <Name>t_electricityDemandIncreaseResidentialArea_pct</Name> - <X>235</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_electricityDemandIncreaseResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_electricityDemandIncreaseResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1750063382223</Id> - <Name>t_householdPVResidentialArea_pct</Name> - <X>235</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdPVResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>10%</Text> - <TextCode>sl_householdPVResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382225</Id> - <Name>sl_householdPVResidentialArea_pct</Name> - <X>265</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPVSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdPVResidentialArea_pct.getValue() ); - -//If on pv map overlay, adjust colouring -if(zero_Interface.rb_mapOverlay != null && zero_Interface.c_loadedMapOverlayTypes.get(zero_Interface.rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); -} - -// Also updates the home batteries -f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), uI_Tabs.f_getActiveSliderGridConnections_houses() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>5</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382227</Id> - <Name>t_householdPVResidentialAreaDescription</Name> - <X>20</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdPVResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Share of houses with PV</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1750063382229</Id> - <Name>t_electricitDemandSlidersResidentialAreaDescription</Name> - <X>20</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Households</Text> - <Font> - <Name>Calibri</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1750063382237</Id> - <Name>t_householdBatteriesResidentialAreaDescription</Name> - <X>30</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdBatteriesResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Of which with batteries</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382239</Id> - <Name>sl_householdBatteriesResidentialArea_pct</Name> - <X>265</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), uI_Tabs.f_getActiveSliderGridConnections_houses() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>5</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382241</Id> - <Name>t_householdBatteriesResidentialArea_pct</Name> - <X>235</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdBatteriesResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_householdBatteriesResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382243</Id> - <Name>sl_gridBatteriesResidentialArea_kWh</Name> - <X>266</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>List<GCGridBattery> gcListGridBatteries = new ArrayList<>(); -for(GridConnection gc : c_electricityTabEASliderGCs){ - if(gc instanceof GCGridBattery gridbattery){ - gcListGridBatteries.add(gridbattery); - } -} - -if(gcListGridBatteries.size() == 0){ - throw new IllegalStateException("Model does not contain any GCGridBattery agent"); -} - -f_setGridBatteries(sl_gridBatteriesResidentialArea_kWh.getValue(), gcListGridBatteries);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>1000</MaxValue> - <Step>10</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382245</Id> - <Name>t_gridBatteriesResidentialAreaDescription</Name> - <X>20</X> - <Y>226</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_gridBatteriesResidentialArea_kWh.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Shared battery capacity</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1750063382247</Id> - <Name>t_gridBatteriesResidentialArea_kW</Name> - <X>236</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_gridBatteriesResidentialArea_kWh.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_gridBatteriesResidentialArea_kWh.getIntValue() + " kWh"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1750063382251</Id> - <Name>t_electricityDemandIncreaseResidentialAreaDescription</Name> - <X>20</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_electricityDemandIncreaseResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electricity consumption growth</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382253</Id> - <Name>sl_electricityDemandIncreaseResidentialArea_pct</Name> - <X>265</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandIncrease( new ArrayList<GridConnection>(findAll(zero_Interface.energyModel.Houses, x -> true)), sl_electricityDemandIncreaseResidentialArea_pct.getValue() ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382255</Id> - <Name>t_householdElectricCookingResidentialAreaDescription</Name> - <X>20</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdElectricCookingResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Perc. electric cooking</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382257</Id> - <Name>sl_householdElectricCookingResidentialArea_pct</Name> - <X>265</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setElectricCooking(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdElectricCookingResidentialArea_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>2</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382259</Id> - <Name>t_householdElectricCookingResidentialArea_pct</Name> - <X>235</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdElectricCookingResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_householdElectricCookingResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382261</Id> - <Name>button_trafoReinforcement</Name> - <X>238</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="130" Height="25"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <VisibleCode>false; // DOESNT WORK PROPERLY</VisibleCode> - <Enabled>true</Enabled> - <EnableExpression>zero_Interface.v_clickedGridNode != null</EnableExpression> - <ActionCode>//gr_electricityDemandSlidersResidentialAreaScale.setVisible(false); -gr_trafoReinforcement.setVisible(true); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Trafo reinforcement</LabelText> - </ExtendedProperties> - </Control> - <Image> - <Id>1752232850349</Id> - <Name>i_householdRooftopPV</Name> - <X>190</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdPVResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdRooftopPV, zero_Interface.v_infoText.householdRooftopPV, i_householdRooftopPV.getX() + uI_Tabs.v_presentationXOffset, i_householdRooftopPV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752232850368</Id> - <Name>i_householdBatteries</Name> - <X>190</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdBatteriesResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdBatteries, zero_Interface.v_infoText.householdBatteries, i_householdBatteries.getX() + uI_Tabs.v_presentationXOffset, i_householdBatteries.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752232850385</Id> - <Name>i_householdElectricCooking</Name> - <X>190</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdElectricCookingResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdElectricCooking, zero_Interface.v_infoText.householdElectricCooking, i_householdElectricCooking.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricCooking.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752232850402</Id> - <Name>i_householdElectricityGrowth</Name> - <X>190</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_electricityDemandIncreaseResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdElectricityGrowth, zero_Interface.v_infoText.householdElectricityConsumptionGrowth, i_householdElectricityGrowth.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricityGrowth.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752232850473</Id> - <Name>i_householdNeighbourhoodBatteries</Name> - <X>190</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_gridBatteriesResidentialArea_kWh.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdNeighbourhoodBatteries, zero_Interface.v_infoText.gridBattery_residential, i_householdNeighbourhoodBatteries.getX() + uI_Tabs.v_presentationXOffset, i_householdNeighbourhoodBatteries.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Group> - <Id>1750063382277</Id> - <Name>gr_trafoReinforcement</Name> - <X>1200</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1750063382279</Id> - <Name>rect_trafoReinforcement</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-32</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1750063382281</Id> - <Name>t_addTrafoDescription</Name> - <X>10</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Trafostation uitbreiden/bijplaatsen</Text> - <Font> - <Name>SansSerif</Name> - <Size>11</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382283</Id> - <Name>sl_trafoReinforcement</Name> - <X>20</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="150" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>1000</MaxValue> - <Step>50</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382285</Id> - <Name>t_minTrafoReinforcement</Name> - <X>20</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>min</Text> - <TextCode>sl_trafoReinforcement.getMin()</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>10</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1750063382287</Id> - <Name>t_maxTrafoReinforcement</Name> - <X>170</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>max</Text> - <TextCode>sl_trafoReinforcement.getMax()</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>10</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Text> - <Id>1750063382289</Id> - <Name>t_trafoReinforcementValue</Name> - <X>95</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>value</Text> - <TextCode>sl_trafoReinforcement.getIntValue() + " kVA"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>10</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382291</Id> - <Name>t_confirmTrafoReinforcement</Name> - <X>210</X> - <Y>94</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="142" Height="32"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>zero_Interface.v_clickedGridNode.p_capacity_kW += sl_trafoReinforcement.getValue(); - -zero_Interface.f_setTrafoText();</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Voer netuitbreiding uit</LabelText> - </ExtendedProperties> - </Control> - <Text> - <Id>1750063382293</Id> - <Name>t_currentTrafoReinforcement</Name> - <X>200</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huidige LS-capaciteit: 300 kVA</Text> - <TextCode>"Huidige LS-capaciteit: " + roundToInt(zero_Interface.v_clickedGridNode.p_capacity_kW) + " kVA"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>11</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382295</Id> - <Name>t_resetTrafoReinforcement</Name> - <X>215</X> - <Y>300</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="140" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>for (GridNode GN : zero_Interface.energyModel.f_getGridNodesNotTopLevel() ){ - GN.p_capacity_kW = GN.p_originalCapacity_kW; -} -for (GridNode GN : zero_Interface.energyModel.f_getGridNodesTopLevel() ){ - GN.p_capacity_kW = GN.p_originalCapacity_kW; -} -zero_Interface.f_setTrafoText(); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>Reset trafostations</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1750063382297</Id> - <Name>t_closeTrafoReinforcement</Name> - <X>350</X> - <Y>2</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="18" Height="18"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>gr_trafoReinforcement.setVisible(false);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="8" Style="0"/> - <LabelText/> - </ExtendedProperties> - </Control> - <Line> - <Id>1750063382299</Id> - <Name>line_closeTrafoReinforcement1</Name> - <X>353</X> - <Y>17</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor>-2894893</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <BeginArrowSize>1</BeginArrowSize> - <BeginArrowStyle>0</BeginArrowStyle> - <EndArrowSize>1</EndArrowSize> - <EndArrowStyle>0</EndArrowStyle> - <Dx>12</Dx> - <Dy>-12</Dy> - <Dz>0</Dz> - </Line> - <Line> - <Id>1750063382301</Id> - <Name>line_closeTrafoReinforcement2</Name> - <X>365</X> - <Y>17</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor>-2894893</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <BeginArrowSize>1</BeginArrowSize> - <BeginArrowStyle>0</BeginArrowStyle> - <EndArrowSize>1</EndArrowSize> - <EndArrowStyle>0</EndArrowStyle> - <Dx>-12</Dx> - <Dy>-12</Dy> - <Dz>0</Dz> - </Line> - <Text> - <Id>1750063382303</Id> - <Name>t_titleTrafoReinforcement</Name> - <X>20</X> - <Y>21</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Trafostation reinforcement</Text> - <Font> - <Name>Calibri</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Rectangle> - <Id>1754985710083</Id> - <Name>rect_batteryFunctions</Name> - <X>39</X> - <Y>931</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16744320</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>311</Width> - <Height>109</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1754985710085</Id> - <Name>t_batteryFunctionsDescription</Name> - <X>189</X> - <Y>936</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Battery Functions</Text> - <Font> - <Name>Dialog</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1722253108625</Id> - <Name>tabHeating</Name> - <AdditionalClassCode>// Default Sliders -public ShapeGroup getGroupHeatDemandSliders() { - return this.gr_heatingSliders_default; -} - -public ShapeSlider getSliderHeatDemandReductionCompanies_pct() { - return this.sl_heatDemandReductionCompanies_pct; -} - -public ShapeSlider getSliderGasBurnerCompanies_pct() { - return this.sl_gasBurnerCompanies_pct; -} - -public ShapeSlider getSliderElectricHeatPumpCompanies_pct() { - return this.sl_electricHeatPumpCompanies_pct; -} - -public ShapeSlider getSliderHeatDemandReductionHouseholds_pct() { - return this.sl_heatDemandReductionHouseholds_pct; -} - -public ShapeSlider getSliderGasBurnerHouseholds_pct() { - return this.sl_gasBurnerHouseholds_pct; -} - -public ShapeSlider getSliderElectricHeatPumpHouseholds_pct() { - return this.sl_electricHeatPumpHouseholds_pct; -} - -// Residential Tab Sliders -public ShapeGroup getGroupHeatDemandSlidersResidentialArea() { - return this.gr_heatingSliders_residential; -} - -public ShapeSlider getSliderHeatDemandSlidersResidentialAreaHouseholdsGasBurner_pct() { - return this.sl_householdGasBurnerResidentialArea_pct; -} -public ShapeSlider getSl_householdHybridHeatpumpResidentialArea() { - return this.sl_householdHybridHeatpumpResidentialArea; -} - -public ShapeSlider getSliderHeatDemandSlidersResidentialAreaHouseholdsElectricHeatPump_pct() { - return this.sl_householdElectricHeatPumpResidentialArea_pct; -} - -// Company Tab Sliders -public ShapeGroup getGroupHeatDemandSlidersCompanies() { - return this.gr_heatingSliders_businesspark; -} - -public ShapeSlider getSliderHeatDemandSlidersCompaniesHeatDemandReductionCompanies_pct() { - return this.sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct; -} - -public ShapeSlider getSliderHeatDemandSlidersCompaniesGasBurnerCompanies_pct() { - return this.sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct; -} - -public ShapeSlider getSliderHeatDemandSlidersCompaniesElectricHeatPumpCompanies_pct() { - return this.sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct; -} - -public ShapeSlider getSl_heatingTypeSlidersCompaniesCustom_pct(){ - return this.sl_heatingTypeSlidersCompaniesCustom_pct; -} - -public ShapeSlider getSl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct(){ - return this.sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct; -} - -public ShapeSlider getSl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct(){ - return this.sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct; -}</AdditionalClassCode> - <Folder>1754045642067</Folder> - <Import>import zeroPackage.ZeroMath;</Import> - <ExtendsReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>tabArea</ClassName> - </ExtendsReference> - <Generic>false</Generic> - <GenericParameter> - <Id>1722253108631</Id> - <Name>1722253108631</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089977</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1722326400000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1722253108628</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1722253108632</CurrentLevel> - <ConnectionsId>1722253108626</ConnectionsId> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>int</ReturnType> - <Id>1722256102007</Id> - <Name>f_setHeatingSystemsCompanies</Name> - <Description>Function that adds or removes heatpumps to utility connections. Takes a percentage as a parameter and runs untill that percentage of all the utility connections has a heatpump. If a new heatpump is created it determines its heat demand on a heat_demand consumption asset if it exists, else it looks for a heat profile asset. The function also updates the radio button in the company UI.</Description> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>100</X> - <Y>1190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCUtility></Type> - </Parameter> - <Parameter> - <Name>sliderGasburner</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHeatpump</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHybridHeatPump</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderDistrictHeating</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderCustomHeating</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double targetHeatPump_pct = sliderHeatpump.getValue(); - -//Set the sliders if companyUI is present using the companyUI functions, if not: do it the normal way -if(zero_Interface.c_companyUIs.size()>0){ - f_setHeatingSystemsWithCompanyUI(gcList, targetHeatPump_pct, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); -} -else{ - ArrayList<GCUtility> companies = new ArrayList<GCUtility>(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).toList()); - double nbHeatPumps = count(gcList, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); - - while ( targetHeatPumpAmount < nbHeatPumps) { // remove excess heatpumps, replace with gasburners. - GCUtility company = findFirst(companies, x->x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - if (company != null) { - company.c_heatingAssets.get(0).removeEnergyAsset(); - nbHeatPumps--; - companies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); - double heatOutputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minGasBurnerOutputCapacity_kW, peakHeatDemand_kW); - new J_EAConversionGasBurner(company, heatOutputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); - company.f_addHeatManagementToGC(company, OL_GridConnectionHeatingType.GAS_BURNER, false); - } - else { - throw new RuntimeException("Can't find Heatpump in company that should have heatpump in f_setHeatingSystemsCompanies."); - } - } - - while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. - GCUtility company = findFirst(companies, x -> x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); - if (company != null) { - company.c_heatingAssets.get(0).removeEnergyAsset(); - nbHeatPumps++; - companies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(company); - double electricInputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minHeatpumpElectricCapacity_kW, peakHeatDemand_kW); - new J_EAConversionHeatPump(company, electricInputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC, zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), 0, 1, OL_AmbientTempType.AMBIENT_AIR); - company.f_addHeatManagementToGC(company, OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false); - } - else { - throw new RuntimeException("Can't find Gasburner in company that should have gasburner in f_setHeatingSystemsCompanies."); - } - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256221655</Id> - <Name>f_setHeatingSystemsHouseholds</Name> - <Description>Function that adds or removes heatpumps to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a heatpump. If a new heatpump is created it determines its heat demand on a heat_demand consumption asset if it exists, else it looks for a heat profile asset.</Description> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>100</X> - <Y>1230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>targetHeatPump_pct</Name> - <Type>double</Type> - </Parameter> - <Body>ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedHeatingSystemsHouses.stream().filter(gcList::contains).toList()); -double nbHeatPumps = count(gcList, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); -int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * gcList.size()); - -while ( nbHeatPumps > targetHeatPumpAmount) { // remove excess heatpumps, replace with gasburners. - GCHouse house = findFirst(houses, x->x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - if (house != null) { - house.c_heatingAssets.get(0).removeEnergyAsset(); - nbHeatPumps--; - houses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house) * 2;//Just make it always twice as high, to be able to support savings/additional consumption slider settings. - double heatOutputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minGasBurnerOutputCapacity_kW, peakHeatDemand_kW); - new J_EAConversionGasBurner(house, heatOutputPower_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); - house.f_addHeatManagementToGC(house, OL_GridConnectionHeatingType.GAS_BURNER, false); - } - else { - throw new RuntimeException("Can't find Heatpump in house that should have heatpump in f_setHeatingSystemsHouseholds."); - } -} - -while ( nbHeatPumps < targetHeatPumpAmount) { // remove gasburners, add heatpumps. - GCHouse house = findFirst(houses, x -> x.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); - if (house != null) { - house.c_heatingAssets.get(0).removeEnergyAsset(); - nbHeatPumps++; - houses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.remove(house); - zero_Interface.c_orderedHeatingSystemsHouses.add(0, house); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house) * 2;//Just make it always twice as high, to be able to support savings/additional consumption slider settings. - double electricInputPower_kW = max(zero_Interface.energyModel.avgc_data.p_minHeatpumpElectricCapacity_kW, peakHeatDemand_kW); - new J_EAConversionHeatPump(house, electricInputPower_kW, 0.5, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHeatpump_degC, zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), 0, 1, OL_AmbientTempType.AMBIENT_AIR); - house.f_addHeatManagementToGC(house, OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false); - } - else { - throw new RuntimeException("Can't find Gasburner in house that should have gasburner in f_setHeatingSystemsHouseholds."); - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.b_changeToCustomScenario = true; -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722335783993</Id> - <Name>f_setDemandReductionHeating</Name> - <Description>Function that reduces the heat demand of all profile and consumption assets. Takes as arguments a list of GridConnections to effect and a percentage to reduce by compared to the default value of the assets. Does not effect heating demand from gridconnection that have a thermal building model. </Description> - <X>70</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>demandReduction_pct</Name> - <Type>double</Type> - </Parameter> - <Body>double scalingFactor = 1 - demandReduction_pct/100; - -for (GridConnection gc : gcList) { - // Set Consumption Assets - for (J_EAConsumption j_ea : gc.c_consumptionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.HEAT_DEMAND) { - j_ea.setConsumptionScaling_fr( scalingFactor ); - } - } - // Set Profile Assets - for (J_EAProfile j_ea : gc.c_profileAssets) { - if (j_ea.energyCarrier == OL_EnergyCarriers.HEAT) { - j_ea.setProfileScaling_fr( scalingFactor ); - } - } - - if(gc.p_BuildingThermalAsset != null){ - gc.p_BuildingThermalAsset.setLossScalingFactor_fr(scalingFactor); - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>int</ReturnType> - <Id>1729259449060</Id> - <Name>f_setHeatingSystemsWithCompanyUI</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>120</X> - <Y>1210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCUtility></Type> - </Parameter> - <Parameter> - <Name>targetHeatPump_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>sliderGasburner</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHeatpump</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHybridHeatPump</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderDistrictHeating</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderCustomHeating</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>ArrayList<GCUtility> companies = new ArrayList<GCUtility>(zero_Interface.c_orderedHeatingSystemsCompanies.stream().filter(gcList::contains).filter(x -> x.v_isActive).toList()); -int nbActiveCompanies = companies.size() + v_totalNumberOfCustomHeatingSystems; -int nbHeatPumps = count(companies, gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); -int targetHeatPumpAmount = roundToInt( targetHeatPump_pct / 100.0 * nbActiveCompanies); - - -while ( targetHeatPumpAmount < nbHeatPumps){ // remove excess heatpumps of companies that didnt start with a heatpump, replace with gasburners. - GCUtility company = findFirst(companies, gc -> gc.p_heatingManagement != null && !(gc.p_heatingManagement instanceof J_HeatingManagementGhost) && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - if (company != null) { - UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); - - companyUI.b_runningMainInterfaceSlider = true; - if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ - int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); - companyUI.GCnr_selection.setValue(i, true); - } - // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! - boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); - companyUI.rb_heatingTypePrivateUI.setEnabled(true); - companyUI.rb_heatingTypePrivateUI.setValue(0, true); // First option is gasburner - companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - companyUI.b_runningMainInterfaceSlider = false; - - //Reorder c_orderedHeatingSystems - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - companies.remove(company); - nbHeatPumps--; - } - else { //No more heating assets to adjust: this is the minimum: set slider to minimum and do nothing else - int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); - sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); - f_setHeatingSliders(1, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); - return; - } -} - -while ( targetHeatPumpAmount > nbHeatPumps) { // remove gasburners, add heatpumps. - - GCUtility company = findFirst(companies, gc -> gc.p_heatingManagement != null && !(gc.p_heatingManagement instanceof J_HeatingManagementGhost) && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.GAS_BURNER); - if (company != null) { - UI_company companyUI = zero_Interface.c_companyUIs.get(company.p_owner.p_connectionOwnerIndexNr); - companyUI.b_runningMainInterfaceSlider = true; - if(companyUI.c_ownedGridConnections.get(companyUI.v_currentSelectedGCnr) != company){ - int i = indexOf(companyUI.c_ownedGridConnections.stream().toArray(), company); - companyUI.GCnr_selection.setValue(i, true); - } - - // rbSetting Bugfix, does not change the heating system if the radiobutton was disabled! - boolean rbSetting = companyUI.rb_heatingTypePrivateUI.isEnabled(); - companyUI.rb_heatingTypePrivateUI.setEnabled(true); - companyUI.rb_heatingTypePrivateUI.setValue(2, true); // Third option (index 2) is electric heatpump - companyUI.rb_heatingTypePrivateUI.setEnabled(rbSetting); - companyUI.rb_scenariosPrivateUI.setValue(2, false); - companyUI.b_runningMainInterfaceSlider = false; - - //Reorder c_orderedHeatingSystems - zero_Interface.c_orderedHeatingSystemsCompanies.remove(company); - zero_Interface.c_orderedHeatingSystemsCompanies.add(0, company); - companies.remove(company); - nbHeatPumps++; - } - else { //No more gas burner assets to adjust: this is the minimum: set slider to minimum and do nothing else - int min_nbOfHeatpumps = count(gcList, gc -> gc.v_isActive && gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP); - int min_pct_ElectricHeatpumpSlider = roundToInt( min_nbOfHeatpumps * 100.0 / nbActiveCompanies ); - sliderHeatpump.setValue(min_pct_ElectricHeatpumpSlider, false); - f_setHeatingSliders(1, sliderGasburner, sliderHeatpump, sliderHybridHeatPump, sliderDistrictHeating, sliderCustomHeating); - return; - } -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749116448649</Id> - <Name>f_calculatePeakHeatDemand_kW</Name> - <X>60</X> - <Y>1070</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gc</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>double peakHeatDemand_kW = 0.0; -for (J_EAConsumption j_ea : gc.c_consumptionAssets) { - if (j_ea.getEAType() == OL_EnergyAssetType.HEAT_DEMAND || j_ea.getEAType() == OL_EnergyAssetType.HOT_WATER_CONSUMPTION) { - double[] profile = j_ea.getProfilePointer().getAllValues(); - double maxFactor = Arrays.stream(profile).max().getAsDouble(); - peakHeatDemand_kW += maxFactor * j_ea.yearlyDemand_kWh * j_ea.getConsumptionScaling_fr(); - } -} -for (J_EAProfile j_ea : gc.c_profileAssets) { - if (j_ea.energyCarrier == OL_EnergyCarriers.HEAT) { - double maxValue = j_ea.getProfileScaling_fr() * Arrays.stream(j_ea.a_energyProfile_kWh).max().getAsDouble(); - peakHeatDemand_kW += maxValue / zero_Interface.energyModel.p_timeStep_h * j_ea.getProfileScaling_fr(); - } -} -if (gc.p_BuildingThermalAsset != null) { - double maximalTemperatureDifference_K = 30.0; // Approximation - peakHeatDemand_kW += gc.p_BuildingThermalAsset.getLossFactor_WpK() * maximalTemperatureDifference_K / 1000; -} -return peakHeatDemand_kW;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532180</Id> - <Name>f_addDistrictHeatingToAllHouses</Name> - <X>70</X> - <Y>900</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>for (GCHouse house: housesGCList ) { - // Remove the existing heating assets - house.f_removeAllHeatingAssets(); - - // Add a heat node - house.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - // Create a heat node if it does not exist yet - if(house.p_parentNodeHeat == null){ - GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); - zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); - GN_heat.p_gridNodeID = "Heatgrid"; - - // Check wether transformer capacity is known or estimated - GN_heat.p_capacity_kW = 1000000; - GN_heat.p_realCapacityAvailable = false; - - // Basic GN information - GN_heat.p_description = "Warmtenet"; - - //Define node type - GN_heat.p_nodeType = OL_GridNodeType.HT; - GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - - //Define GN location - GN_heat.p_latitude = 0; - GN_heat.p_longitude = 0; - GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - - //Connect - house.p_parentNodeHeat = GN_heat; - - //Show warning that heat grid is not a simple solution - zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); - } - house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; - - double outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - double efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - - new J_EAConversionHeatDeliverySet(house, peakHeatDemand_kW, efficiency, zero_Interface.energyModel.p_timeStep_h, outputTemperature_degC); - - house.f_addHeatManagement(OL_GridConnectionHeatingType.DISTRICTHEAT, false); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532202</Id> - <Name>f_removeDistrictHeatingFromAllHouses</Name> - <X>70</X> - <Y>920</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>for (GCHouse house: housesGCList ) { - house.f_removeAllHeatingAssets(); - house.p_parentNodeHeat = null; - house.p_parentNodeHeatID = null; - - //add gasburner - J_EAConsumption heatDemandAsset = findFirst(house.c_consumptionAssets, j_ea -> j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); - J_EAConversionGasBurner gasBurner; - //if house has follows the general heat deamnd profile - if (heatDemandAsset != null) { - gasBurner = new J_EAConversionGasBurner(house, heatDemandAsset.yearlyDemand_kWh/8760*10, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); - } - //if house has a thermalBuildingAsset - else if (house.p_BuildingThermalAsset != null){ - double gasBurnerCapacity_kW = 10; - gasBurner = new J_EAConversionGasBurner(house, gasBurnerCapacity_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); - } - // Else house has a customprofiel - else { - J_EAProfile heatDemandProfile = (J_EAProfile)findFirst(house.c_profileAssets, x->x instanceof J_EAProfile && x.energyCarrier == OL_EnergyCarriers.HEAT); - double peakHeatDemand_kW = heatDemandProfile.getProfileScaling_fr() * Arrays.stream(heatDemandProfile.a_energyProfile_kWh).max().orElseThrow(() -> new RuntimeException("Unable to find the maximum of the heat demand profile")); - gasBurner = new J_EAConversionGasBurner(house, peakHeatDemand_kW, 0.99, zero_Interface.energyModel.p_timeStep_h, 90); - } - house.f_addHeatManagement(OL_GridConnectionHeatingType.GAS_BURNER, false); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532217</Id> - <Name>f_setAircos</Name> - <X>70</X> - <Y>610</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>desiredShare</Name> - <Type>double</Type> - </Parameter> - <Body>double nbHousesWithAirco = count(gcListHouses, x -> x.p_airco != null); -double nbHouses = gcListHouses.size(); - -while ( roundToInt(nbHouses * desiredShare) > nbHousesWithAirco ) { - GCHouse house = randomWhere(gcListHouses, x -> x.p_airco == null); - double aircoPower_kW = roundToDecimal(uniform(3,6),1); - new J_EAAirco(house, aircoPower_kW, zero_Interface.energyModel.p_timeStep_h); - nbHousesWithAirco ++; -} -while ( roundToInt(nbHouses * desiredShare) < nbHousesWithAirco ) { - GCHouse house = randomWhere(gcListHouses, x -> x.p_airco != null); - house.p_airco.removeEnergyAsset(); - nbHousesWithAirco --; -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings(); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532231</Id> - <Name>f_addLTDH</Name> - <X>70</X> - <Y>850</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>for (GCHouse house: housesGCList ) { - house.f_removeAllHeatingAssets(); - - // Add a heat node - house.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - // Create a heat node if it does not exist yet - if(house.p_parentNodeHeat == null){ - GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); - zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); - GN_heat.p_gridNodeID = "Heatgrid"; - - // Check wether transformer capacity is known or estimated - GN_heat.p_capacity_kW = 1000000; - GN_heat.p_realCapacityAvailable = false; - - // Basic GN information - GN_heat.p_description = "Warmtenet"; - - //Define node type - GN_heat.p_nodeType = OL_GridNodeType.HT; - GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - - //Define GN location - GN_heat.p_latitude = 0; - GN_heat.p_longitude = 0; - GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - - //Connect - house.p_parentNodeHeat = GN_heat; - - //Show warning that heat grid is not a simple solution - zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); - } - house.p_parentNodeHeatID = house.p_parentNodeHeat.p_gridNodeID; - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - double heatpumpElectricCapacity_kW = min(peakHeatDemand_kW / 3, 1.0); - double efficiency_fr = 0.5; - double inputTemperature_degC = 15.0; // TODO: Look at these temperatures! - double outputTemperature_degC = 50.0; - double sourceAssetHeatPower_kW = 0.0; - double belowZeroHeatpumpEtaReductionFactor = 1.0; - J_EAConversionHeatPump heatpump = new J_EAConversionHeatPump(house, - heatpumpElectricCapacity_kW, - efficiency_fr, - zero_Interface.energyModel.p_timeStep_h, - outputTemperature_degC, - zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(), - sourceAssetHeatPower_kW, - belowZeroHeatpumpEtaReductionFactor, - OL_AmbientTempType.HEAT_GRID - ); - heatpump.updateParameters(inputTemperature_degC, outputTemperature_degC); - house.f_addHeatManagement(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, false); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749739532244</Id> - <Name>f_removeLTDH</Name> - <X>70</X> - <Y>870</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Body>for (GCHouse house: housesGCList ) { - // Disconnect from GridNode Heat - house.p_parentNodeHeat = null; - house.p_parentNodeHeatID = null; - - // Remove Heatpump and replace with gasburner - house.f_removeAllHeatingAssets(); - double peakHeatDemand_kW = f_calculatePeakHeatDemand_kW(house); - new J_EAConversionGasBurner(house, peakHeatDemand_kW, zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC); - house.f_addHeatManagement(OL_GridConnectionHeatingType.GAS_BURNER, false); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1752227724432</Id> - <Name>f_householdInsulation</Name> - <X>70</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>housesGCList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>houses_pct</Name> - <Type>double</Type> - </Parameter> - <Body>int nbHouses = count(housesGCList, x -> x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -int nbHousesWithImprovedInsulation = count(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -int targetNbHousesWithImprovedInsulation = roundToInt(houses_pct / 100.0 * nbHouses); - -while (nbHousesWithImprovedInsulation < targetNbHousesWithImprovedInsulation) { - GCHouse house = findFirst(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() >= 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); - if (house != null) { - house.p_BuildingThermalAsset.setLossScalingFactor_fr( 0.7 ); - nbHousesWithImprovedInsulation++; - } - else { - throw new RuntimeException("Unable to find house that does not yet have additional insulation"); - } -} -while (nbHousesWithImprovedInsulation > targetNbHousesWithImprovedInsulation) { - GCHouse house = findFirst(housesGCList, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); - if (house != null) { - house.p_BuildingThermalAsset.setLossScalingFactor_fr( 1 ); - nbHousesWithImprovedInsulation--; - } - else { - throw new RuntimeException("Unable to find house that has additional insulation"); - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753950993262</Id> - <Name>f_setPTSystemHouses</Name> - <Description>Function that adds or removes photovoltaic production assets to houses. Takes a percentage as a parameter and runs untill that percentage of all the houses has a PV asset. If a new asset is created it takes as its electric capacity a random value between 3 and 6 kW. The variables for amount of installed PV are updated automatically in the zero_engine. -</Description> - <X>70</X> - <Y>1010</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>PT_pct</Name> - <Type>double</Type> - </Parameter> - <Body>ArrayList<GCHouse> houses = new ArrayList<GCHouse>(zero_Interface.c_orderedPTSystemsHouses.stream().filter(gcList::contains).toList()); -int nbHouses = houses.size(); -int nbHousesWithPT = count(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); -int nbHousesWithPTGoal = roundToInt(PT_pct / 100.0 * nbHouses); - -while ( nbHousesWithPTGoal < nbHousesWithPT ) { // remove excess PV systems - GCHouse house = findFirst(houses, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); - J_EA ptAsset = findFirst(house.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOTHERMAL ); - - if (ptAsset != null) { - ptAsset.removeEnergyAsset(); - houses.remove(house); - zero_Interface.c_orderedPTSystemsHouses.remove(house); - zero_Interface.c_orderedPTSystemsHouses.add(0, house); - - if(house.p_heatBuffer != null){ - house.p_heatBuffer.removeEnergyAsset(); - } - if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - J_EAProduction pvAsset = findFirst(house.c_productionAssets, ea -> ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); - if(pvAsset != null){ - double newInstalledPVCapacity = min(house.v_liveAssetsMetaData.PVPotential_kW, pvAsset.getCapacityElectric_kW() + zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); - pvAsset.setCapacityElectric_kW(newInstalledPVCapacity); - } - } - nbHousesWithPT --; - } - else { - traceln(" cant find PV asset in house that should have PV asset in f_setPVHouses (Interface)"); - } -} - -while ( nbHousesWithPTGoal > nbHousesWithPT ) { - GCHouse house = findFirst(houses, x -> !x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); - if (house == null){ - traceln("No gridconnection without PT panels found! Current PVsystems count: %s", nbHousesWithPT); - break; - } - else { - String assetName = "Rooftop PT"; - double installedPTCapacity_kW = zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPTPower_kWpm2;//roundToDecimal(uniform(3,6),2); - - //Compensate for pt if it is present - if(house.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - J_EAProduction pvAsset = findFirst(house.c_productionAssets, ea -> ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC); - if(pvAsset != null){ - double newInstalledPVCapacity = max(0, pvAsset.getCapacityElectric_kW() - zero_Interface.energyModel.avgc_data.p_avgPTPanelSize_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); - pvAsset.setCapacityElectric_kW(newInstalledPVCapacity); - } - } - J_EAProduction productionAsset = new J_EAProduction ( house, OL_EnergyAssetType.PHOTOTHERMAL, assetName, OL_EnergyCarriers.HEAT, installedPTCapacity_kW, zero_Interface.energyModel.p_timeStep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr ); - - //Get parameters for the heatbuffer - double lossFactor_WpK = 0;// For now no loss factor - double minTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgMinHeatBufferTemperature_degC; - double maxTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgMaxHeatBufferTemperature_degC; - double initialTemperature_degC = (minTemperature_degC + maxTemperature_degC)/2; - double setTemperature_degC = initialTemperature_degC; - double heatBufferStorageCapacity_m3 = zero_Interface.energyModel.avgc_data.p_avgHeatBufferWaterVolumePerPTSurface_m3pm2 * installedPTCapacity_kW/zero_Interface.energyModel.avgc_data.p_avgPTPower_kWpm2; - double heatCapacity_JpK = zero_Interface.energyModel.avgc_data.p_waterHeatCapacity_JpkgK*(heatBufferStorageCapacity_m3*zero_Interface.energyModel.avgc_data.p_waterDensity_kgpm3); - - //Add heatbuffer - J_EAStorageHeat heatbufferAsset = new J_EAStorageHeat ( house, OL_EnergyAssetType.STORAGE_HEAT, installedPTCapacity_kW, lossFactor_WpK, zero_Interface.energyModel.p_timeStep_h, initialTemperature_degC, minTemperature_degC, maxTemperature_degC, setTemperature_degC, heatCapacity_JpK, OL_AmbientTempType.FIXED); - - houses.remove(house); - zero_Interface.c_orderedPTSystemsHouses.remove(house); - zero_Interface.c_orderedPTSystemsHouses.add(0, house); - nbHousesWithPT ++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754391096443</Id> - <Name>f_setHeatingSliders</Name> - <Description>Function that calculates all the values of the other sliders and sets them without calling an action. Takes as parameters the index of the slider which should not be touched as well as all the sliders. HybridHeatPump and DistrictHeating sliders are optional and an argument of null can be passed. </Description> - <X>70</X> - <Y>690</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>orderedHeatingSystemGCList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>changedSliderHeatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>gasBurnerSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>hybridHeatPumpSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>heatPumpSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>HTdistrictHeatingSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>LTdistrictHeatingSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>customHeatingSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>////Determine the changed slider index used in the distribution for loop -int changedSliderIndex = 0; -switch(changedSliderHeatingType){ - case GAS_BURNER: - changedSliderIndex = 0; - break; - case HYBRID_HEATPUMP: - changedSliderIndex = 1; - break; - case ELECTRIC_HEATPUMP: - changedSliderIndex = 2; - break; - case DISTRICTHEAT: - changedSliderIndex = 3; - break; - case LT_DISTRICTHEAT: - case CUSTOM: - throw new RuntimeException("Changed a heating type slider with a currently unsupported type!"); -} - -//// Get current pct values (after slider change, but before correction; In other words total_pct != 100) -double pct_naturalGasBurner = gasBurnerSlider.getValue(); -double pct_hybridHeatPump = hybridHeatPumpSlider != null ? hybridHeatPumpSlider.getValue() : 0; -double pct_electricHeatPump = heatPumpSlider != null ? heatPumpSlider.getValue() : 0; -double pct_HTdistrictHeating = HTdistrictHeatingSlider != null ? HTdistrictHeatingSlider.getValue() : 0; -double pct_LTdistrictHeating = LTdistrictHeatingSlider != null ? LTdistrictHeatingSlider.getValue() : 0; -double pct_customHeatingSlider = customHeatingSlider != null ? customHeatingSlider.getValue() : 0; - -//Set array with pct values -double pctArray[] = { - pct_naturalGasBurner, - pct_hybridHeatPump, - pct_electricHeatPump, - pct_HTdistrictHeating, - pct_LTdistrictHeating, - pct_customHeatingSlider -}; - -//// Create a ghost asset array, and fill it. This is used to find minimums of certain sliders. Also get the total amount of GC with heating systems. -int ghostAssetTotalArray[] = new int[pctArray.length]; -int totalGCWithHeating = 0; -for(GridConnection GC : gcList){ - if(GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE && GC.v_isActive){ - totalGCWithHeating++; - - if(GC.f_getHeatingTypeIsGhost()){ - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - ghostAssetTotalArray[0]++; - break; - case HYBRID_HEATPUMP: - ghostAssetTotalArray[1]++; - break; - case ELECTRIC_HEATPUMP: - ghostAssetTotalArray[2]++; - break; - case DISTRICTHEAT: - ghostAssetTotalArray[3]++; - break; - case LT_DISTRICTHEAT: - ghostAssetTotalArray[4]++; - break; - case CUSTOM: - ghostAssetTotalArray[5]++; - break; - } - } - } -} - -//// Correct the slider change trough to the other sliders. But don't move the custom slider or set sliders lower than their unchangable ghost assets. -int customSliderIndex = 5; -double pctExcess = Arrays.stream(pctArray).sum() - 100; - -for (int i = 0; i < pctArray.length && pctExcess != 0 ; i++) { - if (i != changedSliderIndex && i != customSliderIndex) { - double ghostMin_pct = ((double) 100.0 * ghostAssetTotalArray[i]) / totalGCWithHeating; - double maxDown_pct = pctArray[i] - ghostMin_pct; - double maxUp_pct = 100 - pctArray[i]; - - // Determine the slider delta, positive delta -> slider increases, negative -> slider decreases - double deltaSlider_pct = 0; - if(pctExcess > 0){ - deltaSlider_pct = -min(maxDown_pct, pctExcess); - } - else{ - deltaSlider_pct = min(maxUp_pct, -pctExcess); - } - - pctArray[i] += deltaSlider_pct; - pctExcess = Arrays.stream(pctArray).sum() - 100; - } -} - -//If still not 0, then adjust the changedSlider back to solve it. -if (pctExcess != 0){ - pctArray[changedSliderIndex] = max(0, pctArray[changedSliderIndex] - pctExcess); -} - -//// Set refound values to the sliders again -gasBurnerSlider.setValue(roundToInt(pctArray[0]), false); -if(hybridHeatPumpSlider != null){ - hybridHeatPumpSlider.setValue(roundToInt(pctArray[1]), false); -} -if(heatPumpSlider != null){ - heatPumpSlider.setValue(roundToInt(pctArray[2]), false); -} -if(HTdistrictHeatingSlider != null){ - HTdistrictHeatingSlider.setValue(roundToInt(pctArray[3]), false); -} -if(LTdistrictHeatingSlider != null){ - LTdistrictHeatingSlider.setValue(roundToInt(pctArray[4]), false); -} -if(customHeatingSlider != null){ - customHeatingSlider.setValue(roundToInt(pctArray[5]), false); -} - - -//Set the heating systems in the engine to the correct setting -f_setHeatingSystems(gcList, orderedHeatingSystemGCList, changedSliderHeatingType, pctArray[changedSliderIndex]);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754923748794</Id> - <Name>f_updateSliders_Heating</Name> - <X>-380</X> - <Y>30</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>if(gr_heatingSliders_default.isVisible()){ - f_updateHeatingSliders_default(); -} -else if(gr_heatingSliders_businesspark.isVisible()){ - f_updateHeatingSliders_businesspark(); -} -else if(gr_heatingSliders_residential.isVisible()){ - f_updateHeatingSliders_residential(); -} -else{ - f_updateHeatingSliders_custom(); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754924509667</Id> - <Name>f_updateHeatingSliders_default</Name> - <X>-360</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>////Companies -List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); - -//Savings (IN PROGRESS, WHAT ABOUT THERMAL BUILDINGS?????) -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GridConnection GC : utilityGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.getActiveEnergyCarriers().contains(OL_EnergyCarriers.HEAT)); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - - if(GC.p_BuildingThermalAsset != null){ - traceln("WARNING: SLIDER SAVINGS UPDATE FUNCTION IS NOT FUNCTIONAL YET FOR COMPANIES WITH THERMAL BUILDING ASSETS"); - } - } -} - -double heatSavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; -sl_heatDemandReductionCompanies_pct.setValue(roundToInt(heatSavings_pct), false); - - -//Heating assets -//Heating type -int totalCompaniesWithHeating = 0; -int nbOfCompaniesWithGasBurners = 0; -int nbOfCompaniesWithHybridHeatpumps = 0; -int nbOfCompaniesWithElectricHeatpumps = 0; -int nbOfCompaniesOnHTHeatGrid = 0; -int nbOfCompaniesOnLTHeatGrid = 0; - -for(GCUtility GC : utilityGridConnections){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalCompaniesWithHeating++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbOfCompaniesWithGasBurners++; - break; - case HYBRID_HEATPUMP: - nbOfCompaniesWithHybridHeatpumps++; - break; - case ELECTRIC_HEATPUMP: - nbOfCompaniesWithElectricHeatpumps++; - break; - case DISTRICTHEAT: - nbOfCompaniesOnHTHeatGrid++; - break; - case LT_DISTRICTHEAT: - nbOfCompaniesOnLTHeatGrid++; - break; - } - } -} - -int companiesWithGasBurners_pct = roundToInt(100.0 * nbOfCompaniesWithGasBurners / totalCompaniesWithHeating); -int companiesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithHybridHeatpumps / totalCompaniesWithHeating); -int companiesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithElectricHeatpumps / totalCompaniesWithHeating); -int companiesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnHTHeatGrid / totalCompaniesWithHeating); - -sl_gasBurnerCompanies_pct.setValue(companiesWithGasBurners_pct, false); -sl_hybridHeatPumpCompanies_pct.setValue(companiesWithHybridHeatpump_pct, false); -sl_electricHeatPumpCompanies_pct.setValue(companiesWithElectricHeatpump_pct, false); -sl_districtHeatingCompanies_pct.setValue(companiesWithHTDistrictHeat_pct, false); - - -////Houses -List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); - -//Savings -double averageScalingFactor = 0; -double totalScalingFactors = 0; -for(GCHouse GC : houseGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.getActiveEnergyCarriers().contains(OL_EnergyCarriers.HEAT)); - for(J_EAProfile profileEA : profileEAs){ - double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; - double newTotalScalingFactorValue = totalScalingFactorValue + profileEA.getProfileScaling_fr(); - totalScalingFactors++; - averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; - double newTotalScalingFactorValue = totalScalingFactorValue + consumptionEA.getConsumptionScaling_fr(); - totalScalingFactors++; - averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; - } - - if(GC.p_BuildingThermalAsset != null){ - double totalScalingFactorValue = averageScalingFactor*totalScalingFactors; - double newTotalScalingFactorValue = totalScalingFactorValue + GC.p_BuildingThermalAsset.getLossScalingFactor_fr(); - totalScalingFactors++; - averageScalingFactor = newTotalScalingFactorValue/totalScalingFactors; - } - } -} -double averageSavingsFactor_pct = (1-averageScalingFactor)*100.0; -sl_heatDemandReductionHouseholds_pct.setValue(roundToInt(averageSavingsFactor_pct), false); - - -//Heating type -int totalHousesWithHeating = 0; -int nbOfHousesWithGasBurners = 0; -int nbOfHousesWithHybridHeatpumps = 0; -int nbOfHousesWithElectricHeatpumps = 0; -int nbOfHousesOnHTHeatGrid = 0; -int nbOfHousesOnLTHeatGrid = 0; - -for(GCHouse GC : houseGridConnections){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalHousesWithHeating++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbOfHousesWithGasBurners++; - break; - case HYBRID_HEATPUMP: - nbOfHousesWithHybridHeatpumps++; - break; - case ELECTRIC_HEATPUMP: - nbOfHousesWithElectricHeatpumps++; - break; - case DISTRICTHEAT: - nbOfHousesOnHTHeatGrid++; - break; - case LT_DISTRICTHEAT: - nbOfHousesOnLTHeatGrid++; - break; - } - } -} - -int housesWithGasBurners_pct = roundToInt(100.0 * nbOfHousesWithGasBurners / totalHousesWithHeating); -int housesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfHousesWithHybridHeatpumps / totalHousesWithHeating); -int housesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfHousesWithElectricHeatpumps / totalHousesWithHeating); -int housesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfHousesOnHTHeatGrid / totalHousesWithHeating); - -sl_gasBurnerHouseholds_pct.setValue(housesWithGasBurners_pct, false); -sl_hybridHeatPumpHouseholds_pct.setValue(housesWithHybridHeatpump_pct, false); -sl_electricHeatPumpHouseholds_pct.setValue(housesWithElectricHeatpump_pct, false); -sl_districtHeatingHouseholds_pct.setValue(housesWithHTDistrictHeat_pct, false); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754924542535</Id> - <Name>f_updateHeatingSliders_residential</Name> - <X>-360</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GCHouse> houseGridConnections = uI_Tabs.f_getActiveSliderGridConnections_houses(); - - -//Heating type -int totalHousesWithHeating = 0; -int nbOfHousesWithGasBurners = 0; -int nbOfHousesWithHybridHeatpumps = 0; -int nbOfHousesWithElectricHeatpumps = 0; -int nbOfHousesOnHTHeatGrid = 0; -int nbOfHousesOnLTHeatGrid = 0; - -for(GCHouse GC : houseGridConnections){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalHousesWithHeating++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbOfHousesWithGasBurners++; - break; - case HYBRID_HEATPUMP: - nbOfHousesWithHybridHeatpumps++; - break; - case ELECTRIC_HEATPUMP: - nbOfHousesWithElectricHeatpumps++; - break; - case DISTRICTHEAT: - nbOfHousesOnHTHeatGrid++; - break; - case LT_DISTRICTHEAT: - nbOfHousesOnLTHeatGrid++; - break; - } - } -} - -int housesWithGasBurners_pct = roundToInt(100.0 * nbOfHousesWithGasBurners / totalHousesWithHeating); -int housesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfHousesWithHybridHeatpumps / totalHousesWithHeating); -int housesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfHousesWithElectricHeatpumps / totalHousesWithHeating); - -sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, false); -sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, false); -sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, false); -cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); -cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - -if(nbOfHousesOnHTHeatGrid == totalHousesWithHeating){ - cb_householdHTDistrictHeatingResidentialArea.setSelected(true, false); -} -if(nbOfHousesOnLTHeatGrid == totalHousesWithHeating){ - cb_householdLTDistrictHeatingResidentialArea.setSelected(true, false); -} - -//Houses with Airco -double nbHouses = houseGridConnections.size(); -double nbHousesWithAirco = count(houseGridConnections, x -> x.p_airco != null); -double pctOfHousesWithAirco = (nbHousesWithAirco*100.0)/nbHouses; -sl_householdAircoResidentialArea_pct.setValue(pctOfHousesWithAirco, false); - - -//Houses with better isolation -int nbHousesThatCanGetImprovedIsolation = count(houseGridConnections, x -> x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -int nbHousesWithImprovedInsulation = count(houseGridConnections, x -> x.p_BuildingThermalAsset.getLossScalingFactor_fr() < 1 && x.p_energyLabel != OL_GridConnectionIsolationLabel.A); -double pctOfHousesWithImprovedInsulation = 100.0 * ((double)nbHousesWithImprovedInsulation)/nbHousesThatCanGetImprovedIsolation; -sl_householdHeatDemandReductionResidentialArea_pct.setValue(roundToInt(pctOfHousesWithImprovedInsulation), false); - - -//PT -int nbHousesWithPT = count(houseGridConnections, x -> x.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW)); - -sl_rooftopPTHouses_pct.setValue(roundToInt((nbHousesWithPT*100.0)/nbHouses), false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754924544023</Id> - <Name>f_updateHeatingSliders_businesspark</Name> - <X>-360</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GCUtility> utilityGridConnections = uI_Tabs.f_getActiveSliderGridConnections_utilities(); - -//Savings (IN PROGRESS, WHAT ABOUT THERMAL BUILDINGS?????) -double totalBaseConsumption_kWh = 0; -double totalSavedConsumption_kWh = 0; -for(GridConnection GC : utilityGridConnections){ - if(GC.v_isActive){ - List<J_EAProfile> profileEAs = findAll(GC.c_profileAssets, profile -> profile.getEnergyCarrier() == OL_EnergyCarriers.HEAT); // FIX FOR HOT WATER/PT IN LONG RUN - List<J_EAConsumption> consumptionEAs = findAll(GC.c_consumptionAssets, consumption -> consumption.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); - for(J_EAProfile profileEA : profileEAs){ - double baseConsumption_kWh = ZeroMath.arraySum(profileEA.a_energyProfile_kWh); - totalBaseConsumption_kWh += baseConsumption_kWh; - totalSavedConsumption_kWh += (1 - profileEA.getProfileScaling_fr()) * baseConsumption_kWh; - } - for(J_EAConsumption consumptionEA : consumptionEAs){ - totalBaseConsumption_kWh += consumptionEA.yearlyDemand_kWh; - totalSavedConsumption_kWh += (1-consumptionEA.getConsumptionScaling_fr())*consumptionEA.yearlyDemand_kWh; - } - - if(GC.p_BuildingThermalAsset != null){ - traceln("WARNING: SLIDER SAVINGS UPDATE FUNCTION IS NOT FUNCTIONAL YET FOR COMPANIES WITH THERMAL BUILDING ASSETS"); - } - } -} - -double heatSavings_pct = totalBaseConsumption_kWh > 0 ? (totalSavedConsumption_kWh/totalBaseConsumption_kWh * 100) : 0; -sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.setValue(roundToInt(heatSavings_pct), false); - - -//Heating type -int totalCompaniesWithHeating = 0; -int nbOfCompaniesWithGasBurners = 0; -int nbOfCompaniesWithHybridHeatpumps = 0; -int nbOfCompaniesWithElectricHeatpumps = 0; -int nbOfCompaniesOnHTHeatGrid = 0; -int nbOfCompaniesOnLTHeatGrid = 0; -int nbOfCompaniesWithCustomHeating = 0; - -for(GCUtility GC : utilityGridConnections){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalCompaniesWithHeating++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbOfCompaniesWithGasBurners++; - break; - case HYBRID_HEATPUMP: - nbOfCompaniesWithHybridHeatpumps++; - break; - case ELECTRIC_HEATPUMP: - nbOfCompaniesWithElectricHeatpumps++; - break; - case DISTRICTHEAT: - nbOfCompaniesOnHTHeatGrid++; - break; - case LT_DISTRICTHEAT: - nbOfCompaniesOnLTHeatGrid++; - break; - case CUSTOM: - nbOfCompaniesWithCustomHeating++; - break; - } - } -} - -int companiesWithGasBurners_pct = roundToInt(100.0 * nbOfCompaniesWithGasBurners / totalCompaniesWithHeating); -int companiesWithHybridHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithHybridHeatpumps / totalCompaniesWithHeating); -int companiesWithElectricHeatpump_pct = roundToInt(100.0 * nbOfCompaniesWithElectricHeatpumps / totalCompaniesWithHeating); -int companiesWithHTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnHTHeatGrid / totalCompaniesWithHeating); -int companiesWithLTDistrictHeat_pct = roundToInt(100.0 * nbOfCompaniesOnLTHeatGrid / totalCompaniesWithHeating); -int companiesWithCustomHeating_pct = roundToInt(100.0 * nbOfCompaniesWithCustomHeating / totalCompaniesWithHeating); - - -sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct.setValue(companiesWithGasBurners_pct, false); -sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.setValue(companiesWithHybridHeatpump_pct, false); -sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct.setValue(companiesWithElectricHeatpump_pct, false); -sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.setValue(companiesWithHTDistrictHeat_pct, false); -//sl_heatDemandSlidersCompaniesLTDistrictHeatingCompanies_pct.setValue(companiesWithLTDistrictHeat_pct, false); Doesnt exist (yet) for companies -sl_heatingTypeSlidersCompaniesCustom_pct.setValue(companiesWithCustomHeating_pct, false); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754924574713</Id> - <Name>f_updateHeatingSliders_custom</Name> - <X>-360</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//If you have a custom tab, -//override this function to make it update automatically -traceln("Forgot to override the update custom heating sliders functionality");</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1760350664957</Id> - <Name>f_setHeatingSystems</Name> - <X>90</X> - <Y>711</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>orderedHeatingSystemGCList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>changedSliderHeatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>sliderGoal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>int totalNrOfHeatingSystems = 0; -int nbGasBurners = 0; -int nbHybridHeatpumps = 0; -int nbElectricHeatpumps = 0; -int nbHTHeatGrid = 0; -int nbLTHeatGrid = 0; -int nbCustomHeating = 0; -List<GridConnection> gasBurnerGCs = new ArrayList<>(); -List<GridConnection> hybridHeatpumpGCs = new ArrayList<>(); -List<GridConnection> electricHeatpumpGCs = new ArrayList<>(); -List<GridConnection> HTHeatGridGCs = new ArrayList<>(); -List<GridConnection> LTHeatGridGCs = new ArrayList<>(); - -for(GridConnection GC : gcList){ - if(GC.v_isActive && GC.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE){ - totalNrOfHeatingSystems++; - switch(GC.f_getCurrentHeatingType()){ - case GAS_BURNER: - nbGasBurners++; - if(!GC.f_getHeatingTypeIsGhost()){ - gasBurnerGCs.add(GC); - } - break; - case HYBRID_HEATPUMP: - nbHybridHeatpumps++; - if(!GC.f_getHeatingTypeIsGhost()){ - hybridHeatpumpGCs.add(GC); - } - break; - case ELECTRIC_HEATPUMP: - nbElectricHeatpumps++; - if(!GC.f_getHeatingTypeIsGhost()){ - electricHeatpumpGCs.add(GC); - } - break; - case DISTRICTHEAT: - nbHTHeatGrid++; - if(!GC.f_getHeatingTypeIsGhost()){ - HTHeatGridGCs.add(GC); - } - break; - case LT_DISTRICTHEAT: - nbLTHeatGrid++; - if(!GC.f_getHeatingTypeIsGhost()){ - LTHeatGridGCs.add(GC); - } - break; - case CUSTOM: - nbCustomHeating++; - if(!GC.f_getHeatingTypeIsGhost()){ - //No collection, as ghost cant be changed anyway - } - break; - } - } -} - -int nbChangedHeatingTypeGoal = roundToInt(totalNrOfHeatingSystems*sliderGoal_pct/100.0); - -int currentNumberOfChangedHeatingType = 0; - -switch(changedSliderHeatingType){ - case GAS_BURNER: - currentNumberOfChangedHeatingType = nbGasBurners; - break; - case HYBRID_HEATPUMP: - currentNumberOfChangedHeatingType = nbHybridHeatpumps; - break; - case ELECTRIC_HEATPUMP: - currentNumberOfChangedHeatingType = nbElectricHeatpumps; - break; - case DISTRICTHEAT: - currentNumberOfChangedHeatingType = nbHTHeatGrid; - break; - case LT_DISTRICTHEAT: - currentNumberOfChangedHeatingType = nbLTHeatGrid; - break; -} - - - -if (currentNumberOfChangedHeatingType < nbChangedHeatingTypeGoal) { - while ( currentNumberOfChangedHeatingType < nbChangedHeatingTypeGoal ) { - - GridConnection changingGC = null; - if(changedSliderHeatingType != OL_GridConnectionHeatingType.GAS_BURNER && gasBurnerGCs.size() > 0){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> gasBurnerGCs.contains(gc)); - gasBurnerGCs.remove(changingGC); - } - else if(changedSliderHeatingType != OL_GridConnectionHeatingType.HYBRID_HEATPUMP && hybridHeatpumpGCs.size() > 0){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> hybridHeatpumpGCs.contains(gc)); - hybridHeatpumpGCs.remove(changingGC); - } - else if (changedSliderHeatingType != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP && electricHeatpumpGCs.size() > 0 ) { - changingGC = findFirst(orderedHeatingSystemGCList, gc -> electricHeatpumpGCs.contains(gc)); - electricHeatpumpGCs.remove(changingGC); - } - else if (changedSliderHeatingType != OL_GridConnectionHeatingType.DISTRICTHEAT && HTHeatGridGCs.size() > 0 ) { - changingGC = findFirst(orderedHeatingSystemGCList, gc -> HTHeatGridGCs.contains(gc)); - HTHeatGridGCs.remove(changingGC); - } - else if (changedSliderHeatingType != OL_GridConnectionHeatingType.LT_DISTRICTHEAT && LTHeatGridGCs.size() > 0 ) { - changingGC = findFirst(orderedHeatingSystemGCList, gc -> LTHeatGridGCs.contains(gc)); - LTHeatGridGCs.remove(changingGC); - } - else{ - throw new RuntimeException("No more GC left to change into raised slider type!" ); - } - - if(changingGC == null){ - throw new RuntimeException("orderedHeatingSystemGClist does not contain a GC found by this function! This should not be possible!" ); - } - - //Change the current heating type to the new one - changingGC.f_removeAllHeatingAssets(); - f_addHeatAsset(changingGC, changedSliderHeatingType, f_calculatePeakHeatDemand_kW(changingGC)); - changingGC.f_addHeatManagement(changedSliderHeatingType, false); - currentNumberOfChangedHeatingType ++; - } -} -else { - // Remove Gas burners Trucks - while ( currentNumberOfChangedHeatingType > nbChangedHeatingTypeGoal ) { - // replace a gasburner with a hybrid heatpump - GridConnection changingGC = null; - OL_GridConnectionHeatingType newHeatingType = OL_GridConnectionHeatingType.GAS_BURNER; // Always change into gasburner system. - if(changedSliderHeatingType == OL_GridConnectionHeatingType.GAS_BURNER){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> gasBurnerGCs.contains(gc)); - gasBurnerGCs.remove(changingGC); - newHeatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; // If removing gasburner, change into hybrid system. - } - else if(changedSliderHeatingType == OL_GridConnectionHeatingType.HYBRID_HEATPUMP){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> hybridHeatpumpGCs.contains(gc)); - hybridHeatpumpGCs.remove(changingGC); - } - else if(changedSliderHeatingType == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> electricHeatpumpGCs.contains(gc)); - electricHeatpumpGCs.remove(changingGC); - } - else if(changedSliderHeatingType == OL_GridConnectionHeatingType.DISTRICTHEAT){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> HTHeatGridGCs.contains(gc)); - HTHeatGridGCs.remove(changingGC); - } - else if(changedSliderHeatingType == OL_GridConnectionHeatingType.LT_DISTRICTHEAT){ - changingGC = findFirst(orderedHeatingSystemGCList, gc -> LTHeatGridGCs.contains(gc)); - LTHeatGridGCs.remove(changingGC); - } - changingGC.f_removeAllHeatingAssets(); - f_addHeatAsset(changingGC, newHeatingType, f_calculatePeakHeatDemand_kW(changingGC)); - changingGC.f_addHeatManagement(newHeatingType, false); - currentNumberOfChangedHeatingType--; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1760368810352</Id> - <Name>f_addHeatAsset</Name> - <X>110</X> - <Y>731</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatAssetType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>maxHeatOutputPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>//Initialize parameters -double heatOutputCapacityGasBurner_kW; -double inputCapacityElectric_kW; -double efficiency; -double baseTemperature_degC; -double outputTemperature_degC; -OL_AmbientTempType ambientTempType; -double sourceAssetHeatPower_kW; -double belowZeroHeatpumpEtaReductionFactor; -maxHeatOutputPower_kW = maxHeatOutputPower_kW*2; // Make the asset capacity twice as high, to make sure it can handle the load in other scenarios with more heat consumption. -J_AVGC_data avgc_data = zero_Interface.energyModel.avgc_data; -double timeStep_h = zero_Interface.energyModel.p_timeStep_h; - -switch (heatAssetType){ // There is always only one heatingType, If there are many assets the type is CUSTOM - - case GAS_BURNER: - heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); - J_EAConversionGasBurner gasBurner = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW , avgc_data.p_avgEfficiencyGasBurner_fr, timeStep_h, 90); - break; - - case HYBRID_HEATPUMP: - - //Add primary heating asset (heatpump) (if its not part of the basic profile already - inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW / 3); //-- /3, kan nog kleiner want is hybride zodat gasbrander ook bij springt, dus kleiner MOETEN aanname voor hoe klein onderzoeken - - efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; - baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType); - - zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); - - //Add secondary heating asset (gasburner) - heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); - efficiency = avgc_data.p_avgEfficiencyGasBurner_fr; - outputTemperature_degC = avgc_data.p_avgOutputTemperatureGasBurner_degC; - - J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW, efficiency, timeStep_h, outputTemperature_degC); - break; - - case ELECTRIC_HEATPUMP: - //Add primary heating asset (heatpump) - inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW); // Could be smaller due to high cop - efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; - baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - break; - - case GAS_CHP: - - double outputCapacityElectric_kW = (maxHeatOutputPower_kW/avgc_data.p_avgEfficiencyCHP_thermal_fr) * avgc_data.p_avgEfficiencyCHP_electric_fr; - outputTemperature_degC = avgc_data.p_avgOutputTemperatureCHP_degC; - efficiency = avgc_data.p_avgEfficiencyCHP_thermal_fr + avgc_data.p_avgEfficiencyCHP_electric_fr; - - new J_EAConversionGasCHP(parentGC, outputCapacityElectric_kW, maxHeatOutputPower_kW, efficiency, timeStep_h, outputTemperature_degC ); - break; - - case DISTRICTHEAT: - double heatOutputCapacityDeliverySet_kW = max(avgc_data.p_minDistrictHeatingDeliverySetOutputCapacity_kW, maxHeatOutputPower_kW); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - efficiency = avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - - new J_EAConversionHeatDeliverySet(parentGC, heatOutputCapacityDeliverySet_kW, efficiency, timeStep_h, outputTemperature_degC); - - //Add GC to heat grid - GridNode heatgrid = findFirst(zero_Interface.energyModel.pop_gridNodes, node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - if(heatgrid == null){ - heatgrid = f_createNewHeatGrid(); - } - //Connect - parentGC.p_parentNodeHeatID = heatgrid.p_gridNodeID; - parentGC.p_parentNodeHeat = heatgrid; - break; -} -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GridNode</ReturnType> - <Id>1760370085949</Id> - <Name>f_createNewHeatGrid</Name> - <X>130</X> - <Y>751</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); -zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); -GN_heat.p_gridNodeID = "Heatgrid"; - -// Check wether transformer capacity is known or estimated -GN_heat.p_capacity_kW = 1000000; -GN_heat.p_realCapacityAvailable = false; - -// Basic GN information -GN_heat.p_description = "Custom toegevoegde Warmtenet"; - -//Define node type -GN_heat.p_nodeType = OL_GridNodeType.HT; -GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - -//Define GN location -GN_heat.p_latitude = 0; -GN_heat.p_longitude = 0; -GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - -//Show warning that heat grid is not a simple solution -zero_Interface.f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import.", 0, 0); - -return GN_heat;</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1722253108626</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1722253115477</Id> - <Name>uI_Tabs</Name> - <X>40</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_Tabs</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1722253115479</Id> - <Name>zero_Interface</Name> - <X>160</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1753694295453</Id> - <Name>uI_EnergyHub</Name> - <X>310</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_EnergyHub</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1722253108632</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1722350093699</Id> - <Name>rect_genericFunctions</Name> - <X>10</X> - <Y>460</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-4144960</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>450</Width> - <Height>580</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722350093702</Id> - <Name>t_genericFunctions</Name> - <X>140</X> - <Y>480</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Generic Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>22</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1722253128676</Id> - <Name>gr_heatingSliders_default</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722253128678</Id> - <Name>rect_heatDemandSliders</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-6943</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722253128680</Id> - <Name>t_gasBurnerHouseholdsDescription</Name> - <X>30</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>HR ketel aardgas</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128682</Id> - <Name>t_hybridHeatPumpHouseholdsDescription</Name> - <X>30</X> - <Y>265</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hybride warmtepomp</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128684</Id> - <Name>t_electricHeatPumpHouseholdsDescription</Name> - <X>30</X> - <Y>290</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elek. warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128686</Id> - <Name>t_districtHeatingHouseholdsDescription</Name> - <X>30</X> - <Y>315</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Warmtenet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128688</Id> - <Name>t_electricHeatPumpHouseholds_pct</Name> - <X>235</X> - <Y>290</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricHeatPumpHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128690</Id> - <Name>t_gasBurnerHouseholds_pct</Name> - <X>235</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_gasBurnerHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128692</Id> - <Name>t_districtHeatingHouseholds_pct</Name> - <X>235</X> - <Y>315</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_districtHeatingHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128694</Id> - <Name>t_hybridHeatPumpHouseholds_pct</Name> - <X>235</X> - <Y>265</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_hybridHeatPumpHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128696</Id> - <Name>sl_districtHeatingHouseholds_pct</Name> - <X>265</X> - <Y>310</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>false</VisibleCode> - <Enabled>false</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128698</Id> - <Name>sl_gasBurnerHouseholds_pct</Name> - <X>265</X> - <Y>235</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.GAS_BURNER, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128700</Id> - <Name>sl_hybridHeatPumpHouseholds_pct</Name> - <X>265</X> - <Y>260</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>false</VisibleCode> - <Enabled>false</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128702</Id> - <Name>sl_electricHeatPumpHouseholds_pct</Name> - <X>265</X> - <Y>285</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_gasBurnerHouseholds_pct, sl_hybridHeatPumpHouseholds_pct, sl_electricHeatPumpHouseholds_pct, sl_districtHeatingHouseholds_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128704</Id> - <Name>sl_heatDemandReductionHouseholds_pct</Name> - <X>265</X> - <Y>200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), sl_heatDemandReductionHouseholds_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722253128706</Id> - <Name>t_heatDemandReductionHouseholds_pct</Name> - <X>235</X> - <Y>205</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandReductionHouseholds_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128708</Id> - <Name>t_heatDemandReductionHouseholdsDescription</Name> - <X>30</X> - <Y>205</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing warmte</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128710</Id> - <Name>t_householdsDescription</Name> - <X>20</X> - <Y>180</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huishoudens</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128712</Id> - <Name>sl_heatDemandReductionCompanies_pct</Name> - <X>265</X> - <Y>35</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), sl_heatDemandReductionCompanies_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722253128714</Id> - <Name>t_heatDemandReductionCompaniesDescription</Name> - <X>25</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing warmte</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128716</Id> - <Name>t_heatDemandReductionCompanies_pct</Name> - <X>235</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandReductionCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128718</Id> - <Name>t_gasBurnerCompaniesDescription</Name> - <X>25</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>HR ketel aardgas</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128720</Id> - <Name>t_hybridHeatPumpCompaniesDescription</Name> - <X>25</X> - <Y>100</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hybride warmtepomp</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128722</Id> - <Name>t_electricHeatPumpCompaniesDescription</Name> - <X>25</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elek. warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128724</Id> - <Name>t_districtHeatingCompaniesDescription</Name> - <X>25</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Warmtenet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722253128726</Id> - <Name>t_electricHeatPumpCompanies_pct</Name> - <X>235</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128728</Id> - <Name>t_gasBurnerCompanies_pct</Name> - <X>235</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_gasBurnerCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128730</Id> - <Name>t_districtHeatingCompanies_pct</Name> - <X>235</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_districtHeatingCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722253128732</Id> - <Name>t_hybridHeatPumpCompanies_pct</Name> - <X>235</X> - <Y>100</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_hybridHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128734</Id> - <Name>sl_districtHeatingCompanies_pct</Name> - <X>265</X> - <Y>145</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>false</VisibleCode> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128736</Id> - <Name>sl_gasBurnerCompanies_pct</Name> - <X>265</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.GAS_BURNER, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128738</Id> - <Name>sl_hybridHeatPumpCompanies_pct</Name> - <X>265</X> - <Y>95</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>false</VisibleCode> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722253128740</Id> - <Name>sl_electricHeatPumpCompanies_pct</Name> - <X>265</X> - <Y>120</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_gasBurnerCompanies_pct, sl_hybridHeatPumpCompanies_pct, sl_electricHeatPumpCompanies_pct, sl_districtHeatingCompanies_pct, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722254471242</Id> - <Name>t_companiesDescription</Name> - <X>20</X> - <Y>15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Bedrijven</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1746091940464</Id> - <Name>i_companyReduction</Name> - <X>170</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyReduction, zero_Interface.v_infoText.companyHeatDemandReduction, i_companyReduction.getX() + uI_Tabs.v_presentationXOffset, i_companyReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829752</Id> - <Name>i_companyGasBoiler</Name> - <X>170</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyGasBoiler, zero_Interface.v_infoText.companyGasBoiler, i_companyGasBoiler.getX() + uI_Tabs.v_presentationXOffset, i_companyGasBoiler.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829788</Id> - <Name>i_companyElectricHeatpump</Name> - <X>170</X> - <Y>125</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyElectricHeatpump, zero_Interface.v_infoText.companyElectricHeatpump, i_companyElectricHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_companyElectricHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829826</Id> - <Name>i_companyHybridHeatpump</Name> - <X>170</X> - <Y>100</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyHybridHeatpump, zero_Interface.v_infoText.companyHybridHeatpump, i_companyHybridHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_companyHybridHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829863</Id> - <Name>i_companyHeatGrid</Name> - <X>170</X> - <Y>150</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyHeatGrid, zero_Interface.v_infoText.companyHeatGrid, i_companyHeatGrid.getX() + uI_Tabs.v_presentationXOffset, i_companyHeatGrid.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829905</Id> - <Name>i_householdElectricHeatpump</Name> - <X>170</X> - <Y>290</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdElectricHeatpump, zero_Interface.v_infoText.householdElectricHeatpump, i_householdElectricHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_householdElectricHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829948</Id> - <Name>i_householdReduction</Name> - <X>170</X> - <Y>205</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdReduction, zero_Interface.v_infoText.householdHeatDemandReduction, i_householdReduction.getX() + uI_Tabs.v_presentationXOffset, i_householdReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092829986</Id> - <Name>i_householdGasBoiler</Name> - <X>170</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdGasBoiler, zero_Interface.v_infoText.householdGasBoiler, i_householdGasBoiler.getX() + uI_Tabs.v_presentationXOffset, i_householdGasBoiler.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092830024</Id> - <Name>i_householdHeatGrid</Name> - <X>170</X> - <Y>315</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHeatGrid, zero_Interface.v_infoText.householdHeatGrid, i_householdHeatGrid.getX() + uI_Tabs.v_presentationXOffset, i_householdHeatGrid.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746092830063</Id> - <Name>i_householdHybridHeatpump</Name> - <X>170</X> - <Y>265</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHybridHeatpump, zero_Interface.v_infoText.householdHybridHeatpump, i_householdHybridHeatpump.getX() + uI_Tabs.v_presentationXOffset, i_householdHybridHeatpump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Group> - <Id>1722326800106</Id> - <Name>gr_heatingSliders_businesspark</Name> - <X>800</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722326800108</Id> - <Name>rect_heatDemandSliders1</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-6943</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800142</Id> - <Name>sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct</Name> - <X>255</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReductionHeating( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.getValue());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722326800144</Id> - <Name>t_heatDemandReductionCompaniesDescription1</Name> - <X>15</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing warmte</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800146</Id> - <Name>t_heatDemandReductionCompanies_pct1</Name> - <X>225</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesHeatDemandReductionCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722326800148</Id> - <Name>t_gasBurnerCompaniesDescription1</Name> - <X>15</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>HR ketel aardgas</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800150</Id> - <Name>t_hybridHeatPumpCompaniesDescription1</Name> - <X>15</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hybride warmtepomp</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800152</Id> - <Name>t_electricHeatPumpCompaniesDescription1</Name> - <X>15</X> - <Y>140</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elek. warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800154</Id> - <Name>t_districtHeatingCompaniesDescription1</Name> - <X>15</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Warmtenet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722326800156</Id> - <Name>t_electricHeatPumpCompanies_pct1</Name> - <X>225</X> - <Y>140</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722326800158</Id> - <Name>t_gasBurnerCompanies_pct1</Name> - <X>225</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722326800160</Id> - <Name>t_districtHeatingCompanies_pct1</Name> - <X>225</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722326800162</Id> - <Name>t_hybridHeatPumpCompanies_pct1</Name> - <X>225</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800164</Id> - <Name>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct</Name> - <X>255</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.DISTRICTHEAT, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800166</Id> - <Name>sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct</Name> - <X>255</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.GAS_BURNER, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800168</Id> - <Name>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct</Name> - <X>255</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722326800170</Id> - <Name>sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct</Name> - <X>255</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsCompanies), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_heatDemandSlidersCompaniesGasBurnerCompanies_pct, sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesElectricHeatPumpCompanies_pct, sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct, null, sl_heatingTypeSlidersCompaniesCustom_pct ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722326800172</Id> - <Name>t_companiesDescription1</Name> - <X>10</X> - <Y>30</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Bedrijven</Text> - <Font> - <Name>Calibri</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1734371025574</Id> - <Name>t_eBoilerCompanies_pct</Name> - <X>225</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatDemandSlidersCompaniesEBoiler_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1734371025600</Id> - <Name>sl_heatDemandSlidersCompaniesEBoiler_pct</Name> - <X>255</X> - <Y>185</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isEnabled()</VisibleCode> - <Enabled>false</Enabled> - <ActionCode>traceln("Slider doet nog niets!!");//f_setHeatingSlidersCompanies(3); -//f_resetNeighborhoodHeatingSystems(4);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1734371025534</Id> - <Name>t_eBoilerCompaniesDescription</Name> - <X>15</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>E-boiler</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1746093187570</Id> - <Name>i_companyReduction_Company</Name> - <X>160</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyReduction_Company, zero_Interface.v_infoText.companyHeatDemandReduction, i_companyReduction_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyReduction_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187613</Id> - <Name>i_companyGasBoiler_Company</Name> - <X>160</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyGasBoiler_Company, zero_Interface.v_infoText.companyGasBoiler, i_companyGasBoiler_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyGasBoiler_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187656</Id> - <Name>i_companyElectricHeatpump_Company</Name> - <X>160</X> - <Y>140</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyElectricHeatpump_Company, zero_Interface.v_infoText.companyElectricHeatpump, i_companyElectricHeatpump_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyElectricHeatpump_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187698</Id> - <Name>i_companyHybridHeatpump_Company</Name> - <X>160</X> - <Y>115</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesHybridHeatPumpCompanies_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyHybridHeatpump_Company, zero_Interface.v_infoText.companyHybridHeatpump, i_companyHybridHeatpump_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyHybridHeatpump_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187741</Id> - <Name>i_companyHeatGrid_Company</Name> - <X>160</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesDistrictHeatingCompanies_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyHeatGrid_Company, zero_Interface.v_infoText.companyHeatGrid, i_companyHeatGrid_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyHeatGrid_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746093187784</Id> - <Name>i_companyEBoiler_Company</Name> - <X>160</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_heatDemandSlidersCompaniesEBoiler_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyEBoiler_Company, zero_Interface.v_infoText.companyElectricBoiler, i_companyEBoiler_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyEBoiler_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1754382990780</Id> - <Name>t_customHeatingTypeCompanies_pct</Name> - <X>225</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatingTypeSlidersCompaniesCustom_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_heatingTypeSlidersCompaniesCustom_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754382990782</Id> - <Name>sl_heatingTypeSlidersCompaniesCustom_pct</Name> - <X>255</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>false</Enabled> - <ActionCode>new RuntimeException("This slider action should not be called, this slider is purely for visualisation of the amount of custom heating types for companies");</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1754382990784</Id> - <Name>txt_customHeatingDemandCompaniesDescription</Name> - <X>15</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_heatingTypeSlidersCompaniesCustom_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Custom systeem</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1754382990787</Id> - <Name>i_companyCustomHeatingType_Company</Name> - <X>160</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_heatingTypeSlidersCompaniesCustom_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_companyCustomHeatingType_Company, zero_Interface.v_infoText.companyCustomHeating, i_companyCustomHeatingType_Company.getX() + uI_Tabs.v_presentationXOffset, i_companyCustomHeatingType_Company.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Rectangle> - <Id>1722335783989</Id> - <Name>rect_demandFunctions</Name> - <X>40</X> - <Y>510</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-8355840</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>390</Width> - <Height>120</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722335783991</Id> - <Name>txt_demandFunctionsDescription</Name> - <X>240</X> - <Y>520</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Demand Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1722338183031</Id> - <Name>rect_heatingFunctions</Name> - <X>40</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-5952982</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>390</Width> - <Height>150</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722338183033</Id> - <Name>txt_heatingFunctionsDescription</Name> - <X>130</X> - <Y>650</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heating Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Group> - <Id>1749738869813</Id> - <Name>gr_heatingSliders_residential</Name> - <X>400</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1749738869815</Id> - <Name>rect_heatDeandSlidersResidentialArea</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-6943</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1749738869817</Id> - <Name>t_householdGasBurnerDescriptionResidentialArea</Name> - <X>20</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdGasBurnerResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Gas brander</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1749738869821</Id> - <Name>t_householdElectricHeatPumpDescriptionResidentialArea</Name> - <X>20</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdElectricHeatPumpResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elec. warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1749738869823</Id> - <Name>t_householdElectricHeatPumpResidentialArea_pct</Name> - <X>230</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdElectricHeatPumpResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdElectricHeatPumpResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1749738869825</Id> - <Name>t_householdGasBurnerResidentialArea_pct</Name> - <X>230</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdGasBurnerResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdGasBurnerResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869829</Id> - <Name>sl_householdGasBurnerResidentialArea_pct</Name> - <X>260</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} - -f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.GAS_BURNER, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>100</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869833</Id> - <Name>sl_householdElectricHeatPumpResidentialArea_pct</Name> - <X>260</X> - <Y>100</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} - -f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869835</Id> - <Name>sl_householdHeatDemandReductionResidentialArea_pct</Name> - <X>260</X> - <Y>245</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_householdInsulation( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdHeatDemandReductionResidentialArea_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1749738869837</Id> - <Name>t_householdHeatDemandReductionResidentialArea_pct</Name> - <X>230</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdHeatDemandReductionResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdHeatDemandReductionResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1749738869839</Id> - <Name>t_householdHeatDemandReductionDescriptionResidentialArea</Name> - <X>20</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdHeatDemandReductionResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huizen met betere isolatie</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1749738869841</Id> - <Name>t_householdHeatingTypeDescriptionResidentialArea</Name> - <X>20</X> - <Y>30</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Heating & Cooling</Text> - <Font> - <Name>Calibri</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869843</Id> - <Name>sl_householdAircoResidentialArea_pct</Name> - <X>260</X> - <Y>216</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setAircos(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_householdAircoResidentialArea_pct.getValue() / 100.0);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>5</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1749738869845</Id> - <Name>t_householdAircoDescriptionResidentialArea</Name> - <X>20</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdAircoResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huizen met Airco</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1749738869847</Id> - <Name>t_householdAircoResidentialArea_pct</Name> - <X>230</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdAircoResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdAircoResidentialArea_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869849</Id> - <Name>cb_householdHTDistrictHeatingResidentialArea</Name> - <X>20</X> - <Y>130</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="135" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>if ( cb_householdHTDistrictHeatingResidentialArea.isSelected() ){ - sl_householdGasBurnerResidentialArea_pct.setValue(0, false); - sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_addDistrictHeatingToAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -else{ - sl_householdGasBurnerResidentialArea_pct.setValue(100, false); - sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="12" Style="0"/> - <LabelText>HT-Warmtenet</LabelText> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1749738869851</Id> - <Name>cb_householdLTDistrictHeatingResidentialArea</Name> - <X>20</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="185" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>if ( cb_householdLTDistrictHeatingResidentialArea.isSelected() ){ - sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); - sl_householdGasBurnerResidentialArea_pct.setValue(0, false); - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_addLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -else{ - sl_householdElectricHeatPumpResidentialArea_pct.setValue(0, false); - sl_householdGasBurnerResidentialArea_pct.setValue(100, false); - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="12" Style="0"/> - <LabelText>LT-Warmtenet</LabelText> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1752231559962</Id> - <Name>i_householdGasBurner</Name> - <X>180</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdGasBurnerResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdGasBurner, zero_Interface.v_infoText.householdGasBoiler, i_householdGasBurner.getX() + uI_Tabs.v_presentationXOffset, i_householdGasBurner.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231559982</Id> - <Name>i_householdHeatPump</Name> - <X>180</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdElectricHeatPumpResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHeatPump, zero_Interface.v_infoText.householdElectricHeatpump, i_householdHeatPump.getX() + uI_Tabs.v_presentationXOffset, i_householdHeatPump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231560000</Id> - <Name>i_householdHTDistrictHeating</Name> - <X>220</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_householdHTDistrictHeatingResidentialArea.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHTDistrictHeating, zero_Interface.v_infoText.householdHTDistrictHeating, i_householdHTDistrictHeating.getX() + uI_Tabs.v_presentationXOffset, i_householdHTDistrictHeating.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231560019</Id> - <Name>i_householdLTDistrictHeating</Name> - <X>220</X> - <Y>170</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_householdLTDistrictHeatingResidentialArea.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdLTDistrictHeating, zero_Interface.v_infoText.householdElectricHeatpump, i_householdLTDistrictHeating.getX() + uI_Tabs.v_presentationXOffset, i_householdLTDistrictHeating.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231560038</Id> - <Name>i_householdAirconditioning</Name> - <X>180</X> - <Y>220</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdAircoResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdAirconditioning, zero_Interface.v_infoText.householdAirconditioning, i_householdAirconditioning.getX() + uI_Tabs.v_presentationXOffset, i_householdAirconditioning.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1752231560056</Id> - <Name>i_householdAdditionalInsulation</Name> - <X>180</X> - <Y>250</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdHeatDemandReductionResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdAdditionalInsulation, zero_Interface.v_infoText.householdAdditionalInsulation, i_householdAdditionalInsulation.getX() + uI_Tabs.v_presentationXOffset, i_householdAdditionalInsulation.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Group> - <Id>1753951517102</Id> - <Name>gr_ptSlidersHouses</Name> - <X>200</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - </Group> - <Text> - <Id>1753949405477</Id> - <Name>t_rooftopPTHouses_pct</Name> - <X>230</X> - <Y>299</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_rooftopPTHouses_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_rooftopPTHouses_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1753949405484</Id> - <Name>sl_rooftopPTHouses_pct</Name> - <X>260</X> - <Y>294</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPTSystemHouses( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_rooftopPTHouses_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1753949405489</Id> - <Name>txt_rooftopPTHousesDescription</Name> - <X>20</X> - <Y>300</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_rooftopPTHouses_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Huizen met PT</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1753949405492</Id> - <Name>i_householdPT</Name> - <X>180</X> - <Y>298</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_rooftopPTHouses_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPT, zero_Interface.v_infoText.householdRooftopPT, i_householdPT.getX() + uI_Tabs.v_presentationXOffset, i_householdPT.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1760349016791</Id> - <Name>txt_householdHybridHeatpumpDescriptionResidentialArea</Name> - <X>20</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdHybridHeatpumpResidentialArea.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hybride warmtepomp</Text> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1760349016817</Id> - <Name>sl_householdHybridHeatpumpResidentialArea</Name> - <X>260</X> - <Y>75</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>if (cb_householdHTDistrictHeatingResidentialArea.isSelected()) { - cb_householdHTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeDistrictHeatingFromAllHouses(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} -if (cb_householdLTDistrictHeatingResidentialArea.isSelected()) { - cb_householdLTDistrictHeatingResidentialArea.setSelected(false, false); - f_removeLTDH(uI_Tabs.f_getActiveSliderGridConnections_houses()); -} - -f_setHeatingSliders( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), new ArrayList<GridConnection>(zero_Interface.c_orderedHeatingSystemsHouses), OL_GridConnectionHeatingType.HYBRID_HEATPUMP, sl_householdGasBurnerResidentialArea_pct, sl_householdHybridHeatpumpResidentialArea, sl_householdElectricHeatPumpResidentialArea_pct, null, null, null ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1760349016828</Id> - <Name>i_householdHybridHeatPump</Name> - <X>180</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_householdHybridHeatpumpResidentialArea.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdHybridHeatPump, zero_Interface.v_infoText.householdHybridHeatpump, i_householdHybridHeatPump.getX() + uI_Tabs.v_presentationXOffset, i_householdHybridHeatPump.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1760349443892</Id> - <Name>t_householdElectricHeatPumpResidentialArea_pct1</Name> - <X>230</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_householdHybridHeatpumpResidentialArea.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_householdHybridHeatpumpResidentialArea.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Group> - <Rectangle> - <Id>1755004749570</Id> - <Name>rect_districtHeatingFunctions</Name> - <X>40</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-65536</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>390</Width> - <Height>150</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1755004766095</Id> - <Name>txt_districtheatingFunctionsDescription</Name> - <X>160</X> - <Y>810</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>District Heating Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1755004809972</Id> - <Name>rect_heatingProductionFunctions</Name> - <X>40</X> - <Y>960</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16711936</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>390</Width> - <Height>70</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1755004834735</Id> - <Name>txt_heatingProductionFunctionsDescription</Name> - <X>160</X> - <Y>970</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>District Heating Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1722245324895</Id> - <Name>tabMobility</Name> - <AdditionalClassCode>// Default Sliders -public ShapeGroup getGr_mobilitySliders_default() { - return this.gr_mobilitySliders_default; -} - -//Residential sliders -public ShapeGroup getGr_mobilitySliders_residential() { - return this.gr_mobilitySliders_residential; -} - -public ShapeSlider getSliderMobilityDemandReduction_pct () { - return this.sl_mobilityDemandReduction_pct; -} - -public ShapeSlider getSliderElectricTrucks_pct() { - return this.sl_electricTrucks_pct; -} - -public ShapeSlider getSliderHydrogenTrucks_pct() { - return this.sl_hydrogenTrucks_pct; -} - -public ShapeSlider getSliderFossilFuelTrucks_pct() { - return this.sl_fossilFuelTrucks_pct; -} - -public ShapeSlider getSliderElectricVans_pct() { - return this.sl_electricVans_pct; -} - -public ShapeSlider getSliderFossilFuelVans_pct() { - return this.sl_fossilFuelVans_pct; -} - -public ShapeSlider getSliderElectricCars_pct() { - return this.sl_electricCars_pct; -} - -public ShapeSlider getSliderFossilFuelCars_pct() { - return this.sl_fossilFuelCars_pct; -} - -public ShapeSlider getSl_privateEVsResidentialArea_pct(){ - return this.sl_privateEVsResidentialArea_pct; -} - -public ShapeSlider getSl_publicChargersResidentialArea_pct(){ - return this.sl_publicChargersResidentialArea_pct; -} -</AdditionalClassCode> - <Folder>1754045642067</Folder> - <Import>import org.apache.commons.lang3.tuple.Triple; -import java.util.stream.Collectors;</Import> - <ExtendsReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>tabArea</ClassName> - </ExtendsReference> - <Generic>false</Generic> - <GenericParameter> - <Id>1722245324901</Id> - <Name>1722245324901</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089976</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1722326400000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1722245324898</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1722245324902</CurrentLevel> - <ConnectionsId>1722245324896</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1729167973194</Id> - <Name>v_totalNumberOfGhostVehicle_Trucks</Name> - <X>40</X> - <Y>1140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1729168015819</Id> - <Name>v_totalNumberOfGhostVehicle_Vans</Name> - <X>40</X> - <Y>1120</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1729168016768</Id> - <Name>v_totalNumberOfGhostVehicle_Cars</Name> - <X>40</X> - <Y>1100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722256088443</Id> - <Name>f_setVehicleSliders</Name> - <Description>Function that calculates the values of the other sliders and sets them without calling an action. Takes as parameters the index of the slider which should not be touched as well as all the slider objects. HydrogenVehicle slider is optional and an argument of null can be passed. </Description> - <X>70</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>sliderIndex</Name> - <Type>int</Type> - </Parameter> - <Parameter> - <Name>electricSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>hydrogenSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>fossilFuelSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pct_electric = electricSlider.getValue(); -double pct_hydrogen = 0; -double pct_fossilFuel = fossilFuelSlider.getValue(); -if (hydrogenSlider != null) { - pct_hydrogen = hydrogenSlider.getValue(); -} - - -//Set array with pct values -double pctArray[]={pct_electric, pct_hydrogen, pct_fossilFuel}; -double pctExcess = Arrays.stream(pctArray).sum() - 100; -for (int i = 0; i<pctArray.length; i++){ - if (!(i==(int)sliderIndex)) { - pctArray[i] = max(0,pctArray[i] - pctExcess); - pctExcess = Arrays.stream(pctArray).sum() - 100; - } -} -if (pctExcess != 0) { - traceln("Sliders don't add up to 100%!"); -} - -//Set Sliders -electricSlider.setValue(pctArray[0], false); -if (hydrogenSlider != null) { - hydrogenSlider.setValue(pctArray[1], false); -} -fossilFuelSlider.setValue(pctArray[2], false); - -/* -double pct_fossilFuel = fossilFuelSlider.getValue(); -double pct_electric = electricSlider.getValue(); -double pct_hydrogen = 0; -if (hydrogenSlider != null) { - pct_hydrogen = hydrogenSlider.getValue(); -} - - -//Set array with pct values -double pctArray[]={pct_fossilFuel, pct_electric, pct_hydrogen}; -double pctExcess = Arrays.stream(pctArray).sum() - 100; -for (int i = 0; i<pctArray.length; i++){ - if (!(i==(int)sliderIndex)) { - pctArray[i] = max(0,pctArray[i] - pctExcess); - pctExcess = Arrays.stream(pctArray).sum() - 100; - } -} -if (pctExcess != 0) { - traceln("Sliders don't add up to 100%!"); -} - -//Set Sliders -fossilFuelSlider.setValue(pctArray[0], false); -electricSlider.setValue(pctArray[1], false); -if (hydrogenSlider != null) { - hydrogenSlider.setValue(pctArray[2], false); -} -*/</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1722342449665</Id> - <Name>f_setDemandReduction</Name> - <Description>Function that reduces the distance of all triptrackers of vehicles. Takes as arguments a list of GridConnections to effect and a percentage to reduce by compared to the default distance value of the triptrackers.</Description> - <X>70</X> - <Y>600</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>demandReduction_pct</Name> - <Type>double</Type> - </Parameter> - <Body>// TODO: when new triptrackers are created, for example in the company ui sliders, -// make sure they have this distance scaling fraction! - -double scalingFactor = 1 - demandReduction_pct/100; - -for (GridConnection gc : gcList) { - for (J_EAVehicle j_ea : gc.c_vehicleAssets) { - j_ea.getTripTracker().distanceScaling_fr = scalingFactor; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Triple<Integer, Integer, Integer></ReturnType> - <Id>1729168033110</Id> - <Name>f_calculateNumberOfGhostVehicles</Name> - <X>20</X> - <Y>1080</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>Integer numberOfGhostVehicle_Cars = 0; -Integer numberOfGhostVehicle_Vans = 0; -Integer numberOfGhostVehicle_Trucks = 0; - -for (GridConnection gc : gcList ) { - if(gc.v_hasQuarterHourlyValues && gc.v_isActive){ - numberOfGhostVehicle_Cars += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVCars(); - numberOfGhostVehicle_Vans += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVVans(); - numberOfGhostVehicle_Trucks += zero_Interface.c_scenarioMap_Current.get(gc.p_uid).getCurrentEVTrucks(); - } -} - - -return Triple.of(numberOfGhostVehicle_Cars, numberOfGhostVehicle_Vans, numberOfGhostVehicle_Trucks);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1746008458894</Id> - <Name>f_setDieselTrucks</Name> - <X>70</X> - <Y>770</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctDieselTrucksGoal = sliderFossilFuelTrucks.getValue(); - -int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); - -int nbEtruckCurrent = triple.getLeft(); -int nbHydrogentrucksCurrent = triple.getMiddle(); -int nbDieseltrucksCurrent = triple.getRight(); -int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; - -int nbDieselTrucksGoal = roundToInt(total_vehicles*pctDieselTrucksGoal/100.0); -boolean finishedLookingThroughElectricTrucks = false; - -if (nbDieseltrucksCurrent < nbDieselTrucksGoal) { - // Add Diesel Trucks - while ( nbDieseltrucksCurrent < nbDieselTrucksGoal ) { - if ( nbEtruckCurrent > numberOfGhostVehicle_Trucks && !finishedLookingThroughElectricTrucks ) { - // replace electric truck with a diesel truck - if (!f_electricToDieselTruck(gcList)) { - finishedLookingThroughElectricTrucks = true; - } - else { - nbDieseltrucksCurrent++; - nbEtruckCurrent--; - } - } - else{// ( nbHydrogentrucksCurrent > 0 ) { - // replace hydrogen truck with diesel truck - if (!f_hydrogenToDieselTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbDieseltrucksCurrent++; - nbHydrogentrucksCurrent--; - } - /* - else { - throw new RuntimeException("Can not add another diesel vehicle as there are no other vehicles to replace."); - } - */ - } -} -else { - // Remove Diesel Trucks - while ( nbDieseltrucksCurrent > nbDieselTrucksGoal ) { - // replace a diesel truck with an electric truck - if (!f_dieselToElectricTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbDieseltrucksCurrent--; - nbEtruckCurrent++; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1746008458907</Id> - <Name>f_setHydrogenTrucks</Name> - <X>70</X> - <Y>790</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctHydrogenTrucksGoal = sliderHydrogenTrucks.getValue(); - -int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); - -int nbEtruckCurrent = triple.getLeft(); -int nbHydrogentrucksCurrent = triple.getMiddle(); -int nbDieseltrucksCurrent = triple.getRight(); -int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; - -int nbHydrogenTrucksGoal = roundToInt(total_vehicles*pctHydrogenTrucksGoal/100.0); -boolean finishedLookingThroughDieselTrucks = false; - -if (nbHydrogentrucksCurrent < nbHydrogenTrucksGoal) { - // Add Hydrogen Trucks - while ( nbHydrogentrucksCurrent < nbHydrogenTrucksGoal && !finishedLookingThroughDieselTrucks ) { - if ( nbDieseltrucksCurrent > 0 ) { - // replace a diesel truck with a hydrogen truck - if (!f_dieselToHydrogenTruck(gcList)) { - finishedLookingThroughDieselTrucks = true; - } - else { - nbHydrogentrucksCurrent++; - nbDieseltrucksCurrent--; - } - } - else{// ( nbEtruckCurrent > v_totalNumberOfGhostVehicle_Trucks ) { - // replace an electric truck with a hydrogen truck - if (!f_electricToHydrogenTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbHydrogentrucksCurrent++; - nbEtruckCurrent--; - } - /*else { - throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); - }*/ - } -} -else { - // Remove Hydrogen Trucks - while ( nbHydrogentrucksCurrent > nbHydrogenTrucksGoal ) { - // replace a hydrogen truck with a diesel truck - if (!f_hydrogenToDieselTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbHydrogentrucksCurrent--; - nbDieseltrucksCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1746008458917</Id> - <Name>f_setElectricTrucks</Name> - <X>70</X> - <Y>810</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctElectricTrucksGoal = sliderElectricTrucks.getValue(); - -int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfTrucks( gcList, numberOfGhostVehicle_Trucks ); - -int nbEtruckCurrent = triple.getLeft(); -int nbHydrogentrucksCurrent = triple.getMiddle(); -int nbDieseltrucksCurrent = triple.getRight(); -int total_vehicles = nbEtruckCurrent + nbHydrogentrucksCurrent + nbDieseltrucksCurrent; - -int nbElectricTrucksGoal = roundToInt(total_vehicles*pctElectricTrucksGoal/100.0); -boolean finishedLookingThroughDieselTrucks = false; - -if (nbEtruckCurrent < nbElectricTrucksGoal) { - // Add Electric Trucks - while ( nbEtruckCurrent < nbElectricTrucksGoal && !finishedLookingThroughDieselTrucks ) { - if ( nbDieseltrucksCurrent > 0 ) { - // replace a diesel truck with an electric truck - if (!f_dieselToElectricTruck(gcList)) { - finishedLookingThroughDieselTrucks = true; - } - else { - nbEtruckCurrent++; - nbDieseltrucksCurrent--; - } - } - else{// if ( nbHydrogentrucksCurrent > 0 ) { - // replace a hydrogen truck with an electric truck - if (!f_hydrogenToElectricTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbEtruckCurrent++; - nbHydrogentrucksCurrent--; - } - /*else { - throw new RuntimeException("Can not add another hydrogen vehicle as there are no other vehicles to replace."); - } - */ - } -} -else { - // Remove Electric Trucks - while ( nbEtruckCurrent > nbElectricTrucksGoal ) { - // replace an electric truck with a diesel truck - if (!f_electricToDieselTruck(gcList)) { - f_setTruckSlidersToCurrentEngineState(gcList, sliderElectricTrucks, sliderHydrogenTrucks, sliderFossilFuelTrucks); - return; - } - nbEtruckCurrent--; - nbDieseltrucksCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458938</Id> - <Name>f_dieselToElectricTruck</Name> - <X>360</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EADieselVehicle dieselTruck = null; -boolean foundAdditionalVehicle = false; - -// find the diesel truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); - if ( dieselTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselTruck!=null) { - GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; - boolean available = dieselTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselTruck); - dieselTruck.removeEnergyAsset(); - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); - electricTruck.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricTruck); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricTruck); - } -} - -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458950</Id> - <Name>f_hydrogenToElectricTruck</Name> - <X>360</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAHydrogenVehicle hydrogenTruck = null; -boolean foundAdditionalVehicle = false; - -// find the hydrogen truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); - if ( hydrogenTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (hydrogenTruck!=null) { - GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; - boolean available = true; - available = hydrogenTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenTruck); - hydrogenTruck.removeEnergyAsset(); - - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricTruck = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_TRUCK, tripTracker); - electricTruck.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricTruck); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricTruck); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458960</Id> - <Name>f_electricToHydrogenTruck</Name> - <X>360</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAEV electricTruck = null; -boolean foundAdditionalVehicle = false; - -// find the electric truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - electricTruck = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); - if ( electricTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicle -if (!foundAdditionalVehicle) { - electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (electricTruck!=null) { - GridConnection gc = (GridConnection)electricTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; - boolean available = true; - available = electricTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricTruck); - electricTruck.removeEnergyAsset(); - - // Re-add hydrogen vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); - hydrogenVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(hydrogenVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458968</Id> - <Name>f_dieselToHydrogenTruck</Name> - <X>360</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EADieselVehicle dieselTruck = null; -boolean foundAdditionalVehicle = false; - -// find the diesel truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); - if ( dieselTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselTruck = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselTruck!=null) { - GridConnection gc = (GridConnection)dieselTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = dieselTruck.tripTracker; - boolean available = true; - available = dieselTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselTruck); - dieselTruck.removeEnergyAsset(); - - // Re-add hydrogen vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.HYDROGEN_TRUCK, tripTracker); - hydrogenVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(hydrogenVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458977</Id> - <Name>f_electricToDieselTruck</Name> - <X>360</X> - <Y>840</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAEV electricTruck = null; -boolean foundAdditionalVehicle = false; - -// find the electric truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - electricTruck = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); - if ( electricTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - electricTruck = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( electricTruck != null ) { - GridConnection gc = (GridConnection)electricTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = electricTruck.tripTracker; - boolean available = true; - available = electricTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricTruck); - electricTruck.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1746008458987</Id> - <Name>f_hydrogenToDieselTruck</Name> - <X>360</X> - <Y>860</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAHydrogenVehicle hydrogenTruck = null; -boolean foundAdditionalVehicle = false; - -// find the hydrogen truck to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); - if ( hydrogenTruck != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - hydrogenTruck = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( hydrogenTruck != null ) { - GridConnection gc = (GridConnection)hydrogenTruck.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = hydrogenTruck.tripTracker; - boolean available = true; - available = hydrogenTruck.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenTruck); - hydrogenTruck.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_TRUCK, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is a hydrogen truck left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1746018501114</Id> - <Name>f_setTruckSlidersToCurrentEngineState</Name> - <X>360</X> - <Y>1040</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelTrucks</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); -for (GridConnection gc : gcList) { - if (gc.v_isActive) { - vehicles.addAll(gc.c_vehicleAssets); - } -} - -int numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); - -int nbElectricTrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Trucks; -int nbDieseltrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); -int nbHydrogentrucksCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); - -int totalVehicles = nbElectricTrucksCurrent + nbDieseltrucksCurrent + nbHydrogentrucksCurrent; - - - -int pct_electricTruckSlider = roundToInt(100.0*nbElectricTrucksCurrent/totalVehicles); -int pct_hydrogenTruckSlider = roundToInt(100.0*nbHydrogentrucksCurrent/totalVehicles); -int pct_dieselTruckSlider = roundToInt(100.0*nbDieseltrucksCurrent/totalVehicles); - -sliderElectricTrucks.setValue(pct_electricTruckSlider, false); -if ( sliderHydrogenTrucks != null ) { - sliderHydrogenTrucks.setValue(pct_hydrogenTruckSlider, false); -} -else if ( sliderHydrogenTrucks == null && pct_hydrogenTruckSlider != 0 ) { - throw new RuntimeException("Hydrogen trucks found but no hydrogen slider passed to f_setTruckSlidersToCurrentEngineState"); -}sliderFossilFuelTrucks.setValue(pct_dieselTruckSlider, false); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Triple<Integer, Integer, Integer></ReturnType> - <Id>1749134655530</Id> - <Name>f_calculateCurrentNumberOfTrucks</Name> - <X>20</X> - <Y>1040</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>numberOfGhostVehicle_Trucks</Name> - <Type>Integer</Type> - </Parameter> - <Body>if (numberOfGhostVehicle_Trucks == null) { - numberOfGhostVehicle_Trucks = f_calculateNumberOfGhostVehicles(gcList).getRight(); -} - -int nbEtruckCurrent = numberOfGhostVehicle_Trucks; -int nbHydrogenTrucksCurrent = 0; -int nbDieselTrucksCurrent = 0; -for ( GridConnection gc : gcList ) { - nbEtruckCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK && !(gc instanceof GCPublicCharger) && gc.v_isActive); - nbHydrogenTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK && gc.v_isActive); - nbDieselTrucksCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK && gc.v_isActive); -} - -return Triple.of(nbEtruckCurrent, nbHydrogenTrucksCurrent, nbDieselTrucksCurrent);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1749645625091</Id> - <Name>f_dieselToElectricVan</Name> - <X>590</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EADieselVehicle dieselVan = null; -boolean foundAdditionalVehicle = false; - -// find the diesel van to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - dieselVan = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); - if ( dieselVan != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselVan = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselVan!=null) { - GridConnection gc = (GridConnection)dieselVan.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = dieselVan.tripTracker; - boolean available = dieselVan.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVan); - dieselVan.removeEnergyAsset(); - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerVan_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageVan_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricVan = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VAN, tripTracker); - electricVan.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricVan); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricVan); - } -} - -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel van left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1749645629101</Id> - <Name>f_electricToDieselVan</Name> - <X>590</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAEV electricVan = null; -boolean foundAdditionalVehicle = false; - -// find the electric van to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - electricVan = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN); - if ( electricVan != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - electricVan = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( electricVan != null ) { - GridConnection gc = (GridConnection)electricVan.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = electricVan.tripTracker; - boolean available = true; - available = electricVan.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricVan); - electricVan.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VAN, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric van left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1749646233660</Id> - <Name>f_dieselToElectricCar</Name> - <X>590</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EADieselVehicle dieselCar = null; -boolean foundAdditionalVehicle = false; - -// find the diesel car to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - dieselCar = (J_EADieselVehicle)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); - if ( dieselCar != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - dieselCar = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if (dieselCar!=null) { - GridConnection gc = (GridConnection)dieselCar.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = dieselCar.tripTracker; - boolean available = dieselCar.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselCar); - dieselCar.removeEnergyAsset(); - - // Re-add Electric vehicle - double capacityElectric_kW = zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerCar_kW; - double storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageCar_kWh; - double initialStateOfCharge_fr = 1.0; - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; - double vehicleScalingElectric = 1.0; - J_EAEV electricCar = new J_EAEV(gc, capacityElectric_kW, storageCapacity_kWh, initialStateOfCharge_fr, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, vehicleScalingElectric, OL_EnergyAssetType.ELECTRIC_VEHICLE, tripTracker); - electricCar.available = available; - - zero_Interface.c_orderedVehicles.add(0, electricCar); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(electricCar); - } -} - -else { - return false; - //throw new RuntimeException("Numbers suggest there is a diesel car left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1749646235580</Id> - <Name>f_electricToDieselCar</Name> - <X>590</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>J_EAEV electricCar = null; -boolean foundAdditionalVehicle = false; - -// find the electric car to remove, search through additional vehicles first -for (GridConnection gc : gcList ) { - if(gc instanceof GCUtility && gc.v_isActive){ - electricCar = (J_EAEV)findFirst(zero_Interface.c_additionalVehicles.get(gc.p_uid), p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); - if ( electricCar != null ) { - foundAdditionalVehicle = true; - break; - } - } -} - -// if no additional vehicle was found, search through the regular ordering of vehicles -if (!foundAdditionalVehicle) { - electricCar = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && ((GridConnection)p.getParentAgent()).v_isActive && gcList.contains((GridConnection)p.getParentAgent())); -} -if ( electricCar != null ) { - GridConnection gc = (GridConnection)electricCar.getParentAgent(); - - J_ActivityTrackerTrips tripTracker = electricCar.tripTracker; - boolean available = true; - available = electricCar.getAvailability(); - zero_Interface.c_orderedVehicles.remove(electricCar); - electricCar.removeEnergyAsset(); - - // Re-add diesel vehicle - double energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - double vehicleScaling = 1.0; - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(gc, energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, vehicleScaling, OL_EnergyAssetType.DIESEL_VEHICLE, tripTracker); - dieselVehicle.available = available; - - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - - //check if was additional vehicle in companyUI, if so: add to collection - if(foundAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(gc.p_uid).add(dieselVehicle); - } -} -else { - return false; - //throw new RuntimeException("Numbers suggest there is an electric car left, but could not find it."); -} - -return true;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Triple<Integer, Integer, Integer></ReturnType> - <Id>1749655535164</Id> - <Name>f_calculateCurrentNumberOfVans</Name> - <X>20</X> - <Y>1020</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>numberOfGhostVehicle_Vans</Name> - <Type>Integer</Type> - </Parameter> - <Body>if (numberOfGhostVehicle_Vans == null) { - numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -} - -int nbEVansCurrent = numberOfGhostVehicle_Vans; -int nbHydrogenVansCurrent = 0; -int nbDieselVansCurrent = 0; -for ( GridConnection gc : gcList ) { - nbEVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(gc instanceof GCPublicCharger) && gc.v_isActive); - nbHydrogenVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN && gc.v_isActive); - nbDieselVansCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN && gc.v_isActive); -} - -return Triple.of(nbEVansCurrent, nbHydrogenVansCurrent, nbDieselVansCurrent);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Triple<Integer, Integer, Integer></ReturnType> - <Id>1749655667960</Id> - <Name>f_calculateCurrentNumberOfCars</Name> - <X>20</X> - <Y>1000</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>numberOfGhostVehicle_Cars</Name> - <Type>Integer</Type> - </Parameter> - <Body>if (numberOfGhostVehicle_Cars == null) { - numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -} - -int nbEVsCurrent = numberOfGhostVehicle_Cars; -int nbHydrogenCarsCurrent = 0; -int nbDieselCarsCurrent = 0; -for ( GridConnection gc : gcList ) { - nbEVsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(gc instanceof GCPublicCharger) && gc.v_isActive); - nbHydrogenCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE && gc.v_isActive); - nbDieselCarsCurrent += count(gc.c_vehicleAssets, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE && gc.v_isActive); -} - -return Triple.of(nbEVsCurrent, nbHydrogenCarsCurrent, nbDieselCarsCurrent);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749655752858</Id> - <Name>f_setDieselVans</Name> - <X>70</X> - <Y>840</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctDieselVansGoal = sliderFossilFuelVans.getValue(); - -int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); - -int nbEvanCurrent = triple.getLeft(); -int nbDieselvansCurrent = triple.getRight(); - -int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; - -int nbDieselVansGoal = roundToInt(total_vehicles*pctDieselVansGoal/100.0); - -if (nbDieselvansCurrent < nbDieselVansGoal) { - // Add Diesel Vans - while ( nbDieselvansCurrent < nbDieselVansGoal ) { - if ( nbEvanCurrent > numberOfGhostVehicle_Vans ) { - // replace electric van with a diesel van - if (!f_electricToDieselVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - else { - nbDieselvansCurrent++; - nbEvanCurrent--; - } - } - } -} -else { - // Remove Diesel Vans - while ( nbDieselvansCurrent > nbDieselVansGoal ) { - // replace a diesel van with an electric van - if (!f_dieselToElectricVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - nbDieselvansCurrent--; - nbEvanCurrent++; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749656346356</Id> - <Name>f_setElectricVans</Name> - <X>70</X> - <Y>860</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctElectricVansGoal = sliderElectricVans.getValue(); - -int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfVans( gcList, numberOfGhostVehicle_Vans ); - -int nbEvanCurrent = triple.getLeft(); -int nbDieselvansCurrent = triple.getRight(); - -int total_vehicles = nbEvanCurrent + nbDieselvansCurrent; - -int nbElectricVansGoal = roundToInt(total_vehicles*pctElectricVansGoal/100.0); - -if (nbEvanCurrent < nbElectricVansGoal) { - // Add Electric Vans - while ( nbEvanCurrent < nbElectricVansGoal ) { - if ( nbDieselvansCurrent > 0 ) { - // replace a diesel van with an electric van - if (!f_dieselToElectricVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - else { - nbEvanCurrent++; - nbDieselvansCurrent--; - } - } - } -} -else { - // Remove Electric Vans - while ( nbEvanCurrent > nbElectricVansGoal ) { - // replace an electric van with a diesel van - if (!f_electricToDieselVan(gcList)) { - f_setVanSlidersToCurrentEngineState(gcList, sliderElectricVans, null, sliderFossilFuelVans); - return; - } - nbEvanCurrent--; - nbDieselvansCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749717776391</Id> - <Name>f_setDieselCars</Name> - <X>70</X> - <Y>890</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctDieselCarsGoal = sliderFossilFuelCars.getValue(); - -int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); - -int nbEcarCurrent = triple.getLeft(); -int nbDieselcarsCurrent = triple.getRight(); - -int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; - -int nbDieselCarsGoal = roundToInt(total_vehicles*pctDieselCarsGoal/100.0); - -if (nbDieselcarsCurrent < nbDieselCarsGoal) { - // Add Diesel Cars - while ( nbDieselcarsCurrent < nbDieselCarsGoal ) { - if ( nbEcarCurrent > numberOfGhostVehicle_Cars ) { - // replace electric car with a diesel car - if (!f_electricToDieselCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - else { - nbDieselcarsCurrent++; - nbEcarCurrent--; - } - } - } -} -else { - // Remove Diesel Cars - while ( nbDieselcarsCurrent > nbDieselCarsGoal ) { - // replace a diesel car with an electric car - if (!f_dieselToElectricCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - nbDieselcarsCurrent--; - nbEcarCurrent++; - } -} - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749717779317</Id> - <Name>f_setElectricCars</Name> - <X>70</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>double pctElectricCarsGoal = sliderElectricCars.getValue(); - -int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getMiddle(); -Triple<Integer, Integer, Integer> triple = f_calculateCurrentNumberOfCars( gcList, numberOfGhostVehicle_Cars ); - -int nbEcarCurrent = triple.getLeft(); -int nbDieselcarsCurrent = triple.getRight(); - -int total_vehicles = nbEcarCurrent + nbDieselcarsCurrent; - -int nbElectricCarsGoal = roundToInt(total_vehicles*pctElectricCarsGoal/100.0); - -if (nbEcarCurrent < nbElectricCarsGoal) { - // Add Electric Cars - while ( nbEcarCurrent < nbElectricCarsGoal ) { - if ( nbDieselcarsCurrent > 0 ) { - // replace a diesel car with an electric car - if (!f_dieselToElectricCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - else { - nbEcarCurrent++; - nbDieselcarsCurrent--; - } - } - } -} -else { - // Remove Electric Cars - while ( nbEcarCurrent > nbElectricCarsGoal ) { - // replace an electric car with a diesel car - if (!f_electricToDieselCar(gcList)) { - f_setCarSlidersToCurrentEngineState(gcList, sliderElectricCars, null, sliderFossilFuelCars); - return; - } - nbEcarCurrent--; - nbDieselcarsCurrent++; - } -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749717909708</Id> - <Name>f_setVanSlidersToCurrentEngineState</Name> - <X>360</X> - <Y>1020</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelVans</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); -for (GridConnection gc : gcList) { - if (gc.v_isActive) { - vehicles.addAll(gc.c_vehicleAssets); - } -} - -int numberOfGhostVehicle_Vans = f_calculateNumberOfGhostVehicles(gcList).getRight(); - -int nbElectricVansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Vans; -int nbDieselvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); -int nbHydrogenvansCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); - -int totalVehicles = nbElectricVansCurrent + nbDieselvansCurrent + nbHydrogenvansCurrent; - - - -int pct_electricVanSlider = roundToInt(100.0*nbElectricVansCurrent/totalVehicles); -int pct_hydrogenVanSlider = roundToInt(100.0*nbHydrogenvansCurrent/totalVehicles); -int pct_dieselVanSlider = roundToInt(100.0*nbDieselvansCurrent/totalVehicles); - -sliderElectricVans.setValue(pct_electricVanSlider, false); -if ( sliderHydrogenVans != null ) { - sliderHydrogenVans.setValue(pct_hydrogenVanSlider, false); -} -else if ( sliderHydrogenVans == null && pct_hydrogenVanSlider != 0 ) { - throw new RuntimeException("Hydrogen vans found but no hydrogen slider passed to f_setVanSlidersToCurrentEngineState"); -} -sliderFossilFuelVans.setValue(pct_dieselVanSlider, false); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749717987139</Id> - <Name>f_setCarSlidersToCurrentEngineState</Name> - <X>360</X> - <Y>1000</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>sliderElectricCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderHydrogenCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>sliderFossilFuelCars</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>List<J_EAVehicle> vehicles = new ArrayList<J_EAVehicle>(); -for (GridConnection gc : gcList) { - if (gc.v_isActive) { - vehicles.addAll(gc.c_vehicleAssets); - } -} - -int numberOfGhostVehicle_Cars = f_calculateNumberOfGhostVehicles(gcList).getRight(); - -int nbElectricCarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !(p.getParentAgent() instanceof GCPublicCharger)) + numberOfGhostVehicle_Cars; -int nbDieselcarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); -int nbHydrogencarsCurrent = count(vehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); - -int totalVehicles = nbElectricCarsCurrent + nbDieselcarsCurrent + nbHydrogencarsCurrent; - - - -int pct_electricCarSlider = roundToInt(100.0*nbElectricCarsCurrent/totalVehicles); -int pct_hydrogenCarSlider = roundToInt(100.0*nbHydrogencarsCurrent/totalVehicles); -int pct_dieselCarSlider = roundToInt(100.0*nbDieselcarsCurrent/totalVehicles); - -sliderElectricCars.setValue(pct_electricCarSlider, false); -if ( sliderHydrogenCars != null ) { - sliderHydrogenCars.setValue(pct_hydrogenCarSlider, false); -} -else if ( sliderHydrogenCars == null && pct_hydrogenCarSlider != 0 ) { - throw new RuntimeException("Hydrogen cars found but no hydrogen slider passed to f_setCarSlidersToCurrentEngineState"); -} -sliderFossilFuelCars.setValue(pct_dieselCarSlider, false); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754928402690</Id> - <Name>f_updateSliders_Mobility</Name> - <X>-350</X> - <Y>40</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>Triple<Integer, Integer, Integer> triple = f_calculateNumberOfGhostVehicles( new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_utilities()) ); -v_totalNumberOfGhostVehicle_Cars = triple.getLeft(); -v_totalNumberOfGhostVehicle_Vans = triple.getMiddle(); -v_totalNumberOfGhostVehicle_Trucks = triple.getRight(); - - -if(gr_mobilitySliders_default.isVisible()){ - f_updateMobilitySliders_default(); -} -else if(gr_mobilitySliders_residential.isVisible()){ - f_updateMobilitySliders_residential(); -} -else{ - f_updateMobilitySliders_custom(); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754928402694</Id> - <Name>f_updateMobilitySliders_default</Name> - <X>-330</X> - <Y>60</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GridConnection> allConsumerGridConnections = uI_Tabs.f_getActiveSliderGridConnections_consumption(); - -////Savings -double totalBaseTravelDistance_km = 0; -double totalSavedTravelDistance_km = 0; -for(GridConnection GC : allConsumerGridConnections){ - if(GC.v_isActive){ - for(J_ActivityTrackerTrips tripTracker : GC.c_tripTrackers){ - totalBaseTravelDistance_km += tripTracker.getAnnualDistance_km(); - totalSavedTravelDistance_km += (1-tripTracker.getDistanceScaling_fr())*tripTracker.getAnnualDistance_km(); - } - } -} - -double mobilitySavings_pct = totalBaseTravelDistance_km > 0 ? (totalSavedTravelDistance_km/totalBaseTravelDistance_km * 100) : 0; -sl_mobilityDemandReduction_pct.setValue(roundToInt(mobilitySavings_pct), false); - - -//Smart charging -boolean smartCharging = false; -for(GridConnection GC : allConsumerGridConnections){ - if(GC.c_electricVehicles.size() > 0 && GC.f_getCurrentChargingType() != OL_ChargingAttitude.SIMPLE){ - smartCharging = true; - break; - } -} -cb_spreadChargingEVs.setSelected(smartCharging, false); - - -////Vehicles -// Initialize the vehicle counters -int DieselCars = 0; -int ElectricCars = v_totalNumberOfGhostVehicle_Cars; -int HydrogenCars = 0; - -int DieselVans = 0; -int ElectricVans = v_totalNumberOfGhostVehicle_Vans; -int HydrogenVans = 0; - -int DieselTrucks = 0; -int ElectricTrucks = v_totalNumberOfGhostVehicle_Trucks; -int HydrogenTrucks = 0; - -//Count the amount of vehicles for each type -for (GridConnection gc : allConsumerGridConnections) { - if(gc.v_isActive){ - for (J_EAVehicle vehicle : gc.c_vehicleAssets) { - if (vehicle instanceof J_EADieselVehicle){ - switch(vehicle.getEAType()){ - case DIESEL_VEHICLE: - DieselCars += 1; - break; - case DIESEL_VAN: - DieselVans += 1; - break; - case DIESEL_TRUCK: - DieselTrucks += 1; - break; - } - } - else if (vehicle instanceof J_EAEV){ - switch(vehicle.getEAType()){ - case ELECTRIC_VEHICLE: - ElectricCars += 1; - break; - case ELECTRIC_VAN: - ElectricVans += 1; - break; - case ELECTRIC_TRUCK: - ElectricTrucks += 1; - break; - } - } - else if (vehicle instanceof J_EAHydrogenVehicle){ - switch(vehicle.getEAType()){ - case HYDROGEN_VEHICLE: - HydrogenCars += 1; - break; - case HYDROGEN_VAN: - HydrogenVans += 1; - break; - case HYDROGEN_TRUCK: - HydrogenTrucks += 1; - break; - } - } - } - } -} - - -//Set CAR sliders -int totalCars = DieselCars + ElectricCars + HydrogenCars; -int DieselCars_pct = 0; -int ElectricCars_pct = 0; -int HydrogenCars_pct = 0; -if (totalCars != 0) { - DieselCars_pct = roundToInt((100.0 * DieselCars) / totalCars); - ElectricCars_pct = roundToInt((100.0 * ElectricCars) / totalCars); - HydrogenCars_pct = roundToInt((100.0 * HydrogenCars) / totalCars); -} -else{ - sl_fossilFuelCars_pct.setEnabled(false); - sl_electricCars_pct.setEnabled(false); -} -sl_fossilFuelCars_pct.setValue(DieselCars_pct, false); -sl_electricCars_pct.setValue(ElectricCars_pct, false); - - -//Set VAN sliders -int totalVans = DieselVans + ElectricVans + HydrogenVans; -int DieselVans_pct = 0; -int ElectricVans_pct = 0; -int HydrogenVans_pct = 0; -if (totalVans != 0) { - DieselVans_pct = roundToInt(100.0 * DieselVans / totalVans); - ElectricVans_pct = roundToInt(100.0 * ElectricVans / totalVans); - HydrogenVans_pct = roundToInt(100.0 * HydrogenVans / totalVans); -} -else{ - sl_fossilFuelVans_pct.setEnabled(false); - sl_electricVans_pct.setEnabled(false); -} -sl_fossilFuelVans_pct.setValue(DieselVans_pct, false); -sl_electricVans_pct.setValue(ElectricVans_pct, false); - - -//Set TRUCK sliders -int totalTrucks = DieselTrucks + ElectricTrucks + HydrogenTrucks; -int DieselTrucks_pct = 0; -int ElectricTrucks_pct = 0; -int HydrogenTrucks_pct = 0; -if (totalTrucks != 0) { - DieselTrucks_pct = roundToInt(100.0 * DieselTrucks / totalTrucks); - ElectricTrucks_pct = roundToInt(100.0 * ElectricTrucks / totalTrucks); - HydrogenTrucks_pct = roundToInt(100.0 * HydrogenTrucks / totalTrucks); -} -else{ - sl_fossilFuelTrucks_pct.setEnabled(false); - sl_electricTrucks_pct.setEnabled(false); - sl_hydrogenTrucks_pct.setEnabled(false); -} -sl_fossilFuelTrucks_pct.setValue(DieselTrucks_pct, false); -sl_electricTrucks_pct.setValue(ElectricTrucks_pct, false); -sl_hydrogenTrucks_pct.setValue(HydrogenTrucks_pct, false);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754928402700</Id> - <Name>f_updateMobilitySliders_custom</Name> - <X>-330</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//If you have a custom tab, -//override this function to make it update automatically -traceln("Forgot to override the update custom electricity sliders functionality");</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754990674760</Id> - <Name>f_setChargingAttitude</Name> - <X>65</X> - <Y>655</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>selectedChargingAttitude</Name> - <Type>OL_ChargingAttitude</Type> - </Parameter> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Body>gcList.forEach(x -> x.f_addChargingManagement(selectedChargingAttitude)); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183013077</Id> - <Name>f_updateMobilitySliders_residential</Name> - <X>-330</X> - <Y>80</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>////Private EV -gr_activateV2GPrivateParkedCars.setVisible(false); -cb_activateV2GPrivateParkedCars.setSelected(false, false); -gr_settingsV2G_privateParkedCars.setVisible(false); - -List<GCHouse> houseGridConnectionsWithPrivateParking = findAll(uI_Tabs.f_getActiveSliderGridConnections_houses(), house -> house.p_eigenOprit); -List<J_EAVehicle> privateParkedCars = new ArrayList<J_EAVehicle>(); -houseGridConnectionsWithPrivateParking.forEach(gc -> privateParkedCars.addAll(gc.c_vehicleAssets)); - -if (privateParkedCars.size() > 0) { - int nbPrivateEVs = count(privateParkedCars, x -> x instanceof J_EAEV); - int nbPrivateEVsThatSupportV2G = count(privateParkedCars, x -> x instanceof J_EAEV && ((J_EAEV)x).getV2GCapable()); - double privateEVs_pct = 100.0 * nbPrivateEVs / privateParkedCars.size(); - double privateEVsThatSupportV2G_pct = 100.0 * nbPrivateEVsThatSupportV2G / nbPrivateEVs; - sl_privateEVsResidentialArea_pct.setValue(roundToInt(privateEVs_pct), false); - sl_EVsThatSupportV2G_pct.setValue(roundToInt(privateEVsThatSupportV2G_pct), false); - - //Selected charging mode - GCHouse GCWithPrivateParkedEV = findFirst(houseGridConnectionsWithPrivateParking, gc -> gc.c_electricVehicles.size() > 0); - OL_ChargingAttitude currentChargingAttitude = (GCWithPrivateParkedEV != null) ? GCWithPrivateParkedEV.f_getCurrentChargingType() : OL_ChargingAttitude.SIMPLE; - boolean V2GActive = (GCWithPrivateParkedEV != null) ? GCWithPrivateParkedEV.f_getV2GActive() : false; - for(GridConnection GC : houseGridConnectionsWithPrivateParking){ - if(GC.c_electricVehicles.size() > 0 ){ - if(currentChargingAttitude != OL_ChargingAttitude.CUSTOM && GC.f_getCurrentChargingType() != currentChargingAttitude){ - currentChargingAttitude = OL_ChargingAttitude.CUSTOM; // Here used as varied: in other words: custom setting - } - if(V2GActive && !GC.f_getV2GActive()){ - V2GActive = false; - } - } - - if(currentChargingAttitude == OL_ChargingAttitude.CUSTOM && !V2GActive){ - break; - } - - } - - String selectedChargingAttitudeString = ""; - switch(currentChargingAttitude){ - case SIMPLE: - selectedChargingAttitudeString = "Niet slim laden"; - break; - case PRICE: - selectedChargingAttitudeString = "Slim laden: Prijs gestuurd"; - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - case BALANCE_LOCAL: - selectedChargingAttitudeString = "Slim laden: Netbewust"; - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - case CUSTOM: - selectedChargingAttitudeString = "Gevarieerd"; - break; - } - - cb_chargingAttitudePrivateParkedCars.setValue(selectedChargingAttitudeString, false); - cb_activateV2GPrivateParkedCars.setSelected(V2GActive, false); - - if(gr_activateV2GPrivateParkedCars.isVisible() && V2GActive){ - gr_settingsV2G_privateParkedCars.setVisible(true); - } -} -else{ - sl_privateEVsResidentialArea_pct.setEnabled(false); -} - -////Chargers -OL_ChargingAttitude selectedChargingAttitude = null; -gr_activateV2GPublicChargers.setVisible(false); -cb_activateV2GPublicChargers.setSelected(false, false); -gr_settingsV1G_publicChargers.setVisible(false); -gr_settingsV2G_publicChargers.setVisible(false); - -List<GCPublicCharger> activeChargerGridConnections = uI_Tabs.f_getSliderGridConnections_chargers(); -List<GCPublicCharger> pausedChargerGridConnections = uI_Tabs.f_getPausedSliderGridConnections_chargers(); -List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); -activeChargerGridConnections.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); - - -int nbPublicChargerGC = activeChargerGridConnections.size() + pausedChargerGridConnections.size(); - -if(nbPublicChargerGC > 0 ){ - int nbActivePublicChargersGC = activeChargerGridConnections.size(); - double activePublicChargers_pct = 100.0 * nbActivePublicChargersGC / nbPublicChargerGC; - sl_publicChargersResidentialArea_pct.setValue(roundToInt(activePublicChargers_pct), false); - - int nbV1GChargers = count(activeChargersEA, x -> x.getV1GCapable()); - int nbV2GChargers =count(activeChargersEA, x -> x.getV2GCapable()); - int nbPublicChargers = activeChargersEA.size(); - - double V1G_pct = 100.0 * nbV1GChargers / nbPublicChargers; - double V2G_pct = 100.0 * nbV2GChargers / nbPublicChargers; - sl_chargersThatSupportV1G_pct.setValue(roundToInt(V1G_pct), false); - sl_chargersThatSupportV2G_pct.setValue(roundToInt(V2G_pct), false); - - //Selected charging mode - OL_ChargingAttitude currentChargingAttitude = activeChargersEA.size() > 0 ? activeChargersEA.get(0).getChargingAttitude(): OL_ChargingAttitude.SIMPLE; - boolean V2GActive = activeChargersEA.size() > 0 ? activeChargersEA.get(0).getV2GActive(): false; - for(J_EAChargePoint charger : activeChargersEA){ - if(currentChargingAttitude != OL_ChargingAttitude.CUSTOM && charger.getChargingAttitude() != currentChargingAttitude){ - currentChargingAttitude = OL_ChargingAttitude.CUSTOM; // Here used as varied: in other words: custom setting - } - if(V2GActive && !charger.getV2GActive()){ - V2GActive = false; - } - - if(currentChargingAttitude == OL_ChargingAttitude.CUSTOM && !V2GActive){ - break; - } - } - - String selectedChargingAttitudeString = ""; - switch(currentChargingAttitude){ - case SIMPLE: - selectedChargingAttitudeString = "Niet slim laden"; - break; - case PRICE: - selectedChargingAttitudeString = "Slim laden: Prijs gestuurd"; - gr_settingsV1G_publicChargers.setVisible(true); - gr_activateV2GPublicChargers.setVisible(true); - break; - case BALANCE_GRID: - selectedChargingAttitudeString = "Slim laden: Netbewust"; - gr_settingsV1G_publicChargers.setVisible(true); - gr_activateV2GPublicChargers.setVisible(true); - break; - case CUSTOM: - selectedChargingAttitudeString = "Gevarieerd"; - break; - } - - cb_chargingAttitudePrivatePublicChargers.setValue(selectedChargingAttitudeString, false); - cb_activateV2GPublicChargers.setSelected(V2GActive, false); - - if(gr_activateV2GPublicChargers.isVisible() && V2GActive){ - gr_settingsV2G_publicChargers.setVisible(true); - } -} -else{ - sl_publicChargersResidentialArea_pct.setEnabled(false); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183975214</Id> - <Name>f_setPublicChargingStations</Name> - <X>480</X> - <Y>605</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListChargers</Name> - <Type>List<GCPublicCharger></Type> - </Parameter> - <Parameter> - <Name>publicChargers_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>V1GCapableChargerSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Parameter> - <Name>V2GCapableChargerSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>int totalNbChargers = gcListChargers.size(); -int currentNbChargers = count(gcListChargers, x -> x.v_isActive); -int nbChargersGoal = roundToInt(publicChargers_pct / 100 * totalNbChargers) ; - -while ( currentNbChargers > nbChargersGoal ) { - GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> x.v_isActive); - if (gc != null) { - gc.f_setActive(false); - zero_Interface.c_orderedPublicChargers.remove(gc); - zero_Interface.c_orderedPublicChargers.add(0, gc); - currentNbChargers--; - - for (J_EADieselVehicle car : zero_Interface.c_mappingOfVehiclesPerCharger.get(gc.p_uid)) { - car.reRegisterEnergyAsset(); - } - } - else { - throw new RuntimeException("Charger slider error: there are not sufficient chargers to remove"); - } -} -while ( currentNbChargers < nbChargersGoal){ - GCPublicCharger gc = findFirst(zero_Interface.c_orderedPublicChargers, x -> !x.v_isActive); - if (gc != null) { - gc.f_setActive(true); - zero_Interface.c_orderedPublicChargers.remove(gc); - zero_Interface.c_orderedPublicChargers.add(0, gc); - currentNbChargers++; - - for (J_EADieselVehicle car : zero_Interface.c_mappingOfVehiclesPerCharger.get(gc.p_uid)) { - J_ActivityTrackerTrips tripTracker = car.getTripTracker(); //Needed, as triptracker is removed when removeEnergyAsset is called. - car.removeEnergyAsset(); - car.setTripTracker(tripTracker);//Re-set the triptracker again, for storing. - } - } - else { - throw new RuntimeException("Charger slider error: there are no more chargers to add"); - } -} - -//Update the V1G and V2G capable vehicle slider accordingly to the change in vehicle dynamics -int totalActiveChargers = 0; -int totalCapableV1GChargers = 0; -int totalCapableV2GChargers = 0; - -for(GCPublicCharger GC : gcListChargers){ - if(GC.v_isActive){ - for(J_EAChargePoint charger : GC.c_chargers){ - totalActiveChargers++; - if(charger.getV1GCapable()){ - totalCapableV1GChargers++; - } - if(charger.getV2GCapable()){ - totalCapableV2GChargers++; - } - } - - } -} -V1GCapableChargerSlider.setValue(roundToInt(100.0 * totalCapableV1GChargers/totalActiveChargers)); -V2GCapableChargerSlider.setValue(roundToInt(100.0 * totalCapableV2GChargers/totalActiveChargers)); - - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings(); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183975221</Id> - <Name>f_setV1GChargerCapabilities</Name> - <X>480</X> - <Y>545</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListChargers</Name> - <Type>List<GCPublicCharger></Type> - </Parameter> - <Parameter> - <Name>goal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); -gcListChargers.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); - -int totalNbChargers = activeChargersEA.size(); -int currentNbChargers = count(activeChargersEA, x -> x.getV1GCapable()); -int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); - -while (currentNbChargers < nbChargersGoal) { - J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> activeChargersEA.contains(x) && !x.getV1GCapable()); - j_ea.setV1GCapability(true); - currentNbChargers++; - zero_Interface.c_orderedV1GChargers.remove(j_ea); - zero_Interface.c_orderedV1GChargers.add(0, j_ea); - -} -while (currentNbChargers > nbChargersGoal) { - J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> activeChargersEA.contains(x) && x.getV1GCapable()); - j_ea.setV1GCapability(false); - currentNbChargers--; - zero_Interface.c_orderedV1GChargers.remove(j_ea); - zero_Interface.c_orderedV1GChargers.add(0, j_ea); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183975227</Id> - <Name>f_setV2GChargerCapabilities</Name> - <X>480</X> - <Y>565</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListChargers</Name> - <Type>List<GCPublicCharger></Type> - </Parameter> - <Parameter> - <Name>goal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>List<J_EAChargePoint> activeChargersEA = new ArrayList<J_EAChargePoint>(); -gcListChargers.forEach(gc -> activeChargersEA.addAll(gc.c_chargers)); - -int totalNbChargers = activeChargersEA.size(); -int currentNbChargers = count(activeChargersEA, x -> x.getV2GCapable()); -int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); - -while (currentNbChargers < nbChargersGoal) { - J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> activeChargersEA.contains(x) && !x.getV2GCapable()); - j_ea.setV2GCapability(true); - currentNbChargers++; - zero_Interface.c_orderedV2GChargers.remove(j_ea); - zero_Interface.c_orderedV2GChargers.add(0, j_ea); - -} -while (currentNbChargers > nbChargersGoal) { - J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> activeChargersEA.contains(x) && x.getV2GCapable()); - j_ea.setV2GCapability(false); - currentNbChargers--; - zero_Interface.c_orderedV2GChargers.remove(j_ea); - zero_Interface.c_orderedV2GChargers.add(0, j_ea); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758183975234</Id> - <Name>f_setVehiclesPrivateParking</Name> - <X>480</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>privateParkingEV_pct</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>V2GCapableVehicleSlider</Name> - <Type>ShapeSlider</Type> - </Parameter> - <Body>//Voor nu zo opgelost, echter gaat dit niet goed werken met de volgorde. BEDENK EEN BETER MANIER!? -List<J_EAVehicle> gcListOrderedVehiclesPrivateParking = findAll( zero_Interface.c_orderedVehiclesPrivateParking, h -> gcListHouses.contains(h.getParentAgent())); - -int nbOfPrivateParkedEV = (int)sum(findAll(gcListHouses, gc -> gc.p_eigenOprit), x -> x.c_electricVehicles.size()); -int desiredNbOfPrivateParkedEV = roundToInt(privateParkingEV_pct / 100 * gcListOrderedVehiclesPrivateParking.size()); - - -// we scale the consumption instead of getting the diesel/EV parameter from avgc data to represent the 'size' of the car -double ratioEVToDieselConsumption = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm / zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionCar_kWhpkm; - -while ( nbOfPrivateParkedEV > desiredNbOfPrivateParkedEV){ - J_EAVehicle j_ea = findFirst( gcListOrderedVehiclesPrivateParking, h -> h instanceof J_EAEV); - if (j_ea.vehicleScaling != 1) { - throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); - } - J_ActivityTrackerTrips triptracker = j_ea.tripTracker; - double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() / ratioEVToDieselConsumption; - j_ea.removeEnergyAsset(); - gcListOrderedVehiclesPrivateParking.remove(j_ea); - zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); - J_EADieselVehicle dieselCar = new J_EADieselVehicle(j_ea.getParentAgent(), energyConsumption_kWhpkm, zero_Interface.energyModel.p_timeStep_h, 1, OL_EnergyAssetType.DIESEL_VEHICLE, triptracker); - gcListOrderedVehiclesPrivateParking.add(dieselCar); - zero_Interface.c_orderedVehiclesPrivateParking.add(dieselCar); - nbOfPrivateParkedEV --; -} -while ( nbOfPrivateParkedEV < desiredNbOfPrivateParkedEV){ - J_EAVehicle j_ea = findFirst( gcListOrderedVehiclesPrivateParking, h -> h instanceof J_EADieselVehicle); - if (j_ea.vehicleScaling != 1) { - throw new RuntimeException("f_setVehiclesPrivateParking does not work with vehicles that have a vehicleScaling other than 1"); - } - J_ActivityTrackerTrips triptracker = j_ea.tripTracker; - double energyConsumption_kWhpkm = j_ea.getEnergyConsumption_kWhpkm() * ratioEVToDieselConsumption; - j_ea.removeEnergyAsset(); - gcListOrderedVehiclesPrivateParking.remove(j_ea); - zero_Interface.c_orderedVehiclesPrivateParking.remove(j_ea); - double capacityElectricity_kW = randomTrue(0.6) ? randomTrue(0.4) ? 3.2 : 5.6 : 11.0; - double storageCapacity_kWh = uniform_discr(65,90); - J_EAEV ev = new J_EAEV(j_ea.getParentAgent(), capacityElectricity_kW, storageCapacity_kWh, 1, zero_Interface.energyModel.p_timeStep_h, energyConsumption_kWhpkm, 1, OL_EnergyAssetType.ELECTRIC_VEHICLE, triptracker); - gcListOrderedVehiclesPrivateParking.add(ev); - zero_Interface.c_orderedVehiclesPrivateParking.add(ev); - nbOfPrivateParkedEV++; -} - - -//Update the V2G capable vehicle slider accordingly to the change in vehicle dynamics -int totalCapableV2GEVs = count(gcListOrderedVehiclesPrivateParking, vehicle -> vehicle instanceof J_EAEV && ((J_EAEV)vehicle).getV2GCapable()); -V2GCapableVehicleSlider.setValue(roundToInt(100.0*totalCapableV2GEVs/nbOfPrivateParkedEV)); - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758275653317</Id> - <Name>f_setV2GEVCapabilities</Name> - <X>480</X> - <Y>585</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcListHouses</Name> - <Type>List<GCHouse></Type> - </Parameter> - <Parameter> - <Name>goal_pct</Name> - <Type>double</Type> - </Parameter> - <Body>//Voor nu zo werkend gemaakt met gclist als input, echter gaat dit niet goed werken mochten er minder gcs tussen zitten dan in de zero_interface ordered collectie staat en gaat de volgorde veranderen. -// -> BEDENK EEN BETER MANIER!? --> Bestaat er uberhaupt een manier voor? - -List<J_EAVehicle> gcListOrderedVehiclesPrivateParking_all = findAll( zero_Interface.c_orderedVehiclesPrivateParking, vehicle -> gcListHouses.contains(vehicle.getParentAgent()) && vehicle.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); - -List<J_EAEV> gcListOrderedVehiclesPrivateParking = gcListOrderedVehiclesPrivateParking_all.stream().map(v -> (J_EAEV) v).collect(Collectors.toList()); - -int totalNbEVs = gcListOrderedVehiclesPrivateParking.size(); -int currentNbEVsV2GCapable = count(gcListOrderedVehiclesPrivateParking, x -> x.getV2GCapable()); -int nbEVsV2GCapableGoal = roundToInt(goal_pct / 100.0 * totalNbEVs); - -while (currentNbEVsV2GCapable < nbEVsV2GCapableGoal) { - J_EAEV j_ea = findFirst(gcListOrderedVehiclesPrivateParking, x -> x.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && !x.getV2GCapable()); - j_ea.setV2GCapable(true); - currentNbEVsV2GCapable++; - gcListOrderedVehiclesPrivateParking.remove(j_ea); - gcListOrderedVehiclesPrivateParking.add(0, j_ea); - -} -while (currentNbEVsV2GCapable > nbEVsV2GCapableGoal) { - J_EAEV j_ea = findFirst(gcListOrderedVehiclesPrivateParking, x -> x.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE && x.getV2GCapable()); - j_ea.setV2GCapable(false); - currentNbEVsV2GCapable--; - gcListOrderedVehiclesPrivateParking.remove(j_ea); - gcListOrderedVehiclesPrivateParking.add(0, j_ea); -} - -// Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758276936913</Id> - <Name>f_activateV2G</Name> - <X>65</X> - <Y>675</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gcList</Name> - <Type>List<GridConnection></Type> - </Parameter> - <Parameter> - <Name>activateV2G</Name> - <Type>boolean</Type> - </Parameter> - <Body>for(GridConnection GC : gcList){ - GC.f_activateV2GChargingMode(activateV2G); -} - -//Update variable to change to custom scenario -if(!zero_Interface.b_runningMainInterfaceScenarios){ - zero_Interface.f_setScenarioToCustom(); -} - -zero_Interface.f_resetSettings();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1764004906148</Id> - <Name>f_initializeTab_Mobility</Name> - <X>-350</X> - <Y>-50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Use this function to initialize mobility tab settings at start of simulation</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1722245324896</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1722245483166</Id> - <Name>uI_Tabs</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_Tabs</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1722252542608</Id> - <Name>zero_Interface</Name> - <X>150</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - <ContainerLink> - <Id>1753694295455</Id> - <Name>uI_EnergyHub</Name> - <X>300</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>UI_EnergyHub</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1722245324902</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1722350199532</Id> - <Name>rect_genericFunctions</Name> - <X>10</X> - <Y>470</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-4144960</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>800</Width> - <Height>470</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722350199535</Id> - <Name>t_genericFunctions</Name> - <X>100</X> - <Y>490</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Generic Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>22</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1722247567090</Id> - <Name>gr_mobilitySliders_default</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1722247567092</Id> - <Name>rect_mobilityDemandSliders_default</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>DOTTED</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-2625550</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567094</Id> - <Name>sl_fossilFuelCars_pct</Name> - <X>260</X> - <Y>315</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>sl_electricCars_pct.setValue(100 - sl_fossilFuelCars_pct.getIntValue(), false); -f_setDieselCars( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricCars_pct, sl_fossilFuelCars_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567096</Id> - <Name>sl_electricTrucks_pct</Name> - <X>260</X> - <Y>105</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setVehicleSliders( 0, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); -f_setElectricTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567098</Id> - <Name>t_fossilFuelCars_pct</Name> - <X>230</X> - <Y>320</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_fossilFuelCars_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567100</Id> - <Name>t_fossilFuelCarsDescription</Name> - <X>20</X> - <Y>320</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fossiele brandstof</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567102</Id> - <Name>t_electricTrucksDescription</Name> - <X>15</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elektrisch</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567104</Id> - <Name>t_electricTrucks_pct</Name> - <X>230</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricTrucks_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567106</Id> - <Name>t_mobilityDemandReductionDescription</Name> - <X>15</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Besparing transport</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567108</Id> - <Name>sl_mobilityDemandReduction_pct</Name> - <X>260</X> - <Y>15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setDemandReduction( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_mobilityDemandReduction_pct.getValue() ); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>-50</MinValue> - <MaxValue>50</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567110</Id> - <Name>t_mobilityDemandReduction_pct</Name> - <X>230</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_mobilityDemandReduction_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567112</Id> - <Name>sl_hydrogenTrucks_pct</Name> - <X>260</X> - <Y>130</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setVehicleSliders( 1, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); -f_setHydrogenTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567114</Id> - <Name>t_hydrogenTrucksDescription</Name> - <X>15</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Waterstof</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567116</Id> - <Name>t_hydrogenTrucks_pct</Name> - <X>230</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_hydrogenTrucks_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567118</Id> - <Name>sl_fossilFuelTrucks_pct</Name> - <X>260</X> - <Y>155</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setVehicleSliders( 2, sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct ); -f_setDieselTrucks( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricTrucks_pct, sl_hydrogenTrucks_pct, sl_fossilFuelTrucks_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567120</Id> - <Name>t_fossilFuelTrucksDescription</Name> - <X>15</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fossiele brandstof</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567122</Id> - <Name>t_fossilFuelTrucks_pct</Name> - <X>230</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_fossilFuelTrucks_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567124</Id> - <Name>t_trucksDescription</Name> - <X>15</X> - <Y>85</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Vrachtwagens</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567126</Id> - <Name>sl_electricCars_pct</Name> - <X>260</X> - <Y>290</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>sl_fossilFuelCars_pct.setValue(100 - sl_electricCars_pct.getIntValue(), false); -f_setElectricCars( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricCars_pct, sl_fossilFuelCars_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567128</Id> - <Name>t_electricCarsDescription</Name> - <X>20</X> - <Y>295</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elektrisch</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567130</Id> - <Name>t_electricCars_pct</Name> - <X>230</X> - <Y>295</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricCars_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567132</Id> - <Name>t_carsDescription</Name> - <X>15</X> - <Y>270</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Auto's</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567134</Id> - <Name>sl_fossilFuelVans_pct</Name> - <X>260</X> - <Y>235</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>sl_electricVans_pct.setValue(100 - sl_fossilFuelVans_pct.getIntValue(), false); -f_setDieselVans( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricVans_pct, sl_fossilFuelVans_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567136</Id> - <Name>t_fossilFuelVans_pct</Name> - <X>230</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_fossilFuelVans_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567138</Id> - <Name>t_fossilFuelVansDescription</Name> - <X>15</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fossiele brandstof</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1722247567140</Id> - <Name>sl_electricVans_pct</Name> - <X>260</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>sl_fossilFuelVans_pct.setValue(100 - sl_electricVans_pct.getIntValue(), false); -f_setElectricVans( uI_Tabs.f_getActiveSliderGridConnections_consumption(), sl_electricVans_pct, sl_fossilFuelVans_pct );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1722247567142</Id> - <Name>t_electricVansDescription</Name> - <X>15</X> - <Y>215</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Elektrisch</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1722247567144</Id> - <Name>t_electricVans_pct</Name> - <X>230</X> - <Y>215</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>#</Text> - <TextCode>sl_electricVans_pct.getIntValue() + "%"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Text> - <Id>1722247567146</Id> - <Name>t_vansDescription</Name> - <X>15</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Busjes</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Image> - <Id>1746096199769</Id> - <Name>i_mobilityReduction</Name> - <X>160</X> - <Y>20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_mobilityReduction, zero_Interface.v_infoText.mobilityDemandReduction, i_mobilityReduction.getX() + uI_Tabs.v_presentationXOffset, i_mobilityReduction.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716217</Id> - <Name>i_electricTruck</Name> - <X>160</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricTruck, zero_Interface.v_infoText.electricTrucks, i_electricTruck.getX() + uI_Tabs.v_presentationXOffset, i_electricTruck.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716230</Id> - <Name>i_hydrogenTruck</Name> - <X>160</X> - <Y>135</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_hydrogenTruck, zero_Interface.v_infoText.hydrogenTrucks, i_hydrogenTruck.getX() + uI_Tabs.v_presentationXOffset, i_hydrogenTruck.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716242</Id> - <Name>i_fossilFuelTruck</Name> - <X>160</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_fossilFuelTruck, zero_Interface.v_infoText.fossilTrucks, i_fossilFuelTruck.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelTruck.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716255</Id> - <Name>i_electricVans</Name> - <X>160</X> - <Y>215</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricVans, zero_Interface.v_infoText.electricVans, i_electricVans.getX() + uI_Tabs.v_presentationXOffset, i_electricVans.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716267</Id> - <Name>i_fossilFuelVans</Name> - <X>160</X> - <Y>240</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_fossilFuelVans, zero_Interface.v_infoText.fossilVans, i_fossilFuelVans.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelVans.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716280</Id> - <Name>i_electricCars</Name> - <X>160</X> - <Y>295</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_electricCars, zero_Interface.v_infoText.electricCars, i_electricCars.getX() + uI_Tabs.v_presentationXOffset, i_electricCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1746096716293</Id> - <Name>i_fossilFuelCars</Name> - <X>160</X> - <Y>320</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_fossilFuelCars, zero_Interface.v_infoText.fossilCars, i_fossilFuelCars.getX() + uI_Tabs.v_presentationXOffset, i_fossilFuelCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754990132964</Id> - <Name>cb_spreadChargingEVs</Name> - <X>260</X> - <Y>50</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="40" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>OL_ChargingAttitude selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; -if(cb_spreadChargingEVs.isSelected()){ - selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; -} - -f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getAllSliderGridConnections_all());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1754990186800</Id> - <Name>t_spreadChargingEVsDescription1</Name> - <X>15</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Slim laden</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Rectangle> - <Id>1722342418259</Id> - <Name>rect_demandFunctions</Name> - <X>50</X> - <Y>550</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-8355840</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>300</Width> - <Height>70</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722342418261</Id> - <Name>t_demandFunctionsDescription</Name> - <X>200</X> - <Y>560</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Demand Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1722342719680</Id> - <Name>rect_mobilityFunctions</Name> - <X>50</X> - <Y>690</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-5952982</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>720</Width> - <Height>230</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1722342719682</Id> - <Name>t_mobilityFunctionsDescription</Name> - <X>170</X> - <Y>700</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Mobility Functions (default)</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Control Type="ComboBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1754990738497</Id> - <Name>cb_setChargingAttitude</Name> - <X>265</X> - <Y>640</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="20"> - <EmbeddedIcon>false</EmbeddedIcon> - <FillColor>-1</FillColor> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>OL_ChargingAttitude selectedChargingAttitude = null; - -switch(cb_setChargingAttitude.getValue()){ - case "Standaard": - selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; - break; - case "Gelimiteerd vermogen": - selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; - break; - /*case "Slimme spreiding": - selectedChargingAttitude = OL_ChargingAttitude.MAX_SPREAD; - break;*/ - case "Prijsgestuurd": - selectedChargingAttitude = OL_ChargingAttitude.PRICE; - break; - case "Custom": - selectedChargingAttitude = null; - break; -} - -if(selectedChargingAttitude != null){ - f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getAllSliderGridConnections_all()); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <Editable>false</Editable> - <Button>Standaard</Button> - <Button>Gelimiteerd vermogen</Button> - <Button>Prijsgestuurd</Button> - <Button>Custom</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1754991641604</Id> - <Name>i_mobilityChargingAttitude</Name> - <X>160</X> - <Y>55</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <OnClickCode>zero_Interface.f_setInfoText(i_mobilityChargingAttitude, zero_Interface.v_infoText.mobilitySmartCharging, i_mobilityChargingAttitude.getX() + uI_Tabs.v_presentationXOffset, i_mobilityChargingAttitude.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Group> - <Id>1758182984074</Id> - <Name>gr_mobilitySliders_residential</Name> - <X>400</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <XCode>0</XCode> - <YCode>0</YCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1758182947156</Id> - <Name>rect_mobilityDemandSliders_residential</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>1</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>DOTTED</LineStyle> - <Width>370</Width> - <Height>350</Height> - <Rotation>0.0</Rotation> - <FillColor>-2625550</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1758183089010</Id> - <Name>txt_privateParkedCars</Name> - <X>15</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Privé geparkeerde autos</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758183152912</Id> - <Name>txt_publicChargePoints</Name> - <X>15</X> - <Y>165</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Publieke laadpalen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758183196756</Id> - <Name>sl_publicChargersResidentialArea_pct</Name> - <X>260</X> - <Y>190</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setPublicChargingStations(uI_Tabs.f_getAllSliderGridConnections_chargers(), sl_publicChargersResidentialArea_pct.getIntValue(), sl_chargersThatSupportV1G_pct, sl_chargersThatSupportV2G_pct);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758183196774</Id> - <Name>t_publicEVsResidentialAreaDescription</Name> - <X>15</X> - <Y>195</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_publicChargersResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Actieve laadpalen in gebied</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758183196782</Id> - <Name>t_publicEVsResidentialArea_pct</Name> - <X>245</X> - <Y>195</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_publicChargersResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_publicChargersResidentialArea_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Text> - <Id>1758183196796</Id> - <Name>t_privateEVsResidentialAreaDescription</Name> - <X>15</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_privateEVsResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Aandeel Elektrisch</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758183196803</Id> - <Name>sl_privateEVsResidentialArea_pct</Name> - <X>260</X> - <Y>34</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setVehiclesPrivateParking(uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_privateEVsResidentialArea_pct.getValue(), sl_EVsThatSupportV2G_pct);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758183196811</Id> - <Name>t_privateEVsResidentialArea_pct</Name> - <X>244</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_privateEVsResidentialArea_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_privateEVsResidentialArea_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Group> - <Id>1758183196871</Id> - <Name>gr_settingsV2G_publicChargers</Name> - <X>9</X> - <Y>311</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758183196873</Id> - <Name>sl_chargersThatSupportV2G_pct</Name> - <X>251</X> - <Y>4</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setV2GChargerCapabilities( uI_Tabs.f_getSliderGridConnections_chargers(), sl_chargersThatSupportV2G_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758183196875</Id> - <Name>t_chargersThatSupportV2GDescription</Name> - <X>5</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_chargersThatSupportV2G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Laadpalen met V2G</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758183196877</Id> - <Name>t_chargersThatSupportV2G_pct</Name> - <X>226</X> - <Y>11</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_chargersThatSupportV2G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_chargersThatSupportV2G_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Image> - <Id>1758183196879</Id> - <Name>i_householdPublicChargersV2G</Name> - <X>181</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_chargersThatSupportV2G_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPublicChargersV2G, zero_Interface.v_infoText.householdPublicParkingV2G, i_householdPublicChargersV2G.getX() + gr_settingsV2G_publicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargersV2G.getY() + gr_settingsV2G_publicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Image> - <Id>1758183196924</Id> - <Name>i_householdPrivateEV</Name> - <X>190</X> - <Y>39</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_privateEVsResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPrivateEV, zero_Interface.v_infoText.householdPrivateParking, i_householdPrivateEV.getX() + uI_Tabs.v_presentationXOffset, i_householdPrivateEV.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Image> - <Id>1758183196939</Id> - <Name>i_householdPublicChargers</Name> - <X>190</X> - <Y>193</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_publicChargersResidentialArea_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPublicChargers, zero_Interface.v_infoText.householdPublicParking, i_householdPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Group> - <Id>1758183196817</Id> - <Name>gr_settingsV1G_publicChargers</Name> - <X>5</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758183196819</Id> - <Name>sl_chargersThatSupportV1G_pct</Name> - <X>255</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setV1GChargerCapabilities( uI_Tabs.f_getSliderGridConnections_chargers(), sl_chargersThatSupportV1G_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758183196821</Id> - <Name>txt_chargersThatSupportV1GDescription</Name> - <X>10</X> - <Y>5</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_chargersThatSupportV1G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Laadpalen met V1G</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758183196823</Id> - <Name>t_chargersThatSupportV1G_pct</Name> - <X>240</X> - <Y>7</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_chargersThatSupportV1G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_chargersThatSupportV1G_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - <Image> - <Id>1758183196825</Id> - <Name>i_householdPublicChargersV1G</Name> - <X>185</X> - <Y>5</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_chargersThatSupportV1G_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_householdPublicChargersV1G, zero_Interface.v_infoText.householdPublicParkingV1G, i_householdPublicChargersV1G.getX() + gr_settingsV1G_publicChargers.getX() + uI_Tabs.v_presentationXOffset, i_householdPublicChargersV1G.getY() + gr_settingsV1G_publicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - <Group> - <Id>1758191125495</Id> - <Name>gr_activateV2GPrivateParkedCars</Name> - <X>170</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758190979055</Id> - <Name>cb_activateV2GPrivateParkedCars</Name> - <X>135</X> - <Y>-16</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="20" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_activateV2G(new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses()), cb_activateV2GPrivateParkedCars.isSelected()); -gr_settingsV2G_privateParkedCars.setVisible(cb_activateV2GPrivateParkedCars.isSelected());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1758191012105</Id> - <Name>i_activateV2GPrivateParkedCars</Name> - <X>20</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_activateV2GPrivateParkedCars.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_activateV2GPrivateParkedCars, zero_Interface.v_infoText.activateV2GPrivateParkedCars, i_activateV2GPrivateParkedCars.getX() + gr_activateV2GPrivateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_activateV2GPrivateParkedCars.getY() + gr_activateV2GPrivateParkedCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1758191030984</Id> - <Name>txt_activateV2GPrivateParkedCars</Name> - <X>-155</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>cb_activateV2GPrivateParkedCars.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Activeer V2G</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1758189201608</Id> - <Name>txt_chargingStrategyPrivateParkedCars</Name> - <X>15</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>cb_chargingAttitudePrivateParkedCars.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Laad strategie</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="ComboBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758189233415</Id> - <Name>cb_chargingAttitudePrivateParkedCars</Name> - <X>221</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="140" Height="20"> - <EmbeddedIcon>false</EmbeddedIcon> - <FillColor>-1</FillColor> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <EnableExpression>sl_privateEVsResidentialArea_pct.isEnabled()</EnableExpression> - <ActionCode>OL_ChargingAttitude selectedChargingAttitude = null; -gr_activateV2GPrivateParkedCars.setVisible(false); -cb_activateV2GPrivateParkedCars.setSelected(false, false); -gr_settingsV2G_privateParkedCars.setVisible(false); - -switch(cb_chargingAttitudePrivateParkedCars.getValue()){ - case "Niet slim laden": - selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; - break; - case "Slim laden: Prijs gestuurd": - selectedChargingAttitude = OL_ChargingAttitude.PRICE; - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - case "Slim laden: Netbewust": - selectedChargingAttitude = OL_ChargingAttitude.BALANCE_LOCAL; // For now Balance_Local - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - /* - case "Slim laden: Locale balans": - selectedChargingAttitude = OL_ChargingAttitude.BALANCE_LOCAL; - gr_activateV2GPrivateParkedCars.setVisible(true); - break; - */ - case "Gevarieerd": - zero_Interface.f_setErrorScreen("De geselecteerde laad strategie is er alleen ter visualisatie in het geval niet elk huis dezelfde laad strategie heeft. Dit is dus niet een strategie die je handmatig aan kunt zetten. Voor nu is 'Niet slim laden' weer geselecteerd.", 0, 0); - selectedChargingAttitude = null; - break; -} - -if(selectedChargingAttitude != null){ - f_setChargingAttitude(selectedChargingAttitude, new ArrayList<GridConnection>(uI_Tabs.f_getActiveSliderGridConnections_houses())); -} -else{ - cb_chargingAttitudePrivateParkedCars.setValue("Niet slim laden", true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <Editable>false</Editable> - <Button>Niet slim laden</Button> - <Button>Slim laden: Prijs gestuurd</Button> - <Button>Slim laden: Netbewust</Button> - <Button>Gevarieerd</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1758189262812</Id> - <Name>i_chargingAttitudePrivateParkedCars</Name> - <X>190</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_chargingAttitudePrivateParkedCars.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_chargingAttitudePrivateParkedCars, zero_Interface.v_infoText.chargingAttitudePrivateParkedCars, i_chargingAttitudePrivateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_chargingAttitudePrivateParkedCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1758192054421</Id> - <Name>txt_chargingStrategyPublicChargers</Name> - <X>15</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>cb_chargingAttitudePrivatePublicChargers.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Laad strategie</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="ComboBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758192054440</Id> - <Name>cb_chargingAttitudePrivatePublicChargers</Name> - <X>221</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="140" Height="20"> - <EmbeddedIcon>false</EmbeddedIcon> - <FillColor>-1</FillColor> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <EnableExpression>sl_publicChargersResidentialArea_pct.isEnabled()</EnableExpression> - <ActionCode>OL_ChargingAttitude selectedChargingAttitude = null; -gr_activateV2GPublicChargers.setVisible(false); -cb_activateV2GPublicChargers.setSelected(false, true); // True call for now needed for chargepoints only -gr_settingsV1G_publicChargers.setVisible(false); -gr_settingsV2G_publicChargers.setVisible(false); - -switch(cb_chargingAttitudePrivatePublicChargers.getValue()){ - case "Niet slim laden": - selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; - break; - case "Slim laden: Prijs gestuurd": - selectedChargingAttitude = OL_ChargingAttitude.PRICE; - gr_activateV2GPublicChargers.setVisible(true); - gr_settingsV1G_publicChargers.setVisible(true); - break; - case "Slim laden: Netbewust": - selectedChargingAttitude = OL_ChargingAttitude.BALANCE_GRID; - gr_activateV2GPublicChargers.setVisible(true); - gr_settingsV1G_publicChargers.setVisible(true); - break; - case "Gevarieerd": - zero_Interface.f_setErrorScreen("De geselecteerde laad strategie is er alleen ter visualisatie in het geval niet elk huis dezelfde laad strategie heeft. Dit is dus niet een strategie die je handmatig aan kunt zetten. Voor nu is 'Niet slim laden' weer geselecteerd.", 0, 0); - selectedChargingAttitude = null; - break; -} - -if(selectedChargingAttitude != null){ - List<GridConnection> allChargersInModel = new ArrayList<GridConnection>(uI_Tabs.f_getSliderGridConnections_chargers()); - allChargersInModel.addAll(uI_Tabs.f_getPausedSliderGridConnections_chargers()); - f_setChargingAttitude(selectedChargingAttitude, allChargersInModel); -} -else{ - cb_chargingAttitudePrivatePublicChargers.setValue("Niet slim laden", true); -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <Editable>false</Editable> - <Button>Niet slim laden</Button> - <Button>Slim laden: Prijs gestuurd</Button> - <Button>Slim laden: Netbewust</Button> - <Button>Gevarieerd</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1758192054460</Id> - <Name>i_chargingStrategyPublicChargers</Name> - <X>190</X> - <Y>225</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_chargingAttitudePrivatePublicChargers.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_chargingStrategyPublicChargers, zero_Interface.v_infoText.chargingStrategyPublicChargers, i_chargingStrategyPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_chargingStrategyPublicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Group> - <Id>1758192011387</Id> - <Name>gr_activateV2GPublicChargers</Name> - <X>170</X> - <Y>300</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="CheckBox"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758192011389</Id> - <Name>cb_activateV2GPublicChargers</Name> - <X>135</X> - <Y>-16</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="20" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_activateV2G(new ArrayList<GridConnection>(uI_Tabs.f_getAllSliderGridConnections_chargers()), cb_activateV2GPublicChargers.isSelected()); -gr_settingsV2G_publicChargers.setVisible(cb_activateV2GPublicChargers.isSelected());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText/> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Image> - <Id>1758192011391</Id> - <Name>i_activateV2GPrivatePublicChargers</Name> - <X>20</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>cb_activateV2GPublicChargers.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_activateV2GPrivatePublicChargers, zero_Interface.v_infoText.activateV2GPrivatePublicChargers, i_activateV2GPrivatePublicChargers.getX() + gr_activateV2GPublicChargers.getX() + uI_Tabs.v_presentationXOffset, i_activateV2GPrivatePublicChargers.getY() + gr_activateV2GPublicChargers.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - <Text> - <Id>1758192011393</Id> - <Name>txt_activateV2GPrivatePublicChargers</Name> - <X>-155</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>cb_activateV2GPublicChargers.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Activeer V2G</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1758274187930</Id> - <Name>gr_settingsV2G_privateParkedCars</Name> - <X>9</X> - <Y>121</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1758274187932</Id> - <Name>sl_EVsThatSupportV2G_pct</Name> - <X>251</X> - <Y>4</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>f_setV2GEVCapabilities( uI_Tabs.f_getActiveSliderGridConnections_houses(), sl_EVsThatSupportV2G_pct.getValue() );</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1758274187934</Id> - <Name>txt_EVsThatSupportV2GDescription</Name> - <X>5</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_EVsThatSupportV2G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>EVs die V2G ondersteunen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1758274187936</Id> - <Name>txt_EVsThatSupportV2G_pct</Name> - <X>226</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <VisibleCode>sl_EVsThatSupportV2G_pct.isVisible()</VisibleCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0%</Text> - <TextCode>sl_EVsThatSupportV2G_pct.getIntValue() + " %"</TextCode> - <Font> - <Name>Dialog</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Image> - <Id>1758274187938</Id> - <Name>i_EVsThatSupportV2G</Name> - <X>181</X> - <Y>8</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <VisibleCode>sl_EVsThatSupportV2G_pct.isVisible()</VisibleCode> - <OnClickCode>zero_Interface.f_setInfoText(i_EVsThatSupportV2G, zero_Interface.v_infoText.EVsThatSupportV2G, i_EVsThatSupportV2G.getX() + gr_settingsV2G_privateParkedCars.getX() + uI_Tabs.v_presentationXOffset, i_EVsThatSupportV2G.getY() + gr_settingsV2G_privateParkedCars.getY() + uI_Tabs.v_presentationYOffset);</OnClickCode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Width>20</Width> - <Height>20</Height> - <Rotation>0.0</Rotation> - <ImageFiles> - <ImageResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>icon_i.png</ClassName> - </ImageResourceReference> - </ImageFiles> - <OriginalSize>false</OriginalSize> - </Image> - </Presentation> - </Group> - </Presentation> - </Group> - <Text> - <Id>1758183975194</Id> - <Name>txt_mobilityFunctionsDescription</Name> - <X>590</X> - <Y>510</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Mobility Functions</Text> - <Font> - <Name>Dialog</Name> - <Size>18</Size> - <Style>0</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - <Rectangle> - <Id>1758183975205</Id> - <Name>rect_mobilityFunctions1</Name> - <X>440</X> - <Y>500</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16711936</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>310</Width> - <Height>170</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1758184003102</Id> - <Name>t_mobilityFunctionsDescription1</Name> - <X>590</X> - <Y>510</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Mobility Functions (residential)</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>CENTER</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1709049456135</Id> - <Name>UI_Battery</Name> - <Folder>1754045666929</Folder> - <Generic>false</Generic> - <GenericParameter> - <Id>1709049456141</Id> - <Name>1709049456141</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089975</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709107200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1709049456138</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1709049456142</CurrentLevel> - <ConnectionsId>1709049456136</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1715597286082</Id> - <Name>v_colorBattery_lines</Name> - <X>-740</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>new Color(158, 201, 158)</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715597307038</Id> - <Name>v_colorBattery_background</Name> - <X>-740</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>new Color(198, 251, 198)</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715597314638</Id> - <Name>v_colorBatter_3</Name> - <X>-740</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>white</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715602425848</Id> - <Name>v_sliderStartValue_priceLimit</Name> - <X>-730</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715607530949</Id> - <Name>v_sliderMinValue_balanceLimit</Name> - <X>-730</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715607536716</Id> - <Name>v_sliderMaxValue_balanceLimit</Name> - <X>-730</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715607544383</Id> - <Name>v_sliderStartValue_balanceLimit</Name> - <X>-730</X> - <Y>330</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1715630743924</Id> - <Name>v_sliderStartValue_BatteryP_MW</Name> - <X>-730</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724947743379</Id> - <Name>v_currentSelectedBattery</Name> - <X>-310</X> - <Y>570</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1724947743386</Id> - <Name>p_amountOfGISObjects</Name> - <X>-310</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1724947743384</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1724947743389</Id> - <Name>p_amountOfGC</Name> - <X>-310</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1724947743387</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743355</Id> - <Name>c_GISObjects_Battery</Name> - <X>-310</X> - <Y>140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GIS_Object</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743357</Id> - <Name>c_gridConnections_Battery</Name> - <X>-310</X> - <Y>160</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GridConnection</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743359</Id> - <Name>c_connectedGridNodes</Name> - <X>-310</X> - <Y>180</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Object</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743361</Id> - <Name>c_connectionOwners_Battery</Name> - <X>-310</X> - <Y>120</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>ConnectionOwner</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724947743365</Id> - <Name>c_gridBatteries</Name> - <X>-310</X> - <Y>300</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>J_EAStorageElectric</ElementClass> - <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1709553910991</Id> - <Name>f_styleBatteryUI</Name> - <X>-760</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1715591908888</Id> - <Name>f_initializeUIBattery</Name> - <X>-760</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>COC</Name> - <Type>ConnectionOwner</Type> - </Parameter> - <Body>//Instantiate new sliders -f_instantiateSlidersBattery(COC);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1715591980366</Id> - <Name>f_instantiateSlidersBattery</Name> - <X>-740</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>COC</Name> - <Type>ConnectionOwner</Type> - </Parameter> - <Body>// Electrolyser Power start value -v_sliderStartValue_BatteryP_MW = ((J_EAConversionElectrolyser)COC.f_getOwnedGridConnections().get(0).c_conversionAssets.get(0)).getInputCapacity_kW()/1000; -sl_batteryPower.setValue(v_sliderStartValue_BatteryP_MW, false); -t_powerBattery.setText(v_sliderStartValue_BatteryP_MW + " MW"); - - -// Price limit start value -v_sliderStartValue_priceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_electricityPriceMaxForProfit_eurpkWh; -sl_batteryElectricityPriceLimit.setValue(v_sliderStartValue_priceLimit, false); -t_electricityPriceLimit.setText("€" + v_sliderStartValue_priceLimit); - - -//Balance limit start value -v_sliderStartValue_balanceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_gridNodeCongestionLimit_kW; -sl_batteryElectricityBalanceLimit.setValue(v_sliderStartValue_balanceLimit, false); -t_electricityBalanceLimit.setText(v_sliderStartValue_balanceLimit + " MW"); - - -//Radio button balance or price mode -int rb_value = 0; -switch (((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).p_electrolyserOperationMode){ - - case PRICE: - - rb_value = 0; - //Set visibility of price slider true and balance slider false - gr_electricityPriceSliderBattery.setVisible(true); - gr_electricityBalanceSliderBattery.setVisible(false); - break; - - case BALANCE: - rb_value = 1; - - //Set visibility of balance slider true and price slider false - gr_electricityBalanceSliderBattery.setVisible(true); - gr_electricityPriceSliderBattery.setVisible(false); - break; -} -rb_batteryMode.setValue(rb_value, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724947743369</Id> - <Name>f_setScenarioFuture</Name> - <X>-290</X> - <Y>490</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>//Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -//Scenario code here - - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(1, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724947743373</Id> - <Name>f_setScenario</Name> - <X>-310</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>scenario_nr</Name> - <Type>int</Type> - </Parameter> - <Body>switch (scenario_nr){ - - case 0: // Current - - break; - - case 1: // Future - - break; - - case 2: // Hydrogen - traceln("Selected scenario: Hydrogen : DOES NOTHING YET"); - break; - - case 3: // Custom - - if(rb_scenariosPrivateUI.getValue() == 2){ - return; - } - rb_scenariosPrivateUI.setValue(2, false); - traceln("Selected scenario: Custom"); - break; - - default: - -} - -//Set 'results up to date' to false -zero_Interface.b_resultsUpToDate = false;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724947743375</Id> - <Name>f_setScenarioCurrent</Name> - <X>-290</X> - <Y>470</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>//Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -//Scenario code here - - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(0, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724947743377</Id> - <Name>f_setSelectedGC</Name> - <Description>Function that sets the sliders to match the currently present settings of the energy assets owned by the selected GC. Used when a connection owner has multiple grid connections, and wants to set the sliders of a different GC. </Description> - <X>-310</X> - <Y>400</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Initialize slider presets to selected GC (min, max, etc.) -//f_setSliderPresets(); - -</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1709049456136</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1709049456197</Id> - <Name>zero_Interface</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1709049456142</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1725002991039</Id> - <Name>rect_canvas</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>1920</Width> - <Height>980</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1725002921481</Id> - <Name>rect_scenarios</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorBattery_background</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>170</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorBattery_lines</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <TimePlot> - <Id>1709582023151</Id> - <Name>plot</Name> - <X>400</X> - <Y>280</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <AutoUpdate>true</AutoUpdate> - <RecurrenceProperties> - <Id>1751013532165</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709625600000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </RecurrenceProperties> - <EmbeddedIcon>false</EmbeddedIcon> - <Width>540</Width> - <Height>400</Height> - <BackgroundColor/> - <BorderColor/> - <ChartArea> - <XOffset>50</XOffset> - <YOffset>30</YOffset> - <Width>460</Width> - <Height>310</Height> - <BackgroundColor>-1</BackgroundColor> - <BorderColor>-16777216</BorderColor> - <GridColor>-12566464</GridColor> - </ChartArea> - <Legend> - <Place>SOUTH</Place> - <TextColor>-16777216</TextColor> - <Size>30</Size> - </Legend> - <Labels> - <HorLabelsPosition>DEFAULT</HorLabelsPosition> - <VerLabelsPosition>DEFAULT</VerLabelsPosition> - <TextColor>-12566464</TextColor> - </Labels> - <ShowLegend>true</ShowLegend> - <TimeWindowsMovementType>MOVEMENT_WITH_TIME</TimeWindowsMovementType> - <TimeWindowUnits>MODEL_TIME_UNIT</TimeWindowUnits> - <VerScaleFromExpression>0</VerScaleFromExpression> - <VerScaleToExpression>1</VerScaleToExpression> - <VerScaleType>AUTO</VerScaleType> - <DrawLine>true</DrawLine> - <Interpolation>LINEAR</Interpolation> - <SamplesToKeep>100</SamplesToKeep> - <TimeWindowExpression>100</TimeWindowExpression> - <FillAreaUnderLine>false</FillAreaUnderLine> - <LabelFormat>MODEL_TIME_UNITS</LabelFormat> - </TimePlot> - <Rectangle> - <Id>1715589407937</Id> - <Name>slider_blocker</Name> - <X>0</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorBattery_lines</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>810</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorBatter_3</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1715596728186</Id> - <Name>t_batterySliders</Name> - <X>70</X> - <Y>200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Battery</Text> - <Font> - <Name>Calibri</Name> - <Size>22</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1715597165299</Id> - <Name>gr_buttonBattery</Name> - <X>41</X> - <Y>211</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Oval> - <Id>1715596934178</Id> - <Name>ovalBatteryButton</Name> - <X>-1</X> - <Y>-1</Y> - <Label> - <X>0</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <RadiusX>20</RadiusX> - <RadiusY>40</RadiusY> - <Rotation>0.0</Rotation> - <FillColor>-6632142</FillColor> - <FillColorCode>zero_Interface.v_batteryColor</FillColorCode> - <FillMaterial>null</FillMaterial> - </Oval> - <Text> - <Id>1715596882276</Id> - <Name>t_battery</Name> - <X>-10</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-1</Color> - <Text>Bat</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1715606650390</Id> - <Name>gr_electricityPriceSliderBattery</Name> - <X>190</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1715597606225</Id> - <Name>txt_electricityPriceLimit</Name> - <X>-170</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electriciteits prijs limiet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1715597606227</Id> - <Name>sl_batteryElectricityPriceLimit</Name> - <X>62</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the maximum price of electricity used to produce hydrogen -((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_electricityPriceMaxForProfit_eurpkWh = sl_batteryElectricityPriceLimit.getValue(); - -//Set text accordingly -t_electricityPriceLimit.setText( "€" + sl_batteryElectricityPriceLimit.getValue()); - -//Set scenario to custom -f_setScenario(2);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>v_sliderStartValue_priceLimit</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>0.5</MaxValue> - <Step>0.01</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1715597606229</Id> - <Name>t_electricityPriceLimit</Name> - <X>40</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text> €0.00</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1715606688952</Id> - <Name>gr_batteryPowerSlider</Name> - <X>190</X> - <Y>280</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1715597606231</Id> - <Name>txt_powerBattery</Name> - <X>-170</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Vermogen</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1715597606233</Id> - <Name>sl_batteryPower</Name> - <X>62</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the electric capacity -c_gridBatteries.get(v_currentSelectedBattery).setCapacityElectric_kW(sl_batteryPower.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW - -//Adjust grid connection capacity as well (if needed) -if(sl_batteryPower.getValue()*1000 > 2000){ - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryPower.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryPower.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryPower.getValue()*1000; -} - -//Set the text accordingly -t_powerBattery.setText(sl_batteryPower.getValue() + " MW"); - - -//Set scenario to custom -f_setScenario(2);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>10</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1715597606235</Id> - <Name>t_powerBattery</Name> - <X>35</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>1.0 MW</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1715606719124</Id> - <Name>gr_batteryMode</Name> - <X>100</X> - <Y>380</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1715598832030</Id> - <Name>rb_batteryMode</Name> - <X>-80</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="150" Height="50"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>/* -switch (rb_batteryMode.getValue()){ - - case 0: - c_ownedGridConnections.get(0).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.PRICE; - - //Set visibility of price slider true and balance slider false - gr_electricityPriceSlider.setVisible(true); - gr_electricityBalanceSlider.setVisible(false); - break; - - case 1: - c_ownedGridConnections.get(0).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.BALANCE; - - //Set visibility of balance slider true and price slider false - gr_electricityBalanceSlider.setVisible(true); - gr_electricityPriceSlider.setVisible(false); - break; -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Prijs</Button> - <Button>Balans</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1715598901188</Id> - <Name>txt_electrolyserMode</Name> - <X>-80</X> - <Y>-40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batterij modus</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1715606808711</Id> - <Name>gr_electricityBalanceSliderBattery</Name> - <X>190</X> - <Y>490</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1715606808713</Id> - <Name>txt_electricityBalanceLimit</Name> - <X>-170</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electriciteits balans limiet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1715606808715</Id> - <Name>sl_batteryElectricityBalanceLimit</Name> - <X>62</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the gridnode congestion while charging -((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_gridNodeCongestionLimit_kW = sl_batteryElectricityBalanceLimit.getValue()*1000; - -//Set text accordingly -t_electricityBalanceLimit.setText( sl_batteryElectricityBalanceLimit.getValue() + " MW" ); - -//Set scenario to custom -f_setScenario(2);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>v_sliderStartValue_balanceLimit</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>v_sliderMinValue_balanceLimit</MinValue> - <MaxValue>v_sliderMaxValue_balanceLimit</MaxValue> - <Step>0.01</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1715606808717</Id> - <Name>t_electricityBalanceLimit</Name> - <X>50</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0.0 MW</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1724859658263</Id> - <Name>gr_scenarioRB</Name> - <X>120</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1724859658265</Id> - <Name>rb_scenariosPrivateUI</Name> - <X>-100</X> - <Y>-60</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="180" Height="120"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setScenario(rb_scenariosPrivateUI.getValue());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="14" Style="0"/> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Huidig - 2023</Button> - <Button>Toekomstplannen</Button> - <Button>Custom</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1724859658267</Id> - <Name>text187</Name> - <X>-100</X> - <Y>-80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Selecteer een scenario</Text> - <Font> - <Name>Calibri</Name> - <Size>20</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724947743345</Id> - <Name>text</Name> - <X>-320</X> - <Y>540</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Current selected assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724947743347</Id> - <Name>txt_batteryAssets</Name> - <X>-320</X> - <Y>270</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Battery assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724947743349</Id> - <Name>txt_setSlidersToSelectedGC</Name> - <X>-320</X> - <Y>370</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Set Sliders to selected GC</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724947743351</Id> - <Name>text7</Name> - <X>-320</X> - <Y>420</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Set Sliders to Scenario</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724947743353</Id> - <Name>text5</Name> - <X>-320</X> - <Y>90</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Connections</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1724948168075</Id> - <Name>gr_batteryCapacitySlider</Name> - <X>190</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1724948168077</Id> - <Name>txt_powerBattery1</Name> - <X>-170</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Opslagcapaciteit</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1724948168079</Id> - <Name>sl_batteryCapacity</Name> - <X>62</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the electric capacity -c_gridBatteries.get(v_currentSelectedBattery).setStorageCapacity_kWh(sl_batteryCapacity.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW - -//Adjust grid connection capacity as well (if needed) -if(sl_batteryCapacity.getValue()*1000 > 2000){ - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_batteryCapacity.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_batteryCapacity.getValue()*1000; - ((GCGridBattery)c_gridBatteries.get(v_currentSelectedBattery).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_batteryCapacity.getValue()*1000; -} - -//Set the text accordingly -t_capacityBattery.setText(sl_batteryCapacity.getValue() + " MWh"); - - -//Set scenario to custom -f_setScenario(2);</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>100</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1724948168081</Id> - <Name>t_capacityBattery</Name> - <X>35</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>1.0 MWh</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1725003063740</Id> - <Name>txt_batteryControlRoom</Name> - <X>760</X> - <Y>80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Batterij Controlroom</Text> - <Font> - <Name>Calibri</Name> - <Size>72</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - <Areas> - <Area> - <Id>1725002896440</Id> - <Name>va_batteryUI</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Title>Batter UI - 1920 - 980 - - - - - 1708522361862 - UI_company - -//Getters for shapes -public ShapeRadioButtonGroup getRb_scenariosPrivateUI() { - return this.rb_scenariosPrivateUI; -} - -public ShapeRadioButtonGroup getRb_heatingTypePrivateUI() { - return this.rb_heatingTypePrivateUI; -} - -public ShapeSlider getSl_batteryCompany(){ - return this.sl_batteryCompany; -} - -public ShapeSlider getSl_heatDemandCompanyReduction(){ - return this.sl_heatDemandCompanyReduction; -} - -public ShapeSlider getSl_electricityDemandCompanyReduction(){ - return this.sl_electricityDemandCompanyReduction; -} - -public ShapeSlider getSl_mobilityDemandCompanyReduction(){ - return this.sl_mobilityDemandCompanyReduction; -} - 1754045666929 - //import kotlinx.serialization.internal.ArrayListClassDesc; -import org.eclipse.jdt.internal.compiler.ast.ForeachStatement; - - //Initialize graph locations and visibility -f_setResultsUIPresets(); - -zero_Interface.c_UIResultsInstances.add(uI_Results); - false - - 1708522361868 - 1708522361868 - - T extends Agent - - Generic parameter: - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - 10 - MPS - - - 1 - METER - - - 1 - METER - - - 1 - METER - - - - false - - 1.0 - SECOND - - CONTINUOUS - 500 - 500 - 0 - 100 - 100 - MOORE - USER_DEF - USER_DEF - 2 - 50 - 0.95 - 10 - - - true - 1658477089974 - true - 1708588800000 - - 0 - HOUR - - - 1 - HOUR - - - - 1708522361865 - scale - 10 - -210 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1708522361869 - 1708522361863 - - - 1708611471928 - v_companyUIBackgroundColor - -430 - 50 - - false - true - true - - Color - - new Color( 204, 72, 118); - - - - - 1709554407054 - v_companyUILineColor - -430 - 90 - - false - true - true - - Color - - black - - - - - 1713957213075 - v_minPVSlider - -1060 - 430 - - false - true - true - - double - - 0 - - - - - 1713957229701 - v_maxPVSlider - -1060 - 450 - - false - true - true - - double - - 100 - - - - - 1713957233827 - v_defaultPVSlider - -1060 - 470 - - false - true - true - - double - - 0 - - - - - 1713971707023 - v_minBatSlider - -1060 - 510 - - false - true - true - - double - - 0 - - - - - 1713971707027 - v_maxBatSlider - -1060 - 530 - - false - true - true - - double - - 1000 - - - - - 1713971707029 - v_defaultBatSlider - -1060 - 550 - - false - true - true - - double - - 0 - - - - - 1714139274247 - v_nbEVCars - -1050 - 730 - - false - true - true - - int - - 0 - - - - - 1714139294087 - v_nbHydrogenCars - -1050 - 770 - - false - true - true - - int - - 0 - - - - - 1714139299844 - v_nbDieselCars - -1050 - 750 - - false - true - true - - int - - 0 - - - - - 1714139304156 - v_nbEVVans - -1050 - 930 - - false - true - true - - int - - 0 - - - - - 1714139320416 - v_nbEVTrucks - -1050 - 1130 - - false - true - true - - int - - 0 - - - - - 1714139381294 - v_nbDieselVans - -1050 - 950 - - false - true - true - - int - - 0 - - - - - 1714139385293 - v_nbDieselTrucks - -1050 - 1150 - - false - true - true - - int - - 0 - - - - - 1714139405729 - v_nbHydrogenVans - -1050 - 970 - - false - true - true - - int - - 0 - - - - - 1714139413565 - v_nbHydrogenTrucks - -1050 - 1170 - - false - true - true - - int - - 0 - - - - - 1714139966993 - v_minEVCarSlider - -1050 - 610 - - false - true - true - - int - - 0 - - - - - 1714139997786 - v_minHydrogenCarSlider - -1050 - 650 - - false - true - true - - int - - 0 - - - - - 1714140003906 - v_maxEVCarSlider - -1050 - 670 - - false - true - true - - int - - 20 - - - - - 1714140007855 - v_minDieselCarSlider - -1050 - 630 - - false - true - true - - int - - 0 - - - - - 1714140012482 - v_maxHydrogenCarSlider - -1050 - 710 - - false - true - true - - int - - 20 - - - - - 1714140056511 - v_maxDieselCarSlider - -1050 - 690 - - false - true - true - - int - - 20 - - - - - 1714141906262 - v_minEVVanSlider - -1050 - 810 - - false - true - true - - int - - 0 - - - - - 1714141906264 - v_minHydrogenVanSlider - -1050 - 850 - - false - true - true - - int - - 0 - - - - - 1714141906266 - v_maxEVVanSlider - -1050 - 870 - - false - true - true - - int - - 20 - - - - - 1714141906268 - v_minDieselVanSlider - -1050 - 830 - - false - true - true - - int - - 0 - - - - - 1714141906270 - v_maxHydrogenVanSlider - -1050 - 910 - - false - true - true - - int - - 20 - - - - - 1714141906272 - v_maxDieselVanSlider - -1050 - 890 - - false - true - true - - int - - 20 - - - - - 1714142030261 - v_minEVTruckSlider - -1050 - 1010 - - false - true - true - - int - - 0 - - - - - 1714142030263 - v_minHydrogenTruckSlider - -1050 - 1050 - - false - true - true - - int - - 0 - - - - - 1714142030265 - v_maxEVTruckSlider - -1050 - 1070 - - false - true - true - - int - - 20 - - - - - 1714142030267 - v_minDieselTruckSlider - -1050 - 1030 - - false - true - true - - int - - 0 - - - - - 1714142030269 - v_maxDieselTruckSlider - -1050 - 1090 - - false - true - true - - int - - 20 - - - - - 1714142035660 - v_maxHydrogenTruckSlider - -1050 - 1110 - - false - true - true - - int - - 20 - - - - - 1725364840518 - v_adressGC - -740 - 90 - - false - true - true - - String - - - - 1725373825534 - v_chartBackgroundColor - -430 - 130 - - false - true - true - - Color - - white - - - - - 1725381531538 - v_companyUILineWidth - -430 - 110 - - false - true - true - - double - - 2 - - - - - 1725381554846 - v_chartLineWidth - -430 - 150 - - false - true - true - - double - - 2 - - - - - 1725382988283 - v_companyUIBackgroundColorSliders - -430 - 70 - - false - true - true - - Color - - white - - - - - 1725609978738 - v_loadScreenColor - -430 - 180 - - false - true - true - - Color - - v_companyUIBackgroundColor - - - - - 1725614630564 - v_minGCCapacitySlider - -1060 - 270 - - false - true - true - - double - - 0 - - - - - 1725614630566 - v_maxGCCapacitySlider - -1060 - 290 - - false - true - true - - double - - 100 - - - - - 1725614630568 - v_defaultGCCapacitySlider - -1060 - 310 - - false - true - true - - double - - 0 - - - - - 1725625091022 - b_runningMainInterfaceScenarioSettings - -410 - 850 - - false - true - true - - boolean - - false - - - - - 1727798399505 - v_minGCCapacitySlider_Feedin - -1060 - 350 - - false - true - true - - double - - 0 - - - - - 1727798399507 - v_maxGCCapacitySlider_Feedin - -1060 - 370 - - false - true - true - - double - - 100 - - - - - 1727798399509 - v_defaultGCCapacitySlider_Feedin - -1060 - 390 - - false - true - true - - double - - 0 - - - - - 1727872520826 - v_physicalConnectionCapacity_kW - -1060 - 250 - - false - true - true - - double - - - - 1727883544535 - v_NFATO_kW_delivery - -430 - 745 - - false - true - true - - double - - - - 1727883574908 - v_NFATO_kW_feedin - -430 - 765 - - false - true - true - - double - - - - 1727941212434 - v_NFATO_active - -430 - 725 - - false - true - true - - boolean - - - - 1729686904963 - b_runningMainInterfaceSlider - -410 - 870 - - false - true - true - - boolean - - false - - - - - 1756376301806 - v_minSavingsSliders - -1050 - 1260 - - false - true - true - - double - - -50 - - - - - 1756376314706 - v_maxSavingsSliders - -1050 - 1280 - - false - true - true - - double - - 50 - - - - - 1708522385741 - p_companyName - -740 - 70 - - false - true - true - - String - NONE - false - - 1708522385739 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1715181661645 - p_maxAddedVehicles - Amount of vehicles that can additionally be added on the already existing ones - -1060 - 1190 - - false - true - true - - int - NONE - false - - 20 - - - 1715181661643 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760715449229 - p_scenarioSettings_Current - -740 - 140 - - false - true - true - - J_scenario_Current - NONE - false - - 1760715449227 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760715453384 - p_scenarioSettings_Future - -740 - 160 - - false - true - true - - J_scenario_Future - NONE - false - - 1760715453382 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760715588549 - p_gridConnection - -740 - 50 - - false - true - true - - GridConnection - NONE - false - - 1760715588547 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - - - VOID - double - 1713445281785 - f_setScenarioFuture - -410 - 410 - - false - true - true - //Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -////Heating - -//Heating savings -sl_heatDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedHeatSavings_pct(), true); - -//Heating type (aangenomen dat het hetzelfde blijft, want hebben geen vraag die dat stelt in het formulier) -int nr_currentHeatingType = 0; -switch (p_scenarioSettings_Future.getPlannedHeatingType()){ - case GAS_BURNER: - nr_currentHeatingType = 0; - break; - - case HYBRID_HEATPUMP: - nr_currentHeatingType = 1; - break; - - case ELECTRIC_HEATPUMP: - nr_currentHeatingType = 2; - break; - - //case HYDROGENBURNER: - case DISTRICTHEAT: - nr_currentHeatingType = 3; - break; - - case GAS_CHP: - nr_currentHeatingType = 4; - break; - - default: -} -rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, true); - - -////Electricity - -//Electricity savings -sl_electricityDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedElectricitySavings_pct(), true); - -//Connection capacity (Delivery) -sl_GCCapacityCompany.setValue(p_scenarioSettings_Future.getRequestedContractDeliveryCapacity_kW(), true); - -//Connection capacity (Feedin) -sl_GCCapacityCompany_Feedin.setValue(p_scenarioSettings_Future.getRequestedContractFeedinCapacity_kW(), true); - -//Connection capacity (Physical) -v_physicalConnectionCapacity_kW = p_scenarioSettings_Future.getRequestedPhysicalConnectionCapacity_kW(); -p_gridConnection.v_liveConnectionMetaData.physicalCapacity_kW = v_physicalConnectionCapacity_kW; - -//Solar panel power -sl_rooftopPVCompany.setValue(p_scenarioSettings_Future.getPlannedPV_kW(), true); - -//Battery capacity -sl_batteryCompany.setValue(p_scenarioSettings_Future.getPlannedBatteryCapacity_kWh(), true); - -//Curtailment setting -cb_curtailmentCompany.setSelected(p_scenarioSettings_Future.getPlannedCurtailment(), true); - -////Mobility - -//Mobility savings -sl_mobilityDemandCompanyReduction.setValue(p_scenarioSettings_Future.getPlannedTransportSavings_pct(), true); - -//Cars (VOLGORDE BELANGRIJK) -sl_hydrogenCarsCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenCars(), true); -sl_electricCarsCompany.setValue(p_scenarioSettings_Future.getPlannedEVCars(), true); -//sl_dieselCarsCompany.setValue(c_scenarioSettings_Future.getPlannedDieselCars(), true); - -//Vans (VOLGORDE BELANGRIJK) -sl_hydrogenVansCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenVans(), true); -sl_electricVansCompany.setValue(p_scenarioSettings_Future.getPlannedEVVans(), true); -//sl_dieselVansCompany.setValue(c_scenarioSettings_Future.getPlannedDieselVans(), true); - -//Trucks (VOLGORDE BELANGRIJK) -sl_hydrogenTrucksCompany.setValue(p_scenarioSettings_Future.getPlannedHydrogenTrucks(), true); -sl_electricTrucksCompany.setValue(p_scenarioSettings_Future.getPlannedEVTrucks(), true); -//sl_dieselTrucksCompany.setValue(c_scenarioSettings_Future.getPlannedDieselTrucks(), true); - -//set active if active in future -p_gridConnection.f_setActive(p_scenarioSettings_Future.getIsActiveInFuture()); - - -//Reset button to future, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(1, false); - - - VOID - double - 1713447383903 - f_setScenario - -430 - 370 - - false - true - true - - scenario_nr - int - - switch (scenario_nr){ - - case 0: // Current - f_setScenarioCurrent(); - - if(!b_runningMainInterfaceScenarioSettings){ - traceln("Selected scenario: Current"); - } - - break; - - case 1: // Future - f_setScenarioFuture(); - - if(!b_runningMainInterfaceScenarioSettings){ - traceln("Selected scenario: Future"); - } - break; - - case 2: // Custom - if(rb_scenariosPrivateUI.getValue() == 2){ - return; - } - rb_scenariosPrivateUI.setValue(2, false); - - if(!b_runningMainInterfaceSlider){ - traceln("Selected scenario: Custom"); - } - break; - - default: -} - -//Set 'results up to date' to false -zero_Interface.b_resultsUpToDate = false; - - - VOID - double - 1713447428490 - f_setScenarioCurrent - -410 - 390 - - false - true - true - //Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -////Heating - -//Heating savings -sl_heatDemandCompanyReduction.setValue(0, true); - -//Heating type -int nr_currentHeatingType = 0; -switch (p_scenarioSettings_Current.getCurrentHeatingType()){ - case GAS_BURNER: - nr_currentHeatingType = 0; - break; - - case HYBRID_HEATPUMP: - nr_currentHeatingType = 1; - break; - - case ELECTRIC_HEATPUMP: - nr_currentHeatingType = 2; - break; - - //case HYDROGENBURNER: - case DISTRICTHEAT: - nr_currentHeatingType = 3; - break; - - case GAS_CHP: - nr_currentHeatingType = 4; - break; - - default: -} -rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, true); - - -////Electricity - -//Electricity savings -sl_electricityDemandCompanyReduction.setValue(0, true); - -//Connection capacity (Delivery) -sl_GCCapacityCompany.setValue(p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW(), true); - -//Connection capacity (Feedin) -sl_GCCapacityCompany_Feedin.setValue(p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW(), true); - -//Connection capacity (Physical) -v_physicalConnectionCapacity_kW = p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW(); -p_gridConnection.v_liveConnectionMetaData.physicalCapacity_kW = v_physicalConnectionCapacity_kW; - -//Solar panel power -sl_rooftopPVCompany.setValue(v_minPVSlider, true); - -//Battery capacity -sl_batteryCompany.setValue(v_minBatSlider, true); - -//Curtailment setting -cb_curtailmentCompany.setSelected(false, false); - -////Mobility - -//Mobility savings -sl_mobilityDemandCompanyReduction.setValue(0, true); - -//Cars (VOLGORDE BELANGRIJK) -sl_hydrogenCarsCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenCars(), true); -sl_electricCarsCompany.setValue(p_scenarioSettings_Current.getCurrentEVCars(), true); -//sl_dieselCarsCompany.setValue(c_scenarioSettings_Current.getCurrentDieselCars(), true); - -//Vans (VOLGORDE BELANGRIJK) -sl_hydrogenVansCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenVans(), true); -sl_electricVansCompany.setValue(p_scenarioSettings_Current.getCurrentEVVans(), true); -//sl_dieselVansCompany.setValue(c_scenarioSettings_Current.getCurrentDieselVans(), true); - -//Trucks (VOLGORDE BELANGRIJK) -sl_hydrogenTrucksCompany.setValue(p_scenarioSettings_Current.getCurrentHydrogenTrucks(), true); -sl_electricTrucksCompany.setValue(p_scenarioSettings_Current.getCurrentEVTrucks(), true); -//sl_dieselTrucksCompany.setValue(c_scenarioSettings_Current.getCurrentDieselTrucks(), true); - -//set active if active in present -p_gridConnection.f_setActive(p_scenarioSettings_Current.getIsCurrentlyActive()); - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(0, false); - - - VOID - double - 1713537591106 - f_setHeatingType - -430 - 490 - - false - true - true - - GC - GridConnection - - - selectedHeatingType - OL_GridConnectionHeatingType - - //Check if selected is not the same as previous, if not: continue with the setting of new heating type -if (GC.f_getCurrentHeatingType() == selectedHeatingType){ - //traceln("Selected heating type is the same as previous heating type"); - return; -} - -//Remove from heat grid if it was connected to one. -GC.p_parentNodeHeat = null; -GC.p_parentNodeHeatID = null; - -//Remove primary heating asset -GC.f_removeAllHeatingAssets(); - -//Get needed cacacity -double capacityThermal_kW; - -//Select heat demand consumption asset -J_EAConsumption heatDemandAsset = findFirst(GC.c_consumptionAssets, j_ea->j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); - -//Check heating demand asset is null (shouldnt be possible) -if (heatDemandAsset != null){ - capacityThermal_kW = heatDemandAsset.yearlyDemand_kWh/8760*10; // --> average hourly consumption * 10 --> to always have enough capacity -} -else{ - //Select profile heat demand asset - J_EAProfile heatDemandAsset_Profile = findFirst(GC.c_profileAssets, j_ea->j_ea.energyCarrier == OL_EnergyCarriers.HEAT); - - if(heatDemandAsset_Profile != null){ - capacityThermal_kW = heatDemandAsset_Profile.getProfileScaling_fr() * max(heatDemandAsset_Profile.a_energyProfile_kWh)*4; - } - else{ - traceln("No heating demand asset found for GC:" + GC.p_gridConnectionID); - traceln("--> No heating asset created"); - return; - } - -} - -capacityThermal_kW = capacityThermal_kW * 2;//For now just make it always twice as high, to be able to support savings/additional consumption slider settings. - -//Algemeen -double timestep_h = zero_Interface.energyModel.p_timeStep_h; -double efficiency; -double outputTemperature_degC; - -//Heatpump specifieke parameters -double baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); -double capacityElectric_kW; -OL_AmbientTempType ambientTempType; -double sourceAssetHeatPower_kW; -double belowZeroHeatpumpEtaReductionFactor; - - - -//Create selected heating type -switch (selectedHeatingType){ - case GAS_BURNER: - - //Add primary heating asset (gasburner) - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; - - new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - - break; - - case HYBRID_HEATPUMP: - - //Add primary heating asset (heatpump) - capacityElectric_kW = capacityThermal_kW / 3; //-- /3, want is hybride, dus kleiner - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); - - //Add secondary heating asset (gasburner) - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyGasBurner_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureGasBurner_degC; - - J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - //GC.p_secondaryHeatingAsset = gasBurnerHybrid; - - break; - - case ELECTRIC_HEATPUMP: - - //Add primary heating asset (heatpump) - capacityElectric_kW = capacityThermal_kW; - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHeatpump_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - new J_EAConversionHeatPump(GC, capacityElectric_kW, efficiency, timestep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - - //Add secondary heating asset (if needed??) //E-boiler!!?? - break; - - case HYDROGENBURNER: - - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyHydrogenBurner_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureHydrogenBurner_degC; - - //Add primary heating asset (hydrogenburner) - new J_EAConversionHydrogenBurner(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - - break; - - case DISTRICTHEAT: - - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - - new J_EAConversionHeatDeliverySet(GC, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC); - - //Add GC to heat grid if it exists, else create new one - GC.p_parentNodeHeat = findFirst(zero_Interface.energyModel.f_getGridNodesTopLevel(), node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - if(GC.p_parentNodeHeat == null){ - GridNode GN_heat = zero_Interface.energyModel.add_pop_gridNodes(); - zero_Interface.energyModel.f_getGridNodesTopLevel().add(GN_heat); - GN_heat.p_gridNodeID = "Heatgrid"; - - // Check wether transformer capacity is known or estimated - GN_heat.p_capacity_kW = 1000000; - GN_heat.p_realCapacityAvailable = false; - - // Basic GN information - GN_heat.p_description = "Warmtenet"; - - //Define node type - GN_heat.p_nodeType = OL_GridNodeType.HT; - GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - - //Define GN location - GN_heat.p_latitude = 0; - GN_heat.p_longitude = 0; - GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - - //Connect - GC.p_parentNodeHeat = GN_heat; - - //Show warning that heat grid is not a simple solution - f_setErrorScreen("LET OP: Er is nu een 'warmtenet' gecreëerd. Maar er is geen warmtebron aanwezig in het model. Daarom zal de benodigde warmte voor het warmtenet in de resultaten te zien zijn als warmte import."); - } - GC.p_parentNodeHeatID = GC.p_parentNodeHeat.p_gridNodeID; - break; - - case GAS_CHP: - - efficiency = zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr + zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; - outputTemperature_degC = zero_Interface.energyModel.avgc_data.p_avgOutputTemperatureCHP_degC; - double outputCapacityElectric_kW = (capacityThermal_kW/zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_thermal_fr) * zero_Interface.energyModel.avgc_data.p_avgEfficiencyCHP_electric_fr; - - new J_EAConversionGasCHP(GC, outputCapacityElectric_kW, capacityThermal_kW, efficiency, timestep_h, outputTemperature_degC ); - - break; -} - -// Add a management for the chosen heating type -GC.f_addHeatManagement(selectedHeatingType, false); - - - VOID - double - 1713537591117 - f_setGCCapacity - -430 - 510 - - false - true - true - - GC - GridConnection - - - setGridConnectionCapacity_kW - double - - - type - String - - GC.f_nfatoSetConnectionCapacity(true); - -switch(type){ - case "DELIVERY": - GC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = setGridConnectionCapacity_kW; - break; - case "FEEDIN": - GC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = setGridConnectionCapacity_kW; - break; - case "PHYSICAL": - GC.v_liveConnectionMetaData.physicalCapacity_kW = setGridConnectionCapacity_kW; - break; -} - -GC.f_nfatoSetConnectionCapacity(false); - - - VOID - double - 1713537591121 - f_setBattery - -430 - 570 - - false - true - true - - GC - GridConnection - - - setBatteryCapacity_kWh - double - - J_EAStorage batteryAsset = findFirst(GC.c_storageAssets, p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); - -if (setBatteryCapacity_kWh == 0) { - if (batteryAsset != null) { - batteryAsset.removeEnergyAsset(); - } -} -else { - double c_rate = 1.0 / zero_Interface.energyModel.avgc_data.p_avgRatioBatteryCapacity_v_Power; - if (batteryAsset == null) { - batteryAsset = new J_EAStorageElectric(GC, setBatteryCapacity_kWh * c_rate, setBatteryCapacity_kWh, 0.5, zero_Interface.energyModel.p_timeStep_h); - } - else { - if (batteryAsset.getStorageCapacity_kWh() != 0) { - c_rate = ((J_EAStorageElectric)batteryAsset).getCapacityElectric_kW()/((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh(); - } - ((J_EAStorageElectric)batteryAsset).setStorageCapacity_kWh(setBatteryCapacity_kWh); - ((J_EAStorageElectric)batteryAsset).setCapacityElectric_kW(c_rate * setBatteryCapacity_kWh); - } -} - -//Add battery algorithm if it is not present -if(GC.f_getBatteryManagement() == null){ - GC.f_setBatteryManagement(new J_BatteryManagementSelfConsumption(GC)); -} - - - - VOID - double - 1713954180112 - f_setPVSystem - -430 - 530 - - false - true - true - - GC - GridConnection - - - v_rooftopPV_kWp - double - - if (GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - J_EAProduction pvAsset = findFirst(GC.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); - if (v_rooftopPV_kWp == 0) { - pvAsset.removeEnergyAsset(); - } - else { - pvAsset.setCapacityElectric_kW(v_rooftopPV_kWp); - } -} -else{ - if (v_rooftopPV_kWp != 0) { - f_addPVAsset(GC, OL_EnergyAssetType.PHOTOVOLTAIC, v_rooftopPV_kWp); - } -} - - - VOID - double - 1713956765904 - f_setSliderPresets - Set Slider presets (limits, start value, text) for private company sliders - -1090 - 190 - - false - true - true - //Heating radio button -f_setHeatingRB(); - -//Set grid capacity slider (delivery) -f_setGCCapacitySliderPresets(); - -//Set connection capacity slider (feedin) -f_setGCCapacitySliderPresets_Feedin(); - -//PV slider -f_setPVSliderPresets(); - -//Battery slider -f_setBatSliderPresets(); - -//Vehicles sliders -f_setVehicleSliderPresets(); - -//Demand Reduction sliders -f_setDemandReductionSliderPresets(); - - - VOID - double - 1713961813474 - f_setComboBoxOwnedGC - -1070 - 100 - - false - true - true - String currentSelectedGCString = ""; -int i = 1; -List<String> ownedGCs = new ArrayList<String>(); -for(GridConnection GC : p_gridConnection.p_owner.f_getOwnedGridConnections()){ - if(GC instanceof GCUtility){ - String GCDisplayName = "Aansluiting " + i + ": " + GC.p_address.getAddress(); - ownedGCs.add(GCDisplayName); - i++; - - if(GC == p_gridConnection){ - currentSelectedGCString = GCDisplayName; - } - } -} -String[] ownedGCsArray = new String[ownedGCs.size()]; -for(int j = 0; j < ownedGCsArray.length; j++){ - ownedGCsArray[j] = ownedGCs.get(j); -} - -cb_selectGC.setItems(ownedGCsArray, false); - -//Set cb to correct gc -cb_selectGC.setValue(currentSelectedGCString, false); - - - VOID - double - 1714139629738 - f_setPVSliderPresets - -1070 - 410 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_rooftopPVCompany.setRange(0, 2000000); - -//Set range specific for each company -v_minPVSlider = roundToInt(p_scenarioSettings_Current.getCurrentPV_kW()); -v_maxPVSlider = roundToInt(zero_Interface.energyModel.avgc_data.p_avgRatioRoofPotentialPV* p_gridConnection.p_roofSurfaceArea_m2*zero_Interface.energyModel.avgc_data.p_avgPVPower_kWpm2); -if(v_maxPVSlider <= v_minPVSlider){ - v_maxPVSlider = v_minPVSlider + 1000; -} -v_defaultPVSlider = v_minPVSlider; - - - VOID - double - 1714139648227 - f_setBatSliderPresets - -1070 - 490 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_batteryCompany.setRange(0, 10000); - -double upperLimit = 1000 + 1000 * Math.ceil(p_scenarioSettings_Current.getCurrentPV_kW()/1000.0); -v_minBatSlider = roundToInt(p_scenarioSettings_Current.getCurrentBatteryCapacity_kWh()); -v_maxBatSlider = Math.max(v_minBatSlider*2, upperLimit); -v_defaultBatSlider = v_minBatSlider; - - - VOID - double - 1714139684603 - f_setVehicleSliderPresets - -1070 - 570 - - false - true - true - //Cars -f_setCarSliderPresets(); - -//Vans -f_setVanSliderPresets(); - -//Trucks -f_setTruckSliderPresets(); - - - VOID - double - 1714140108358 - f_setCarSliderPresets - -1060 - 590 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_electricCarsCompany.setRange(0, 500); -sl_dieselCarsCompany.setRange(0, 500); -sl_hydrogenCarsCompany.setRange(0, 500); - - -//Get default values -int default_nbEVCars = p_scenarioSettings_Current.getCurrentEVCars(); -int default_nbDieselCars = p_scenarioSettings_Current.getCurrentDieselCars(); -int default_nbHydrogenCars = p_scenarioSettings_Current.getCurrentHydrogenCars(); - -//Set minimum value -v_minEVCarSlider = default_nbEVCars; -v_minDieselCarSlider = 0; -v_minHydrogenCarSlider = 0; - -//Determine realistic max additional vehicles -int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVCars + default_nbDieselCars + default_nbHydrogenCars)*1, 20); - -//Set maximum -v_maxEVCarSlider = default_nbEVCars + default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. -v_maxDieselCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; -v_maxHydrogenCarSlider = default_nbDieselCars + default_nbHydrogenCars + max_additonal_vehicles; - -//Set default values -v_nbEVCars = default_nbEVCars; -v_nbDieselCars = default_nbDieselCars; -v_nbHydrogenCars = default_nbHydrogenCars; - -//Set slider knobs -sl_electricCarsCompany.setValue(v_nbEVCars, false); -sl_dieselCarsCompany.setValue(v_nbDieselCars, false); -sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); - - - - VOID - double - 1714140134819 - f_setVanSliderPresets - -1060 - 790 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_electricVansCompany.setRange(0, 500); -sl_dieselVansCompany.setRange(0, 500); -sl_hydrogenVansCompany.setRange(0, 500); - -//Get default values -int default_nbEVVans = p_scenarioSettings_Current.getCurrentEVVans(); -int default_nbDieselVans = p_scenarioSettings_Current.getCurrentDieselVans(); -int default_nbHydrogenVans = p_scenarioSettings_Current.getCurrentHydrogenVans(); - -//Set minimum value -v_minEVVanSlider = default_nbEVVans; -v_minDieselVanSlider = 0; -v_minHydrogenVanSlider = 0; - -//Determine realistic max additional vehicles -int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVVans + default_nbDieselVans + default_nbHydrogenVans)*2, 20); - -//Set maximum -v_maxEVVanSlider = default_nbEVVans + default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. -v_maxDieselVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; -v_maxHydrogenVanSlider = default_nbDieselVans + default_nbHydrogenVans + max_additonal_vehicles; - -//Set default values -v_nbEVVans = default_nbEVVans; -v_nbDieselVans = default_nbDieselVans; -v_nbHydrogenVans = default_nbHydrogenVans; - -//Set slider knob -sl_electricVansCompany.setValue(v_nbEVVans, false); -sl_dieselVansCompany.setValue(v_nbDieselVans, false); -sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); - - - - VOID - double - 1714140156233 - f_setTruckSliderPresets - -1060 - 990 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_electricTrucksCompany.setRange(0, 500); -sl_dieselTrucksCompany.setRange(0, 500); -sl_hydrogenTrucksCompany.setRange(0, 500); - -//Get default values -int default_nbEVTrucks = p_scenarioSettings_Current.getCurrentEVTrucks(); -int default_nbDieselTrucks = p_scenarioSettings_Current.getCurrentDieselTrucks(); -int default_nbHydrogenTrucks = p_scenarioSettings_Current.getCurrentHydrogenTrucks(); - -//Set minimum value -v_minEVTruckSlider = default_nbEVTrucks; -v_minDieselTruckSlider = 0; -v_minHydrogenTruckSlider = 0; - -//Determine realistic max additional vehicles -int max_additonal_vehicles = p_maxAddedVehicles; //min((default_nbEVTrucks + default_nbDieselTrucks + default_nbHydrogenTrucks)*2, 20); - -//Set maximum -v_maxEVTruckSlider = default_nbEVTrucks + default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; // loading of EV is included in the quarter electricity data --> Cant filter --> cant get less EV than atm. -v_maxDieselTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; -v_maxHydrogenTruckSlider = default_nbDieselTrucks + default_nbHydrogenTrucks + max_additonal_vehicles; - -//Set default values -v_nbEVTrucks = default_nbEVTrucks; -v_nbDieselTrucks = default_nbDieselTrucks; -v_nbHydrogenTrucks = default_nbHydrogenTrucks; - -//Set slider knob -sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); -sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); -sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); - - - - VOID - double - 1714410040303 - f_createVehicle - -410 - 650 - - false - true - true - - parentGC - GridConnection - - - vehicleType - OL_EnergyAssetType - - - tripTracker - J_ActivityTrackerTrips - - - available - boolean - - - isAdditionalVehicle - boolean - - double energyConsumption_kWhpkm = 0; -double vehicleScaling = 1.0; -double timestep_h = zero_Interface.energyModel.p_timeStep_h; - -if (vehicleType == OL_EnergyAssetType.ELECTRIC_VEHICLE || vehicleType == OL_EnergyAssetType.ELECTRIC_VAN || vehicleType == OL_EnergyAssetType.ELECTRIC_TRUCK ){ // Create EVS - double storageCapacity_kWh = 0; - double capacityElectricity_kW = 0; - double stateOfCharge_fr = 1; // Initial state of charge - - switch(vehicleType){ - case ELECTRIC_VEHICLE: - capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVCarChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVCarChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerCar_kW; - storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageCar_kWh; - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; - break; - case ELECTRIC_VAN: - capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVVanChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVVanChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerVan_kW; - storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageVan_kWh; - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; - break; - case ELECTRIC_TRUCK: - capacityElectricity_kW = (p_scenarioSettings_Current.getCurrentEVTruckChargePower_kW() > 0) ? p_scenarioSettings_Current.getCurrentEVTruckChargePower_kW() : zero_Interface.energyModel.avgc_data.p_avgEVMaxChargePowerTruck_kW; - storageCapacity_kWh = zero_Interface.energyModel.avgc_data.p_avgEVStorageTruck_kWh; - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - break; - - } - - //Create EV and connect to GC and selected trip tracker - J_EAEV electricVehicle = new J_EAEV(parentGC, capacityElectricity_kW, storageCapacity_kWh, stateOfCharge_fr, timestep_h, energyConsumption_kWhpkm, vehicleScaling, vehicleType, tripTracker); - electricVehicle.available = available; - - - - if (isAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(electricVehicle); - } - else{ - zero_Interface.c_orderedVehicles.add(0, electricVehicle); - } -} - -else if (vehicleType == OL_EnergyAssetType.DIESEL_VEHICLE || vehicleType == OL_EnergyAssetType.DIESEL_VAN || vehicleType == OL_EnergyAssetType.DIESEL_TRUCK ){ // Create diesel vehicles - switch (vehicleType){ - - case DIESEL_VEHICLE: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionCar_kWhpkm; - break; - - case DIESEL_VAN: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionVan_kWhpkm; - break; - - case DIESEL_TRUCK: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - break; - } - - //Create Diesel vehicle and connect to GC and selected trip tracker - J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(parentGC, energyConsumption_kWhpkm, timestep_h, vehicleScaling, vehicleType, tripTracker); - dieselVehicle.available = available; - - - - if (isAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(dieselVehicle); - } - else{ - zero_Interface.c_orderedVehicles.add(0, dieselVehicle); - } -} - -else{ // (Hydrogen vehicles) - switch (vehicleType){ - case HYDROGEN_VEHICLE: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionCar_kWhpkm; - break; - case HYDROGEN_VAN: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionVan_kWhpkm; - break; - case HYDROGEN_TRUCK: - energyConsumption_kWhpkm = zero_Interface.energyModel.avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - break; - - } - - //Create Hydrogen vehicle and connect to GC and selected trip tracker - J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(parentGC, energyConsumption_kWhpkm, timestep_h, vehicleScaling, vehicleType, tripTracker); - hydrogenVehicle.available = available; - - - - if (isAdditionalVehicle){ - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).add(hydrogenVehicle); - } - else{ - zero_Interface.c_orderedVehicles.add(0, hydrogenVehicle); - } -} - - - - - VOID - int - 1714411599586 - f_setElectricVehicleSliders - -430 - 590 - - false - true - true - - GC - GridConnection - - - vehicleType - OL_EnergyAssetType - - - setAmountOfVehicles - int - - int local_EV_nb; -int local_DieselV_nb; -int local_HydrogenV_nb; -int max_amount_diesel_vehicles; - -OL_EnergyAssetType vehicleType_diesel; -OL_EnergyAssetType vehicleType_hydrogen; - -switch (vehicleType){ - - case ELECTRIC_VEHICLE: - - vehicleType_diesel = OL_EnergyAssetType.DIESEL_VEHICLE; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VEHICLE; - - local_EV_nb = v_nbEVCars; - local_DieselV_nb = v_nbDieselCars; - local_HydrogenV_nb = v_nbHydrogenCars; - - max_amount_diesel_vehicles = v_maxDieselCarSlider; - - break; - - case ELECTRIC_VAN: - - vehicleType_diesel = OL_EnergyAssetType.DIESEL_VAN; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VAN; - - local_EV_nb = v_nbEVVans; - local_DieselV_nb = v_nbDieselVans; - local_HydrogenV_nb = v_nbHydrogenVans; - - max_amount_diesel_vehicles = v_maxDieselVanSlider; - - break; - - case ELECTRIC_TRUCK: - - vehicleType_diesel = OL_EnergyAssetType.DIESEL_TRUCK; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_TRUCK; - - local_EV_nb = v_nbEVTrucks; - local_DieselV_nb = v_nbDieselTrucks; - local_HydrogenV_nb = v_nbHydrogenTrucks; - - max_amount_diesel_vehicles = v_maxDieselTruckSlider; - - break; - - default: - traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); - return; -} - - -if (setAmountOfVehicles > local_EV_nb){ // Slider has increased the amount of selected vehicles - - //First convert all other existing additional vehicles - int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_hydrogen).size(); - while(setAmountOfVehicles > local_EV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ - - // Find an additional Diesel vehicle - J_EAVehicle dieselVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel); - - if(dieselVehicle != null){ - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove Diesel vehicle - boolean available = dieselVehicle.getAvailability(); - dieselVehicle.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - - //Create new additional EV - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_EV_nb++; - local_DieselV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - else{ - // Find an additional Hydrogen vehicle - J_EAVehicle hydrogenVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove Hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - hydrogenVehicle.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - - //Create new additional EV - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_EV_nb++; - local_HydrogenV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - } - - while ( setAmountOfVehicles > local_EV_nb && local_DieselV_nb > 0) { - - // Find a Diesel vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove Diesel vehicle - boolean available = dieselVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - - //Create new EV - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_EV_nb++; - local_DieselV_nb--; - } - while (setAmountOfVehicles > local_EV_nb && local_HydrogenV_nb > 0){ - - // Find a Hydrogen vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove Hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - - //Create new EV - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_EV_nb++; - local_HydrogenV_nb--; - } - while (setAmountOfVehicles > local_EV_nb){ //If still not enough EV: - - // Create additional vehicles - f_createVehicle(GC, vehicleType, null, true, true); - - //Update variables - local_EV_nb++; - } - -} -else if(setAmountOfVehicles < local_EV_nb){ // Slider has decreased the amount of selected vehicles - - ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); - while(setAmountOfVehicles < local_EV_nb && additionalVehicles.size() > 0){ //If there are additional EV, remove them first - - //Find additional created vehicle - J_EAEV ev = (J_EAEV)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added - - // Remove electric vehicle - additionalVehicles.remove(ev); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - //Update variable - local_EV_nb--; - } - while ( setAmountOfVehicles < local_EV_nb && local_DieselV_nb < max_amount_diesel_vehicles) { - - //Find a to be removed EV - J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - //Remove EV - boolean available = ev.getAvailability(); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - // Create diesel vehicle - f_createVehicle(GC, vehicleType_diesel, tripTracker, available, false); - - local_EV_nb--; - local_DieselV_nb++; - } -} - - - -//Update variables -switch (vehicleType){ - - case ELECTRIC_VEHICLE: - - v_nbEVCars = local_EV_nb; - v_nbDieselCars = local_DieselV_nb; - v_nbHydrogenCars = local_HydrogenV_nb; - - break; - - case ELECTRIC_VAN: - - v_nbEVVans = local_EV_nb; - v_nbDieselVans = local_DieselV_nb; - v_nbHydrogenVans = local_HydrogenV_nb; - - break; - - case ELECTRIC_TRUCK: - - v_nbEVTrucks = local_EV_nb; - v_nbDieselTrucks = local_DieselV_nb; - v_nbHydrogenTrucks = local_HydrogenV_nb; - - break; -} - - - VOID - int - 1714471183392 - f_setDieselVehicleSliders - -430 - 630 - - false - true - true - - GC - GridConnection - - - vehicleType - OL_EnergyAssetType - - - setAmountOfVehicles - int - - int local_EV_nb; -int local_DieselV_nb; -int local_HydrogenV_nb; - -int min_amount_EV; -int max_amount_EV; - -OL_EnergyAssetType vehicleType_electric; -OL_EnergyAssetType vehicleType_hydrogen; - -switch (vehicleType){ - - case DIESEL_VEHICLE: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VEHICLE; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VEHICLE; - - local_EV_nb = v_nbEVCars; - local_DieselV_nb = v_nbDieselCars; - local_HydrogenV_nb = v_nbHydrogenCars; - - min_amount_EV = v_minEVCarSlider; - max_amount_EV = v_maxEVCarSlider; - - break; - - case DIESEL_VAN: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VAN; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_VAN; - - local_EV_nb = v_nbEVVans; - local_DieselV_nb = v_nbDieselVans; - local_HydrogenV_nb = v_nbHydrogenVans; - - min_amount_EV = v_minEVVanSlider; - max_amount_EV = v_maxEVVanSlider; - - break; - - case DIESEL_TRUCK: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_TRUCK; - vehicleType_hydrogen = OL_EnergyAssetType.HYDROGEN_TRUCK; - - local_EV_nb = v_nbEVTrucks; - local_DieselV_nb = v_nbDieselTrucks; - local_HydrogenV_nb = v_nbHydrogenTrucks; - - min_amount_EV = v_minEVTruckSlider; - max_amount_EV = v_maxEVTruckSlider; - - break; - - default: - traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); - return; -} - - -if (setAmountOfVehicles > local_DieselV_nb){ // Slider has increased the amount of selected vehicles - //First convert all other existing additional vehicles - int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen || p.energyAssetType == vehicleType_electric).size(); - while(setAmountOfVehicles > local_DieselV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ - - // Find an additional EV vehicle - J_EAVehicle ev = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_electric); - - if(ev != null){ - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - // Remove EV - boolean available = ev.getAvailability(); - ev.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); - zero_Interface.c_orderedVehicles.remove(ev); - - //Create new additional Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_DieselV_nb++; - local_EV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - else{ - // Find an additional Hydrogen vehicle - J_EAVehicle hydrogenVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_hydrogen); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove Hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - hydrogenVehicle.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - - //Create new additional Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_DieselV_nb++; - local_HydrogenV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - } - while ( setAmountOfVehicles > local_DieselV_nb && local_EV_nb > min_amount_EV) { - - // Find an EV - J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - //Remove one EV - boolean available = ev.getAvailability(); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - //Create new Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_DieselV_nb++; - local_EV_nb--; - } - while (setAmountOfVehicles > local_DieselV_nb && local_HydrogenV_nb > 0){ - - // Find a Hydrogen vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_hydrogen && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - - //Create new Diesel vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_DieselV_nb++; - local_HydrogenV_nb--; - } - while (setAmountOfVehicles > local_DieselV_nb){ // Create additional vehicles - - f_createVehicle(GC, vehicleType, null, true, true); - - local_DieselV_nb++; - } -} -else if(setAmountOfVehicles < local_DieselV_nb){ // Slider has decreased the amount of selected vehicles - - ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); - while(setAmountOfVehicles < local_DieselV_nb && additionalVehicles.size() > 0){ //Remove additional Diesel vehicles first - - //Find additional created vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added - - // Remove diesel vehicle - additionalVehicles.remove(dieselVehicle); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - - //Update variable - local_DieselV_nb--; - } - while ( setAmountOfVehicles < local_DieselV_nb && local_EV_nb < max_amount_EV) { - - // Find a to be removed Diesel vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove diesel vehicle - boolean available = dieselVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - - //Create new EV - f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); - - //Update variables - local_DieselV_nb--; - local_EV_nb++; - } -} - - - -//Update variables -switch (vehicleType){ - - case DIESEL_VEHICLE: - v_nbEVCars = local_EV_nb; - v_nbDieselCars = local_DieselV_nb; - v_nbHydrogenCars = local_HydrogenV_nb; - break; - - case DIESEL_VAN: - v_nbEVVans = local_EV_nb; - v_nbDieselVans = local_DieselV_nb; - v_nbHydrogenVans = local_HydrogenV_nb; - break; - - case DIESEL_TRUCK: - v_nbEVTrucks = local_EV_nb; - v_nbDieselTrucks = local_DieselV_nb; - v_nbHydrogenTrucks = local_HydrogenV_nb; - break; -} - - - VOID - int - 1714474430338 - f_setHydrogenVehicleSliders - -430 - 610 - - false - true - true - - GC - GridConnection - - - vehicleType - OL_EnergyAssetType - - - setAmountOfVehicles - int - - int local_EV_nb; -int local_DieselV_nb; -int local_HydrogenV_nb; - -int min_amount_EV; -int max_amount_EV; - -OL_EnergyAssetType vehicleType_electric; -OL_EnergyAssetType vehicleType_diesel; - -switch (vehicleType){ - - case HYDROGEN_VEHICLE: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VEHICLE; - vehicleType_diesel = OL_EnergyAssetType.DIESEL_VEHICLE; - - local_EV_nb = v_nbEVCars; - local_DieselV_nb = v_nbDieselCars; - local_HydrogenV_nb = v_nbHydrogenCars; - - min_amount_EV = v_minEVCarSlider; - max_amount_EV = v_maxEVCarSlider; - - break; - - case HYDROGEN_VAN: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_VAN; - vehicleType_diesel = OL_EnergyAssetType.DIESEL_VAN; - - local_EV_nb = v_nbEVVans; - local_DieselV_nb = v_nbDieselVans; - local_HydrogenV_nb = v_nbHydrogenVans; - - min_amount_EV = v_minEVVanSlider; - max_amount_EV = v_maxEVVanSlider; - - break; - - case HYDROGEN_TRUCK: - - vehicleType_electric = OL_EnergyAssetType.ELECTRIC_TRUCK; - vehicleType_diesel = OL_EnergyAssetType.DIESEL_TRUCK; - - local_EV_nb = v_nbEVTrucks; - local_DieselV_nb = v_nbDieselTrucks; - local_HydrogenV_nb = v_nbHydrogenTrucks; - - min_amount_EV = v_minEVTruckSlider; - max_amount_EV = v_maxEVTruckSlider; - - break; - - default: - traceln("SLIDER SET TO WRONG VEHICLE TYPE, DO NOTHING"); - return; -} - -if (setAmountOfVehicles > local_HydrogenV_nb){ // Slider has increased the amount of selected vehicles - - //First convert all other existing additional vehicles - int nbOfOtherAdditionalVehiclesOfThisClass = findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel || p.energyAssetType == vehicleType_electric).size(); - while(setAmountOfVehicles > local_HydrogenV_nb && nbOfOtherAdditionalVehiclesOfThisClass > 0 ){ - - // Find an additional Diesel vehicle - J_EAVehicle dieselVehicle = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_diesel); - - if(dieselVehicle != null){ - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - // Remove Diesel vehicle - boolean available = dieselVehicle.getAvailability(); - dieselVehicle.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(dieselVehicle); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - - //Create new additional Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_HydrogenV_nb++; - local_DieselV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - else{ - // Find an additional EV vehicle - J_EAVehicle ev = findFirst(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), p -> p.energyAssetType == vehicleType_electric); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - // Remove EV - boolean available = ev.getAvailability(); - ev.removeEnergyAsset(); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(ev); - zero_Interface.c_orderedVehicles.remove(ev); - - //Create new additional Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, true); - - //Update local variables - local_HydrogenV_nb++; - local_EV_nb--; - nbOfOtherAdditionalVehiclesOfThisClass--; - } - } - while ( setAmountOfVehicles > local_HydrogenV_nb && local_DieselV_nb > 0) { - - // Find a to be removed Diesel vehicle - J_EADieselVehicle dieselVehicle = (J_EADieselVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_diesel && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = dieselVehicle.tripTracker; - - //Remove diesel vehicle - boolean available = dieselVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(dieselVehicle); - dieselVehicle.removeEnergyAsset(); - - //Create new Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_HydrogenV_nb++; - local_DieselV_nb--; - - } - while (setAmountOfVehicles > local_HydrogenV_nb && local_EV_nb > min_amount_EV){ - - // Find a to be removed EV - J_EAEV ev = (J_EAEV)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType_electric && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = ev.tripTracker; - - // Remove EV - boolean available = ev.getAvailability(); - zero_Interface.c_orderedVehicles.remove(ev); - ev.removeEnergyAsset(); - - //Create new Hydrogen vehicle - f_createVehicle(GC, vehicleType, tripTracker, available, false); - - //Update variables - local_HydrogenV_nb++; - local_EV_nb--; - } - while (setAmountOfVehicles > local_HydrogenV_nb){ // Create additional vehicles - - f_createVehicle(GC, vehicleType, null, true, true); - local_HydrogenV_nb++; - } - - -} -else if(setAmountOfVehicles < local_HydrogenV_nb){ // Slider has decreased the amount of selected vehicles - - ArrayList<J_EAVehicle> additionalVehicles = new ArrayList<J_EAVehicle>(findAll(zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid), vehicle -> vehicle.energyAssetType == vehicleType )); - while(setAmountOfVehicles < local_HydrogenV_nb && additionalVehicles.size() > 0){//Remove additional Hydrogen vehicles first - - //Find additional created vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)additionalVehicles.get(additionalVehicles.size()-1); // Get latest added - - // Remove hydrogen vehicle - additionalVehicles.remove(hydrogenVehicle); - zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - - //Update variable - local_HydrogenV_nb--; - } - while ( setAmountOfVehicles < local_HydrogenV_nb && local_EV_nb < max_amount_EV) { - - // Find a to be removed Hydrogen vehicle - J_EAHydrogenVehicle hydrogenVehicle = (J_EAHydrogenVehicle)findFirst(zero_Interface.c_orderedVehicles, p -> p.energyAssetType == vehicleType && !zero_Interface.c_additionalVehicles.get(p_gridConnection.p_uid).contains(p) && ((GridConnection)p.getParentAgent()) == GC); - J_ActivityTrackerTrips tripTracker = hydrogenVehicle.tripTracker; - - // Remove hydrogen vehicle - boolean available = hydrogenVehicle.getAvailability(); - zero_Interface.c_orderedVehicles.remove(hydrogenVehicle); - hydrogenVehicle.removeEnergyAsset(); - - //Create new EV vehicle - f_createVehicle(GC, vehicleType_electric, tripTracker, available, false); - - //Update variables - local_HydrogenV_nb--; - local_EV_nb++; - } -} - -//Update variables -switch (vehicleType){ - - case HYDROGEN_VEHICLE: - - v_nbEVCars = local_EV_nb; - v_nbDieselCars = local_DieselV_nb; - v_nbHydrogenCars = local_HydrogenV_nb; - - break; - - case HYDROGEN_VAN: - - v_nbEVVans = local_EV_nb; - v_nbDieselVans = local_DieselV_nb; - v_nbHydrogenVans = local_HydrogenV_nb; - - break; - - case HYDROGEN_TRUCK: - - v_nbEVTrucks = local_EV_nb; - v_nbDieselTrucks = local_DieselV_nb; - v_nbHydrogenTrucks = local_HydrogenV_nb; - - break; -} - - - VOID - double - 1714654645264 - f_setResultsUIPresets - -1050 - 1350 - - false - true - true - //Set the order of the resultsUI to front but behind simulation screen group and load icon -presentation.remove(uI_Results_presentation); -presentation.insert(presentation.size()-1, uI_Results_presentation); -presentation.remove(gr_loadIcon); -presentation.insert(presentation.size()-1, gr_loadIcon); -presentation.remove(gr_simulateYearScreen); -presentation.insert(presentation.size()-1, gr_simulateYearScreen); -presentation.remove(gr_GCisPausedScreen); -presentation.insert(presentation.size()-1, gr_GCisPausedScreen); - - - -//Set the locations and visibilities of the ResultsUI agents -uI_Results.f_setChartProfiles_Presentation(0, 0, true); -uI_Results.f_setChartBalance_Presentation(530, 0, true); -uI_Results.f_setChartGridLoad_Presentation(1060, 0, false); -uI_Results.f_setChartSankey_Presentation(1060, 0, true); -uI_Results.f_setResultsUIHeader(null, null, false); - -//Disable KPIsummary button if KPIsummary is not selected -if(zero_Interface.settings.showKPISummary() == null || !zero_Interface.settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setVisible(false); -} -else{ - //uI_Results.f_setCB_KPISummary_Presentation(10, -30, true); -} - -//Set selected object display flase -uI_Results.b_isCompanyUIResultsUI = true; - -//Set the color of the charts -uI_Results.f_styleAllCharts(v_chartBackgroundColor, v_companyUILineColor, v_chartLineWidth, LINE_STYLE_SOLID); - - - VOID - double - 1714655282643 - f_setCompanyUI - -1090 - 40 - - false - true - true - - GC - GridConnection - - //Initialize parameters -p_gridConnection = GC; -p_companyName = GC.p_ownerID; -v_adressGC = GC.p_address.getAddress(); -p_scenarioSettings_Current = zero_Interface.c_scenarioMap_Current.get(GC.p_uid); -p_scenarioSettings_Future = zero_Interface.c_scenarioMap_Future.get(GC.p_uid); - -//Scale companyName to the box size -f_setNameTextSize(); - -//Set the sliders to the correct settings -f_setSelectedGCSliders(); - -//Set the new graphs/building selection -if(!b_runningMainInterfaceScenarioSettings && !b_runningMainInterfaceSlider && p_gridConnection.v_isActive){ - f_updateUIResultsCompanyUI(); - if(p_gridConnection.v_rapidRunData != null){ - uI_Results.f_setAllCharts(); - } -} - -//Set connected GC combobox -f_setComboBoxOwnedGC(); - -//Enable/disable all sliders (based on paused) -f_enableAllSliders(p_gridConnection.v_isActive); - - - - VOID - double - 1714656835269 - f_updateUIResultsCompanyUI - -1050 - 1370 - - false - true - true - uI_Results.f_updateResultsUI(p_gridConnection); -uI_Results.f_setChartProfiles_Presentation(null, null, true); -uI_Results.f_setChartBalance_Presentation(null, null, true); - -if(cb_showGridloadPlot.isSelected()) - uI_Results.f_setChartGridLoad_Presentation(null, null, true); -else{ - uI_Results.f_setChartSankey_Presentation(null, null, true); -} - - - VOID - double - 1715713362876 - f_setHeatingRB - -1070 - 210 - - false - true - true - int nr_currentHeatingType = 0; -String rbHeating_acces = "enabled"; - -switch (p_scenarioSettings_Current.getCurrentHeatingType()){ - case GAS_BURNER: - nr_currentHeatingType = 0; - break; - case HYBRID_HEATPUMP: - nr_currentHeatingType = 1; - rbHeating_acces = "disabled"; - break; - case ELECTRIC_HEATPUMP: - nr_currentHeatingType = 2; - rbHeating_acces = "disabled"; - break; - case DISTRICTHEAT: - nr_currentHeatingType = 3; - break; - case LT_DISTRICTHEAT: - nr_currentHeatingType = 3; - rbHeating_acces = "disabled"; - break; - case CUSTOM: - nr_currentHeatingType = 4; - rbHeating_acces = "disabled"; - break; - default: - rbHeating_acces = "invisible"; -} - -if (rbHeating_acces.equals("disabled") || rbHeating_acces.equals("invisible")){ - rb_heatingTypePrivateUI.setEnabled(false); - - if(p_gridConnection.v_hasQuarterHourlyValues){ - sl_heatDemandCompanyReduction.setEnabled(false); - } - - if (rbHeating_acces.equals("invisible")){ - rb_heatingTypePrivateUI.setVisible(false); - gr_heatDemandReductionSlider.setVisible(false); - } - else { - gr_heatDemandReductionSlider.setVisible(true); - } -} -else{ // if(rbHeating_acces.equals("enabled"){ - rb_heatingTypePrivateUI.setEnabled(true); - rb_heatingTypePrivateUI.setVisible(true); - sl_heatDemandCompanyReduction.setEnabled(true); - gr_heatDemandReductionSlider.setVisible(true); -} - - - - VOID - double - 1715952034311 - f_addPVAsset - -410 - 550 - - false - true - true - - parentGC - GridConnection - - - asset_type - OL_EnergyAssetType - - - installedPower_kW - double - - String asset_name = "Solar Panels"; -double capacityElectric_kW = installedPower_kW; -double capacityHeat_kW = 0; -double yearlyProductionMethane_kWh = 0; -double yearlyProductionHydrogen_kWh = 0; -double timestep_h = zero_Interface.energyModel.p_timeStep_h; -double outputTemperature_degC = 0; - -J_EAProduction production_asset = new J_EAProduction(parentGC, asset_type, asset_name, OL_EnergyCarriers.ELECTRICITY, capacityElectric_kW, timestep_h, zero_Interface.energyModel.pp_PVProduction35DegSouth_fr); -parentGC.v_liveAssetsMetaData.updateActiveAssetData(new ArrayList<GridConnection>(List.of(parentGC))); - - - - VOID - double - 1725439625846 - f_setSelectedGCSliders - -1070 - 80 - - false - true - true - //Reset GC capacities to without NFATO values -p_gridConnection.f_nfatoSetConnectionCapacity(true); - -//Initialize slider presets to selected GC (min, max, etc.) -f_setSliderPresets(); - -//If GC not active in current situation, disable scenario rb -rb_scenariosPrivateUI.setEnabled(p_scenarioSettings_Current.getIsCurrentlyActive()); - -//Find the current heating type -int nr_currentHeatingType = 0; -switch (p_gridConnection.f_getCurrentHeatingType()){ - case GAS_BURNER: - nr_currentHeatingType = 0; - break; - - case HYBRID_HEATPUMP: - nr_currentHeatingType = 1; - break; - - case ELECTRIC_HEATPUMP: - nr_currentHeatingType = 2; - break; - - case DISTRICTHEAT: - case LT_DISTRICTHEAT: - nr_currentHeatingType = 3; - break; - case CUSTOM: - nr_currentHeatingType = 4; - break; - default: - nr_currentHeatingType = 4; -} - -//Find the current heat saving percentage -int currentHeatSavings = 0; - -J_EAConsumption consumptionEAHEAT = findFirst(p_gridConnection.c_consumptionAssets, consumptionAsset -> consumptionAsset.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); -if (consumptionEAHEAT != null){ - currentHeatSavings = roundToInt((consumptionEAHEAT.getConsumptionScaling_fr() - 1)*-100); -} -else{ - J_EAProfile profileEAHEAT = findFirst(p_gridConnection.c_profileAssets, profileAsset -> profileAsset.energyCarrier == OL_EnergyCarriers.HEAT); - if (profileEAHEAT != null){ - currentHeatSavings = roundToInt((profileEAHEAT.getProfileScaling_fr() - 1)*-100); - } -} - -//Find the current electricity savings percentage -int currentElectricitySavings = 0; - -J_EAConsumption consumptionEAELECTRIC = findFirst(p_gridConnection.c_consumptionAssets, consumptionAsset -> consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND); -if (consumptionEAELECTRIC != null){ - currentElectricitySavings = roundToInt((consumptionEAELECTRIC.getConsumptionScaling_fr() - 1)*-100); -} -else{ - J_EAProfile profileEAELECTRIC = findFirst(p_gridConnection.c_profileAssets, profileAsset -> profileAsset.assetFlowCategory == OL_AssetFlowCategories.fixedConsumptionElectric_kW); - if (profileEAELECTRIC != null){ - currentElectricitySavings = roundToInt((profileEAELECTRIC.getProfileScaling_fr() - 1)*-100); - } -} - -//Find the current Connection capacity (delivery) -int GCContractCapacityCurrent_Delivery = roundToInt(p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - -//Find the current Connection capacity (feedin) -int GCContractCapacityCurrent_Feedin = roundToInt(p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - -//Set the nfato values -f_getNFATOValues(); - -//Find the current battery capacity -int BatteryCapacityCurrent = 0; -J_EAStorage batteryAsset = findFirst(p_gridConnection.c_storageAssets, p -> p.energyAssetType == OL_EnergyAssetType.STORAGE_ELECTRIC ); -if (batteryAsset != null){ - BatteryCapacityCurrent = roundToInt(((J_EAStorageElectric)batteryAsset).getStorageCapacity_kWh()); -} - -//Find the current PV capacity -int PVCapacityCurrent = 0; -if (p_gridConnection.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - J_EAProduction pvAsset = findFirst(p_gridConnection.c_productionAssets, p -> p.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC ); - PVCapacityCurrent = roundToInt(pvAsset.getCapacityElectric_kW()); -} - -//Find the current curtailment setting -boolean currentCurtailmentSetting = p_gridConnection.v_enableCurtailment; - -//Find the current transport savings -int currentTransportSavings = 0; -if (p_gridConnection.c_tripTrackers.size() > 0){ - currentTransportSavings = - roundToInt(p_gridConnection.c_tripTrackers.get(0).getDistanceScaling_fr()*100) + 100; -} - - -//Find the current number of vehicles for each type -int nbEcarsCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VEHICLE); -int nbHydrogencarsCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VEHICLE); -int nbDieselcarsCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VEHICLE); - -int nbEvansCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_VAN); -int nbHydrogenvansCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_VAN); -int nbDieselvansCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_VAN); - -int nbEtrucksCurrent = count(p_gridConnection.c_electricVehicles, p->p.energyAssetType == OL_EnergyAssetType.ELECTRIC_TRUCK); -int nbHydrogentrucksCurrent = count(p_gridConnection.c_hydrogenVehicles, p->p.energyAssetType == OL_EnergyAssetType.HYDROGEN_TRUCK); -int nbDieseltrucksCurrent = count(p_gridConnection.c_dieselVehicles, p->p.energyAssetType == OL_EnergyAssetType.DIESEL_TRUCK); - -//Check on electric cars, cause for companies that have quarterlyhour electricity data, the initial ea for EV (and other electric appliances) are not made. -if (p_gridConnection.v_hasQuarterHourlyValues){ - - nbEcarsCurrent += v_minEVCarSlider; - nbEvansCurrent += v_minEVVanSlider; - nbEtrucksCurrent += v_minEVTruckSlider; -} - - -////Set slider knobs at the currently (!) correct points - -//heating -rb_heatingTypePrivateUI.setValue(nr_currentHeatingType, false); - -//Heat savings -sl_heatDemandCompanyReduction.setValue(currentHeatSavings, false); - -//Electricity savings -sl_electricityDemandCompanyReduction.setValue(currentElectricitySavings, false); - -//Contract connection capacity (delivery) -sl_GCCapacityCompany.setValue(GCContractCapacityCurrent_Delivery, false); -v_defaultGCCapacitySlider = GCContractCapacityCurrent_Delivery; - -//Contract connection capacity (feedin) -sl_GCCapacityCompany_Feedin.setValue(GCContractCapacityCurrent_Feedin, false); -v_defaultGCCapacitySlider_Feedin = GCContractCapacityCurrent_Feedin; - -//Battery capacity -sl_batteryCompany.setValue(BatteryCapacityCurrent, false); -v_defaultBatSlider = BatteryCapacityCurrent; - -//Solar panel power -sl_rooftopPVCompany.setValue(PVCapacityCurrent, false); -v_defaultPVSlider = PVCapacityCurrent; - -//Curtailment setting -cb_curtailmentCompany.setSelected(currentCurtailmentSetting, false); - - -//Mobility savings -sl_mobilityDemandCompanyReduction.setValue(currentTransportSavings, false); - -//Cars -sl_electricCarsCompany.setValue(nbEcarsCurrent, false); -sl_hydrogenCarsCompany.setValue(nbHydrogencarsCurrent, false); -sl_dieselCarsCompany.setValue(nbDieselcarsCurrent, false); - -v_nbEVCars = nbEcarsCurrent; -v_nbHydrogenCars = nbHydrogencarsCurrent; -v_nbDieselCars = nbDieselcarsCurrent; - - -//Vans -sl_electricVansCompany.setValue(nbEvansCurrent, false); -sl_hydrogenVansCompany.setValue(nbHydrogenvansCurrent, false); -sl_dieselVansCompany.setValue(nbDieselvansCurrent, false); - -v_nbEVVans = nbEvansCurrent; -v_nbHydrogenVans = nbHydrogenvansCurrent; -v_nbDieselVans = nbDieselvansCurrent; - - -//Trucks -sl_electricTrucksCompany.setValue(nbEtrucksCurrent, false); -sl_hydrogenTrucksCompany.setValue(nbHydrogentrucksCurrent, false); -sl_dieselTrucksCompany.setValue(nbDieseltrucksCurrent, false); - -v_nbEVTrucks = nbEtrucksCurrent; -v_nbHydrogenTrucks = nbHydrogentrucksCurrent; -v_nbDieselTrucks = nbDieseltrucksCurrent; - -//Add nfato again -p_gridConnection.f_nfatoSetConnectionCapacity(false); - - - VOID - double - 1725439635605 - f_selectGCOnMainInterface - -410 - 300 - - false - true - true - //Select the newly selected GC also on the main interface (if not paused) -zero_Interface.f_clearSelectionAndSelectEnergyModel(); - -if(p_gridConnection.v_isActive){ - zero_Interface.f_selectBuilding(p_gridConnection.c_connectedGISObjects.get(0), p_gridConnection.c_connectedGISObjects); -} - - - VOID - double - 1725607045331 - f_setSimulateYearScreen - -430 - 830 - - false - true - true - if(!b_runningMainInterfaceScenarioSettings && !b_runningMainInterfaceSlider){ - //Update main interface sliders according to the companyUI changes - zero_Interface.f_updateMainInterfaceSliders(); - - //Set it for main interface as well - zero_Interface.f_resetSettings(); - - //Update variable to change to custom scenario - zero_Interface.f_setScenarioToCustom(); -} - - - VOID - double - 1725614403909 - f_setGCCapacitySliderPresets - -1070 - 230 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_GCCapacityCompany.setRange(0, 100000); - -//Get current grid capacity -double defaultGCCapacitySlider = p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW(); - -//Get future grid capacity -double futureGCCapacity_delivery_kW = p_scenarioSettings_Future.getRequestedContractDeliveryCapacity_kW(); - -//Get current physical capacity -v_physicalConnectionCapacity_kW = p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW(); - -//Set range specific for specific intervals of capacity -v_minGCCapacitySlider = 0; - -if(futureGCCapacity_delivery_kW < 100 && defaultGCCapacitySlider < 100){ - v_maxGCCapacitySlider = 150; -} -else if(futureGCCapacity_delivery_kW < 1000 && defaultGCCapacitySlider < 1000){ - v_maxGCCapacitySlider = 2000; -} -else if(futureGCCapacity_delivery_kW < 8000 && defaultGCCapacitySlider < 8000){ - v_maxGCCapacitySlider = 10000; -} -else if(futureGCCapacity_delivery_kW < 15000 && defaultGCCapacitySlider < 15000){ - v_maxGCCapacitySlider = 20000; -} -else{ - v_maxGCCapacitySlider = max(futureGCCapacity_delivery_kW, defaultGCCapacitySlider); -} - -v_defaultGCCapacitySlider = roundToInt(defaultGCCapacitySlider); - -//Set slider knob -sl_GCCapacityCompany.setValue(v_defaultGCCapacitySlider, false); - - - VOID - double - 1727712593952 - f_setNameTextSize - -1070 - 60 - - false - true - true - if (p_companyName == null) { - return; -} - -int nameLength = p_companyName.length(); - -int i = 0; -if(nameLength > 24){ - while(24+i != nameLength){ - - t_companyName.setScale(0.9); - i++; - } -} -//Works for now: Possible to make it more accurate using getFontMetrics package and comparing width of text with the name text box width. -//--> Not done for now, as it feels unnecessary. - - - VOID - double - 1727798399503 - f_setGCCapacitySliderPresets_Feedin - -1070 - 330 - - false - true - true - //Set back end range (to prevent anylogic errors) -sl_GCCapacityCompany_Feedin.setRange(0, 100000); - -//Get current grid capacity -double defaultGCCapacitySlider_Feedin = p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW(); - -//Set range specific for specific intervals of capacity -v_minGCCapacitySlider_Feedin = 0; - -if(defaultGCCapacitySlider_Feedin < 100){ - v_maxGCCapacitySlider_Feedin = 150; -} -else if(defaultGCCapacitySlider_Feedin < 1000){ - v_maxGCCapacitySlider_Feedin = 2000; -} -else if(defaultGCCapacitySlider_Feedin < 8000){ - v_maxGCCapacitySlider_Feedin = 10000; -} -else if(defaultGCCapacitySlider_Feedin < 15000){ - v_maxGCCapacitySlider_Feedin = 20000; -} -else{ - v_maxGCCapacitySlider_Feedin = defaultGCCapacitySlider_Feedin; -} - -v_defaultGCCapacitySlider_Feedin = roundToInt(defaultGCCapacitySlider_Feedin); - -//Set slider knob -sl_GCCapacityCompany_Feedin.setValue(v_defaultGCCapacitySlider_Feedin, false); - - - VOID - double - 1727884380899 - f_getNFATOValues - -430 - 705 - - false - true - true - v_NFATO_active = p_gridConnection.v_enableNFato; -v_NFATO_kW_delivery = p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacity_kW - v_defaultGCCapacitySlider; -v_NFATO_kW_feedin = p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacity_kW- v_defaultGCCapacitySlider_Feedin; - -if(v_NFATO_kW_delivery > 0){ - t_GCCapacityCompany_delivery_nfato.setColor(green); -} -else if(v_NFATO_kW_delivery < 0){ - t_GCCapacityCompany_delivery_nfato.setColor(red); -} -else{ - t_GCCapacityCompany_delivery_nfato.setColor(black); -} - -if(v_NFATO_kW_feedin > 0){ - t_GCCapacityCompany_Feedin_nfato.setColor(green); -} -else if(v_NFATO_kW_feedin < 0){ - t_GCCapacityCompany_Feedin_nfato.setColor(red); -} -else{ - t_GCCapacityCompany_Feedin_nfato.setColor(black); -} - - - - VOID - double - 1729515671654 - f_enableAllSliders - -1070 - 120 - - false - true - true - - enable - boolean - - sl_heatDemandCompanyReduction.setEnabled(enable); -rb_heatingTypePrivateUI.setEnabled(enable); - -sl_electricityDemandCompanyReduction.setEnabled(enable); -sl_GCCapacityCompany.setEnabled(enable); -sl_GCCapacityCompany_Feedin.setEnabled(enable); -sl_batteryCompany.setEnabled(enable); -sl_rooftopPVCompany.setEnabled(enable); -cb_curtailmentCompany.setEnabled(enable); - -sl_mobilityDemandCompanyReduction.setEnabled(enable); - -sl_electricCarsCompany.setEnabled(enable); -sl_hydrogenCarsCompany.setEnabled(enable); -sl_dieselCarsCompany.setEnabled(enable); - -sl_electricVansCompany.setEnabled(enable); -sl_hydrogenVansCompany.setEnabled(enable); -sl_dieselVansCompany.setEnabled(enable); - -sl_electricTrucksCompany.setEnabled(enable); -sl_hydrogenTrucksCompany.setEnabled(enable); -sl_dieselTrucksCompany.setEnabled(enable); - -// Disabled / Invisible heating based on current scenario settings -if (enable) { - f_setHeatingRB(); -} - - - VOID - double - 1747316158336 - f_setErrorScreen - 5540 - 1110 - - false - true - true - - errorMessage - String - - //Reset location and height -button_errorOK.setY(50); -rect_errorMessage.setY(-120); -rect_errorMessage.setHeight(200); -t_errorMessage.setY(-70); - -//Set position above all other things -presentation.remove(gr_errorScreen); -presentation.insert(presentation.size(), gr_errorScreen); - -int width_numberOfCharacters = 44; - -// Set Text -Pair<String, Integer> p = zero_Interface.v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); -errorMessage = p.getFirst(); -int numberOfLines = p.getSecond(); -int additionalLines = max(0, numberOfLines - 3); - -// Set Size -rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); -rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); -//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); -t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); - -t_errorMessage.setText(errorMessage); -gr_errorScreen.setVisible(true); - - - VOID - double - 1756898097088 - f_setDemandReductionSliderPresets - -1060 - 1240 - - false - true - true - v_minSavingsSliders = -50; -v_maxSavingsSliders = 50; -sl_heatDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); -sl_electricityDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); -sl_mobilityDemandCompanyReduction.setRange(v_minSavingsSliders, v_maxSavingsSliders); - - - VOID - double - 1760976810989 - f_selectDifferentOwnedGC - -430 - 280 - - false - true - true - - selectedOwnedGCIndex - int - - //Set companyUI to the new GC -f_setCompanyUI(p_gridConnection.p_owner.f_getOwnedGridConnections().get(selectedOwnedGCIndex)); - -//Select the gc on the main interface (map) aswell -f_selectGCOnMainInterface(); - - - - - - - 1708522361863 - connections - true - 20 - -160 - - false - true - true - false - COLLECTION_OF_LINKS - true - Object - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - 1708522362017 - zero_Interface - 20 - -120 - - false - true - true - - zerointerfaceloader - Zero_Interface - - - - - - 1714652079023 - uI_Results - -1050 - 1330 - - false - true - true - 1714652081119 - - digital_twin_results - UI_Results - - - - digital_twin_results - UI_Results - 1704197366556 - - - - - energyModel - - zero_Interface.energyModel - - - - p_cutOff_MWh - - - gr_infoText - - - gr_closeInfoText - - - t_infoTextDescription - - - rect_infoText - - - p_currentActiveInfoBubble - - - false - - 100 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089973 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - 1708522361869 - level - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - 1708612468547 - rect_canvas - -1160 - -400 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 4560 - 1800 - 0.0 - -1 - null - - - 1708522459040 - rect_background - 0 - 0 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1920 - 980 - 0.0 - -1 - v_companyUIBackgroundColor - null - - - 1713446065829 - rect_sliders - 0 - 140 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 360 - 840 - 0.0 - -1 - v_companyUIBackgroundColorSliders - null - - - 1708611929678 - rect_scenarios - 0 - 0 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 360 - 140 - 0.0 - -1 - v_companyUIBackgroundColorSliders - null - - - 1708611713278 - text - -440 - 20 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Colors and Styling - - SansSerif - 12 - - - LEFT - - - 1708611755978 - text4 - -750 - 20 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Company parameters - - SansSerif - 12 - - - LEFT - - - 1709571615104 - txt_storedScenarios - -750 - 110 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Scenarios - - SansSerif - 12 - - - LEFT - - - false - 1711555257574 - button1 - 180 - -80 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - p_gridConnection.va_gridConnection.navigateTo(); - - - - Go to GC in engine - - - - 1713447348497 - gr_scenarioRB - 140 - 100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1713447230459 - rb_scenariosPrivateUI - -100 - -60 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - if (p_scenarioSettings_Current != null && p_scenarioSettings_Future != null){ - f_setScenario(rb_scenariosPrivateUI.getValue()); -} - -// Simulate Year button on Interface -zero_Interface.f_resetSettings(); - - - - 0 - VERTICAL - - - - false - - - - 1713447252716 - txt_scenario - -100 - -80 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer een scenario - - Calibri - 20 - - - LEFT - - - - - 1713537625797 - txt_scenarioSettings - -440 - 340 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Set Sliders to Scenario - - SansSerif - 12 - - - LEFT - - - 1713957149840 - txt_sliderPresetsAndLimits - -1100 - 160 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Slider limits and presets - - SansSerif - 12 - - - LEFT - - - 1713957196998 - txt_sliderFunctions - -440 - 460 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Slider functions - - SansSerif - 12 - - - LEFT - - - false - 1714641703973 - button2 - 360 - -80 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - ((GIS_Building)p_gridConnection.c_connectedGISObjects.get(0)).va_building.navigateTo(); - - - - Go to Building in engine - - - - false - 1714641782724 - button3 - 0 - -80 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - p_gridConnection.p_owner.va_ConnectionOwner.navigateTo(); - - - - Go to Owner in engine - - - - 1714655090415 - txt_initialization - -1100 - 10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Initialization - - SansSerif - 12 - - - LEFT - - - 1714660279044 - txt_uiResult - -1060 - 1300 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - UI_Result connection (graphs) - - SansSerif - 12 - - - LEFT - - - 1715626747942 - gr_companyUISliders - 310 - 445 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1713446221121 - txt_warmte - -240 - -270 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Warmte - - Calibri - 22 - - - LEFT - - - 1713446658919 - t_GCCapacityCompany - -85 - 6 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - sl_GCCapacityCompany.getIntValue() + " kW" - - Dialog - 14 - - - RIGHT - - - false - 1713446658921 - sl_GCCapacityCompany - -58 - 1 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - f_setGCCapacity(p_gridConnection, sl_GCCapacityCompany.getValue(), "DELIVERY"); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_defaultGCCapacitySlider - HORIZONTAL - v_minGCCapacitySlider - v_maxGCCapacitySlider - 1 - false - - - - 1713446658933 - txt_GCCapacity - -290 - 6 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Contr. capaciteit (af.) - - Dialog - 14 - - - LEFT - - - 1713446065831 - gr_heatDemandReductionSlider - -120 - -106 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1713446065865 - sl_heatDemandCompanyReduction - 62 - -130 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - double newHeatDemandReduction_pct = sl_heatDemandCompanyReduction.getValue(); -double consumptionScaling_fr = 1 - newHeatDemandReduction_pct/100; - -for (J_EA j_ea : p_gridConnection.c_energyAssets){ - if (j_ea instanceof J_EAConsumption) { - if (j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND) { - ((J_EAConsumption)j_ea).setConsumptionScaling_fr(consumptionScaling_fr); - } - } - if (j_ea instanceof J_EAProfile) { - if (((J_EAProfile) j_ea).energyCarrier== OL_EnergyCarriers.HEAT) { - ((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr ); - } - } -} - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - 0 - HORIZONTAL - v_minSavingsSliders - v_maxSavingsSliders - 1 - false - - - - 1713446065869 - text195 - -170 - -125 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Besparing warmte - - Dialog - 14 - - - LEFT - - - 1713446065871 - t_heatDemandReductionCompanies - 35 - -125 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0% - sl_heatDemandCompanyReduction.getIntValue() + "%" - - Dialog - 14 - - - RIGHT - - - - - 1713446065985 - txt_elektriciteit - -240 - -68 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Elektriciteit - - Calibri - 22 - - - LEFT - - - 1713446438059 - txt_mobiliteit - -240 - 166 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Transport - - Calibri - 22 - - - LEFT - - - 1713446065961 - t_electricityDemandReductionCompany - -85 - -24 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0% - sl_electricityDemandCompanyReduction.getIntValue() + "%" - - - Dialog - 14 - - - RIGHT - - - false - 1713446065963 - sl_electricityDemandCompanyReduction - -58 - -29 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - double newElectricityDemandReduction_pct = sl_electricityDemandCompanyReduction.getValue(); -double consumptionScaling_fr = 1 - newElectricityDemandReduction_pct/100; - -for (J_EA j_ea : p_gridConnection.c_energyAssets) { - if (j_ea instanceof J_EAConsumption) { - if (j_ea.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND) { - ((J_EAConsumption)j_ea).setConsumptionScaling_fr(consumptionScaling_fr); - } - } - if (j_ea instanceof J_EAProfile) { - if (((J_EAProfile) j_ea).energyCarrier == OL_EnergyCarriers.ELECTRICITY) { - ((J_EAProfile) j_ea).setProfileScaling_fr( consumptionScaling_fr ); - } - } -} - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - - 0 - HORIZONTAL - v_minSavingsSliders - v_maxSavingsSliders - 1 - false - - - - 1713446065965 - text279 - -290 - -24 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Besparing elektriciteit - - Dialog - 14 - - - LEFT - - - 1713447888398 - gr_companyMobilitySliders - -120 - 360 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1713446839189 - sl_electricVansCompany - 62 - -3 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_VAN, (int)sl_electricVansCompany.getValue()); - -//Update the other two sliders aswell -sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); -sl_dieselVansCompany.setValue(v_nbDieselVans, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbEVVans - HORIZONTAL - v_minEVVanSlider - v_maxEVVanSlider - 1 - false - v_nbEVVans - - - - 1713446839191 - text266 - -170 - 0 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Elektrisch - - Dialog - 14 - - - LEFT - - - 1713446839193 - t_numberOfElectricVansCompany - 35 - 0 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_electricVansCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - false - 1713446839195 - sl_hydrogenVansCompany - 62 - 22 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_VAN, (int)sl_hydrogenVansCompany.getValue()); - -//Update the other two sliders aswell -sl_electricVansCompany.setValue(v_nbEVVans, false); -sl_dieselVansCompany.setValue(v_nbDieselVans, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbHydrogenVans - HORIZONTAL - v_minHydrogenVanSlider - v_maxHydrogenVanSlider - 1 - false - v_nbHydrogenVans - - - - 1713446839197 - text271 - -170 - 25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Waterstof - - Dialog - 14 - - - LEFT - - - 1713446839199 - t_numberOfHydrogenVansCompany - 35 - 25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_hydrogenVansCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - false - 1713446839201 - sl_dieselVansCompany - 62 - 47 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_VAN, (int)sl_dieselVansCompany.getValue()); - -//Update the other two sliders aswell -sl_electricVansCompany.setValue(v_nbEVVans, false); -sl_hydrogenVansCompany.setValue(v_nbHydrogenVans, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbDieselVans - HORIZONTAL - v_minDieselVanSlider - v_maxDieselVanSlider - 1 - false - v_nbDieselVans - - - - 1713446839203 - text285 - -170 - 50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Fossiele brandstof - - Dialog - 14 - - - LEFT - - - 1713446839205 - t_numberOfDieselVansCompany - 35 - 50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_dieselVansCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446839207 - text274 - -170 - -25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Busjes - - Dialog - 14 - - - LEFT - - - 1713446857516 - t_numberOfDieselTrucksCompany - 35 - 145 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_dieselTrucksCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446857518 - t_numberOfHydrogenTrucksCompany - 35 - 120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_hydrogenTrucksCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446857520 - text272 - -170 - 120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Waterstof - - Dialog - 14 - - - LEFT - - - 1713446857522 - text286 - -170 - 145 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Fossiele brandstof - - Dialog - 14 - - - LEFT - - - 1713446857524 - text268 - -170 - 95 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Elektrisch - - Dialog - 14 - - - LEFT - - - 1713446857528 - text275 - -170 - 70 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Trucks - - Dialog - 14 - - - LEFT - - - false - 1713446857530 - sl_hydrogenTrucksCompany - 62 - 117 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_TRUCK, (int)sl_hydrogenTrucksCompany.getValue()); - -//Update the other two sliders aswell -sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); -sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbHydrogenTrucks - HORIZONTAL - v_minHydrogenTruckSlider - v_maxHydrogenTruckSlider - 1 - false - v_nbHydrogenTrucks - - - - 1713446857532 - t_numberOfElectricTrucksCompany - 35 - 95 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_electricTrucksCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - false - 1713446857534 - sl_electricTrucksCompany - 62 - 92 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_TRUCK, (int)sl_electricTrucksCompany.getValue()); - -//Update the other two sliders aswell -sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); -sl_dieselTrucksCompany.setValue(v_nbDieselTrucks, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbEVTrucks - HORIZONTAL - v_minEVTruckSlider - v_maxEVTruckSlider - 1 - false - v_nbEVTrucks - - - - false - 1713446857526 - sl_dieselTrucksCompany - 62 - 142 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_TRUCK, (int)sl_dieselTrucksCompany.getValue()); - -//Update the other two sliders aswell -sl_electricTrucksCompany.setValue(v_nbEVTrucks, false); -sl_hydrogenTrucksCompany.setValue(v_nbHydrogenTrucks, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbDieselTrucks - HORIZONTAL - v_minDieselTruckSlider - v_maxDieselTruckSlider - 1 - false - v_nbDieselTrucks - - - - false - 1713446065901 - sl_electricCarsCompany - 62 - -103 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setElectricVehicleSliders(p_gridConnection, OL_EnergyAssetType.ELECTRIC_VEHICLE, (int)sl_electricCarsCompany.getValue()); - -//Update the other two sliders aswell -sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); -sl_dieselCarsCompany.setValue(v_nbDieselCars, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbEVCars - HORIZONTAL - v_minEVCarSlider - v_maxEVCarSlider - 1 - false - v_nbEVCars - - - - 1713446065907 - text265 - -170 - -100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Elektrisch - - Dialog - 14 - - - LEFT - - - 1713446065909 - t_numberOfElectricCarsCompany - 35 - -100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_electricCarsCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446065917 - text267 - -170 - -155 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Besparing transport - - Dialog - 14 - - - LEFT - - - false - 1713446065919 - sl_mobilityDemandCompanyReduction - 62 - -160 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - p_gridConnection.c_tripTrackers.forEach(tt -> tt.distanceScaling_fr = 1-sl_mobilityDemandCompanyReduction.getValue()/100); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - 0 - HORIZONTAL - v_minSavingsSliders - v_maxSavingsSliders - 1 - false - - - - 1713446065921 - t_mobilityDemandReductionCompany - 35 - -155 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0% - sl_mobilityDemandCompanyReduction.getIntValue() + "%" - - Dialog - 14 - - - RIGHT - - - false - 1713446065923 - sl_hydrogenCarsCompany - 62 - -78 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setHydrogenVehicleSliders(p_gridConnection, OL_EnergyAssetType.HYDROGEN_VEHICLE, (int)sl_hydrogenCarsCompany.getValue()); - -//Update the other two sliders aswell -sl_electricCarsCompany.setValue(v_nbEVCars, false); -sl_dieselCarsCompany.setValue(v_nbDieselCars, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbHydrogenCars - HORIZONTAL - v_minHydrogenCarSlider - v_maxHydrogenCarSlider - 1 - false - v_nbHydrogenCars - - - - 1713446065925 - text270 - -170 - -75 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Waterstof - - Dialog - 14 - - - LEFT - - - 1713446065927 - t_numberOfHydrogenCarsCompany - 35 - -75 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_hydrogenCarsCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - false - 1713446065933 - sl_dieselCarsCompany - 62 - -54 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //Slider function -f_setDieselVehicleSliders(p_gridConnection, OL_EnergyAssetType.DIESEL_VEHICLE, (int)sl_dieselCarsCompany.getValue()); - -//Update the other two sliders aswell -sl_electricCarsCompany.setValue(v_nbEVCars, false); -sl_hydrogenCarsCompany.setValue(v_nbHydrogenCars, false); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_nbDieselCars - HORIZONTAL - v_minDieselCarSlider - v_maxDieselCarSlider - 1 - false - v_nbDieselCars - - - - 1713446065935 - text284 - -170 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Fossiele brandstof - - Dialog - 14 - - - LEFT - - - 1713446065937 - t_numberOfDieselCarsCompany - 35 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 - sl_dieselCarsCompany.getIntValue() - - Dialog - 14 - - - RIGHT - - - 1713446065939 - text273 - -170 - -125 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Autos - - Dialog - 14 - - - LEFT - - - - - 1713547081193 - gr_selectedGC - -60 - -290 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1713544148158 - cb_selectGC - -84 - -13 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - f_selectDifferentOwnedGC(cb_selectGC.getValueIndex()); - - - - false - - - false - - - - 1713547027389 - text9 - -240 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geselecteerde Aansluiting: - - SansSerif - 12 - - - LEFT - - - - - false - 1713963799790 - sl_batteryCompany - -58 - 61 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - //traceln("Slider werkt nog niet volledig!!, batterij sturing werkt nog niet goed"); -f_setBattery(p_gridConnection, sl_batteryCompany.getValue()); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_defaultBatSlider - HORIZONTAL - v_minBatSlider - v_maxBatSlider - 1 - false - - - - 1713963799825 - t_batteryCompany - -85 - 66 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kWh - sl_batteryCompany.getIntValue() + " kWh" - - Dialog - 14 - - - RIGHT - - - 1713963799827 - text283 - -290 - 66 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Batterij capaciteit - - Dialog - 14 - - - LEFT - - - 1715084970828 - g_energyDemandSettings - 280 - -100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1715084970830 - gr_electricityButton1 - -560 - 42 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1715084970832 - ovalElectricityButton1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -32 - null - - - 1715084970834 - image4 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-electricity-3408805.png - - - false - - - - - 1715084970836 - gr_heatButton1 - -560 - -160 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1715084970838 - ovalHeatButton1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -6943 - null - - - 1715084970840 - image11 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-fire-2429630.png - - - false - - - - - 1715084970842 - gr_transportButton1 - -560 - 276 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1715084970844 - ovalTransportButton1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -2625550 - null - - - 1715084970846 - image16 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-car-1777731.png - - - false - - - - - - - false - 1715093089631 - rb_heatingTypePrivateUI - -290 - -206 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - if (!rb_heatingTypePrivateUI.isEnabled()){// check if disabled, if so, skip when called - return; -} - -//Convert radiobutton integer to OL type -OL_GridConnectionHeatingType selectedHeatingType; -switch (rb_heatingTypePrivateUI.getValue()){ - case 0: - selectedHeatingType = OL_GridConnectionHeatingType.GAS_BURNER; - break; - case 1: - selectedHeatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; - break; - case 2: - selectedHeatingType = OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP; - break; - case 3: - selectedHeatingType = OL_GridConnectionHeatingType.DISTRICTHEAT; - break; - case 4: - selectedHeatingType = OL_GridConnectionHeatingType.CUSTOM; - f_setErrorScreen("De 'custom' verwarming optie wordt alleen gebruikt ter visualisatie voor bedrijven die starten met een 'custom' warmte systeem. In plaats van 'custom' is de knop nu gezet op 'HR ketel aardgas'."); - rb_heatingTypePrivateUI.setValue(0); - return; - default: - selectedHeatingType = OL_GridConnectionHeatingType.NONE; -} - - -//Radio button function -f_setHeatingType(p_gridConnection, selectedHeatingType); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - - 0 - VERTICAL - - - - - - false - - - - 1725618990626 - t_rooftopSolarCompany - -85 - 96 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - sl_rooftopPVCompany.getIntValue() + " kW" - - Dialog - 14 - - - RIGHT - - - false - 1725618990628 - sl_rooftopPVCompany - -58 - 91 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - f_setPVSystem(p_gridConnection, sl_rooftopPVCompany.getValue()); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_defaultPVSlider - HORIZONTAL - v_minPVSlider - v_maxPVSlider - 1 - false - - - - 1725618990630 - txt_PVPower - -290 - 96 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - PV vermogen - - Dialog - 14 - - - LEFT - - - 1727796446739 - t_GCCapacityCompany_Feedin - -85 - 36 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - sl_GCCapacityCompany_Feedin.getIntValue() + " kW" - - Dialog - 14 - - - RIGHT - - - false - 1727796446741 - sl_GCCapacityCompany_Feedin - -58 - 31 - - true - true - false - SHAPE_DRAW_2D3D - - false - true - f_setGCCapacity(p_gridConnection, sl_GCCapacityCompany_Feedin.getValue(), "FEEDIN"); - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - v_defaultGCCapacitySlider_Feedin - HORIZONTAL - v_minGCCapacitySlider_Feedin - v_maxGCCapacitySlider_Feedin - 1 - false - - - - 1727796446743 - txt_GCCapacityCompany_Feedin - -290 - 36 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Contr. capaciteit (te.) - - Dialog - 14 - - - LEFT - - - - - false - 1708523022017 - button - 1670 - 20 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - zero_Interface.uI_Results.getCheckbox_KPISummary().setSelected(false, true); - -zero_Interface.va_Interface.navigateTo(); -zero_Interface.v_currentViewArea = zero_Interface.va_Interface; - - - - - Terug naar hoofdscherm - - - - 1725365029204 - gr_companyDetails - 1140 - 80 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725366551214 - roundRect_companyName - -298 - -59.512 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 596 - 119.024 - 0.0 - -1 - null - 10 - - - 1708611721668 - t_companyName - 0 - -46.34 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Company Name - p_companyName - - SansSerif - 48 - - - CENTER - - - 1708611716618 - t_GCadress - 0 - 23.17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Adress - v_adressGC - - SansSerif - 20 - - - CENTER - - - - - 1714652081119 - uI_Results_presentation - 380 - 220 - - false - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - 1725381132369 - mask_resultsUI1 - 370 - 60 - - false - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 470 - 110 - 0.0 - -1 - null - - - 1725381214835 - mask_resultsUI2 - 845 - 270 - - false - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 2495 - 700 - 0.0 - -1 - null - - - 1725382426671 - gr_chartNameLeft - 610 - 200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725381345763 - rect_chartNameLeft - -230 - -30 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth - -16777216 - v_companyUILineColor - null - SOLID - 460 - 50 - 0.0 - -1 - v_chartBackgroundColor - null - - - 1725382366046 - txt_chartNameLeft - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Profielen - - SansSerif - 24 - - - CENTER - - - - - 1725382459577 - gr_chartNameMiddle - 1140 - 200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725382459579 - rect_chartNameMiddle - -230 - -30 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth - -16777216 - v_companyUILineColor - null - SOLID - 460 - 50 - 0.0 - -1 - v_chartBackgroundColor - null - - - 1725382459581 - txt_chartNameMiddle - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Opwek/verbruik diagram - - SansSerif - 24 - - - CENTER - - - - - 1725382464651 - gr_chartNameRight - 1670 - 200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725382464653 - rect_chartNameRight - -230 - -30 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth - -16777216 - v_companyUILineColor - null - SOLID - 460 - 50 - 0.0 - -1 - v_chartBackgroundColor - null - - - 1725382464655 - txt_chartNameRight - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energiestromen - - SansSerif - 24 - - - CENTER - - - - - 1725606178083 - gr_simulateYearScreen - 1375 - 540 - - true - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725606178085 - rect_simulateYearScreen2 - -535 - -320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -6943 - v_companyUIBackgroundColor - null - SOLID - 1060 - 750 - 0.0 - -1 - v_companyUIBackgroundColor - null - - - 1725606178087 - gr_simulateYearToCalculateKPIs - -35 - 40 - - true - true - false - SHAPE_DRAW_2D3D - //Set correct overlay -gr_simulateYearScreen.setVisible(false); -gr_loadIcon.setVisible(true); - - -//Run simulation -new Thread( () -> { - zero_Interface.energyModel.f_runRapidSimulation(); - zero_Interface.uI_Results.f_updateResultsUI(zero_Interface.energyModel); - f_updateUIResultsCompanyUI(); - gr_loadIcon.setVisible(false); - - //Update and show kpi summary chart after run - if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setSelected(true, true); - } - - //Update results up to date boolean - uI_Results.f_enableNonLivePlotRadioButtons(true); - zero_Interface.b_resultsUpToDate = true; - zero_Interface.gr_simulateYear.setVisible(false); - zero_Interface.uI_Results.f_enableNonLivePlotRadioButtons(true); - -}).start(); - - - - - false - 0 - 0.0 - - - 1725606178089 - t_simulateYearToCalculateCostsSmall - -140 - -40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simuleer jaar voor KPI's - - SansSerif - 28 - - - CENTER - - - 1725606178091 - image_simulateYearToCalculateCostsSmall - -420 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 102.315 - 99.723 - 0.0 - - - zerointerfaceloader - icon_greater_than.png - - - false - - - - - - - 1725606178111 - gr_loadIcon - 2360 - 280 - - true - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725606178113 - rect_loadIcon - -1520 - -60.969 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -369756683 - v_loadScreenColor - null - SOLID - 1065 - 755.969 - 0.0 - -369756683 - v_loadScreenColor - null - - - 1729516584700 - rect_GCisPausedScreen3 - -1990 - -60 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -6943 - v_loadScreenColor - null - SOLID - 480 - 755 - 0.0 - -1 - v_loadScreenColor - null - - - 1725606744485 - gr_loadIconText - -1220 - 280 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1725606744487 - image_loadIconSmall - -27.610999999999876 - -5.4780000000000655 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 61.016 - 60.969 - 0.0 - - - zerointerfaceloader - icon_loading.gif - - - false - - - 1725606744489 - t_loadIconSmall - 2.8969999999999345 - -55.96199999999999 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Jaar wordt gesimuleerd - - SansSerif - 28 - - - CENTER - - - - - - - 1727797637172 - txt_curtailmentDescriptionCompany - 20 - 571 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Curtailment opwek - - Dialog - 14 - - - LEFT - - - false - 1727797637174 - cb_curtailmentCompany - 291 - 564 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - if (cb_curtailmentCompany.isSelected()) { - p_gridConnection.v_enableCurtailment = true; -} -else { - p_gridConnection.v_enableCurtailment = false; -} - -//Set scenario to custom -f_setScenario(2); - -// Simulate Year screen -f_setSimulateYearScreen(); - - - - - false - - - - 1727883464770 - txt_nfatoValues - -440 - 680 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - NF ATO values - - SansSerif - 12 - - - LEFT - - - 1727939194812 - gr_TableConnectionCapacity - 565 - 80 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1727939194814 - rect_table_GridconnectionCapacaties - -185 - -60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 380 - 120 - 0.0 - -1 - null - - - 1727939194816 - txt_additionalGCCapacityInfo - -178 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Aansluitings capaciteit type - - SansSerif - 16 - - - LEFT - - - 1727939194818 - text1 - -175 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Fysieke capaciteit - - SansSerif - 14 - - - LEFT - - - 1727939194820 - text2 - -175 - 8 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Contract capaciteit afname - - SansSerif - 14 - - - LEFT - - - 1727939194822 - text3 - -175 - 33 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Contract capaciteit teruglevering - - SansSerif - 14 - - - LEFT - - - 1727939194824 - t_GCCapacityCompany_delivery2 - 152 - 8 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - t_GCCapacityCompany.getText() - - Dialog - 14 - - - CENTER - - - 1727939194826 - t_GCCapacityCompany_Feedin_2 - 152 - 33 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - t_GCCapacityCompany_Feedin.getText() - - Dialog - 14 - - - CENTER - - - 1727939194828 - t_GCCapacityCompany_physical - 152 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - roundToInt(v_physicalConnectionCapacity_kW) + " kW" - - Dialog - 14 - - - CENTER - - - 1727939194830 - line_table_ConnectionCapacityInfo_1 - 41 - -60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1 - 0 - 1 - 0 - 0 - 120 - 0 - - - 1727939194832 - txt_table_ConnectionCapacityInfo_owned - 152 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Capaciteit - - SansSerif - 16 - - - CENTER - - - 1727939194834 - line_table_ConnectionCapacityInfo_3 - -185 - -25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1 - 0 - 1 - 0 - 380 - 0 - 0 - - - 1727939206993 - gr_table_nfato - 225 - 0 - - true - true - false - SHAPE_DRAW_2D3D - v_NFATO_active - - - - - false - 0 - 0.0 - - - 1727939206995 - rect_Table_NFATO - -30 - -60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 65 - 120 - 0.0 - -1 - null - - - 1727939206997 - txt_table_ConnectionCapacityInfo_nfato - 3 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - NF ATO - - SansSerif - 16 - - - CENTER - - - 1727939206999 - t_GCCapacityCompany_delivery_nfato - 0.5 - 8 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - roundToInt(v_NFATO_kW_delivery) + " kW" - - Dialog - 14 - - - CENTER - - - 1727939207001 - t_GCCapacityCompany_Feedin_nfato - 0.5 - 33 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - 0 kW - roundToInt(v_NFATO_kW_feedin) + " kW" - - Dialog - 14 - - - CENTER - - - 1727939207003 - t_GCCapacityCompany_physical_nfato - 0.5 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - --- - - Dialog - 14 - - - CENTER - - - 1727939207005 - line_table_ConnectionCapacityInfo_NFATO - -30 - -25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1 - 0 - 1 - 0 - 65 - 0 - 0 - - - - - 1744645098225 - line_table_ConnectionCapacityInfo_2 - 109 - -60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_companyUILineWidth - -16777216 - v_companyUILineColor - null - SOLID - 1 - 0 - 1 - 0 - 0 - 120 - 0 - - - 1744645140831 - txt_table_ConnectionCapacityInfo_known - 75 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Status - - SansSerif - 16 - - - CENTER - - - 1744645285983 - t_GCCapacityCompany_delivery3 - 75 - 8 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Custom - p_scenarioSettings_Current.getCurrentContractDeliveryCapacity_kW() != sl_GCCapacityCompany.getValue() ? "Custom" : -p_gridConnection.v_liveConnectionMetaData.contractedDeliveryCapacityKnown ? "Bekend" : "Geschat" - - Dialog - 14 - - - CENTER - - - 1744645285985 - t_GCCapacityCompany_Feedin_3 - 75 - 33 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geschat - p_scenarioSettings_Current.getCurrentContractFeedinCapacity_kW() != sl_GCCapacityCompany_Feedin.getValue() ? "Custom" : -p_gridConnection.v_liveConnectionMetaData.contractedFeedinCapacityKnown ? "Bekend" : "Geschat" - - Dialog - 14 - - - CENTER - - - 1744645285987 - t_GCCapacityCompany_physical1 - 75 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Bekend - p_scenarioSettings_Current.getCurrentPhysicalConnectionCapacity_kW() != v_physicalConnectionCapacity_kW ? "Custom" : -p_gridConnection.v_liveConnectionMetaData.physicalCapacityKnown ? "Bekend" : "Geschat" - - Dialog - 14 - - - CENTER - - - - - 1729511748859 - gr_GCisPausedScreen - 4480 - 920 - - true - false - false - true - SHAPE_DRAW_2D3D - 1375 - 540 - !p_gridConnection.v_isActive - false - 0 - 0.0 - - - 1729511748861 - rect_GCisPausedScreen - -1010 - -320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -369756683 - v_loadScreenColor - null - SOLID - 545 - 760 - 0.0 - -369756683 - v_loadScreenColor - null - - - 1729511748863 - rect_GCisPausedScreen2 - -535 - -320 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - v_chartLineWidth+0.5 - -6943 - v_companyUIBackgroundColor - null - SOLID - 1075 - 760 - 0.0 - -1 - v_companyUIBackgroundColor - null - - - 1729511748865 - gr_GCisPausedScreenText - -35 - 40 - - true - true - false - SHAPE_DRAW_2D3D - //Set correct overlay -gr_simulateYearScreen.setVisible(false); -gr_loadIcon.setVisible(true); -rect_GCisPausedScreen3.setVisible(true); - -//Unpause gc -p_gridConnection.f_setActive(true); -zero_Interface.b_resultsUpToDate = false; -zero_Interface.f_setScenarioToCustom(); -f_enableAllSliders(true); - - -//Run simulation -new Thread( () -> { - - //Run rapid run in engine - zero_Interface.energyModel.f_runRapidSimulation(); - - //Update map selection and resultsUIs - f_selectGCOnMainInterface(); - f_updateUIResultsCompanyUI(); - - //Update and show kpi summary chart after run - if(zero_Interface.settings.showKPISummary() != null && zero_Interface.settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setSelected(true, true); - } - - //Remove all simulation screens - zero_Interface.f_removeAllSimulateYearScreens(); - rect_GCisPausedScreen3.setVisible(false); -}).start(); - - -//Update results up to date boolean -zero_Interface.b_resultsUpToDate = true; - - false - 0 - 0.0 - - - 1729511748867 - t_GCisPausedScreen - -140 - -80 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Onpauzeer aansluiting -en -simuleer jaar voor KPI's - - SansSerif - 28 - - - CENTER - - - 1729511748869 - image_simulateYearToCalculateCostsSmall1 - -420 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 102.315 - 99.723 - 0.0 - - - zerointerfaceloader - icon_greater_than.png - - - false - - - - - 1729511999717 - txt_GCisPaused - -235 - -230 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Aansluiting is gepauzeerd! - - SansSerif - 72 - - - CENTER - - - - - false - 1740047018374 - cb_showGridloadPlot - 1450 - 130 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - uI_Results.f_setChartGridLoad_Presentation(null, null, cb_showGridloadPlot.isSelected()); -uI_Results.f_setChartSankey_Presentation(null, null, !cb_showGridloadPlot.isSelected()); - -if(cb_showGridloadPlot.isSelected()){ - txt_chartNameRight.setText("Netbelasting"); -} -else{ - txt_chartNameRight.setText("Energiestromen"); -} - - - - Toon Netbelasting duurkromme - false - - - - 1747234551900 - gr_heatingOptionBlockerCHP - true - 140 - 1500 - - true - true - false - true - SHAPE_DRAW_2D3D - 150 - 350 - false - 0 - 0.0 - - - 1747234424173 - rect_heatingOptionClickBlockerCHP - -140 - -15 - - true - true - false - SHAPE_DRAW_2D3D - rb_heatingTypePrivateUI.isVisible() - ; - false - 0 - 10 - 1 - - null - SOLID - 280 - 30 - 0.0 - - null - - - 1747234398590 - rect_heatingOptionBlockerCHP - -140 - -15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 280 - 30 - 0.0 - -65536 - v_companyUIBackgroundColorSliders - null - - - - - 1747316158314 - gr_errorScreen - 6480 - 600 - - true - false - false - SHAPE_DRAW_2D3D - 960 - 500 - false - 0 - 0.0 - - - 1747316158316 - rect_errorScreenGrayOut - -960 - -500 - - true - true - false - SHAPE_DRAW_2D3D - //traceln(); - false - 0 - 10 - 1 - -2049715245 - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - - - 1747316158318 - rect_errorScreenClickBlocking - -960 - -500 - - true - true - false - SHAPE_DRAW_2D3D - double click_block = 0; - false - 0 - 10 - 1 - -2049715245 - null - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - null - - - 1747326072959 - rect_errorMessage - -270 - -120 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 4 - -65536 - null - SOLID - 540 - 200 - 0.0 - -1 - null - 10 - - - 1747316158322 - t_errorMessage - 0 - -70 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - TYPE YOUR ERROR MESSAGE HERE - - SansSerif - 24 - - - CENTER - - - 1747316158324 - button_errorOK - 0 - 50 - - true - true - false - SHAPE_DRAW_2D3D - gr_errorScreen.setVisible(false); - false - 0 - 0.0 - - - 1747316158326 - rect_errorOK - -60 - -20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 120 - 40 - 0.0 - -1 - null - - - 1747316158328 - txt_errorOK - 0 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Ok - - SansSerif - 18 - - - CENTER - - - - - - - 1760974606250 - txt_setSimYearScreen - -440 - 800 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simulate year screen - - SansSerif - 12 - - - LEFT - - - 1760976852165 - txt_selectDifferentOwnedGC - -440 - 250 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Select different owned GC - - SansSerif - 12 - - - LEFT - - - - - - - 1708523262441 - va_companyUI - 0 - 0 - - false - true - false - company UI - 1920 - 980 - - - - - 1709049506453 - UI_EnergyHub - 1754045666929 - import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.annotation.JsonAutoDetect; - -import java.io.IOException; - -import energy.lux.uplux.*; -import java.util.UUID; -import java.util.function.Predicate; - zero_Interface.c_UIResultsInstances.add(uI_Results); - false - - 1709049506460 - 1709049506460 - - T extends Agent - - Generic parameter: - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - 10 - MPS - - - 1 - METER - - - 1 - METER - - - 1 - METER - - - - false - - 1.0 - SECOND - - CONTINUOUS - 500 - 500 - 0 - 100 - 100 - MOORE - USER_DEF - USER_DEF - 2 - 50 - 0.95 - 10 - - - true - 1658477089954 - true - 1709107200000 - - 0 - HOUR - - - 1 - HOUR - - - - 1709049506456 - scale - 0 - -150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1709049506460 - 1709049506454 - - - 1753435936823 - v_energyHubCoop - -370 - 290 - - false - true - true - - EnergyCoop - - - - 1756801110760 - v_scenarioName - -350 - 400 - - false - true - true - - String - - - - 1756806431965 - v_objectMapper - -710 - 350 - - false - true - true - - ObjectMapper - - - - 1753436054975 - p_energyHubBackGroundColor - -800 - 60 - - false - true - true - - Color - NONE - false - - new Color(198, 251, 198) - - - 1753436054973 - COLOR_PICKER - 0 - 100 - NO_DELIMETER - - - - - 1753436082357 - p_energyHubLineColor - -800 - 80 - - false - true - true - - Color - NONE - false - - new Color(118, 171, 118) - - - 1753436082355 - COLOR_PICKER - 0 - 100 - NO_DELIMETER - - - - - 1753705811916 - p_energyHubLineWidth - -800 - 100 - - false - true - true - - double - NONE - false - - 2.0 - - - 1753705811914 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1753705865456 - p_energyHubLineStyle - -800 - 120 - - false - true - true - - LineStyle - NONE - false - - LINE_STYLE_SOLID - - - 1753705865454 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1756388977317 - c_sliderEAGCs - -370 - 250 - - false - true - true - - ArrayList - GridConnection - String - - - - 1756806491891 - c_GISregions - -710 - 400 - - false - true - true - - LinkedHashMap - String - GISRegion - - - - - - VOID - double - 1753446461346 - f_initializeEnergyHubDashboard - -390 - 30 - - false - true - true - //Set map to correct layout -zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); -zero_Interface.b_updateLiveCongestionColors = false; - -// Zoom map to the selected EHub members -f_zoomMapToBuildings(); - -// Sets the names of the members below the map (call before adding sliders) -f_initializeEnergyHubMemberNames(); - -//Add slider GC Needs to happen before EnergyCoop creation in some way!!! -f_addSliderEAGridConnections(); - -//Initialize the ui_results -f_initializeEnergyHubResultsUI(); - -//Initialize the ui_tabs -f_initializeEnergyHubTabs(); - -//Initialize custom user saved scenarios -f_initializeUserSavedScenarios(combobox_selectScenario); - - -runSimulation(); - - - VOID - double - 1753694353046 - f_initializeEnergyHubResultsUI - -370 - 125 - - false - true - true - //Initialize the ui_results -uI_Results.energyModel = zero_Interface.energyModel; -uI_Results.v_interfaceViewAreaXOffset = zero_Interface.va_EHubDashboard.getX(); -uI_Results.v_interfaceViewAreaYOffset = zero_Interface.va_EHubDashboard.getY(); - -//Style resultsUI -f_styleEnergyHubResultsUI(); - -//Set ResultsUI radiobutton setup -uI_Results.v_selectedRadioButtonSetup = OL_RadioButtonSetup.DEFAULT_AND_GESPREKSLEIDRAADBEDRIJVEN_AND_GTO; - - -//Connect resultsUI -uI_Results.f_initializeResultsUI(); -uI_Results.f_updateResultsUI(v_energyHubCoop); - - - VOID - double - 1753694406870 - f_initializeEnergyHubTabs - -370 - 195 - - false - true - true - //Initialize the ui_tabs -uI_Tabs.add_pop_tabElectricity(); -uI_Tabs.add_pop_tabHeating(); -uI_Tabs.add_pop_tabMobility(); - -//Adjust location of buttons to account for missing e-hub tab -uI_Tabs.gr_energyDemandSettings.setX(zero_Interface.uI_Tabs.gr_energyDemandSettings.getX()+40); - -// Group visibilities -// When using an extension of a generic tab don't forget to typecast it! -if (zero_Interface.project_data.project_type() == OL_ProjectType.RESIDENTIAL) { - ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_ResidentialArea().setVisible(true); - ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersResidentialArea().setVisible(true); - ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_residential().setVisible(true); -} -else { - ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_Businesspark().setVisible(true); - ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersCompanies().setVisible(true); - ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_default().setVisible(true); -} - -//Initialize slider gcs and set sliders -uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), new ArrayList<>(), c_sliderEAGCs); - -uI_Tabs.v_presentationXOffset += zero_Interface.va_EHubDashboard.getX(); -uI_Tabs.v_presentationYOffset += zero_Interface.va_EHubDashboard.getY(); - - - VOID - double - 1753694556229 - f_styleEnergyHubResultsUI - -350 - 145 - - false - true - true - uI_Results.f_styleAllCharts(white, p_energyHubLineColor, p_energyHubLineWidth, p_energyHubLineStyle); -uI_Results.f_styleResultsUIHeader(p_energyHubLineColor, p_energyHubLineColor, p_energyHubLineWidth, p_energyHubLineStyle); - - - VOID - double - 1755014317038 - f_addSliderEAGridConnections - -370 - 100 - - false - true - true - //Check if a slider EA GC has been manually selected -GridConnection manualSelectedSliderGC_solarFarm = null; -GridConnection manualSelectedSliderGC_windFarm = null; -GridConnection manualSelectedSliderGC_gridBattery = null; -for (GridConnection GC : v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()) { - if(GC instanceof GCEnergyProduction){ - if (((GCEnergyProduction)GC).p_isSliderGC) { - if(manualSelectedSliderGC_solarFarm == null && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - manualSelectedSliderGC_solarFarm = GC; - } - else if(manualSelectedSliderGC_windFarm == null && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ - manualSelectedSliderGC_windFarm = GC; - } - } - } - if(manualSelectedSliderGC_gridBattery == null && GC instanceof GCGridBattery && ((GCGridBattery)GC).p_isSliderGC && GC.p_batteryAsset != null){ - manualSelectedSliderGC_gridBattery = GC; - } -} - -//If a slider EA GC has not been manually selected: -GridConnection sliderGC_solarFarm = null; -GridConnection sliderGC_windFarm = null; -GridConnection sliderGC_gridBattery = null; -if(manualSelectedSliderGC_solarFarm == null){ - sliderGC_solarFarm = findFirst(zero_Interface.energyModel.EnergyProductionSites, gc -> gc.p_gridConnectionID.equals(zero_Interface.p_defaultEnergyHubSliderGCName_solarfarm)); -} -if(manualSelectedSliderGC_windFarm == null){ - sliderGC_windFarm = findFirst(zero_Interface.energyModel.EnergyProductionSites, gc -> gc.p_gridConnectionID.equals(zero_Interface.p_defaultEnergyHubSliderGCName_windfarm)); -} -if(manualSelectedSliderGC_gridBattery == null){ - sliderGC_gridBattery = findFirst(zero_Interface.energyModel.GridBatteries, gc -> gc.p_gridConnectionID.equals(zero_Interface.p_defaultEnergyHubSliderGCName_battery)); -} - -//Add to coop and other collections -if(sliderGC_solarFarm != null){ - c_sliderEAGCs.add(sliderGC_solarFarm); -} -if(sliderGC_windFarm != null){ - c_sliderEAGCs.add(sliderGC_windFarm); -} -if(sliderGC_gridBattery != null){ - c_sliderEAGCs.add(sliderGC_gridBattery); -} - -v_energyHubCoop.f_addMemberGCs(c_sliderEAGCs); - - - VOID - double - 1756302765458 - f_initializeEnergyHubMemberNames - -370 - 55 - - false - true - true - t_energyHubMember1.setVisible(false); -t_energyHubMember2.setVisible(false); -t_energyHubMember3.setVisible(false); -t_energyHubMember4.setVisible(false); -t_energyHubMember5.setVisible(false); -t_energyHubMember6.setVisible(false); -t_energyHubMember7.setVisible(false); -t_energyHubMemberOthers.setVisible(false); - -int maxChars = 25; -String name = ""; - -// Filter out GCs without building that are sliderGCs -List<GridConnection> members = v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(); -Predicate<GridConnection> isGenericSliderGC = gc -> (gc instanceof GCGridBattery && ((GCGridBattery)gc).p_isSliderGC && gc.c_connectedGISObjects.size() == 0) || (gc instanceof GCEnergyProduction && ((GCEnergyProduction)gc).p_isSliderGC && gc.c_connectedGISObjects.size() == 0); -members.removeIf(isGenericSliderGC); - -try { - name = members.get(0).p_ownerID; - t_energyHubMember1.setText(f_formatName(name, maxChars)); - t_energyHubMember1.setVisible(true); - name = members.get(1).p_ownerID; - t_energyHubMember2.setText(f_formatName(name, maxChars)); - t_energyHubMember2.setVisible(true); - name = members.get(2).p_ownerID; - t_energyHubMember3.setText(f_formatName(name, maxChars)); - t_energyHubMember3.setVisible(true); - name = members.get(3).p_ownerID; - t_energyHubMember4.setText(f_formatName(name, maxChars)); - t_energyHubMember4.setVisible(true); - name = members.get(4).p_ownerID; - t_energyHubMember5.setText(f_formatName(name, maxChars)); - t_energyHubMember5.setVisible(true); - name = members.get(5).p_ownerID; - t_energyHubMember6.setText(f_formatName(name, maxChars)); - t_energyHubMember6.setVisible(true); - name = members.get(6).p_ownerID; - t_energyHubMember7.setText(f_formatName(name, maxChars)); - t_energyHubMember7.setVisible(true); - if (members.size() == 8) { - name = members.get(7).p_ownerID; - t_energyHubMemberOthers.setText(f_formatName(name, maxChars)); - t_energyHubMemberOthers.setVisible(true); - } - else if (members.size() > 8) { - int nbOthers = members.size() - 7; - t_energyHubMemberOthers.setText("En nog " + nbOthers + " andere leden"); - t_energyHubMemberOthers.setVisible(true); - } -} -catch (Exception exception) { - if (exception instanceof IndexOutOfBoundsException) { - traceln("Ignoring IndexOutOfBoundsException"); // do nothing - } - else { - exception.printStackTrace(); - } -} - - - VOID - double - 1756395572049 - f_initializeUserSavedScenarios - -370 - 340 - - false - true - true - - combo - ShapeComboBox - - if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { - return; -} - -var repository = UserScenarioRepository.builder() - .userId(UUID.fromString(zero_Interface.user.userIdToken())) - .modelName(zero_Interface.project_data.project_name()) - .build(); - -var scenarioList = repository.listUserScenarios(); -int nbScenarios = scenarioList.size(); -String[] scenarioNames = new String[nbScenarios]; -for (int i = 0; i < nbScenarios; i++) { - scenarioNames[i] = scenarioList.get(i).getName(); -} - -combo.setItems(scenarioNames); - - - VOID - double - 1756805429105 - f_loadScenario - -370 - 360 - - false - true - true - - index - int - - zero_Interface.f_setScenarioToCustom(); - -for (UI_Results ui_results : zero_Interface.c_UIResultsInstances) { - if (ui_results.f_getSelectedObjectData() != null) { - zero_Interface.f_enableLivePlotsOnly(ui_results); - } -} - - -if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { - zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's in te laden. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - return; -} -traceln("Loading modelSave..."); -//pauseSimulation(); - -// Collect GIS_Objects into hashmap, to link to new EnergyModel. -zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -pauseSimulation(); -try { - v_objectMapper = new ObjectMapper(); - f_addMixins(); - - var repository = UserScenarioRepository.builder() - .userId(UUID.fromString(zero_Interface.user.userIdToken())) - .modelName(zero_Interface.project_data.project_name()) - .build(); - - var scenarioList = repository.listUserScenarios(); - - // Deserialize the JSON into a new EnergyModel instance: - var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(index).getId()); - - J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); - EnergyModel deserializedEnergyModel = saveObject.energyModel; - - // Reconstruct all Agents - f_reconstructEnergyModel(deserializedEnergyModel); - f_reconstructGridConnections(deserializedEnergyModel); - f_reconstructActors(deserializedEnergyModel); - f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); - - f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); - - // Get profilePointer tableFunctions from 'original' energyModel - deserializedEnergyModel.c_profiles.forEach(x->{ - J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); - x.setTableFunction(origProfile.getTableFunction()); - }); - // get heatingTypeHashmap from 'old' energyModel. - deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; - - zero_Interface.zero_loader.energyModel = deserializedEnergyModel; - zero_Interface.energyModel = deserializedEnergyModel; - zero_Interface.uI_Results.energyModel = deserializedEnergyModel; - uI_Results.energyModel = deserializedEnergyModel; - - deserializedEnergyModel.f_startAfterDeserialisation(); - - f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); - - - // Putting back the ordered collections in the interface - f_reconstructOrderedCollections(saveObject); - - - //Get the correct coop for the E-Hub Dashboard - v_energyHubCoop = findFirst(zero_Interface.energyModel.pop_energyCoops,x->x.p_actorID.equals("eHubConfiguratorCoop")); - if (v_energyHubCoop == null){ - throw new RuntimeException("No energyCoop found with p_actorID = eHubConfiguratorCoop"); - } - zero_Interface.v_customEnergyCoop = v_energyHubCoop; - - //Get the slider gcs of the reloaded EnergyHub - c_sliderEAGCs = f_getEnergyHubsliderEAGCsLoadedScenario(v_energyHubCoop); - - // Update the E-Hub Dashboard with the loaded E-Hub from savefile - f_initializeEnergyHubMemberNames(); - uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null, c_sliderEAGCs); - gr_uI_Tabs_presentation.setVisible(false); - gr_uI_Tabs_presentation.setVisible(true); - uI_Results.f_updateResultsUI(v_energyHubCoop); - - // Update the main interface with the loaded E-Hub from savefile - zero_Interface.c_selectedGridConnections = new ArrayList<>(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()); - - // Update the main interface tabs with the GCs from the new engine - zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer(), zero_Interface.f_getMainInterfaceSliderEAGCs()); - - // Reset all colors on the GIS map - zero_Interface.energyModel.pop_GIS_Buildings.forEach(x -> zero_Interface.f_styleAreas(x)); - zero_Interface.energyModel.pop_GIS_Objects.forEach(x -> zero_Interface.f_styleAreas(x)); - zero_Interface.energyModel.pop_GIS_Parcels.forEach(x -> zero_Interface.f_styleAreas(x)); - - // Color all selected GC - for (GridConnection gc : zero_Interface.c_selectedGridConnections) { - gc.c_connectedGISObjects.forEach(x -> x.gisRegion.setFillColor(zero_Interface.v_selectionColor)); - } - - // Zoom GIS Map to selected buildings - f_zoomMapToBuildings(); - - // Simulate a year - gr_simulateYearEnergyHub.setVisible(false); - gr_loadIconYearSimulationEnergyHub.setVisible(true); - - - zero_Interface.f_simulateYearFromMainInterface(); - - traceln("ModelSave loaded succesfully!"); - -} catch (IOException e) { - e.printStackTrace(); -} - - - - - VOID - double - 1756805443177 - f_saveScenario - -370 - 380 - - false - true - true - - scenarioName - String - - if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { - zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's op te slaan. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - return; -} - -traceln("Starting model serialisation..."); -J_ModelSave saveObject = new J_ModelSave(); -saveObject.energyModel = zero_Interface.energyModel; - -zero_Interface.energyModel.pop_gridNodes.forEach(x->saveObject.c_gridNodes.add(x)); -zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); -zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); -zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); - -saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; -saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; -saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; -saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; -saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; -saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; -saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; -saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; -saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; -saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; -saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; -saveObject.c_scenarioMap_Current = zero_Interface.c_scenarioMap_Current; -saveObject.c_scenarioMap_Future = zero_Interface.c_scenarioMap_Future; - -List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps = new ArrayList<LinkedHashMap<String, List<J_EAVehicle>>>(); - -saveObject.c_additionalVehicleHashMaps = c_additionalVehicleHashMaps; - -v_objectMapper = new ObjectMapper(); -f_addMixins(); -v_objectMapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE); -traceln("Model serialisation has been completed."); - -traceln("Trying to save to file..."); -try { - - //v_objectMapper.writeValue(new File("energyModel.json"), energyModel); - - //v_objectMapper.writeValue(new File("ModelSave.json"), saveObject); - - var repository = UserScenarioRepository.builder() - .userId(UUID.fromString(zero_Interface.user.userIdToken())) - .modelName(zero_Interface.project_data.project_name()) - .build(); - - repository.saveUserScenario( - scenarioName, - v_objectMapper.writeValueAsBytes(saveObject) - ); - - traceln("Scenario saved to file."); - -} catch (IOException e) { - traceln("Saving to file has failed."); - e.printStackTrace(); -} - - - - VOID - double - 1756806431955 - f_addMixins - -710 - 370 - - false - true - true - v_objectMapper.addMixIn(Agent.class, AgentMixin.class); -//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); - -//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); -//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); - -//Ignore classes - -v_objectMapper.addMixIn(java.awt.Font.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(java.awt.Color.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(java.awt.Paint.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeLine.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeLineFill.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeText.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(DataSet.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(Level.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(TableFunction.class, IgnoreClassMixin.class); -//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeModelElementsGroup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeButton.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.analysis.TimePlot.class, IgnoreClassMixin.class); - - -// Weirdness regarding material handling toolbox -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); - - - - VOID - double - 1756806501010 - f_setEngineInputDataAfterDeserialisation - Functie van gillis voor inladen weer data! - -987 - 310 - - false - true - true - - deserializedEnergyModel - EnergyModel - - deserializedEnergyModel.p_truckTripsCsv = zero_Interface.energyModel.p_truckTripsCsv; -deserializedEnergyModel.p_householdTripsCsv = zero_Interface.energyModel.p_householdTripsCsv; -deserializedEnergyModel.p_cookingPatternCsv = zero_Interface.energyModel.p_cookingPatternCsv; - -//deserializedEnergyModel.avgc_data = zero_Interface.energyModel.avgc_data; -deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; - - - VOID - double - 1756806501019 - f_reconstructGridConnections - -986.667 - 352 - - false - true - true - - deserializedEnergyModel - EnergyModel - - ArrayList<GridConnection> allConnections = new ArrayList<>(); -allConnections.addAll(deserializedEnergyModel.c_gridConnections); -allConnections.addAll(deserializedEnergyModel.c_pausedGridConnections); - -for(GridConnection GC : allConnections){ - GC.energyModel = deserializedEnergyModel; - if (GC instanceof GCHouse){ - //toMove.add(GC); - f_reconstructAgent(GC, deserializedEnergyModel.Houses, deserializedEnergyModel); - } else if (GC instanceof GCEnergyProduction) { - f_reconstructAgent(GC, deserializedEnergyModel.EnergyProductionSites, deserializedEnergyModel); - } else if (GC instanceof GCEnergyConversion) { - f_reconstructAgent(GC, deserializedEnergyModel.EnergyConversionSites, deserializedEnergyModel); - } else if (GC instanceof GCGridBattery) { - f_reconstructAgent(GC, deserializedEnergyModel.GridBatteries, deserializedEnergyModel); - } else if (GC instanceof GCNeighborhood) { - f_reconstructAgent(GC, deserializedEnergyModel.Neighborhoods, deserializedEnergyModel); - } else if (GC instanceof GCPublicCharger) { - f_reconstructAgent(GC, deserializedEnergyModel.PublicChargers, deserializedEnergyModel); - } else if (GC instanceof GCUtility) { - f_reconstructAgent(GC, deserializedEnergyModel.UtilityConnections, deserializedEnergyModel); - } - //GC.f_startAfterDeserialisation(); -} - - - - - VOID - double - 1756806501029 - f_reconstructEnergyModel - -986.667 - 332 - - false - true - true - - energyModel - EnergyModel - - // Code Instead of Agent.goToPopulation() (which resets all parameters to default!) -/* -try{ // Reflection trick to get to Agent.owner private field - energyModel.forceSetOwner(energyModel, pop_energyModels); -} catch (Exception e) { - e.printStackTrace(); -} -*/ - -Agent root = zero_Interface.getRootAgent(); -traceln("root: " + root); -energyModel.restoreOwner(zero_Interface.zero_loader); - -energyModel.setEngine(getEngine()); -energyModel.instantiateBaseStructure_xjal(); -energyModel.setEnvironment(zero_Interface.zero_loader.getEnvironment()); - -traceln("EnergyModel owner: %s", energyModel.getOwner()); - -energyModel.create(); -//energyModel.start(); // Why is this needed? - - - VOID - double - 1756806501040 - f_reconstructAgent - -975 - 429 - - false - true - true - - agent - Agent - - - pop - AgentArrayList - - - energyModel - EnergyModel - - /* // Code Instead of Agent.goToPopulation() (which resets many variables to default!) -try{ // Reflection trick to get to Agent.owner private field - if (agent instanceof GridNode) { - ((GridNode)agent).forceSetOwner(agent,pop); - } else if (agent instanceof GridConnection) { - ((GridConnection)agent).forceSetOwner(agent,pop); - } else if (agent instanceof Actor) { - ((Actor)agent).forceSetOwner(agent,pop); - } else if (agent instanceof GIS_Object) { - ((GIS_Object)agent).forceSetOwner(agent,pop); - } -} catch (Exception e) { - e.printStackTrace(); -}*/ - -agent.restoreOwner(energyModel); // simply sets agent.d = root, should replace reflection hack -agent.restoreCollection_xjal(pop); // simple sets agent.j = pop, should replace reflection hack - -agent.setEngine(getEngine()); -agent.instantiateBaseStructure_xjal(); -agent.setEnvironment(pop.getEnvironment()); - -pop._add(agent); // Add to the population -//int popSize = pop.size(); -//pop.callCreate(agent, popSize); // Update population object -agent.create(); - - - VOID - double - 1756806501050 - f_reconstructActors - -987 - 372 - - false - true - true - - deserializedEnergyModel - EnergyModel - - for(Actor AC : deserializedEnergyModel.c_actors){ - - if (AC instanceof ConnectionOwner) { - ((ConnectionOwner)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_connectionOwners, deserializedEnergyModel); - } else if (AC instanceof EnergySupplier) { - ((EnergySupplier)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_energySuppliers, deserializedEnergyModel); - } else if (AC instanceof EnergyCoop) { - ((EnergyCoop)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_energyCoops, deserializedEnergyModel); - //((EnergyCoop)AC).f_startAfterDeserialisation(); - } else if (AC instanceof GridOperator) { - ((GridOperator)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_gridOperators, deserializedEnergyModel); - } - } - - - - VOID - double - 1756806501060 - f_reconstructGIS_Objects - -987 - 412 - - false - true - true - - deserializedEnergyModel - EnergyModel - - - c_GISObjects - ArrayList<GIS_Object> - - for(GIS_Object GO : c_GISObjects){ - GO.gisRegion = c_GISregions.get(GO.p_id); - - if (GO instanceof GIS_Building) { - ((GIS_Building)GO).energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Buildings, deserializedEnergyModel); - } else if (GO instanceof GIS_Parcel) { - ((GIS_Parcel)GO).energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Parcels, deserializedEnergyModel); - } else { - GO.energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Objects, deserializedEnergyModel); - //GO.f_startAfterDeserialisation(); - } - GO.f_resetStyle(); -} - - - VOID - double - 1756806501070 - f_reconstructGridNodes - -987 - 392 - - false - true - true - - deserializedEnergyModel - EnergyModel - - - c_gridNodes - ArrayList<GridNode> - - for(GridNode GN : c_gridNodes){ - GN.energyModel = deserializedEnergyModel; - f_reconstructAgent(GN, deserializedEnergyModel.pop_gridNodes, deserializedEnergyModel); -} - - - - VOID - double - 1756806501080 - f_reconstructOrderedCollections - -990 - 450 - - false - true - true - - saveObject - J_ModelSave - - zero_Interface.c_orderedPVSystemsCompanies = saveObject.c_orderedPVSystemsCompanies; -zero_Interface.c_orderedPVSystemsHouses = saveObject.c_orderedPVSystemsHouses; -zero_Interface.c_orderedVehicles = saveObject.c_orderedVehicles; -zero_Interface.c_orderedHeatingSystemsCompanies = saveObject.c_orderedHeatingSystemsCompanies; -zero_Interface.c_orderedHeatingSystemsHouses = saveObject.c_orderedHeatingSystemsHouses; -zero_Interface.c_orderedVehiclesPrivateParking = saveObject.c_orderedVehiclesPrivateParking; -zero_Interface.c_orderedParkingSpaces = saveObject.c_orderedParkingSpaces; -zero_Interface.c_orderedV1GChargers = saveObject.c_orderedV1GChargers; -zero_Interface.c_orderedV2GChargers = saveObject.c_orderedV2GChargers; -zero_Interface.c_orderedPublicChargers = saveObject.c_orderedPublicChargers; -zero_Interface.c_mappingOfVehiclesPerCharger = saveObject.c_mappingOfVehiclesPerCharger; -zero_Interface.c_scenarioMap_Current = saveObject.c_scenarioMap_Current; -zero_Interface.c_scenarioMap_Future = saveObject.c_scenarioMap_Future; - -/* -List<ConnectionOwner> c_COCompanies = findAll(zero_Interface.energyModel.pop_connectionOwners, p -> p.p_connectionOwnerType == OL_ConnectionOwnerType.COMPANY); - -int i = 0; -for (ConnectionOwner CO : c_COCompanies) { - UI_company companyUI = zero_Interface.c_companyUIs.get(CO.p_connectionOwnerIndexNr); - companyUI.p_company = CO; - companyUI.c_ownedGridConnections = companyUI.p_company.f_getOwnedGridConnections(); - companyUI.c_additionalVehicles = saveObject.c_additionalVehicleHashMaps.get(i); - companyUI.f_setSelectedGCSliders(); - i++; -} -*/ - - - - RETURNS_VALUE - String - 1762259840876 - f_formatName - -350 - 77 - - false - true - true - - fullName - String - - - maxChars - int - - if (fullName.length() <= maxChars) { - return fullName; -} -StringBuilder output = new StringBuilder(); -String[] subNames = fullName.split(" "); -int remainingChars = maxChars; -for (String subName : subNames) { - remainingChars -= subName.length() + 1; - if (remainingChars >= 0) { - output.append(subName); - output.append(" "); - } -} -// If the output is empty (because the first word is longer than maxChars) cut the first word off at maxChars -if (output.toString().length() == 0) { - output.append(fullName.substring(0, maxChars)); -} -output.append("..."); -return output.toString(); - - - VOID - double - 1762352238220 - f_zoomMapToBuildings - -370 - 470 - - false - true - true - List<GIS_Object> gisObjects = new ArrayList<>(); -for (GridConnection GC : v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()) { //Buildings that are grouped, select as well. - for (GIS_Object object : GC.c_connectedGISObjects) { //Buildings that are grouped, select as well. - gisObjects.add(object); - object.gisRegion.setFillColor(zero_Interface.v_selectionColorAddBuildings); - } -} -zero_Interface.f_setMapViewBounds(gisObjects); - - - VOID - double - 1762356123802 - f_loadScenarioButton - -380 - 580 - - false - true - true - // The function creates a new thread, otherwise visibilities are only updated after the entire button action is finished, which is not enough feedback for the user -gr_forceSaveLoadScenario.setVisible(false); -gr_loadScenario.setVisible(false); -zero_Interface.f_setLoadingScreen(true, zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - -new Thread( () -> { - f_loadScenario(combobox_selectScenario.getValueIndex()); - zero_Interface.f_setLoadingScreen(false, 0, 0); -}).start(); - - - VOID - double - 1762358078152 - f_saveScenarioButton - -380 - 600 - - false - true - true - // The function creates a new thread, otherwise visibilities are only updated after the entire button action is finished, which is not enough feedback for the user -gr_forceSaveLoadScenario.setVisible(false); -gr_saveScenario.setVisible(false); -zero_Interface.f_setLoadingScreen(true, zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - -new Thread( () -> { - f_saveScenario(v_scenarioName); - zero_Interface.f_setLoadingScreen(false, 0, 0); -}).start(); - - - - RETURNS_VALUE - ArrayList<GridConnection> - 1765208842919 - f_getEnergyHubsliderEAGCsLoadedScenario - -990 - 490 - - false - true - true - - energyHubCoop - EnergyCoop - - ArrayList<GridConnection> energyHubSliderEAGCs = new ArrayList<GridConnection>(); -for(GridConnection gc : energyHubCoop.f_getMemberGridConnectionsCollectionPointer()){ - if(gc instanceof GCGridBattery battery){ - if(battery.p_isSliderGC){ - energyHubSliderEAGCs.add(battery); - } - } - if(gc instanceof GCEnergyProduction productionSite){ - if(productionSite.p_isSliderGC){ - energyHubSliderEAGCs.add(productionSite); - } - } -} - -if(energyHubSliderEAGCs.size() != 3){ - throw new RuntimeException("energyHubsliderEAGCs.size() != 3 -> Should be exactly 3: 1 solarfarm, 1 windfarm and 1 battery"); -} - -return energyHubSliderEAGCs; - - - - - 1709049506454 - connections - 50 - -50 - - false - true - true - false - COLLECTION_OF_LINKS - true - Object - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - 1747229590464 - zero_Interface - 50 - -100 - - false - true - true - - zerointerfaceloader - Zero_Interface - - - - - - 1716193013122 - uI_Results - -350 - 165 - - false - true - true - 1753694648333 - - digital_twin_results - UI_Results - - - - digital_twin_results - UI_Results - 1704197366556 - - - - - energyModel - - - p_cutOff_MWh - - - gr_infoText - - zero_Interface.gr_infoText - - - - gr_closeInfoText - - zero_Interface.gr_closeInfoText - - - - t_infoTextDescription - - zero_Interface.t_infoTextDescription - - - - rect_infoText - - zero_Interface.rect_infoText - - - - p_currentActiveInfoBubble - - zero_Interface.p_currentActiveInfoBubble - - - - false - - 100 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 2658477089962 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722252541830 - uI_Tabs - -350 - 215 - - false - true - true - 1753694955483 - - zerointerfaceloader - UI_Tabs - - - - zerointerfaceloader - UI_Tabs - 1722245292191 - - - - false - - 100 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 2658477089960 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - 1709049506460 - level - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - 1753702320529 - rect_backGround - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 1920 - 980 - 0.0 - -1 - p_energyHubBackGroundColor - null - - - 1747228615096 - rect_settings - 10 - 440 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - p_energyHubLineWidth - -16777216 - p_energyHubLineColor - null - SOLID - p_energyHubLineStyle - 380 - 530 - 0.0 - -1 - null - 10 - - - 1753702302932 - gr_uI_Tabs_presentation - 0 - -20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753694955483 - uI_Tabs_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1753706195332 - rect_uITabsModelBlocker - 400 - 10 - - false - false - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 0 - - null - SOLID - 1500 - 960 - 0.0 - -1 - null - - - 1747228569476 - rect_scenarios - 10 - 90 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - p_energyHubLineWidth - -16777216 - p_energyHubLineColor - null - SOLID - p_energyHubLineStyle - 380 - 300 - 0.0 - -1 - null - 10 - - - 1747228738085 - t_scenario - 200 - 100 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Scenario's - - SansSerif - 36 - - - CENTER - - - 1747228860030 - txt_settings - 200 - 460 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Instellingen - - SansSerif - 36 - - - CENTER - - - 1747231288371 - rect_map - 470 - 190 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - p_energyHubLineWidth - -16777216 - p_energyHubLineColor - null - SOLID - p_energyHubLineStyle - 870 - 550 - 0.0 - -1 - p_energyHubLineColor - null - 10 - - - 1753704667485 - gr_energyHubTitle - 910 - 80 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1747228628985 - rect_title - -440 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - p_energyHubLineWidth - -16777216 - p_energyHubLineColor - null - SOLID - p_energyHubLineStyle - 870 - 110 - 0.0 - -1 - null - 10 - - - 1747228659472 - txt_energyHubTitle - -25 - -25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - EnergyHub Configurator - - SansSerif - 48 - - - CENTER - - - 1753704116114 - gr_energyHubLogo - -350 - 5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753704116116 - ovalEnergyHubLogo - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 48.1235 - 40 - 0.0 - -3736634 - null - - - 1753704116118 - line - -24.062 - -16.844 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 47 - -6 - 0 - - - 1753704116120 - line1 - -14.437 - 14.437 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 37 - -38 - 0 - - - 1753704116122 - line2 - -24.062 - -9.625 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 42 - 35 - 0 - - - 1753704116124 - oval - -26.468 - -14.437 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 7.2185 - 40 - 0.0 - -657931 - null - - - 1753704116126 - oval1 - -19.25 - 19.25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 7.2185 - 40 - 0.0 - -657931 - null - - - 1753704116128 - line3 - 19.25 - 24.062 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - DOTTED - 1 - 0 - 1 - 0 - 1 - -42 - 0 - - - 1753704116130 - oval4 - 19.25 - 24.062 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 7.2185 - 40 - 0.0 - -657931 - null - - - 1753704116132 - oval3 - 24.062 - -21.656 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 7.2185 - 40 - 0.0 - -657931 - null - - - - - - - 1753694681879 - gr_uI_Results_presentation - 1420 - 200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753694648333 - uI_Results_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - false - 1753706469000 - button_reconfigureEnergyHub - 1100 - 760 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - pauseSimulation(); - -//Remove slider GCs from coop -v_energyHubCoop.f_removeMemberGCs(c_sliderEAGCs); - - -zero_Interface.f_getScenarioButtons().setPos( 19, 144); - -zero_Interface.map.setScale( 1.0, 1.0); -zero_Interface.map.setPos(410, 130); - -zero_Interface.va_Interface.navigateTo(); -zero_Interface.v_currentViewArea = zero_Interface.va_Interface; -//zero_Interface.c_selectedGridConnections = new ArrayList<GridConnection>(c_selectedEnergyHubGC); -//zero_Interface.v_customEnergyCoop = v_energyHubCoop; - -v_energyHubCoop = null; - -zero_Interface.b_inEnergyHubSelectionMode = true; - - - - Herconfigureer de EnergyHub - - - - 1753706641851 - gr_exitButton - 1245 - 85 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1747230291770 - rect_exit - -91.459 - -27.63 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 173.773 - 55.262 - 0.0 - -1 - null - 10 - - - false - 1747230286040 - button_exit - -86.886 - -23.025 - - true - true - false - SHAPE_DRAW_2D3D - - false - - true - //Remove slider GCs from coop -v_energyHubCoop.f_removeMemberGCs(c_sliderEAGCs); -c_sliderEAGCs.clear(); - -zero_Interface.f_getScenarioButtons().setPos( 19, 144); - -zero_Interface.map.setScale( 1.0, 1.0); -zero_Interface.map.setPos(410, 130); - - -zero_Interface.button_clearFilters.action(); -zero_Interface.rb_mapOverlay.setValue(zero_Interface.c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); -zero_Interface.cb_showFilterInterface.setSelected(false, true); -zero_Interface.f_updateMainInterfaceSliders(); - -zero_Interface.f_setStartView(); - -v_energyHubCoop = null; - -zero_Interface.b_inEnergyHubMode = false; - -runSimulation(); - - - - Terug naar hoofdscherm - - - - - - 1753883623020 - gr_simulateYearScreenEnergyHub - 1900 - 130 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753883623022 - gr_loadIconYearSimulationEnergyHub - -261 - -25 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753883623024 - rect_loadIconSmall - -219 - -50 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - p_energyHubLineColor - null - DASHED - 460 - 250 - 0.0 - -369756683 - null - - - 1753883623026 - image_loadIconSmall - -30 - 60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - zerointerfaceloader - icon_loading.gif - - - false - - - 1753883623028 - t_loadIconSmall - 0 - 15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Jaar wordt gesimuleerd - - SansSerif - 22 - - - CENTER - - - - - 1753883623030 - gr_simulateYearEnergyHub - 270 - 20 - - true - false - false - SHAPE_DRAW_2D3D - -250 - 15 - false - 0 - 0.0 - - - 1753883623032 - rect_simulateYearScreenSmall - -230 - -90 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - DASHED - 460 - 180 - 0.0 - -1 - p_energyHubLineColor - null - - - 1753883623034 - gr_simulateYearButtonEnergyHub - 10 - 50 - - true - true - false - SHAPE_DRAW_2D3D - gr_simulateYearEnergyHub.setVisible(false); -gr_loadIconYearSimulationEnergyHub.setVisible(true); -zero_Interface.f_simulateYearFromMainInterface(); - false - 0 - 0.0 - - - 1753883623036 - t_simulateYearToCalculateCostsSmall - 10 - -60 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simuleer jaar voor KPI's - - SansSerif - 22 - - - CENTER - - - 1753883623038 - image_simulateYearToCalculateCostsSmall - -200 - -75 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - zerointerfaceloader - icon_greater_than.png - - - false - - - - - - - - - 1756302313206 - rect_memberNames - 470 - 760 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 500 - 200 - 0.0 - -1 - null - 10 - - - 1756302430570 - t_energyHubMember1 - 500 - 820 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 1 - - SansSerif - 18 - - - LEFT - - - 1756302500322 - t_energyHubMembers - 720 - 765 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - E-Hub Members - - SansSerif - 36 - - - CENTER - - - 1756302556840 - t_energyHubMember3 - 500 - 850 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 3 - - SansSerif - 18 - - - LEFT - - - 1756302569681 - t_energyHubMember2 - 930 - 820 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 2 - - SansSerif - 18 - - - RIGHT - - - 1756302580797 - t_energyHubMember4 - 930 - 850 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 4 - - SansSerif - 18 - - - RIGHT - - - 1756302616239 - t_energyHubMember5 - 500 - 880 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 5 - - SansSerif - 18 - - - LEFT - - - 1756302630734 - t_energyHubMember7 - 500 - 910 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 7 - - SansSerif - 18 - - - LEFT - - - 1756302634233 - t_energyHubMemberOthers - 930 - 910 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Etc - - SansSerif - 18 - - - RIGHT - - - 1756302654947 - t_energyHubMember6 - 930 - 880 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - name 6 - - SansSerif - 18 - - - RIGHT - - - 1758546856343 - gr_forceSaveLoadScenario - 0 - -1500 - - true - false - false - SHAPE_DRAW_2D3D - 0 - false - 0 - 0.0 - - - 1758548705448 - rect_forceSaveLoadScenarioClickBlocker1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - ; - false - 0 - 10 - 1 - - null - SOLID - 10 - 980 - 0.0 - 16777215 - null - - - 1758548705454 - rect_forceSaveLoadScenarioClickBlocker2 - 10 - 0 - - true - true - false - SHAPE_DRAW_2D3D - ; - false - 0 - 10 - 1 - - null - SOLID - 380 - 275 - 0.0 - 16777215 - null - - - 1758548705462 - rect_forceSaveLoadScenarioClickBlocker3 - 10 - 390 - - true - true - false - SHAPE_DRAW_2D3D - ; - false - 0 - 10 - 1 - - null - SOLID - 380 - 590 - 0.0 - 16777215 - null - - - 1758548705469 - rect_forceSaveLoadScenarioClickBlocker4 - 390 - 0 - - true - true - false - SHAPE_DRAW_2D3D - ; - false - 0 - 10 - 1 - - null - SOLID - 1530 - 980 - 0.0 - 16777215 - null - - - 1758546863803 - rect_forceSaveLoadScenario1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 10 - 980 - 0.0 - -1765752640 - zero_Interface.v_forcedClickScreenColor - null - - - 1758546863807 - rect_forceSaveLoadScenario2 - 10 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 380 - 275 - 0.0 - -1765752640 - zero_Interface.v_forcedClickScreenColor - null - - - 1758546863812 - rect_forceSaveLoadScenario3 - 10 - 390 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 380 - 590 - 0.0 - -1765752640 - zero_Interface.v_forcedClickScreenColor - null - - - 1758546863816 - rect_forceSaveLoadScenario4 - 390 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1530 - 980 - 0.0 - -1765752640 - zero_Interface.v_forcedClickScreenColor - null - - - false - 1758548909849 - button_cancelSaveLoadScenario - 305 - 355 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - gr_saveScenario.setVisible(false); -gr_loadScenario.setVisible(false); -gr_forceSaveLoadScenario.setVisible(false); - - - - annuleren - - - - - - 1756800864903 - gr_saveAndLoadScenarios - 365 - -270 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1756805661168 - gr_saveScenario - -330 - 610 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1756805661170 - image_saveScenario - 225 - -5 - - true - true - false - SHAPE_DRAW_2D3D - f_saveScenarioButton(); - false - 0 - 32 - 32 - 0.0 - - - zerointerfaceloader - save_icon.png - - - false - - - false - 1756805661172 - eb_scenarioName - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - - - - true - v_scenarioName - - - - 1758545634906 - t_saveScenarioInstructions - 5 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geef je scenario een naam en klik rechts op het icoontje - - SansSerif - 10 - - - LEFT - - - - - 1756805661208 - gr_loadScenario - -330 - 665 - - true - false - false - SHAPE_DRAW_2D3D - 610 - false - 0 - 0.0 - - - 1756805661210 - image_loadScenario - 225 - -5 - - true - true - false - SHAPE_DRAW_2D3D - f_loadScenarioButton(); - false - 0 - 32 - 32 - 0.0 - - - zerointerfaceloader - load_icon.png - - - false - - - false - 1756805661212 - combobox_selectScenario - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - - - - false - - false - - - - 1758545638022 - t_loadScenarioInstructions - 5 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer een scenario in de keuzelijst en klik op het icoontje - - SansSerif - 10 - - - LEFT - - - - - false - 1758532628277 - button_saveScenario - -331 - 555 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - gr_loadScenario.setVisible(false); -gr_forceSaveLoadScenario.setVisible(true); -gr_saveScenario.setVisible(true); - - - - Bewaar een scenario - - - - false - 1758532628290 - button_loadScenario - -181 - 555 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - f_initializeUserSavedScenarios(combobox_selectScenario); -if (combobox_selectScenario.getItems().length == 0) { - zero_Interface.f_setErrorScreen("Er zijn nog geen scenario's opgeslagen.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - return; -} - -gr_saveScenario.setVisible(false); -gr_forceSaveLoadScenario.setVisible(true); -gr_loadScenario.setVisible(true); - - - - - - Laad een scenario in - - - - - - 1762252612468 - t_date - 490 - 160 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Datum - zero_Interface.energyModel.v_isRapidRun ? zero_Interface.f_getDateString() : zero_Interface.f_getDateAndTimeString() - - SansSerif - 16 - - - LEFT - - - - - - - 1747229800342 - va_main - 0 - 0 - - false - true - false - - <Width>1920</Width> - <Height>980</Height> - </Area> - </Areas> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1717506309790</Id> - <Name>UI_Hydrogen</Name> - <Folder>1754045666929</Folder> - <Generic>false</Generic> - <GenericParameter> - <Id>1717506309785</Id> - <Name>1717506309785</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089972</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709107200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1717506309786</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1717506309821</CurrentLevel> - <ConnectionsId>1717506309867</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1717506309811</Id> - <Name>v_sliderStartValue_priceLimit</Name> - <X>-930</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1717506309813</Id> - <Name>v_sliderMinValue_balanceLimit</Name> - <X>-930</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1717506309815</Id> - <Name>v_sliderMaxValue_balanceLimit</Name> - <X>-930</X> - <Y>310</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1717506309817</Id> - <Name>v_sliderStartValue_balanceLimit</Name> - <X>-930</X> - <Y>330</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1717506309819</Id> - <Name>v_sliderStartValue_ElectrolyserP_MW</Name> - <X>-930</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724859028571</Id> - <Name>v_colorH2_blue</Name> - <X>-940</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>new Color(33, 164, 195)</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724859028735</Id> - <Name>v_colorH2_green</Name> - <X>-940</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>new Color(104, 193, 103)</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724859028737</Id> - <Name>v_colorH2_white</Name> - <X>-940</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Color</Type> - <InitialValue Class="CodeValue"> - <Code>white</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724860189446</Id> - <Name>v_currentSelectedElectrolyser</Name> - <X>-360</X> - <Y>510</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724944015553</Id> - <Name>v_currentSelectedStorage</Name> - <X>-360</X> - <Y>530</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1724944025798</Id> - <Name>v_currentSelectedFuelCell</Name> - <X>-360</X> - <Y>550</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1724921941090</Id> - <Name>p_amountOfGISObjects</Name> - <X>-360</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1724921941088</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1724921946872</Id> - <Name>p_amountOfGC</Name> - <X>-360</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>int</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1724921946870</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724859404446</Id> - <Name>c_GISObjects_Hydrogen</Name> - <X>-360</X> - <Y>80</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GIS_Object</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724859404449</Id> - <Name>c_gridConnections_Hydrogen</Name> - <X>-360</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GridConnection</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724859404455</Id> - <Name>c_connectedGridNodes</Name> - <X>-360</X> - <Y>120</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Object</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724943470087</Id> - <Name>c_connectionOwners_Hydrogen</Name> - <X>-360</X> - <Y>60</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>ConnectionOwner</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724943620236</Id> - <Name>c_hydrogenStorages</Name> - <X>-360</X> - <Y>260</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>J_EAStorageGas</ElementClass> - <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724943636670</Id> - <Name>c_hydrogenElectrolysers</Name> - <X>-360</X> - <Y>240</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>J_EAConversionElectrolyser</ElementClass> - <ValueElementClass>J_EAConversionElectrolyser</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1724943685107</Id> - <Name>c_hydrogenFuelCells</Name> - <X>-360</X> - <Y>280</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>J_EAConversionFuelCell</ElementClass> - <ValueElementClass>J_EAStorageGas</ValueElementClass> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1717506309797</Id> - <Name>f_styleHydrogenUI</Name> - <X>-960</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1717506309801</Id> - <Name>f_initializeUIElectrolyser</Name> - <X>-960</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>COC</Name> - <Type>ConnectionOwner</Type> - </Parameter> - <Body>//Instantiate sliders -f_instantiateSlidersElectrolyser(COC);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1717506309803</Id> - <Name>f_instantiateSlidersElectrolyser</Name> - <X>-940</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>COC</Name> - <Type>ConnectionOwner</Type> - </Parameter> - <Body>// Electrolyser Power start value -v_sliderStartValue_ElectrolyserP_MW = ((J_EAConversionElectrolyser)COC.f_getOwnedGridConnections().get(0).c_conversionAssets.get(0)).getInputCapacity_kW()/1000; -sl_electrolyserPower.setValue(v_sliderStartValue_ElectrolyserP_MW, false); -t_powerElectrolyser.setText(v_sliderStartValue_ElectrolyserP_MW + " MW"); - - -// Price limit start value -v_sliderStartValue_priceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_electricityPriceMaxForProfit_eurpkWh; -sl_electrolyserElectricityPriceLimit.setValue(v_sliderStartValue_priceLimit, false); -t_electricityPriceLimit.setText("€" + v_sliderStartValue_priceLimit); - - -//Balance limit start value -v_sliderStartValue_balanceLimit = ((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).v_gridNodeCongestionLimit_kW; -sl_electrolyserElectricityBalanceLimit.setValue(v_sliderStartValue_balanceLimit, false); -t_electricityBalanceLimit.setText(v_sliderStartValue_balanceLimit + " MW"); - - -//Radio button balance or price mode -int rb_value = 0; -switch (((GCEnergyConversion)COC.f_getOwnedGridConnections().get(0)).p_electrolyserOperationMode){ - - case PRICE: - - rb_value = 0; - //Set visibility of price slider true and balance slider false - gr_electricityPriceSlider.setVisible(true); - gr_electricityBalanceSlider.setVisible(false); - break; - - case BALANCE: - rb_value = 1; - - //Set visibility of balance slider true and price slider false - gr_electricityBalanceSlider.setVisible(true); - gr_electricityPriceSlider.setVisible(false); - break; -} -rb_electrolyserMode.setValue(rb_value, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724859526072</Id> - <Name>f_setScenarioFuture</Name> - <X>-340</X> - <Y>430</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>//Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -//Scenario code here - - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(1, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724859526076</Id> - <Name>f_setScenario</Name> - <X>-360</X> - <Y>390</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>scenario_nr</Name> - <Type>int</Type> - </Parameter> - <Body>switch (scenario_nr){ - - case 0: // Current - - break; - - case 1: // Future - - break; - - case 2: // Hydrogen - traceln("Selected scenario: Hydrogen : DOES NOTHING YET"); - break; - - case 3: // Custom - - if(rb_scenariosPrivateUI.getValue() == 2){ - return; - } - rb_scenariosPrivateUI.setValue(2, false); - traceln("Selected scenario: Custom"); - break; - - default: - -} - -//Set 'results up to date' to false -zero_Interface.b_resultsUpToDate = false;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724859526078</Id> - <Name>f_setScenarioCurrent</Name> - <X>-340</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>//Set button to custom early on, so traceln will get ignored. -rb_scenariosPrivateUI.setValue(2, false); - - -//Scenario code here - - -//Reset button to current, due to sliders putting it on custom -rb_scenariosPrivateUI.setValue(0, false);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1724859526080</Id> - <Name>f_setSelectedGC</Name> - <Description>Function that sets the sliders to match the currently present settings of the energy assets owned by the selected GC. Used when a connection owner has multiple grid connections, and wants to set the sliders of a different GC. </Description> - <X>-360</X> - <Y>340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Initialize slider presets to selected GC (min, max, etc.) -//f_setSliderPresets(); - -</Body> - </Function> - </Functions> - <AgentLinks> - <AgentLink> - <Id>1717506309867</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <ContainerLinks> - <ContainerLink> - <Id>1717506328385</Id> - <Name>zero_Interface</Name> - <X>50</X> - <Y>-100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>Zero_Interface</ClassName> - </ActiveObjectClass> - </ContainerLink> - </ContainerLinks> - <Presentation> - <Level> - <Id>1717506309821</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1725003123558</Id> - <Name>rect_canvas</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorH2_blue</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>1920</Width> - <Height>980</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorH2_white</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1724944453528</Id> - <Name>rect_scenarios</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorH2_blue</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>170</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorH2_white</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <TimePlot> - <Id>1717506309825</Id> - <Name>plot</Name> - <X>400</X> - <Y>280</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <AutoUpdate>true</AutoUpdate> - <RecurrenceProperties> - <Id>1751013532514</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709625600000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </RecurrenceProperties> - <EmbeddedIcon>false</EmbeddedIcon> - <Width>540</Width> - <Height>400</Height> - <BackgroundColor/> - <BorderColor/> - <ChartArea> - <XOffset>50</XOffset> - <YOffset>30</YOffset> - <Width>460</Width> - <Height>310</Height> - <BackgroundColor>-1</BackgroundColor> - <BorderColor>-16777216</BorderColor> - <GridColor>-12566464</GridColor> - </ChartArea> - <Legend> - <Place>SOUTH</Place> - <TextColor>-16777216</TextColor> - <Size>30</Size> - </Legend> - <Labels> - <HorLabelsPosition>DEFAULT</HorLabelsPosition> - <VerLabelsPosition>DEFAULT</VerLabelsPosition> - <TextColor>-12566464</TextColor> - </Labels> - <ShowLegend>true</ShowLegend> - <TimeWindowsMovementType>MOVEMENT_WITH_TIME</TimeWindowsMovementType> - <TimeWindowUnits>MODEL_TIME_UNIT</TimeWindowUnits> - <VerScaleFromExpression>0</VerScaleFromExpression> - <VerScaleToExpression>1</VerScaleToExpression> - <VerScaleType>AUTO</VerScaleType> - <DrawLine>true</DrawLine> - <Interpolation>LINEAR</Interpolation> - <SamplesToKeep>100</SamplesToKeep> - <TimeWindowExpression>100</TimeWindowExpression> - <FillAreaUnderLine>false</FillAreaUnderLine> - <LabelFormat>MODEL_TIME_UNITS</LabelFormat> - </TimePlot> - <Rectangle> - <Id>1717506309827</Id> - <Name>rect_sliders</Name> - <X>0</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16777216</LineColor> - <LineColorCode>v_colorH2_blue</LineColorCode> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>370</Width> - <Height>810</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillColorCode>v_colorH2_white</FillColorCode> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1717506309829</Id> - <Name>txt_electrolyserSliders</Name> - <X>70</X> - <Y>200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electrolyser</Text> - <Font> - <Name>Calibri</Name> - <Size>22</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1717506309831</Id> - <Name>gr_buttonH2Electrolyser</Name> - <X>41</X> - <Y>211</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Oval> - <Id>1717506309833</Id> - <Name>ovalElectrolyserButton</Name> - <X>-1</X> - <Y>-1</Y> - <Label> - <X>0</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <RadiusX>20</RadiusX> - <RadiusY>40</RadiusY> - <Rotation>0.0</Rotation> - <FillColor>-14774017</FillColor> - <FillColorCode>v_colorH2_blue</FillColorCode> - <FillMaterial>null</FillMaterial> - </Oval> - <Text> - <Id>1717506309835</Id> - <Name>txt_h21</Name> - <X>-10</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-1</Color> - <Text>H2</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1717506309837</Id> - <Name>gr_electricityPriceSlider</Name> - <X>190</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1717506309839</Id> - <Name>txt_electricityPriceLimit</Name> - <X>-170</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electriciteits prijs limiet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1717506309841</Id> - <Name>sl_electrolyserElectricityPriceLimit</Name> - <X>62</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the maximum price of electricity used to produce hydrogen -((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_electricityPriceMaxForProfit_eurpkWh = sl_electrolyserElectricityPriceLimit.getValue(); - -//Set text accordingly -t_electricityPriceLimit.setText( "€" + sl_electrolyserElectricityPriceLimit.getValue()); - - -//Set scenario to custom -f_setScenario(2); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>v_sliderStartValue_priceLimit</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>0.5</MaxValue> - <Step>0.01</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1717506309843</Id> - <Name>t_electricityPriceLimit</Name> - <X>40</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text> €0.00</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1717506309845</Id> - <Name>gr_electrolyserPowerSlider</Name> - <X>190</X> - <Y>280</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1717506309847</Id> - <Name>txt_powerElectrolyser</Name> - <X>-170</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Vermogen electrolyser</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1717506309849</Id> - <Name>sl_electrolyserPower</Name> - <X>62</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode>//Adjust the electric capacity -c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).setInputCapacity_kW(sl_electrolyserPower.getValue()*1000);// Multiplied by 1000, as the energy asset is in kW - -//Adjust grid connection capacity as well (if needed) -if(sl_electrolyserPower.getValue()*1000 > 2000){ - ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.physicalCapacity_kW = sl_electrolyserPower.getValue()*1000; - ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedDeliveryCapacity_kW = sl_electrolyserPower.getValue()*1000; - ((GridConnection)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_liveConnectionMetaData.contractedFeedinCapacity_kW = sl_electrolyserPower.getValue()*1000; -} - -//Set the text accordingly -t_powerElectrolyser.setText(sl_electrolyserPower.getValue() + " MW"); - - -//Set scenario to custom -f_setScenario(2); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>0</MinValue> - <MaxValue>10</MaxValue> - <Step>0.1</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1717506309851</Id> - <Name>t_powerElectrolyser</Name> - <X>35</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>1.0 MW</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1717506309853</Id> - <Name>gr_electrolyserMode</Name> - <X>100</X> - <Y>340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1717506309855</Id> - <Name>rb_electrolyserMode</Name> - <X>-80</X> - <Y>-20</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="150" Height="50"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>switch (rb_electrolyserMode.getValue()){ - - case 0: - ((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.PRICE; - - //Set visibility of price slider true and balance slider false - gr_electricityPriceSlider.setVisible(true); - gr_electricityBalanceSlider.setVisible(false); - break; - - case 1: - ((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).p_electrolyserOperationMode = OL_ElectrolyserOperationMode.BALANCE; - - //Set visibility of balance slider true and price slider false - gr_electricityBalanceSlider.setVisible(true); - gr_electricityPriceSlider.setVisible(false); - break; -}</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Prijs</Button> - <Button>Balans</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1717506309857</Id> - <Name>txt_electrolyserMode</Name> - <X>-80</X> - <Y>-40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electrolyser modus</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1717506309859</Id> - <Name>gr_electricityBalanceSlider</Name> - <X>190</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Text> - <Id>1717506309861</Id> - <Name>txt_electricityBalanceLimit</Name> - <X>-170</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Electriciteits balans limiet</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Slider"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1717506309863</Id> - <Name>sl_electrolyserElectricityBalanceLimit</Name> - <X>62</X> - <Y>-15</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="100" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <Enabled>true</Enabled> - <ActionCode> -//Adjust the maximum price of electricity used to produce hydrogen -((GCEnergyConversion)c_hydrogenElectrolysers.get(v_currentSelectedElectrolyser).getParentAgent()).v_gridNodeCongestionLimit_kW = sl_electrolyserElectricityBalanceLimit.getValue()*1000; - -//Set text accordingly -t_electricityBalanceLimit.setText( sl_electrolyserElectricityBalanceLimit.getValue() + " MW" ); - -//Set scenario to custom -f_setScenario(2); -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <DefaultValueCode>v_sliderStartValue_balanceLimit</DefaultValueCode> - <Orientation>HORIZONTAL</Orientation> - <MinValue>v_sliderMinValue_balanceLimit</MinValue> - <MaxValue>v_sliderMaxValue_balanceLimit</MaxValue> - <Step>0.01</Step> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1717506309865</Id> - <Name>t_electricityBalanceLimit</Name> - <X>50</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>0.0 MW</Text> - <Font> - <Name>Dialog</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>RIGHT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724859404444</Id> - <Name>text5</Name> - <X>-370</X> - <Y>30</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Connections</Text> - <Font> - <Name>SansSerif</Name> - <Size>12</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724859526068</Id> - <Name>text7</Name> - <X>-370</X> - <Y>360</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Set Sliders to Scenario</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724859526070</Id> - <Name>txt_setSlidersToSelectedGC</Name> - <X>-370</X> - <Y>310</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Set Sliders to selected GC</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1724859673741</Id> - <Name>gr_scenarioRB</Name> - <X>130</X> - <Y>100</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Control Type="RadioButtons"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1724859673743</Id> - <Name>rb_scenariosPrivateUI</Name> - <X>-100</X> - <Y>-60</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="180" Height="120"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>f_setScenario(rb_scenariosPrivateUI.getValue());</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="14" Style="0"/> - <DefaultValueCode>0</DefaultValueCode> - <Orientation>VERTICAL</Orientation> - <Button>Huidig - 2023</Button> - <Button>Toekomstplannen</Button> - <Button>Custom</Button> - <LinkTo>false</LinkTo> - </ExtendedProperties> - </Control> - <Text> - <Id>1724859673745</Id> - <Name>text187</Name> - <X>-100</X> - <Y>-80</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Selecteer een scenario</Text> - <Font> - <Name>Calibri</Name> - <Size>20</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724943713523</Id> - <Name>txt_hydrogenAssets</Name> - <X>-370</X> - <Y>210</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Hydrogen assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1724944232372</Id> - <Name>txt_h2storageSliders</Name> - <X>72</X> - <Y>513</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Waterstof opslag</Text> - <Font> - <Name>Calibri</Name> - <Size>22</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1724944232376</Id> - <Name>gr_buttonH2Storage</Name> - <X>43</X> - <Y>524</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Oval> - <Id>1724944232378</Id> - <Name>ovalH2StorageButton</Name> - <X>-1</X> - <Y>-1</Y> - <Label> - <X>0</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <RadiusX>20</RadiusX> - <RadiusY>40</RadiusY> - <Rotation>0.0</Rotation> - <FillColor>-14774017</FillColor> - <FillColorCode>v_colorH2_blue</FillColorCode> - <FillMaterial>null</FillMaterial> - </Oval> - <Text> - <Id>1724944232380</Id> - <Name>txt_h22</Name> - <X>-10</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-1</Color> - <Text>H2</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724944302875</Id> - <Name>txt_fuelCellSliders</Name> - <X>69</X> - <Y>739</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fuelcell</Text> - <Font> - <Name>Calibri</Name> - <Size>22</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1724944302879</Id> - <Name>gr_buttonH2FuelCell</Name> - <X>40</X> - <Y>750</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Oval> - <Id>1724944302881</Id> - <Name>ovalH2StorageButton1</Name> - <X>-1</X> - <Y>-1</Y> - <Label> - <X>0</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor/> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <RadiusX>20</RadiusX> - <RadiusY>40</RadiusY> - <Rotation>0.0</Rotation> - <FillColor>-14774017</FillColor> - <FillColorCode>v_colorH2_blue</FillColorCode> - <FillMaterial>null</FillMaterial> - </Oval> - <Text> - <Id>1724944302883</Id> - <Name>txt_h23</Name> - <X>-10</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-1</Color> - <Text>H2</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1724947265014</Id> - <Name>text</Name> - <X>-370</X> - <Y>480</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Current selected assets</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1725003108502</Id> - <Name>txt_hydrogenControlRoom</Name> - <X>770</X> - <Y>70</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <ColorCode>v_colorH2_blue</ColorCode> - <Text>Hydrogen Controlroom</Text> - <Font> - <Name>Calibri</Name> - <Size>72</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Level> - </Presentation> - <Areas> - <Area> - <Id>1725002833718</Id> - <Name>va_hydrogenUI</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Title>Hydrogen UI - 1920 - 980 - - - - - 1722245292185 - UI_Tabs - /* -public ShapeGroup getGroupElectricityPresentation() { - return gr_tabElectricity_presentation; -} - -public ShapeEmbeddedObjectPresentation getElectricityPresentation() { - return pop_tabElectricity_presentation; -} -*/ - 1754045642067 - false - - 1722245292191 - 1722245292191 - - T extends Agent - - Generic parameter: - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - 10 - MPS - - - 1 - METER - - - 1 - METER - - - 1 - METER - - - - false - - 1.0 - SECOND - - CONTINUOUS - 500 - 500 - 0 - 100 - 100 - MOORE - USER_DEF - USER_DEF - 2 - 50 - 0.95 - 10 - - - true - 1658477089971 - true - 1722326400000 - - 0 - HOUR - - - 1 - HOUR - - - - 1722245292188 - scale - 0 - -150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1722245292192 - 1722245292186 - - - 1722245555993 - v_selectedTabType - 270 - 40 - - false - true - true - - EnergyDemandTab - - ELECTRICITY - - - - - 1746099651858 - v_presentationXOffset - 270 - 130 - - false - true - true - - double - - 15 - - - - - 1746099651890 - v_presentationYOffset - 270 - 150 - - false - true - true - - double - - 630 - - - - - 1754908036761 - v_activeSliderGridConnections - 530 - 50 - - false - true - true - - List<GridConnection> - - - - 1755013554753 - v_pausedSliderGridConnections - 530 - 70 - - false - true - true - - List<GridConnection> - - - - 1753869985994 - c_utilityGridConnections - true - 1170 - 75 - - false - true - true - - ArrayList - GCUtility - String - - - - 1753869993825 - c_houseGridConnections - true - 1170 - 100 - - false - true - true - - ArrayList - GCHouse - String - - - - 1753870454474 - c_gridBatteryGridConnections - true - 1170 - 125 - - false - true - true - - ArrayList - GCGridBattery - String - - - - 1753870466643 - c_solarFarmGridConnections - true - 1170 - 150 - - false - true - true - - ArrayList - GCEnergyProduction - String - - - - 1753870491136 - c_windFarmGridConnections - true - 1170 - 175 - - false - true - true - - ArrayList - GCEnergyProduction - String - - - - 1753870502247 - c_chargerGridConnections - true - 1170 - 200 - - false - true - true - - ArrayList - GCPublicCharger - String - - - - - - VOID - double - 1722245473562 - f_showCorrectTab - 270 - 70 - - false - true - true - pop_tabElectricity_presentation.setVisible(false); -pop_tabHeating_presentation.setVisible(false); -pop_tabMobility_presentation.setVisible(false); -pop_tabEHub_presentation.setVisible(false); - -switch (v_selectedTabType) { - case ELECTRICITY: - pop_tabElectricity_presentation.setVisible(true); - break; - case HEAT: - pop_tabHeating_presentation.setVisible(true); - break; - case MOBILITY: - pop_tabMobility_presentation.setVisible(true); - break; - case HUB: - case NFATO: - pop_tabEHub_presentation.setVisible(true); - break; -} - - - - VOID - double - 1722259092945 - f_setTab - 270 - 100 - - false - true - true - - tab - EnergyDemandTab - - v_selectedTabType = tab; -f_showCorrectTab(); - - - - VOID - double - 1753881126492 - f_initializeSliderGridConnections - true - 1170 - 50 - - false - true - true - - gridConnections - List<GridConnection> - - c_utilityGridConnections.clear(); -c_houseGridConnections.clear(); -c_solarFarmGridConnections.clear(); -c_windFarmGridConnections.clear(); -c_gridBatteryGridConnections.clear(); -c_chargerGridConnections.clear(); - - -for(GridConnection GC : gridConnections){ - if(GC instanceof GCUtility){ - c_utilityGridConnections.add((GCUtility)GC); - } - else if(GC instanceof GCHouse){ - c_houseGridConnections.add((GCHouse)GC); - } - else if(GC instanceof GCEnergyProduction){ - if(GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - c_solarFarmGridConnections.add((GCEnergyProduction)GC); - } - if(GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.windProductionElectric_kW)){ - c_windFarmGridConnections.add((GCEnergyProduction)GC); - } - } - else if(GC instanceof GCGridBattery){ - c_gridBatteryGridConnections.add((GCGridBattery)GC); - } - else if(GC instanceof GCPublicCharger){ - c_chargerGridConnections.add((GCPublicCharger)GC); - } -} - - - VOID - double - 1754908006859 - f_initializeSliderGCPointers - 530 - 30 - - false - true - true - - activeGridConnections - List<GridConnection> - - - pausedGridConnections - List<GridConnection> - - if(activeGridConnections != null){ - v_activeSliderGridConnections = activeGridConnections; -} -else{ - v_activeSliderGridConnections = new ArrayList<>(); - traceln("WARNING: UI_TABS HAS BEEN INITIALIZED WITH NO ACTIVE GC"); -} - -if(pausedGridConnections != null){ - v_pausedSliderGridConnections = pausedGridConnections; -} -else{ - v_pausedSliderGridConnections = new ArrayList<>(); -} - - - VOID - double - 1754908356478 - f_initializeUI_Tabs - 50 - 150 - - false - true - true - - activeGridConnections - List<GridConnection> - - - pausedGridConnections - List<GridConnection> - - - electricityTabEASliderGCs - List<GridConnection> - - //Initialize the GridConnections -f_initializeSliderGCPointers(activeGridConnections, pausedGridConnections); - -//Initialize the tabs -f_initializeActiveTabs(electricityTabEASliderGCs); - -//Set sliders to engine state of the gridconnections -f_updateSliders(); - -//Show correct tab -f_showCorrectTab(); - - - RETURNS_VALUE - List<GCHouse> - 1754919017244 - f_getActiveSliderGridConnections_houses - 560 - 260 - - false - true - true - List<GCHouse> houseGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCHouse){ - houseGridConnections.add((GCHouse)GC); - } -} - -return houseGridConnections; - - - RETURNS_VALUE - List<GCUtility> - 1754922545766 - f_getActiveSliderGridConnections_utilities - 560 - 240 - - false - true - true - List<GCUtility> utilityGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCUtility){ - utilityGridConnections.add((GCUtility)GC); - } -} - -return utilityGridConnections; - - - RETURNS_VALUE - List<GCGridBattery> - 1754922546986 - f_getAllSliderGridConnections_gridBatteries - 540 - 320 - - false - true - true - List<GCGridBattery> gridBatteryGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCGridBattery){ - gridBatteryGridConnections.add((GCGridBattery)GC); - } -} -if(v_pausedSliderGridConnections != null){ - for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCGridBattery){ - gridBatteryGridConnections.add((GCGridBattery)GC); - } - } -} -return gridBatteryGridConnections; - - - RETURNS_VALUE - List<GCPublicCharger> - 1754922547989 - f_getSliderGridConnections_chargers - 550 - 400 - - false - true - true - List<GCPublicCharger> chargerGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCPublicCharger){ - chargerGridConnections.add((GCPublicCharger)GC); - } -} - -return chargerGridConnections; - - - RETURNS_VALUE - List<GCEnergyProduction> - 1754922591622 - f_getAllSliderGridConnections_production - 540 - 350 - - false - true - true - List<GCEnergyProduction> productionGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCEnergyProduction){ - productionGridConnections.add((GCEnergyProduction)GC); - } -} -if(v_pausedSliderGridConnections != null){ - for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCEnergyProduction){ - productionGridConnections.add((GCEnergyProduction)GC); - } - } -} -return productionGridConnections; - - - VOID - double - 1754929564839 - f_updateSliders - 50 - 200 - - false - true - true - if(!pop_tabElectricity.isEmpty()){ - pop_tabElectricity.get(0).f_updateSliders_Electricity(); -} -if(!pop_tabHeating.isEmpty()){ - pop_tabHeating.get(0).f_updateSliders_Heating(); -} -if(!pop_tabMobility.isEmpty()){ - pop_tabMobility.get(0).f_updateSliders_Mobility(); -} -if(!pop_tabEHub.isEmpty()){ - pop_tabEHub.get(0).f_updateSliders_EHub(); -} - - - RETURNS_VALUE - List<GridConnection> - 1754986474226 - f_getActiveSliderGridConnections_consumption - 550 - 220 - - false - true - true - List<GridConnection> consumptionGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCUtility){ - consumptionGridConnections.add(GC); - } - else if(GC instanceof GCHouse){ - consumptionGridConnections.add(GC); - } -} - -return consumptionGridConnections; - - - RETURNS_VALUE - List<GridConnection> - 1754991155553 - f_getActiveSliderGridConnections_all - 550 - 150 - - false - true - true - List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); - -return gridConnections; - - - RETURNS_VALUE - List<GCPublicCharger> - 1755013777878 - f_getPausedSliderGridConnections_chargers - 550 - 420 - - false - true - true - List<GCPublicCharger> pausedChargerGridConnections = new ArrayList<>(); - -if(v_pausedSliderGridConnections != null){ - for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCPublicCharger){ - pausedChargerGridConnections.add((GCPublicCharger)GC); - } - } -} - -return pausedChargerGridConnections; - - - VOID - double - 1756302560139 - f_initializeActiveTabs - 70 - 170 - - false - true - true - - electricityTabEASliderGCs - List<GridConnection> - - if(!pop_tabElectricity.isEmpty()){ - pop_tabElectricity.get(0).f_initializeTab_Electricity(electricityTabEASliderGCs); -} -if(!pop_tabHeating.isEmpty()){ - //pop_tabHeating.get(0).f_initializeTab_Heating(); -} -if(!pop_tabMobility.isEmpty()){ - pop_tabMobility.get(0).f_initializeTab_Mobility(); -} -if(!pop_tabEHub.isEmpty()){ - //pop_tabEHub.get(0).f_initializeTab_EHub(); -} - - - RETURNS_VALUE - List<GCPublicCharger> - 1758278620331 - f_getAllSliderGridConnections_chargers - 540 - 380 - - false - true - true - List<GCPublicCharger> chargerGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCPublicCharger){ - chargerGridConnections.add((GCPublicCharger)GC); - } -} -if(v_pausedSliderGridConnections != null){ - for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCPublicCharger){ - chargerGridConnections.add((GCPublicCharger)GC); - } - } -} - -return chargerGridConnections; - - - RETURNS_VALUE - List<GridConnection> - 1761208715194 - f_getAllSliderGridConnections_consumption - 540 - 200 - - false - true - true - List<GridConnection> consumptionGridConnections = new ArrayList<>(); - -for(GridConnection GC : v_activeSliderGridConnections){ - if(GC instanceof GCUtility){ - consumptionGridConnections.add(GC); - } - else if(GC instanceof GCHouse){ - consumptionGridConnections.add(GC); - } -} - -for(GridConnection GC : v_pausedSliderGridConnections){ - if(GC instanceof GCUtility){ - consumptionGridConnections.add(GC); - } - else if(GC instanceof GCHouse){ - consumptionGridConnections.add(GC); - } -} - -return consumptionGridConnections; - - - RETURNS_VALUE - List<GridConnection> - 1761208797812 - f_getPausedSliderGridConnections_all - 550 - 170 - - false - true - true - List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); - -return gridConnections; - - - RETURNS_VALUE - List<GridConnection> - 1761208826669 - f_getAllSliderGridConnections_all - 530 - 130 - - false - true - true - List<GridConnection> gridConnections = new ArrayList<>(v_activeSliderGridConnections); -gridConnections.addAll(v_pausedSliderGridConnections); - -return gridConnections; - - - - - 1722245292186 - connections - 50 - -40 - - false - true - true - false - COLLECTION_OF_LINKS - true - Object - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - 1722252542602 - zero_Interface - 50 - -100 - - false - true - true - - zerointerfaceloader - Zero_Interface - - - - 1753694295457 - uI_EnergyHub - 50 - -70 - - false - true - true - - zerointerfaceloader - UI_EnergyHub - - - - - - 1722245482640 - pop_tabMobility - 50 - 80 - - false - true - true - 1744964660761 - - zerointerfaceloader - tabMobility - - - - zerointerfaceloader - tabMobility - 1722245324901 - - - - true - - 0 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089970 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722245482641 - pop_tabElectricity - 50 - 40 - - false - true - true - 1744964655611 - - zerointerfaceloader - tabElectricity - - - - zerointerfaceloader - tabElectricity - 1722247653567 - - - - - p_currentPVOnLand_ha - - - p_currentWindTurbines_MW - - - p_currentTotalGridBatteryCapacity_MWh - - - true - - 0 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089969 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722253113248 - pop_tabHeating - 50 - 60 - - false - true - true - 1744964658364 - - zerointerfaceloader - tabHeating - - - - zerointerfaceloader - tabHeating - 1722253108631 - - - - true - - 0 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089968 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722253478328 - pop_tabEHub - 50 - 100 - - false - true - true - 1744964663750 - - zerointerfaceloader - tabEHub - - - - zerointerfaceloader - tabEHub - 1722253463901 - - - - true - - 0 - - ARRAY_LIST_BASED - true - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089967 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - 1722245292192 - level - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - 1722248369298 - gr_energyDemandSettings - 200 - 580 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1722248369300 - gr_electricityButton - -125 - -25 - - true - true - false - SHAPE_DRAW_2D3D - !pop_tabElectricity.isEmpty() - v_selectedTabType = EnergyDemandTab.ELECTRICITY; -f_showCorrectTab(); - false - 0 - 0.0 - - - 1722248369302 - ovalElectricityButton - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -32 - null - - - 1722248369304 - image3 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-electricity-3408805.png - - - false - - - - - 1722248369306 - gr_heatButton - -40 - -25 - - true - true - false - SHAPE_DRAW_2D3D - !pop_tabHeating.isEmpty() - v_selectedTabType = EnergyDemandTab.HEAT; -f_showCorrectTab(); - false - 0 - 0.0 - - - 1722248369308 - ovalHeatButton - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -6943 - null - - - 1722248369310 - image10 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-fire-2429630.png - - - false - - - - - 1722248369312 - gr_mobilityButton - 45 - -25 - - true - true - false - SHAPE_DRAW_2D3D - !pop_tabMobility.isEmpty() - v_selectedTabType = EnergyDemandTab.MOBILITY; -f_showCorrectTab(); - false - 0 - 0.0 - - - 1722248369314 - ovalTransportButton - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -2625550 - null - - - 1722248369316 - image15 - -14 - -12 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 28 - 24 - 0.0 - - - zerointerfaceloader - noun-car-1777731.png - - - false - - - - - 1722248369318 - gr_eHubButton - 130 - -25 - - true - true - false - SHAPE_DRAW_2D3D - !pop_tabEHub.isEmpty() - v_selectedTabType = EnergyDemandTab.HUB; -f_showCorrectTab(); - false - 0 - 0.0 - - - 1722248369320 - ovalHubButton - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -657931 - null - SOLID - 20 - 40 - 0.0 - -3736634 - null - - - 1722248369322 - line - -10 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 20 - -2 - 0 - - - 1722248369324 - line1 - -6 - 6 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 16 - -15 - 0 - - - 1722248369326 - line2 - -10 - -4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1.5 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 18 - 15 - 0 - - - 1722248369328 - oval - -11 - -6 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - 1722248369330 - oval1 - -8 - 8 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - 1722248369332 - line3 - 8 - 10 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - DOTTED - 1 - 0 - 1 - 0 - 1 - -17 - 0 - - - 1722248369334 - oval4 - 8 - 10 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - 1722248369336 - oval3 - 10 - -9 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 3 - 40 - 0.0 - -657931 - null - - - - - 1722248369338 - txt_electricityButtonDescription - -125 - 10 - - true - true - false - SHAPE_DRAW_2D - gr_electricityButton.isVisible() - false - 0 - 0.0 - -16777216 - Elektriciteit - - Calibri - 12 - - - CENTER - - - 1722248369340 - txt_heatButtonDescription - -40 - 10 - - true - true - false - SHAPE_DRAW_2D - gr_heatButton.isVisible() - false - 0 - 0.0 - -16777216 - Warmte - - Calibri - 12 - - - CENTER - - - 1722248369342 - txt_mobilityButtonDescription - 45 - 10 - - true - true - false - SHAPE_DRAW_2D - gr_mobilityButton.isVisible() - false - 0 - 0.0 - -16777216 - Transport - - Calibri - 12 - - - CENTER - - - 1722248369344 - txt_eHubButtonDescription - 130 - 10 - - true - true - false - SHAPE_DRAW_2D - gr_eHubButton.isVisible() - false - 0 - 0.0 - -16777216 - E-hub - - Calibri - 12 - - - CENTER - - - - - 1744964727616 - gr_tabElectricity_presentation - 15 - 630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744964655611 - pop_tabElectricity_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1744964732289 - gr_tabHeating_presentation - 15 - 630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744964658364 - pop_tabHeating_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1744964737688 - gr_tabEHub_presentation - 15 - 630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744964663750 - pop_tabEHub_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1744964742286 - gr_tabMobility_presentation - 15 - 630 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744964660761 - pop_tabMobility_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 0.0 - 0.0 - - - - - 1753877322668 - txt_allGridConnectionsForTheseSliders - true - 1160 - 20 - - false - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - GridConnections displayed in slider - - SansSerif - 12 - - - LEFT - - - - - - - 1658477103140 - Zero_Interface - public ShapeButton getButton_goToUI() { - return this.button_goToUI; -} -public ShapeRadioButtonGroup getBuildingColorsRB(){ - return this.rb_mapOverlay; -} -public ShapeCheckBox getCb_showFilterInterface(){ - return this.cb_showFilterInterface; -} -public ShapeComboBox getCb_filterOptions(){ - return this.cb_filterOptions; -} - - import java.io.FileOutputStream; -import java.util.stream.Stream; -import java.util.Dictionary.*; -import java.util.Hashtable.*; -import java.util.*; -import java.util.stream.Collectors; - -import java.io.*; -import java.io.File; -import java.io.IOException; -import java.util.Date; -import java.time.LocalDate; -import java.time.DayOfWeek; -import java.text.SimpleDateFormat; -import com.fasterxml.jackson.databind.node.JsonNodeFactory; - -//Possibility to turn of traceln -import java.io.OutputStream; -import java.io.PrintStream; - -//Curves -import com.anylogic.engine.markup.AbstractCurve; -import com.anylogic.engine.markup.GISMarkupSegment; -import com.anylogic.engine.markup.GISPoint; -//import zero_engine.OL_EnergyCarriers; -//import zero_engine.OL_EnergyCarriers; -import com.querydsl.core.types.dsl.TimeExpression; -//import zero_engine.J_EAStorageElectric; -//import zero_engine.J_EAConsumption; -import org.apache.commons.lang3.tuple.Triple; -import javax.media.jai.widget.ViewportListener; - false - - 1658477103138 - 1658477103138 - - T extends Agent - - Generic parameter: - - ENTITY - 100 - false - 100 - true - - -4144960 - null - - true - true - false - - 10 - MPS - - - 1 - METER - - - 1 - METER - - - 1 - METER - - - - false - - 1.0 - SECOND - - GIS - 500 - 500 - 0 - 100 - 100 - MOORE - USER_DEF - USER_DEF - 2 - 50 - 0.95 - 10 - - - false - 1658477089966 - true - 1658563200000 - - 0 - HOUR - - - p_timeStep_h - HOUR - - - - 1658477103136 - scale - 0 - -150 - false - false - false - SHAPE_DRAW_2D3D - 100 - 0 - BASED_ON_LENGTH - 10 - METER - 10 - true - - 1658477103139 - 1658477103135 - - - 1696837759932 - v_LVGridColor - 395 - 1220 - - false - true - true - - Color - - purple - - - - - 1696837759935 - v_HVGridColor - 395 - 1180 - - false - true - true - - Color - - red - - - - - 1696837759938 - v_gasGridColor - 395 - 1240 - - false - true - true - - Color - - brown - - - - - 1696837759945 - v_energyLabelAColor - 395 - 1325 - - false - true - true - - Color - - darkGreen - - - - - 1696837759948 - v_energyLabelBColor - 395 - 1345 - - false - true - true - - Color - - green - - - - - 1696837759950 - v_energyLabelCColor - 395 - 1365 - - false - true - true - - Color - - yellowGreen - - - - - 1696837759953 - v_energyLabelDColor - 395 - 1385 - - false - true - true - - Color - - gold - - - - - 1696837759955 - v_energyLabelEColor - 395 - 1405 - - false - true - true - - Color - - orange - - - - - 1696837759958 - v_energyLabelFColor - 395 - 1425 - - false - true - true - - Color - - orangeRed - - - - - 1696837759961 - v_energyLabelUnknownColor - 395 - 1465 - - false - true - true - - Color - - gray - - - - - 1696837759963 - v_energyLabelGColor - 395 - 1445 - - false - true - true - - Color - - red - - - - - 1696837759966 - v_MVGridColor - 395 - 1200 - - false - true - true - - Color - - steelBlue - - - - - 1696863329269 - v_gridConnectionInBuildingIndex - 50 - 1560 - - false - true - true - - int - - 0 - - - - - 1701164360663 - b_resultsUpToDate - -240 - 940 - - false - true - true - - boolean - - - - 1701879001472 - v_clickedObjectText - 50 - 1580 - - false - true - true - - String - - "None" - - - - - 1701879014361 - v_clickedObjectAdress - 50 - 1600 - - false - true - true - - String - - "" - - - - - 1702041370471 - v_simulationArea1Color - 1310 - 1230 - - false - true - true - - Color - - new Color(178, 34, 34, 0) - - - - - 1702043349202 - v_companyBuildingColor - 690 - 1060 - - false - true - true - - Color - - teal - - - - - 1702043408687 - v_detailedCompanyBuildingColor - 690 - 1110 - - false - true - true - - Color - - navy - - - - - 1702043479414 - v_houseBuildingColor - 690 - 1160 - - false - true - true - - Color - - new Color(154, 208, 194) - - - - - 1702043554935 - v_restBuildingColor - 690 - 1210 - - false - true - true - - Color - - gainsboro - - - - - 1702046920293 - v_clickedObjectDetails - 50 - 1620 - - false - true - true - - String - - "" - - - - - 1704450852556 - v_solarParkColor - 690 - 1310 - - false - true - true - - Color - - new Color(250, 246, 179, 206) - - - - - 1704463271534 - v_selectionColor - 400 - 1080 - - false - true - true - - Color - - yellow - - - - - 1704463281781 - v_selectionColorAddBuildings - 400 - 1100 - - false - true - true - - Color - - yellow - - - - - 1705663820237 - v_HVMVNodeColor - 1030 - 1060 - - false - true - true - - Color - - new Color(253, 223, 134, 206) - - - - - 1705663820239 - v_HVMVLineColor - 1030 - 1080 - - false - true - true - - Color - - navy - - - - - 1705664070254 - v_solarParkLineColor - 690 - 1330 - - false - true - true - - Color - - gold - - - - - 1705664575869 - v_electrolyserColor - 690 - 1445 - - false - true - true - - Color - - new Color(33, 164, 195) - - - - - 1705664587285 - v_chargingStationColor - 690 - 1490 - - false - true - true - - Color - - cyan - - - - - 1705668042403 - v_antiLayerColor - 1310 - 1210 - - false - true - true - - Color - - new Color(192, 192, 192, 100) - - - - - 1705668569794 - v_electrolyserLineColor - 690 - 1465 - - false - true - true - - Color - - navy - - - - - 1705668590932 - v_chargingStationLineColor - 690 - 1510 - - false - true - true - - Color - - darkBlue - - - - - 1705673181898 - v_clickedGridNode - 50 - 1460 - - false - true - true - - GridNode - - - - 1705673647104 - v_previousClickedObjectType - 50 - 1430 - - false - true - true - - OL_GISObjectType - - - - 1705673714784 - v_previousClickedGridNode - 50 - 1480 - - false - true - true - - GridNode - - - - 1705967311665 - v_simulationArea1LineColor - 1310 - 1250 - - false - true - true - - Color - - dimGray - - - - - 1705967344378 - v_simulationArea2Color - true - 1310 - 1270 - - false - true - true - - Color - - new Color(178, 34, 34, 0) - - - - - 1705967344381 - v_simulationArea2LineColor - true - 1310 - 1290 - - false - true - true - - Color - - dimGray - - - - - 1706892713276 - GISregion_antiLaag - -280 - 250 - - false - true - true - - GISRegion - - - - 1706990958029 - v_backgroundColor - 1312 - 1060 - - false - true - true - - Color - - (new Color(208, 208, 245)).brighter() - - - - - 1707918668189 - v_clickedObjectType - 50 - 1410 - - false - true - true - - OL_GISObjectType - - - - 1709803708318 - v_gridNodeFeedinColor - 400 - 1120 - - false - true - true - - Color - - orange - - - - - 1710162245199 - v_batteryColor - 690 - 1400 - - false - true - true - - Color - - green.darker() - - - - - 1710162245201 - v_batteryLineColor - 690 - 1420 - - false - true - true - - Color - - green - - - - - 1710166484674 - v_windFarmColor - 690 - 1355 - - false - true - true - - Color - - white - - - - - 1710166484676 - v_windFarmLineColor - 690 - 1375 - - false - true - true - - Color - - black - - - - - 1714137967101 - v_MVLVNodeColor - 1030 - 1220 - - false - true - true - - Color - - green - - - - - 1714137970406 - v_MVLVLineColor - 1030 - 1240 - - false - true - true - - Color - - green.brighter() - - - - - 1714137978358 - v_gridNodeColorStrained - 1030 - 1415 - - false - true - true - - Color - - orange - - - - - 1714137980262 - v_gridNodeLineColorStrained - 1030 - 1435 - - false - true - true - - Color - - orange.brighter() - - - - - 1714137982277 - v_gridNodeColorCongested - 1030 - 1460 - - false - true - true - - Color - - red - - - - - 1714137984157 - v_gridLineColorCongested - 1030 - 1480 - - false - true - true - - Color - - red.brighter() - - - - - 1718264413499 - v_unknownConsumptionColor - 395 - 1305 - - false - true - true - - Color - - white - - - - - 1718567214780 - b_updateLiveCongestionColors - 1030 - 1600 - - false - true - true - - boolean - - false - - - - - 1719311576065 - v_newChargingStationColor - 690 - 1540 - - false - true - true - - Color - - new Color(173, 255, 47, 156) - - - - - 1719311576067 - v_newChargingStationLineColor - 690 - 1560 - - false - true - true - - Color - - green - - - - - 1719830571563 - v_outsideTemperature - 940 - -260 - - false - false - true - - double - - - - 1719830581855 - v_solarIrradiance - 940 - -240 - - false - false - true - - int - - - - 1719830591551 - v_windspeed - 940 - -220 - - false - false - true - - String - - - - 1720905248678 - v_selectedGridConnectionIndex - 940 - -130 - - false - true - true - - int - - 0 - - - - - 1720905365617 - v_nbGridConnectionsInSelectedBuilding - 940 - -110 - - false - true - true - - int - - 0 - - - - - 1721652532124 - v_companyBuildingLineColor - 690 - 1080 - - false - true - true - - Color - - black - - - - - 1721652543732 - v_detailedCompanyBuildingLineColor - 690 - 1130 - - false - true - true - - Color - - black - - - - - 1721652554195 - v_houseBuildingLineColor - 690 - 1180 - - false - true - true - - Color - - black - - - - - 1721652564323 - v_restBuildingLineColor - 690 - 1230 - - false - true - true - - Color - - - - 1721729327873 - v_parcelColor - 690 - 1590 - - false - true - true - - Color - - navajoWhite - - - - - 1721729331151 - v_parcelLineColor - 690 - 1610 - - false - true - true - - Color - - black - - - - - 1721996776514 - v_MVMVNodeColor - 1030 - 1150 - - false - true - true - - Color - - new Color(253, 223, 134, 206) - - - - - 1721996776516 - v_MVMVLineColor - 1030 - 1170 - - false - true - true - - Color - - navy - - - - - 1721998215865 - v_HVMVNodeSize - 1030 - 1100 - - false - true - true - - double - - 100 - - - - - 1721998236233 - v_MVMVNodeSize - 1030 - 1190 - - false - true - true - - double - - 30 - - - - - 1721998240384 - v_MVLVNodeSize - 1030 - 1260 - - false - true - true - - double - - 20 - - - - - 1725018118872 - b_showCables - 50 - 1660 - - false - true - true - - boolean - - false - - - - - 1728404379677 - v_energyAssetLineWidth - 690 - 1280 - - false - true - true - - double - - 2 - - - - - 1732027307811 - b_runningMainInterfaceScenarios - -670 - 706 - - false - true - true - - boolean - - false - - - - - 1734617425109 - b_gridLoopsAreDefined - -630 - 510 - - false - true - true - - boolean - - false - - - - - 1739980192808 - v_customEnergyCoop - 50 - 1370 - - false - true - true - - EnergyCoop - - - - 1742298194173 - v_forcedClickScreenColor - 140 - -840 - - false - true - true - - Color - - new Color(105, 105, 105, 150) - - - - - 1743092928263 - b_inManualFilterSelectionMode - -1530 - 580 - - false - true - true - - boolean - - false - - - - - 1743666440153 - v_currentActiveInfoBubble - true - -1990 - 150 - - false - true - true - - ShapeImage - - - - 1744205147072 - v_infoText - -2010 - 80 - - false - true - true - - J_InfoText - - new J_InfoText() - - - - - 1750086295616 - v_parkingSpaceColor_private - 690 - 1720 - - false - true - true - - Color - - salmon - - - - - 1750086307414 - v_parkingSpaceLineColor_private - 690 - 1740 - - false - true - true - - Color - - red - - - - - 1750089169786 - v_parkingSpaceColor_electric - 690 - 1680 - - false - true - true - - Color - - lightGreen - - - - - 1750089169788 - v_parkingSpaceLineColor_electric - 690 - 1700 - - false - true - true - - Color - - green - - - - - 1750089171472 - v_parkingSpaceColor_public - 690 - 1640 - - false - true - true - - Color - - lightBlue - - - - - 1750089171474 - v_parkingSpaceLineColor_public - 690 - 1660 - - false - true - true - - Color - - blue - - - - - 1750165528617 - v_numberOfSurveyCompanies - 1390 - 1520 - - false - true - true - - int - - - - 1750777761770 - v_HVMVNodeIsVisible - 1030 - 1120 - - false - true - true - - boolean - - false - - - - - 1752836273466 - v_gridNodeLineColorUncongested - 1030 - 1390 - - false - true - true - - Color - - green.brighter() - - - - - 1752836375624 - v_gridNodeColorUncongested - 1030 - 1370 - - false - true - true - - Color - - green - - - - - 1752837181466 - v_LVLVNodeColor - 1030 - 1290 - - false - true - true - - Color - - green - - - - - 1752837181468 - v_LVLVLineColor - 1030 - 1310 - - false - true - true - - Color - - green.brighter() - - - - - 1752837181470 - v_LVLVNodeSize - 1030 - 1330 - - false - true - true - - double - - 10 - - - - - 1753105667219 - rb_mapOverlay - 1920 - 1495 - - false - true - true - - ShapeRadioButtonGroup - - - - 1753110308594 - v_amountOfDefinedGridLoops - -630 - 530 - - false - true - true - - int - - 0 - - - - - 1753115730758 - v_gridNodeColorCapacityUnknown - 1030 - 1510 - - false - true - true - - Color - - gray - - - - - 1753115736678 - v_gridNodeLineColorCapacityUnknown - 1030 - 1530 - - false - true - true - - Color - - gray.brighter() - - - - - 1754312936616 - v_parkingSpaceLineColor_unkown - 690 - 1810 - - false - true - true - - Color - - gray.darker() - - - - - 1754312949585 - v_parkingSpaceColor_unkown - 690 - 1790 - - false - true - true - - Color - - gray - - - - - 1756375264408 - v_currentViewArea - -2010 - 100 - - false - true - true - - ViewArea - - va_Interface - - - - - 1758795129963 - zero_loader - 50 - -250 - - false - true - true - - Zero_Loader - - - - 1715858732720 - energyModel - -200 - 1020 - - false - true - true - - EnergyModel - NONE - false - - 1715858732718 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1727251571552 - settings - -670 - 110 - - false - false - true - - Settings - NONE - false - - 1727251571550 - - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1746106585457 - p_currentActiveInfoBubble - -1990 - 170 - - false - true - true - - List<ShapeImage> - NONE - false - - new ArrayList<ShapeImage>() - - - 1746106585455 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1744987127500 - p_maxNrSelectedGCForExport - true - -555 - -440 - - false - true - true - - int - NONE - false - - 20 - - - 1744987127498 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1745937830300 - p_minSelectedGCForPublicAggregation - -655 - 895 - - false - true - true - - int - NONE - false - - 10 - - - 1745937830298 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1753446312779 - b_inEnergyHubSelectionMode - 2240 - -2110 - - false - true - true - - boolean - NONE - false - - false - - - 1753446312777 - CHECK_BOX - 0 - 100 - NO_DELIMETER - - - - - 1753446312783 - b_inEnergyHubMode - 2240 - -2130 - - false - true - true - - boolean - NONE - false - - false - - - 1753446312781 - CHECK_BOX - 0 - 100 - NO_DELIMETER - - - - - 1756395079958 - user - -670 - 130 - - false - false - true - - User - NONE - false - - 1756395079956 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1758028435828 - project_data - Should be filled with the Project_data record created in the startup of the project model - -670 - 90 - - false - false - true - - Project_data - NONE - false - - 1758028435826 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760978961206 - uI_Company - -250 - 480 - - false - false - true - - UI_company - NONE - false - - 1760978961204 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760978964017 - uI_Hydrogen - -250 - 520 - - false - false - true - - UI_Hydrogen - NONE - false - - 1760978964015 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760978968830 - uI_Battery - -250 - 560 - - false - false - true - - UI_Battery - NONE - false - - 1760978968828 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1760979190278 - uI_EnergyHub - -250 - 440 - - false - false - true - - UI_EnergyHub - NONE - false - - 1760979190276 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761118903683 - rb_scenarios - -1150 - 100 - - false - true - true - - ShapeRadioButtonGroup - NONE - false - - 1761118903681 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761119479237 - t_scenario_current - -1145 - 245 - - false - true - true - - String - NONE - false - - "Het huidige scenario bevat de energie dynamieken van dit moment. \n" + -"Dit omvat o.a. de huidige zonnepanelen, het aantal elektrische \n" + -"voertuigen in per buurt, de energie consumptie profielen van bedrijven \n" + -"en de huidige gasconsumptie voor verwarming." - - - 1761119479235 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761119479242 - t_scenario_future - -1140 - 290 - - false - true - true - - String - NONE - false - - "Het toekomstige scenario bevat de energie dynamieken van dit moment, \n" + -"plus de toekomst plannen van alle bedrijven die de enquete hebben \n" + -"ingevuld. Deze plannen kunnen bevatten: het instaleren van extra \n" + -"zonnepanelen, aangevraagde net uitbereiding, maar ook plannen voor \n" + -"het electrificeren van het transport." - - - 1761119479240 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761119827711 - t_scenario_custom - -1140 - 335 - - false - true - true - - String - NONE - false - - "" - - - 1761119827709 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1761134798639 - p_residentialScenario_Current - -1160 - 150 - - false - true - true - - J_SliderSettings_Residential - NONE - false - - 1761134798637 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1763657709730 - map_filterOptionUINames - Map that matches OL_FilterOptionsGC option with a user friendly name - -1560 - 90 - - false - true - true - - Map<OL_FilterOptionsGC, String> - NONE - false - - Map.of( -OL_FilterOptionsGC.COMPANIES, "Bedrijfspanden", -OL_FilterOptionsGC.HOUSES,"Woonhuizen", -OL_FilterOptionsGC.DETAILED,"Met bekende data", -OL_FilterOptionsGC.NONDETAILED,"Met geschatte data", -OL_FilterOptionsGC.HAS_PV,"Met zonnepanelen", -OL_FilterOptionsGC.HAS_TRANSPORT,"Met voertuigen", -OL_FilterOptionsGC.HAS_EV,"Met EV", -OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP,"In de aangewezen 'lus'", -OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD,"In de aangewezen 'buurt'", -OL_FilterOptionsGC.MANUAL_SELECTION, "Handmatige selectie" -) - - - 1763657709728 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1764772112998 - map_UINamesFilterOption - Map that matches the user friendly name with the OL_FilterOptionsGC option --> This is created dynamically and a direct reverse copy of map_filterOptionUINames - -1560 - 110 - - false - true - true - - Map<String, OL_FilterOptionsGC> - NONE - false - - 1764772112996 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1765213300991 - p_defaultMainSliderGCName_solarfarm - 420 - 2050 - - false - true - true - - String - NONE - false - - "Main solarfarm slider" - - - 1765213300989 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1765213382483 - p_defaultMainSliderGCName_windfarm - 420 - 2070 - - false - true - true - - String - NONE - false - - "Main windfarm slider" - - - 1765213382481 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1765213390361 - p_defaultMainSliderGCName_battery - 420 - 2090 - - false - true - true - - String - NONE - false - - "Main battery slider" - - - 1765213390359 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1765213400597 - p_defaultEnergyHubSliderGCName_solarfarm - 420 - 2110 - - false - true - true - - String - NONE - false - - "EnergyHub solarfarm slider" - - - 1765213400595 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1765213400601 - p_defaultEnergyHubSliderGCName_windfarm - 420 - 2130 - - false - true - true - - String - NONE - false - - "EnergyHub windfarm slider" - - - 1765213400599 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1765213400605 - p_defaultEnergyHubSliderGCName_battery - 420 - 2150 - - false - true - true - - String - NONE - false - - "EnergyHub battery slider" - - - 1765213400603 - TEXT_BOX - 0 - 100 - NO_DELIMETER - - - - - 1707918668148 - c_GISNeighborhoods - -280 - 230 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1713429665418 - c_scenarioMap_Future - -280 - 340 - - false - true - true - - LinkedHashMap - String - J_scenario_Future - - - - 1713874283959 - c_scenarioMap_Current - -280 - 320 - - false - true - true - - LinkedHashMap - String - J_scenario_Current - - - - 1715178022675 - c_orderedVehicles - 510 - -710 - - false - true - true - - ArrayList - J_EA - String - - - - 1715183417595 - c_orderedHeatingSystemsCompanies - 510 - -650 - - false - true - true - - ArrayList - GCUtility - String - - - - 1715183423011 - c_orderedPVSystemsCompanies - 510 - -690 - - false - true - true - - ArrayList - GCUtility - String - - - - 1719176257019 - c_orderedHeatingSystemsHouses - 840 - -650 - - false - true - true - - ArrayList - GCHouse - String - - - - 1722344496313 - c_GISNetplanes - -280 - 210 - - false - true - true - - ArrayList - GISRegion - GISRegion - - - - 1721302080638 - c_selectedGridConnections - 50 - 1340 - - false - true - true - - ArrayList - GridConnection - String - - - - 1725276677836 - c_LVCables - -280 - 170 - - false - true - true - - ArrayList - GISRoute - String - - - - 1725276688077 - c_MVCables - -280 - 190 - - false - true - true - - ArrayList - GISRoute - String - - - - 1734442668540 - c_selectedFilterOptions - -1550 - 160 - - false - true - true - - ArrayList - OL_FilterOptionsGC - String - - - - 1734512815255 - c_previousSelectedObjects - 50 - 1530 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1734513139372 - c_selectedObjects - 50 - 1510 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1742226708562 - c_manualFilterDeselectedGC - -1530 - 555 - - false - true - true - - ArrayList - GridConnection - String - - - - 1742226748068 - c_manualFilterSelectedGC - -1530 - 535 - - false - true - true - - ArrayList - GridConnection - String - - - - 1742376749972 - c_filterSelectedGridLoops - -1530 - 410 - - false - true - true - - ArrayList - GridNode - String - - - - 1742376765347 - c_filterSelectedNeighborhoods - -1530 - 470 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1744886925970 - c_presentations - Would have to be filled by hand with all presentations that are (indirectly) on the interface canvas. eg: c_presentations.add(uI_Tabs_presentation) - true - -2020 - 210 - - false - true - true - - ArrayList - ShapeEmbeddedObjectPresentation - String - - - - 1749741070275 - c_orderedParkingSpaces - 510 - -630 - - false - true - true - - ArrayList - GIS_Object - String - - - - 1747300275742 - c_orderedPVSystemsHouses - 840 - -690 - - false - true - true - - ArrayList - GCHouse - String - - - - 1750078746618 - c_modelActiveSpecialGISObjects - 1390 - 1480 - - false - true - true - - LinkedHashSet - OL_GISObjectType - String - - - - 1750247117301 - c_orderedV1GChargers - 530 - -590 - - false - true - true - - ArrayList - J_EAChargePoint - String - - - - 1750089494475 - c_modelActiveParkingSpaceTypes - 1390 - 1500 - - false - true - true - - LinkedHashSet - OL_ParkingSpaceType - String - - - - 1750247117305 - c_orderedV2GChargers - 530 - -570 - - false - true - true - - ArrayList - J_EAChargePoint - String - - - - 1750156136377 - c_modelActiveDefaultGISBuildings - 1390 - 1460 - - false - true - true - - LinkedHashSet - OL_GISBuildingTypes - String - - - - 1750333680450 - c_orderedVehiclesPrivateParking - 510 - -530 - - false - true - true - - ArrayList - J_EAVehicle - String - - - - 1750335318608 - c_orderedPublicChargers - Niet laadpleinen, alleen losse palen - 510 - -610 - - false - true - true - - ArrayList - GCPublicCharger - String - - - - 1753087052979 - c_loadedMapOverlayTypes - 1920 - 1470 - - false - true - true - - ArrayList - OL_MapOverlayTypes - String - - - - 1753951769737 - c_orderedPTSystemsHouses - 510 - -670 - - false - true - true - - ArrayList - GCHouse - String - - - - 1756121323600 - c_mappingOfVehiclesPerCharger - 530 - -550 - - false - true - true - - LinkedHashMap - String - List<J_EADieselVehicle> - - - - 1756993771846 - c_UIResultsInstances - -290 - 650 - - false - true - true - - ArrayList - UI_Results - String - - - - 1760715323344 - c_additionalVehicles - 510 - -500 - - false - true - true - - LinkedHashMap - String - List<J_EAVehicle> - - - - 1763657607448 - c_cbFilterOptions - -1560 - 70 - - false - true - true - - ArrayList - OL_FilterOptionsGC - String - - - - - - 1658497469833 - e_calculateEnergyBalance - Trigger voor energieberekeningen in de model backbone. Volgorde is belangrijk voor consistente resultaten. - -@since: Sprint 6 -@author: Jorrit - -240 - 910 - - false - true - true - - - 1 - HOUR - - - 1/p_timeStep_h - PER_HOUR - - 1658477089965 - true - 1658563200000 - - 0 - HOUR - - - energyModel.p_timeStep_h - HOUR - - false - - // Trigger timestep in energymodel for continuous simulation ('interactive mode') -energyModel.f_runTimestep(); - - -// This function colors the trafos according to the amount of congestion. (maybe move this function call somewhere else?) -if ( b_updateLiveCongestionColors ){ - for (GridNode gn : energyModel.pop_gridNodes) { - if ((v_clickedObjectType != OL_GISObjectType.GRIDNODE || v_clickedGridNode != gn) && gn.p_energyCarrier == OL_EnergyCarriers.ELECTRICITY) { - f_setColorsBasedOnCongestion_gridnodes(gn, true); - } - } -} - - -// Update the NFATO values in the selected companyUI -if(c_selectedGridConnections.size() > 0 && c_selectedGridConnections.get(0).v_enableNFato){ - if(uI_Company.v_NFATO_active){ - uI_Company.f_getNFATOValues(); - } -} - -// Get the weather info -f_getWeatherInfo(); - - - 1743509682728 - e_setStartView - -660 - 265 - - false - true - true - - - 1 - HOUR - - - 1 - PER_HOUR - - 1658477089964 - true - 1743580800000 - - 0 - HOUR - - - 1 - HOUR - - false - - f_setStartView(); - - - - - VOID - double - 1696837759924 - f_setColorsBasedOnEnergyLabels - 1960 - 1870 - - false - true - true - - b - GIS_Object - - if (b.gisRegion != null){ - - OL_GridConnectionIsolationLabel buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.NONE; - - //Find the lowest energy label in the building - for(GridConnection GC : b.c_containedGridConnections){ - switch(GC.p_energyLabel){ - case A: - if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.A; - } - break; - case B: - if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.A){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.B; - } - break; - case C: - if(buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.NONE || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.B - || buildingLowestEnergyLabel == OL_GridConnectionIsolationLabel.C){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.C; - } - break; - case D: - if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.E || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.F - || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.D; - } - break; - case E: - if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.F || buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.E; - } - break; - case F: - if(buildingLowestEnergyLabel != OL_GridConnectionIsolationLabel.G){ - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.F; - } - break; - case G: - buildingLowestEnergyLabel = OL_GridConnectionIsolationLabel.G; - break; - } - } - - //Color building based on lowest energy label - switch(buildingLowestEnergyLabel){ - - case A: - b.gisRegion.setFillColor(v_energyLabelAColor); - break; - case B: - b.gisRegion.setFillColor(v_energyLabelBColor); - break; - case C: - b.gisRegion.setFillColor(v_energyLabelCColor); - break; - case D: - b.gisRegion.setFillColor(v_energyLabelDColor); - break; - case E: - b.gisRegion.setFillColor(v_energyLabelEColor); - break; - case F: - b.gisRegion.setFillColor(v_energyLabelFColor); - break; - case G: - b.gisRegion.setFillColor(v_energyLabelGColor); - break; - case NONE: - b.gisRegion.setFillColor(v_energyLabelUnknownColor); - break; - } -} - - - VOID - double - 1696863329251 - f_selectGISRegion - Function that selects gisregions after click on the map - 50 - 1060 - - false - true - true - - clickx - double - - - clicky - double - - //After a click, reset previous clicked building/gridNode colors and text -ArrayList<GIS_Object> buildingsConnectedToSelectedBuildingsList = new ArrayList<>(); - -//Deselect previous selection -f_deselectPreviousSelect(); - -//Check if click was on Gridnode, if yes, select grid node -for ( GridNode GN : energyModel.pop_gridNodes ){ - if( GN.gisRegion != null && GN.gisRegion.contains(clickx, clicky) && GN.gisRegion.isVisible() ){ - if(f_checkIfGCsAreAccesible(GN.f_getAllLowerLVLConnectedGridConnections())){ - f_selectGridNode(GN); - } - else{ - f_selectEnergyModel(); - } - return; - } -} - -//Check if click was on Building, if yes, select grid building -for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ - if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ - if (b.gisRegion.isVisible()) { //only allow us to click on visible objects - if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections - if(f_checkIfGCsAreAccesible(b.c_containedGridConnections)){ - buildingsConnectedToSelectedBuildingsList = b.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(b, buildingsConnectedToSelectedBuildingsList); - } - else{ - f_selectEnergyModel(); - } - return; - } - } - } -} - -//Check if click was on remaining objects such as chargers, solarfields, parcels: if yes, select object -for ( GIS_Object GISobject : energyModel.pop_GIS_Objects ){ - if( GISobject.gisRegion != null && GISobject.gisRegion.contains(clickx, clicky) ) { - if (GISobject.gisRegion.isVisible()) { //only allow us to click on visible objects - if (GISobject.c_containedGridConnections.size() > 0 ) { // only allow objects with gridconnections - if(f_checkIfGCsAreAccesible(GISobject.c_containedGridConnections)){ - // Find buildings powered by the same GC as the clicked object - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; - - //Find the (first) connected GC in the object - GridConnection selectedGC = GISobject.c_containedGridConnections.get(0); - - //Set the selected GIS object type - v_clickedObjectType = GISobject.p_GISObjectType; - c_selectedObjects.add(GISobject); - - //Set the correct interface view for each object type - switch(v_clickedObjectType){ - - case CHARGER: - f_selectCharger((GCPublicCharger)selectedGC, GISobject ); - break; - - default: - buildingsConnectedToSelectedBuildingsList = GISobject.c_containedGridConnections.get(0).c_connectedGISObjects; // Find buildings powered by the same GC as the clicked building - f_selectBuilding(GISobject, buildingsConnectedToSelectedBuildingsList); - break; - } - } - else{ - f_selectEnergyModel(); - } - return; - } - } - } -} - -//Still no clicked object? : select energyModel -f_selectEnergyModel(); - - - VOID - double - 1702045084338 - f_styleAreas - -670 - 351 - - false - true - true - - gis_area - GIS_Object - - double width = 1; - -if (gis_area instanceof GIS_Parcel || - gis_area.c_containedGridConnections.size() == 0 || - gis_area.c_containedGridConnections.get(0) instanceof GCPublicCharger ) { - // Parcels, Chargers and GIS Objects without GCs are always the default color - gis_area.f_style(null, null, null, null); - return; -} - -//Get selected map overlay type, based on loaded order of the radio buttons -OL_MapOverlayTypes selectedMapOverlayType; -if(rb_mapOverlay != null){ - selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); -} -else{ - selectedMapOverlayType = OL_MapOverlayTypes.DEFAULT; -} -//Set the correct map overlay -switch(selectedMapOverlayType){ - case DEFAULT: - gis_area.f_style(null, null, null, null); - break; - case ELECTRICITY_CONSUMPTION: - if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { - f_setColorsBasedOnConsumptionProfileHouseholds(gis_area); - } - else { - f_setColorsBasedOnElectricityConsumption(gis_area); - } - break; - case PV_PRODUCTION: - f_setColorsBasedOnProduction(gis_area); - break; - case GRID_NEIGHBOURS: - f_setColorsBasedOnGridTopology_objects(gis_area); - break; - case CONGESTION: - f_setColorsBasedOnCongestion_objects(gis_area); - break; - case ENERGY_LABEL: - f_setColorsBasedOnEnergyLabels(gis_area); - break; - case PARKING_TYPE: - f_setColorsBasedOnParkingType_objects(gis_area); - break; -} - - - VOID - double - 1702385530773 - f_styleSimulationAreas - -670 - 331 - - false - true - true - - area - GIS_Object - - GISRegion gisregion = area.gisRegion; - -switch( area.p_GISObjectType ) { - case ANTI_LAYER: - gisregion.setVisible(true); - gisregion.setLineStyle( LINE_STYLE_SOLID ); - gisregion.setLineWidth( 0); - gisregion.setLineColor( v_antiLayerColor ); - gisregion.setFillColor( v_antiLayerColor ); - GISregion_antiLaag = gisregion; - - //Pas p_id aan naar een normale naam - area.p_id = "Buitengebied"; - break; - - default: - gisregion.setVisible(true); - gisregion.setLineColor( v_simulationArea1LineColor ); - gisregion.setLineStyle( LINE_STYLE_SOLID ); - gisregion.setLineWidth( 1); - gisregion.setFillColor( v_simulationArea1Color ); -} - - - VOID - double - 1705499586056 - f_styleGridNodes - -670 - 371 - - false - true - true - - GN - GridNode - - //Get selected map overlay type, based on loaded order of the radio buttons -OL_MapOverlayTypes selectedMapOverlayType; -if(rb_mapOverlay != null){ - selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); -} -else{ - selectedMapOverlayType = OL_MapOverlayTypes.DEFAULT; -} -//Set the correct map overlay -switch(selectedMapOverlayType){ - case DEFAULT: - case ELECTRICITY_CONSUMPTION: - case PV_PRODUCTION: - if(!b_updateLiveCongestionColors){ - switch( GN.p_nodeType ) { - case LVLV: - f_styleLVLV(GN.gisRegion); - break; - case MVLV: - f_styleMVLV(GN.gisRegion); - break; - case SUBMV: - f_styleSUBMV(GN.gisRegion); - break; - case MVMV: - f_styleMVMV(GN.gisRegion); - break; - case HVMV: - f_styleHVMV(GN.gisRegion); - break; - case HT: - - break; - case MT: - - break; - case LT: - - break; - default: - } - } - else{ - f_setColorsBasedOnCongestion_gridnodes(GN, true); - } - break; - case GRID_NEIGHBOURS: - f_setColorsBasedOnGridTopology_gridnodes(GN); - break; - case CONGESTION: - f_setColorsBasedOnCongestion_gridnodes(GN, false); - break; - case PARKING_TYPE: - f_setColorsBasedOnParkingType_gridnodes(GN); - break; -} - - - VOID - double - 1705505495599 - f_styleMVLV - -650 - 451 - - false - true - true - - gisregion - GISRegion - - gisregion.setLineStyle( LINE_STYLE_SOLID ); -gisregion.setLineColor( v_MVLVLineColor ); -gisregion.setLineWidth(2); -gisregion.setFillColor(v_MVLVNodeColor); - - - VOID - double - 1705505509120 - f_styleHVMV - -650 - 391 - - false - true - true - - gisregion - GISRegion - - gisregion.setFillColor(v_HVMVNodeColor); -gisregion.setLineStyle( LINE_STYLE_SOLID ); -gisregion.setLineColor( v_HVMVLineColor ); -gisregion.setLineWidth(2); -gisregion.setVisible(v_HVMVNodeIsVisible); - - - VOID - double - 1705925024602 - f_setUITabs - -670 - 601 - - false - true - true - //Create the tabs for the project -f_createUITabs_default(); - -//Initialize the uI_Tabs with the gridconnections -uI_Tabs.f_initializeUI_Tabs(energyModel.f_getGridConnectionsCollectionPointer(), energyModel.f_getPausedGridConnectionsCollectionPointer(), f_getMainInterfaceSliderEAGCs()); - -//Initialize sliders and start scenario with certain presets -b_runningMainInterfaceScenarios = true; -f_setSliderPresets(); -b_runningMainInterfaceScenarios = false; - -//Store the initial slider state for Residential areas for the scenario current button -if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { - f_storeResidentialScenario_Current(); -} - - - VOID - double - 1707918668161 - f_selectGridNode - 70 - 1100 - - false - true - true - - GN - GridNode - - v_clickedGridNode = GN; -v_clickedObjectType = OL_GISObjectType.GRIDNODE; - -//Disable the KPI summary (button) -uI_Results.getCheckbox_KPISummary().setSelected(false, true); -uI_Results.getCheckbox_KPISummary().setEnabled(false); - - -// 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; -} - -v_clickedObjectAdress = ""; -v_clickedObjectDetails = "Type station:\t" + GN.p_description; - - -// Color the GridNode -GN.gisRegion.setFillColor( v_selectionColor ); -GN.gisRegion.setLineColor( orange ); - -// Color the connected GridConnections -for ( GridConnection GC : GN.f_getAllLowerLVLConnectedGridConnections()){ - if (GC.c_connectedGISObjects.size() == 0){ - //traceln("Gridconnection with ID " + GC.p_ownerID + " and index " + GC.getIndex() + " has no GIS building"); - } - else { - GC.c_connectedGISObjects.forEach(gb -> gb.f_style(v_gridNodeFeedinColor, v_gridNodeFeedinColor, 2.0, null)); - } -} - -uI_Results.f_updateUIresultsGridNode(GN); - - - VOID - double - 1707918668163 - f_selectBuilding - 70 - 1120 - - false - true - true - - b - GIS_Object - - - buildingsConnectedToSelectedGC_list - ArrayList<GIS_Object> - - c_selectedObjects = new ArrayList<GIS_Object>(buildingsConnectedToSelectedGC_list); -v_clickedObjectType = b.p_GISObjectType; - -//Enable checkbox -uI_Results.getCheckbox_KPISummary().setEnabled(true); - -// Color all buildings of the GridConnection associated with the selected building -if (!c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.equals("-") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("woonfunctie") && !c_selectedObjects.get(0).c_containedGridConnections.get(0).p_ownerID.contains("Onbekend")){ - for (GIS_Object obj : c_selectedObjects) { //Buildings that are grouped, select as well. - obj.gisRegion.setFillColor(v_selectionColorAddBuildings); - } -} - -//Check the number of GCs in building -v_nbGridConnectionsInSelectedBuilding = b.c_containedGridConnections.size(); - -//Multiple GC in building: set additional adress in building info + buttons -if ( v_nbGridConnectionsInSelectedBuilding > 1 ){ - v_selectedGridConnectionIndex = 0; - v_clickedObjectText = "Pand met " + b.c_containedGridConnections.size() + " adressen: " + b.p_id; - gr_multipleBuildingInfo.setVisible(true); -} -else { - String text = ""; - if (project_data.project_type() == OL_ProjectType.BUSINESSPARK) { - if (b instanceof GIS_Building) { - if(b.c_containedGridConnections.get(0).p_owner.p_detailedCompany){ - text = b.c_containedGridConnections.get(0).p_owner.p_actorID + ", "; - } - else if(b.p_annotation != null){ - text = b.p_annotation + ", "; - } - } - else { - text = b.p_id + ", "; - } - } - else{ - if(b.p_annotation != null){ - text = b.p_annotation + ", "; - } - else{ - text = b.p_id + ", "; - } - } - - //Set adres text - if (c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address == null || c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress() == null) { - text = text + "Onbekend adres"; - } - else { - text = text + c_selectedObjects.get(0).c_containedGridConnections.get(0).p_address.getAddress(); - } - - v_clickedObjectText = text; - gr_multipleBuildingInfo.setVisible(false); -} - - - -//Update the resultsUI -f_updateUIResultsData(); - -//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(); - - - - VOID - double - 1707918668165 - f_deselectPreviousSelect - 70 - 1080 - - false - true - true - v_previousClickedObjectType = v_clickedObjectType; -c_previousSelectedObjects = new ArrayList<GIS_Object>(c_selectedObjects); -c_selectedGridConnections.clear(); -c_selectedObjects.clear(); - -if(v_previousClickedObjectType != null){ - // Update for results_ui when deselecting objects to show entire area again as default option - v_clickedObjectText = "None"; - v_clickedObjectAdress = ""; - v_clickedObjectDetails = ""; - v_clickedObjectType = null; - button_goToUI.setVisible(false); - gr_multipleBuildingInfo.setVisible(false); - - // We restore the colors of what we clicked on before - if (v_previousClickedObjectType == OL_GISObjectType.GRIDNODE){ - v_previousClickedGridNode = v_clickedGridNode; - f_styleGridNodes(v_clickedGridNode); - for ( Agent agent : v_previousClickedGridNode.f_getAllLowerLVLConnectedGridConnections()){ - if (agent instanceof GridConnection) { - GridConnection GC = (GridConnection)agent; - for (GIS_Object a : GC.c_connectedGISObjects) { - f_styleAreas(a); - } - } - } - } - else if (v_previousClickedObjectType == OL_GISObjectType.BUILDING || - v_previousClickedObjectType == OL_GISObjectType.SOLARFARM || - v_previousClickedObjectType == OL_GISObjectType.WINDFARM || - v_previousClickedObjectType == OL_GISObjectType.ELECTROLYSER || - v_previousClickedObjectType == OL_GISObjectType.BATTERY || - v_previousClickedObjectType == OL_GISObjectType.CHARGER || - v_previousClickedObjectType == OL_GISObjectType.PARKING){ - for(GIS_Object previousClickedObject: c_previousSelectedObjects){ - f_styleAreas(previousClickedObject); - } - } - - if(v_customEnergyCoop != null){ - energyModel.f_removeEnergyCoop(v_customEnergyCoop); - v_customEnergyCoop = null; - } -} - - - VOID - double - 1709716821854 - f_connectResultsUI - -670 - 780 - - false - true - true - //Style resultsUI -f_styleResultsUI(); - -//Set ResultsUI radiobutton setup -if(settings.resultsUIRadioButtonSetup() != null){ - uI_Results.v_selectedRadioButtonSetup = settings.resultsUIRadioButtonSetup(); -} - -//Disable summary button if summary is not selected -if(settings.showKPISummary() == null || !settings.showKPISummary()){ - uI_Results.getCheckbox_KPISummary().setVisible(false); -} - -//Connect resultsUI -uI_Results.f_initializeResultsUI(); - -c_UIResultsInstances.add(uI_Results); - - - VOID - double - 1709718252272 - f_resetSettings - -290 - 750 - - false - true - true - if(!b_runningMainInterfaceScenarios){ - b_resultsUpToDate = false; - - // Update asset flow categories of all agents - energyModel.f_updateActiveAssetsMetaData(); - - // Switch to the live plots and do not allow the user to switch away from the live plot when the year is not yet simulated - for (UI_Results ui_results : c_UIResultsInstances) { - if (ui_results.f_getSelectedObjectData() != null) { - f_enableLivePlotsOnly(ui_results); - } - } - - // On all screens cover the resultsUI Buttons with the simulate year button - f_setAllSimulateYearScreens(); - - runSimulation(); -} - - - VOID - double - 1714130288661 - f_initialPVSystemsOrder - 85 - -690 - - false - true - true - List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); -List<GCHouse> housesWithoutPV = houses.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); -List<GCHouse> housesWithPV = new ArrayList<>(houses); -housesWithPV.removeAll(housesWithoutPV); - -c_orderedPVSystemsHouses = new ArrayList<>(housesWithoutPV); -c_orderedPVSystemsHouses.addAll(housesWithPV); - - -List<GCUtility> companies = new ArrayList<GCUtility>(energyModel.UtilityConnections.findAll( x -> true)); -List<GCUtility> companiesWithoutPV = companies.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); -List<GCUtility> companiesWithPV = companies.stream().filter( gc -> gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW) ).collect(Collectors.toList()); -List<GCUtility> detailedCompaniesWithPV = companiesWithPV.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); -List<GCUtility> genericCompaniesWithPV = new ArrayList<>(companiesWithPV); -genericCompaniesWithPV.removeAll(detailedCompaniesWithPV); - -c_orderedPVSystemsCompanies = new ArrayList<>(companiesWithoutPV); -c_orderedPVSystemsCompanies.addAll(genericCompaniesWithPV); -c_orderedPVSystemsCompanies.addAll(detailedCompaniesWithPV); - - - - - VOID - double - 1714130342440 - f_initialElectricVehiclesOrder - 85 - -710 - - false - true - true - // First we make a copy of all the vehicle energy assets -List<J_EA> EAs = new ArrayList<>(findAll(energyModel.f_getEnergyAssets(), ea -> !(ea.getParentAgent() instanceof GCPublicCharger))); -EAs = EAs.stream().filter(ea -> ea instanceof J_EAVehicle).collect(Collectors.toList()); -// Find all the EVs at the start of the simulation -ArrayList<J_EA> otherEAs = EAs.stream().filter(ea -> !(ea instanceof J_EAEV)).collect(Collectors.toCollection(ArrayList::new)); -// We make sure that the EVs at the start of the simulation are the last in the list - - -for(J_EA vehicle : EAs){ - if(vehicle instanceof J_EAEV && !(vehicle.getParentAgent() instanceof GCUtility)){ // Companies can not get lower EV then current situation - otherEAs.add((J_EAEV) vehicle); - } -} - -c_orderedVehicles = otherEAs; - - - VOID - double - 1714131269202 - f_initialHeatingSystemsOrder - 85 - -650 - - false - true - true - List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); -List<GCHouse> housesWithoutHP = houses.stream().filter( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP ).collect(Collectors.toList()); -List<GCHouse> housesWithHP = new ArrayList<>(houses); -housesWithHP.removeAll(housesWithoutHP); - -c_orderedHeatingSystemsHouses = new ArrayList<>(housesWithoutHP); -c_orderedHeatingSystemsHouses.addAll(housesWithHP); - -List<GCUtility> companies = new ArrayList<GCUtility>(energyModel.UtilityConnections.findAll( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.NONE && gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.CUSTOM)); -List<GCUtility> companiesWithoutHP = companies.stream().filter( gc -> gc.f_getCurrentHeatingType() != OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP).collect(Collectors.toList()); -List<GCUtility> companiesWithHP = companies.stream().filter( gc -> gc.f_getCurrentHeatingType() == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP ).collect(Collectors.toList()); -List<GCUtility> detailedCompaniesWithHP = companiesWithHP.stream().filter( gc -> gc.p_owner != null && gc.p_owner.p_detailedCompany ).collect(Collectors.toList()); -List<GCUtility> genericCompaniesWithHP = new ArrayList<>(companiesWithHP); -genericCompaniesWithHP.removeAll(detailedCompaniesWithHP); - -c_orderedHeatingSystemsCompanies = new ArrayList<>(companiesWithoutHP); -c_orderedHeatingSystemsCompanies.addAll(genericCompaniesWithHP); -c_orderedHeatingSystemsCompanies.addAll(detailedCompaniesWithHP); - - - - - VOID - double - 1714135623471 - f_initialAssetOrdering - 70 - -730 - - false - true - true - f_initialElectricVehiclesOrder(); -f_initialPVSystemsOrder(); -f_initialPTSystemsOrder_households(); -f_initialHeatingSystemsOrder(); -f_initialParkingSpacesOrder(); -f_initialChargerOrder(); -f_initializePrivateAndPublicParkingCarsOrder(); -f_initializeAdditionalVehicles(); -f_projectSpecificOrderedCollectionAdjustments(); - - - - - VOID - double - 1715116336665 - f_setColorsBasedOnElectricityConsumption - 1960 - 1610 - - false - true - true - - gis_area - GIS_Object - - if(gis_area.c_containedGridConnections.size() > 0){ - - double yearlyEnergyConsumption = sum( gis_area.c_containedGridConnections, x -> x.v_rapidRunData.getTotalElectricityConsumed_MWh()); - - if ( yearlyEnergyConsumption < 10){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption < 50){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption < 150){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption < 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} - else if ( yearlyEnergyConsumption > 500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} -} - - - VOID - double - 1715118739710 - f_setColorsBasedOnProduction - 1960 - 1680 - - false - true - true - - gis_area - GIS_Object - - if (gis_area.c_containedGridConnections.size() > 0) { - - //Define medium PV Value - double mediumPVValue_kWp = 100; - if (project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - mediumPVValue_kWp = 5; - } - - //Calculate total pv capacity on the gis object - double totalPVCapacity_kWp = 0; - for(GridConnection GC : gis_area.c_containedGridConnections){ - totalPVCapacity_kWp += GC.v_liveAssetsMetaData.totalInstalledPVPower_kW; - } - - //Set color of object based on total pv capacity - if(totalPVCapacity_kWp == 0){ - gis_area.f_style(rect_mapOverlayLegend_PVProduction1.getFillColor(), null, null, null); - } - else if (totalPVCapacity_kWp < mediumPVValue_kWp){ - gis_area.f_style(rect_mapOverlayLegend_PVProduction2.getFillColor(), null, null, null); - } - else{ - gis_area.f_style(rect_mapOverlayLegend_PVProduction3.getFillColor(), null, null, null); - } -} - - - VOID - double - 1715157302225 - f_projectSpecificSettings - -660 - 240 - - false - false - true - //Should be overridden in child interface!!! -traceln("Forgot to override project specific settings!!"); - - - VOID - double - 1715859145993 - f_UIStartup - -670 - 180 - - false - true - true - // UI elements - -//Project specific settings -f_projectSpecificSettings(); - -// Initialize the slider Asset Ordering lists -f_initialAssetOrdering(); - -//Connect the results UI -f_connectResultsUI(); - -//Initialize the UITabs -f_setUITabs(); - -//Initialize scenario radio button -f_initializeScenarioRadioButton(); - -//Initialize the legend -f_initializeLegend(); - -//Initialize map overlay buttons -f_initializeMapOverlayRadioButton(); - -//Set ui button visibility false at startup -f_createAdditionalUIs(); -button_goToUI.setVisible(false); - -//Create and set the grid topology colors (Netvlakken) -f_setGridTopologyColors(); - -//Disable cable button if no cables have been loaded in -if(c_LVCables.size() == 0 && c_MVCables.size() == 0){ - checkbox_cabels.setVisible(false); -} - -//Set order of certain layovers and submenus -f_initializePresentationOrder(); - -//Set to public model version styling if activated -if(settings.isPublicModel() || user.GCAccessType != OL_UserGCAccessType.FULL){ - f_changeDefaultColorOfPrivateGC(); -} - -//Turn on update of live congestion colloring -b_updateLiveCongestionColors = true; - -//Set filter combo box options -f_setFilterComboBoxOptions(); - - - RETURNS_VALUE - GISRegion - 1715868403475 - f_createGISObject - Functino used by the loader to create new GIS objects on the GIS map - -280 - 90 - - false - true - true - - gisTokens - double[] - - GISRegion gisregion = new GISRegion(map, gisTokens); -return gisregion; - - - VOID - double - 1716419446045 - f_enableTraceln - -640 - -120 - - false - true - true - - originalPrintStream - PrintStream - - System.setOut(originalPrintStream); - - - RETURNS_VALUE - PrintStream - 1716419448047 - f_disableTraceln - -640 - -140 - - false - true - true - PrintStream originalPrintStream = System.out; - -System.setOut(new PrintStream(new OutputStream() { - public void write(int b) { - } - })); -return originalPrintStream; - - - VOID - double - 1718263685462 - f_setColorsBasedOnConsumptionProfileHouseholds - 1960 - 1630 - - false - true - true - - gis_area - GIS_Object - - double yearlyElectricityConsumption_kWh = 0; -for( GridConnection gc : gis_area.c_containedGridConnections){ - if(gc.v_rapidRunData != null){ - yearlyElectricityConsumption_kWh += gc.v_rapidRunData.getTotalElectricityConsumed_MWh()*1000; - } - else{ - for ( J_EAConsumption consumptionAsset : gc.c_consumptionAssets){ - if( consumptionAsset.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND ){ - yearlyElectricityConsumption_kWh += consumptionAsset.yearlyDemand_kWh; - } - } - } -} - -if ( yearlyElectricityConsumption_kWh == 0) { gis_area.f_style( v_unknownConsumptionColor, null, null, null );} -else if ( yearlyElectricityConsumption_kWh < 1500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption1.getFillColor(), null, null, null);} -else if ( yearlyElectricityConsumption_kWh < 2500){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption2.getFillColor(), null, null, null);} -else if ( yearlyElectricityConsumption_kWh < 4000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption3.getFillColor(), null, null, null);} -else if ( yearlyElectricityConsumption_kWh < 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption4.getFillColor(), null, null, null);} -else if ( yearlyElectricityConsumption_kWh > 6000){ gis_area.f_style( rect_mapOverlayLegend_ElectricityConsumption5.getFillColor(), null, null, null);} - - - - - VOID - double - 1718288402102 - f_updateMainInterfaceSliders - -670 - 686 - - false - true - true - uI_Tabs.f_updateSliders(); - -if(uI_EnergyHub != null){ - uI_EnergyHub.uI_Tabs.f_updateSliders(); -} - - - VOID - double - 1718552624959 - f_selectCharger - 70 - 1140 - - false - true - true - - charger - GCPublicCharger - - - objectGIS - GIS_Object - - objectGIS.gisRegion.setFillColor( v_selectionColor ); -objectGIS.gisRegion.setLineColor( orange ); - -//set info text -v_clickedObjectText = ""; //charger.p_CPOName + " laadpunt, "; -if (charger.p_address == null || charger.p_address.getAddress() == null) { - v_clickedObjectAdress = "Onbekend adres"; -} -else{ - v_clickedObjectAdress = charger.p_address.getStreetName(); -} -v_clickedObjectDetails = "No detaild info of charger available"; - -//v_clickedGridConnection = charger; -c_selectedGridConnections = new ArrayList<GridConnection>(Arrays.asList(charger)); -uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - -//Set the UI button -f_setUIButton(); - - - VOID - double - 1718566260603 - f_setColorsBasedOnGridTopology_objects - 1960 - 1730 - - false - true - true - - gis_area - GIS_Object - - if (gis_area.c_containedGridConnections.size() > 0) { - Color c = gis_area.c_containedGridConnections.get(0).p_parentNodeElectric.p_uniqueColor; - gis_area.f_style(c, black, 1.0, null); -} - - - VOID - double - 1719830600300 - f_getWeatherInfo - 940 - -280 - - false - false - true - v_outsideTemperature = roundToDecimal(energyModel.pp_ambientTemperature_degC.getCurrentValue(), 1); -v_solarIrradiance = roundToInt(energyModel.pp_PVProduction35DegSouth_fr.getCurrentValue() * 1000); - -double windspeed = roundToDecimal(energyModel.pp_windProduction_fr.getCurrentValue(), 1); -if (windspeed < 0.2){ - v_windspeed = "Laag"; -} -else if (windspeed < 0.6){ - v_windspeed = "Midden"; -} -else if (windspeed < 0.8){ - v_windspeed = "Hoog"; -} -else { - v_windspeed = "Zeer hoog"; -} - - - VOID - double - 1720793723819 - f_updateUIResultsData - 80 - 1160 - - false - true - true - for (GridConnection gc : c_selectedObjects.get(0).c_containedGridConnections) { - if (!c_selectedGridConnections.contains(gc)) { - c_selectedGridConnections.add(gc); - } -} - -if(c_selectedGridConnections.size()>1){ - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); -} -else{ - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); -} - - - - VOID - double - 1721991420806 - f_setGridTopologyColors - -650 - 491 - - false - true - true - //Find all MV substations -List<GridNode> MVsubstations = findAll(energyModel.pop_gridNodes, GN -> GN.p_nodeType == OL_GridNodeType.SUBMV); - -if(MVsubstations.size() > 0 || project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - b_gridLoopsAreDefined = true; -} - -v_amountOfDefinedGridLoops = 0; - -if(MVsubstations != null){ - //Set all unique grid topology colors for each substation and its children if the gridloops are defined - for (GridNode MVsub : MVsubstations){ - - //Create a unique color from a spectrum and assign it to the subMV - MVsub.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, MVsubstations.size()); - - //Assign unique color to all underlying grid nodes - MVsub.f_getLowerLVLConnectedGridNodes().forEach(GN -> GN.p_uniqueColor = MVsub.p_uniqueColor); - - //Update spectrum color index and total defined colours - v_amountOfDefinedGridLoops++; - } -} -else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - int totalNotToplevelGridNodes = energyModel.f_getGridNodesNotTopLevel().size(); - //Set all unique grid topology colors for each substation and its children if the gridloops are defined - for (GridNode node : energyModel.f_getGridNodesNotTopLevel()){ - - //Create a unique color from a spectrum and assign it to the subMV - node.p_uniqueColor = spectrumColor(v_amountOfDefinedGridLoops, totalNotToplevelGridNodes); - - //Update spectrum color index and total defined colours - v_amountOfDefinedGridLoops++; - } -} - - - VOID - double - 1721991963719 - f_styleSUBMV - -650 - 431 - - false - true - true - - gisregion - GISRegion - - gisregion.setVisible(false); - - - VOID - double - 1721992103665 - f_styleMVMV - -650 - 411 - - false - true - true - - gisregion - GISRegion - - gisregion.setFillColor(v_MVMVNodeColor); -gisregion.setLineStyle( LINE_STYLE_SOLID ); -gisregion.setLineColor( v_MVMVLineColor ); -gisregion.setLineWidth(2); - - - VOID - double - 1721049341787 - f_listFunctions - 80 - 1180 - - false - true - true - if(c_selectedObjects.get(0).c_containedGridConnections.size() > 1){ - HashMap<String, Integer> functionsList = new HashMap<String, Integer>(); - - for (int i = 0; i < c_selectedObjects.get(0).c_containedGridConnections.size(); i++) { - //split functies als er meerdere zijn - String[] splitFunctions = c_selectedObjects.get(0).c_containedGridConnections.get(i).p_purposeBAG.split(","); - - for (int j = 0; j < splitFunctions.length; j++) { - // als de key al bestaat, itereer - if (functionsList.get(splitFunctions[j]) != null) { - functionsList.put(splitFunctions[j], functionsList.get(splitFunctions[j]) + 1); - } - // zo niet, voeg toe - else { - functionsList.put(splitFunctions[j],1); - } - } - } - - /* - for (String i : functionsList.keySet()) { - traceln(i + ": " + functionsList.get(i)); - } - */ -} - - - VOID - double - 1725006890451 - f_setUIButton - 80 - 1200 - - false - true - true - switch(v_clickedObjectType){ - -case BUILDING: - if (c_selectedGridConnections.size() > 1 || !(c_selectedGridConnections.get(0) instanceof GCUtility) || !c_selectedGridConnections.get(0).v_isActive){ - button_goToUI.setVisible(false); - } - else{ - button_goToUI.setText("Ga naar het Bedrijfsportaal"); - button_goToUI.setVisible(true); - } - break; - -case ELECTROLYSER: - button_goToUI.setText("Ga naar het Waterstof Dashboard"); - button_goToUI.setVisible(true); - break; - -case BATTERY: - button_goToUI.setText("Ga naar het Batterijen Dashboard"); - button_goToUI.setVisible(true); - break; - -case CHARGER: - button_goToUI.setVisible(false); - break; - -default: - button_goToUI.setVisible(false); - break; -} - - - - RETURNS_VALUE - GISRoute - 1725266804325 - f_createGISLine - -280 - 110 - - false - true - true - - GISCoords - double[] - - - objectType - OL_GISObjectType - - -Curve curve = new Curve(); -for(int i = 0; i+3 < GISCoords.length; i += 2){ - GISMarkupSegmentLine segment = new GISMarkupSegmentLine(GISCoords[i], GISCoords[i+1], GISCoords[i+2], GISCoords[i+3]); - curve.addSegment(segment); -} - -//Create route (line) -GISRoute gisroute = new GISRoute(map, curve, true); - -//Object styling -switch(objectType){ - - case LV_CABLE: - c_LVCables.add(gisroute); - //Styling - gisroute.setLineStyle(LINE_STYLE_SOLID); - gisroute.setLineWidth(0.8); - gisroute.setLineColor(v_LVGridColor); - gisroute.setVisible(false); - break; - - case MV_CABLE: - c_MVCables.add(gisroute); - //Styling - gisroute.setLineStyle(LINE_STYLE_SOLID); - gisroute.setLineWidth(1); - gisroute.setLineColor(v_MVGridColor); - gisroute.setVisible(false); - break; -} - -return gisroute; - - - - VOID - double - 1725968656820 - f_setColorsBasedOnGridTopology_gridnodes - 1960 - 1750 - - false - true - true - - GN - GridNode - - if(GN.gisRegion != null){ - GN.gisRegion.setFillColor(GN.p_uniqueColor); - GN.gisRegion.setLineColor(GN.p_uniqueColor.brighter()); -} - - - VOID - double - 1725977409304 - f_setSliderPresets - -650 - 661 - - false - false - true - //Should be overridden in child interface!!! -traceln("Forgot to override project specific slider settings!!"); - - - VOID - double - 1726068314849 - f_projectSpecificStyling - -660 - 220 - - false - true - true - //Function used to set the colors, styling, and other parameters/functions for each specific project -//Should be overridden!! -traceln("DID NOT OVERRIDE THE PROJECT SPECIFIC STYLING!"); - - - VOID - double - 1729685968993 - f_projectSpecificOrderedCollectionAdjustments - 86 - -550 - - false - true - true - //Function that can be used to make project specific adjustments to the ordered collection -//SHOULD BE OVERRIDEN IF YOU WANT TO USE THIS - - - VOID - double - 1734442458629 - f_applyFilter - -1575 - 210 - - false - true - true - - selectedFilter - OL_FilterOptionsGC - - - selectedFilterName - String - - c_selectedFilterOptions.add(selectedFilter); - -ArrayList<GridConnection> toBeFilteredGC = new ArrayList<GridConnection>(); - -if(c_selectedFilterOptions.size()>1 && c_selectedGridConnections.size()> 0){ // Already filtering - toBeFilteredGC = new ArrayList<GridConnection>(c_selectedGridConnections); -} -else{ // First filter - toBeFilteredGC = new ArrayList<GridConnection>(energyModel.f_getActiveGridConnections()); -} - -//After a filter selecttion, reset previous clicked building/gridNode colors and text -f_deselectPreviousSelect(); - - -//Can filter return 0? (Only allowed for filters who are not inmediately active (gridLoops, nbh, etc.) -boolean filterCanReturnZero = false; - -switch(selectedFilter){ - case COMPANIES: - f_filterCompanies(toBeFilteredGC); - break; - - case HOUSES: - f_filterHouses(toBeFilteredGC); - break; - - case DETAILED: - f_filterDetailed(toBeFilteredGC); - break; - - case NONDETAILED: - f_filterEstimated(toBeFilteredGC); - break; - - case HAS_PV: - f_filterHasPV(toBeFilteredGC); - break; - - case HAS_TRANSPORT: - f_filterHasTransport(toBeFilteredGC); - break; - - case HAS_EV: - f_filterHasEV(toBeFilteredGC); - break; - - case GRIDTOPOLOGY_SELECTEDLOOP: - if(!c_filterSelectedGridLoops.isEmpty()){ - f_filterGridLoops(toBeFilteredGC); - } - else{ - - f_setForcedClickScreenText("Selecteer een lus"); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(true); - } - - if(c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.GRID_NEIGHBOURS)){ - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.GRID_NEIGHBOURS),true); - } - if(c_selectedFilterOptions.size() > 1){ - c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); - } - else{ - filterCanReturnZero = true; - } - } - break; - - case SELECTED_NEIGHBORHOOD: - if(!c_filterSelectedNeighborhoods.isEmpty()){ - f_filterNeighborhoods(toBeFilteredGC); - } - else{ - f_setForcedClickScreenText("Selecteer een buurt"); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(true); - } - if(c_selectedFilterOptions.size() > 1){ - c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); - } - else{ - filterCanReturnZero = true; - } - } - break; - case MANUAL_SELECTION: - if(c_manualFilterSelectedGC.size() > 0){ - f_filterManualSelection(toBeFilteredGC); - } - else if(c_selectedFilterOptions.size() > 1){ - if(c_manualFilterDeselectedGC.size() > 0){ - f_filterManualSelection(toBeFilteredGC); - } - else{ - c_selectedGridConnections = new ArrayList<>(toBeFilteredGC); - } - } - else{ - filterCanReturnZero = true; - } - - break; -} - -if(c_selectedGridConnections.size() == 0 && !filterCanReturnZero){ // Not allowed to return zero, while returning zero - f_removeFilter(selectedFilter, selectedFilterName); - - //Notify filter has not been applied, cause no results are given - f_setErrorScreen("Geselecteerde filter geeft geen resultaten. De filter is gedeactiveerd.", 0, 0); -} -else if(c_selectedGridConnections.size() == 0 && filterCanReturnZero){//Allowed to return zero filtered gc, while returning zero - //Do nothing -} -else{//Filtered GC returns GC - - //Set color of all gis objects of new filter selection - v_clickedObjectType = OL_GISObjectType.BUILDING; - - for (GridConnection GC: c_selectedGridConnections){ - for (GIS_Object objectGIS : GC.c_connectedGISObjects) { - objectGIS.gisRegion.setFillColor(v_selectionColorAddBuildings); - c_selectedObjects.add(objectGIS); - } - } - - //Set graphs - if(c_selectedGridConnections.size()>1){ - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - else{ - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } -} - - - VOID - double - 1734442462084 - f_setFilter - -1575 - 140 - - false - true - true - - selectedFilter - OL_FilterOptionsGC - - String selectedFilterName = map_filterOptionUINames.get(selectedFilter); - -//Remove manual filter first -if(selectedFilter != OL_FilterOptionsGC.MANUAL_SELECTION && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - button_removeManualSelection.action(); -} - -if(!selectedFilterName.equals("-") && !c_selectedFilterOptions.contains(selectedFilter)){ // Set filter - traceln("Geselecteerde filter ( " + selectedFilterName + " ) toegevoegd."); - t_activeFilters.setText( t_activeFilters.getText() + selectedFilterName + "\n"); - f_applyFilter(selectedFilter, selectedFilterName); -} -else if(c_selectedFilterOptions.contains(selectedFilter)){ // Remove filter - f_removeFilter(selectedFilter, selectedFilterName); -} - - - VOID - double - 1734445008646 - f_removeAllFilters - -1570 - 605 - - false - true - true - c_selectedFilterOptions.clear(); -t_activeFilters.setText(""); - -//Deselect everything and set region as main -f_clearSelectionAndSelectEnergyModel(); - - - VOID - double - 1734447122780 - f_selectGridLoop - -1530 - 390 - - false - true - true - - clickx - double - - - clicky - double - - -//Check if click was on Building, if yes, select grid building -for ( GIS_Building b : energyModel.pop_GIS_Buildings ){ - if( b.gisRegion != null && b.gisRegion.contains(clickx, clicky) ){ - if (b.gisRegion.isVisible()) { //only allow us to click on visible objects - if (b.c_containedGridConnections.size() > 0 ) { // only allow buildings with gridconnections - GridConnection clickedGridConnection = b.c_containedGridConnections.get(0); // Find buildings powered by the same GC as the clicked building - GridNode clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; - ArrayList<GridNode> allGridNodes = new ArrayList<GridNode>(energyModel.f_getGridNodesTopLevel()); - allGridNodes.addAll(energyModel.f_getGridNodesNotTopLevel()); - - while( clickedGridConnectionConnectedGridNode.p_parentNodeID != null && - clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.SUBMV && - clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.MVMV && - clickedGridConnectionConnectedGridNode.p_nodeType != OL_GridNodeType.HVMV - ){ - String parentNodeName = clickedGridConnectionConnectedGridNode.p_parentNodeID; - if(parentNodeName != null && !parentNodeName.equals("-") && !parentNodeName.equals("")){ - clickedGridConnectionConnectedGridNode = findFirst(allGridNodes, GN -> GN.p_gridNodeID.equals(parentNodeName)); - } - else{ // At top node --> select the directly attached grid node instead, and break out of while loop. - clickedGridConnectionConnectedGridNode = clickedGridConnection.p_parentNodeElectric; - break; - } - } - - //This deselect the previous selection of gridloops - f_setFilter(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP); - - if(c_filterSelectedGridLoops.contains(clickedGridConnectionConnectedGridNode)){ - c_filterSelectedGridLoops.remove(clickedGridConnectionConnectedGridNode); - } - else{ - c_filterSelectedGridLoops.add(clickedGridConnectionConnectedGridNode); - } - - if(gr_forceMapSelection.isVisible()){ - f_setForcedClickScreenText(""); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); - } - } - - //This selects the new selection of gridloops - f_setFilter(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP); - - return; - - } - } - } -} - - - - VOID - double - 1734448628428 - f_filterCompanies - -1550 - 230 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC instanceof GCUtility)); - - - - - VOID - double - 1734448687355 - f_filterHouses - -1550 - 250 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC instanceof GCHouse)); - - - - - VOID - double - 1734448688472 - f_filterDetailed - -1550 - 270 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.p_owner.p_detailedCompany)); - - - - VOID - double - 1734448689519 - f_filterEstimated - -1550 - 290 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> !GC.p_owner.p_detailedCompany)); - - - - VOID - double - 1734448690487 - f_filterHasPV - -1550 - 310 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(); -for(GridConnection GC : toBeFilteredGC){ //Find all GC with PV AND a gis region (to prevent selecting slider PVGC) - if(GC.c_connectedGISObjects.size() > 0 && GC.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.pvProductionElectric_kW)){ - c_selectedGridConnections.add(GC); - } -} - - - VOID - double - 1734448691508 - f_filterHasTransport - -1550 - 330 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.c_vehicleAssets.size() > 0)); - - - - - VOID - double - 1734451505770 - f_removeFilter - -1575 - 185 - - false - true - true - - selectedFilter - OL_FilterOptionsGC - - - selectedFilterName - String - - c_selectedFilterOptions.remove(selectedFilter); - -ArrayList<OL_FilterOptionsGC> toBeReappliedFilters = new ArrayList<OL_FilterOptionsGC>(c_selectedFilterOptions); -c_selectedFilterOptions.clear(); - -if(toBeReappliedFilters.size() > 0){ - for(OL_FilterOptionsGC filterOption : toBeReappliedFilters){ - f_applyFilter(filterOption, selectedFilterName); - } - String toBeAdjustedFilterText = t_activeFilters.getText(); - String newActiveFilterText = toBeAdjustedFilterText.replace(selectedFilterName + "\n", ""); - t_activeFilters.setText(newActiveFilterText); - - traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); -} -else{ // All filters removed - traceln("Filter ( " + selectedFilterName + " ) is verwijderd."); - f_removeAllFilters(); -} - - - VOID - double - 1734517589341 - f_filterGridLoops - -1550 - 370 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - HashSet<GridConnection> gridConnectionsOnLoop = new HashSet<GridConnection>(); - -for(GridNode GridLoop : c_filterSelectedGridLoops) - if(b_gridLoopsAreDefined){ - OL_GridNodeType loopTopNodeType= GridLoop.p_nodeType; - switch(loopTopNodeType){ - case MVLV: - for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - break; - case SUBMV: - for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - break; - - case MVMV: - for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - - break; - - case HVMV: - for(GridConnection GC : GridLoop.f_getConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - break; - } - } - else{ - for(GridConnection GC : GridLoop.f_getAllLowerLVLConnectedGridConnections()){ - if(toBeFilteredGC.contains(GC)){ - gridConnectionsOnLoop.add(GC); - } - } - } - -c_selectedGridConnections = new ArrayList<>(gridConnectionsOnLoop); - - - VOID - double - 1736344958050 - f_setErrorScreen - 3410 - 930 - - false - true - true - - errorMessage - String - - - xOffset - double - - - yOffset - double - - gr_errorScreen.setPos(xOffset, yOffset); - -//Reset location and height -button_errorOK.setY(550); -rect_errorMessage.setY(380); -rect_errorMessage.setHeight(200); -t_errorMessage.setY(430); - -//Set position above all other things -f_setShapePresentationOnTop(gr_errorScreen); - -int width_numberOfCharacters = 44; - -// Set Text -Pair<String, Integer> p = v_infoText.restrictWidth(errorMessage, width_numberOfCharacters); -errorMessage = p.getFirst(); -int numberOfLines = p.getSecond(); -int additionalLines = max(0, numberOfLines - 3); - -// Set Size -rect_errorMessage.setHeight(rect_errorMessage.getHeight() + additionalLines * 40); -rect_errorMessage.setY(rect_errorMessage.getY() - 40 * additionalLines); -//button_errorOK.setY(button_errorOK.getY() - 10 * additionalLines); -t_errorMessage.setY(t_errorMessage.getY() - 40 * additionalLines); - -t_errorMessage.setText(errorMessage); -gr_errorScreen.setVisible(true); - - - VOID - double - 1736442051389 - f_styleResultsUI - -650 - 800 - - false - true - true - uI_Results.f_styleResultsUIHeader(zenmocolor_blue3.getFillColor(), zenmocolor_blue3.getFillColor(), 1.0, LINE_STYLE_SOLID); -uI_Results.f_styleAllCharts(v_backgroundColor, zenmocolor_blue3.getFillColor(), 1.0, LINE_STYLE_SOLID); - - - VOID - double - 1737653178011 - f_selectNeighborhood - -1530 - 450 - - false - true - true - - clickx - double - - - clicky - double - - -//Check if click was on Building, if yes, select grid building -for ( GIS_Object region : c_GISNeighborhoods ){ - if( region.gisRegion != null && region.gisRegion.contains(clickx, clicky) ){ - if (region.gisRegion.isVisible()) { //only allow us to click on visible objects - - GIS_Object clickedNeighborhood = region; - - - //This deselects the previous selected neighborhood filter - f_setFilter(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD); - - if(c_filterSelectedNeighborhoods.contains(clickedNeighborhood)){ - c_filterSelectedNeighborhoods.remove(clickedNeighborhood); - } - else{ - c_filterSelectedNeighborhoods.add(clickedNeighborhood); - } - - if(gr_forceMapSelection.isVisible()){ - f_setForcedClickScreenText(""); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); - } - } - //This sets the new selected neighborhoods filter - f_setFilter(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD); - - return; - } - } -} - - - - VOID - double - 1737653178013 - f_filterNeighborhoods - -1550 - 430 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - ArrayList<GridConnection> gridConnectionsInNeighborhood = new ArrayList<GridConnection>(); - -for(GridConnection GC : toBeFilteredGC){ - for(GIS_Object nbh : c_filterSelectedNeighborhoods) - if( nbh.gisRegion.contains(GC.p_latitude, GC.p_longitude) ){ - gridConnectionsInNeighborhood.add(GC); - } -} - -//If NBH results in zero GC, remove last added nbh -if(gridConnectionsInNeighborhood.isEmpty() && !c_filterSelectedNeighborhoods.isEmpty()){ - c_filterSelectedNeighborhoods.remove(c_filterSelectedNeighborhoods.size() - 1); -} - -c_selectedGridConnections = new ArrayList<>(gridConnectionsInNeighborhood); - - - VOID - double - 1740043548084 - f_enableLivePlotsOnly - -270 - 770 - - false - true - true - - resultsUI - UI_Results - - if (resultsUI.f_getSelectedObjectData() != null) { - if(resultsUI.getGr_resultsUIHeader().isVisible()){ - resultsUI.getRadioButtons().setValue(0, true); - } - resultsUI.chartProfielen.getPeriodRadioButton().setValue(0, true); - resultsUI.f_enableNonLivePlotRadioButtons(false); -} -for (ShapeRadioButtonGroup rb :resultsUI.chartProfielen.getAllPeriodRadioButtons()) { - rb.setValue(0, false); -} -resultsUI.chartProfielen.getPeriodRadioButton().setValue(0, true); - -resultsUI.f_enableNonLivePlotRadioButtons(false); - - - VOID - double - 1742226689515 - f_filterManualSelection - -1550 - 495 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - ArrayList<GridConnection> resultingGridConnectionSelection = new ArrayList<GridConnection>(); - -if(c_selectedFilterOptions.size() > 1){ - resultingGridConnectionSelection.addAll(toBeFilteredGC); -} -else{//Manual selection is the only active filter -> Resulting grid connection selection should start empty -} - -for(GridConnection manualSelectedGC : c_manualFilterSelectedGC){ - if(!resultingGridConnectionSelection.contains(manualSelectedGC)){ - resultingGridConnectionSelection.add(manualSelectedGC); - } -} -for(GridConnection manualDeselectedGC : c_manualFilterDeselectedGC){ - if(resultingGridConnectionSelection.contains(manualDeselectedGC)){ - resultingGridConnectionSelection.remove(manualDeselectedGC); - } -} - - -c_selectedGridConnections = new ArrayList<>(resultingGridConnectionSelection); - - - VOID - double - 1742226787560 - f_selectManualFilteredGC - -1530 - 515 - - false - true - true - - clickx - double - - - clicky - double - - //Initialize clickedObject -GIS_Object clickedObject = null; - -//Check if click was on Building, if yes, select building -for ( GIS_Object object : energyModel.pop_GIS_Buildings ){//pop_GIS_Buildings - if( object.gisRegion != null && object.gisRegion.contains(clickx, clicky) ){ - if (object.gisRegion.isVisible()) { //only allow us to click on visible objects - if (object.c_containedGridConnections.size() > 0 ){ - clickedObject = object; - break; - } - } - } -} - -//If click was not on a building, check if click was on an EA, if yes, select EA -if(clickedObject == null){ - for ( GIS_Object object : energyModel.pop_GIS_Objects ){//pop_GIS_Buildings - if( object.gisRegion != null && object.gisRegion.contains(clickx, clicky) ){ - if (object.gisRegion.isVisible()) { //only allow us to click on visible objects - if (object.c_containedGridConnections.size() > 0 ){ - clickedObject = object; - break; - } - } - } - } -} - -//If a building or EA has been selected perform click functionality -if(clickedObject != null){ - boolean select = true; // Deselect == false; - boolean removedFromSelectedGC = false; - boolean removedFromDeselectedGC = false; - - ArrayList<GridConnection> clickedGridConnections = new ArrayList<GridConnection>(clickedObject.c_containedGridConnections); - - for (GridConnection clickedGC : clickedGridConnections){ - if(c_selectedGridConnections.contains(clickedGC)){ - c_selectedGridConnections.remove(clickedGC); - select = false; - } - - if(c_manualFilterSelectedGC.contains(clickedGC)){ - c_manualFilterSelectedGC.remove(clickedGC); - } - else if(c_manualFilterDeselectedGC.contains(clickedGC)){ - c_manualFilterDeselectedGC.remove(clickedGC); - } - } - - if(select){ - c_selectedGridConnections.addAll(clickedGridConnections); - c_manualFilterSelectedGC.addAll(clickedGridConnections); - traceln("Handmatig geselecteerd object toegevoegd aan selectie"); - } - else{ - c_manualFilterDeselectedGC.addAll(clickedGridConnections); - traceln("Handmatig geselecteerd object verwijderd van selectie"); - } - - - //Disable traceln - PrintStream originalPrintStream = f_disableTraceln(); - - //This deactivates the previous selection - f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); - - //This activates the new selection - f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); - - //Enable traceln - f_enableTraceln(originalPrintStream); - - return; -} - - - VOID - double - 1742300624199 - f_setForcedClickScreenText - 140 - -880 - - false - true - true - - forcedClickScreenText - String - - t_forcedClickMessage.setText(forcedClickScreenText); - -if(t_forcedClickMessage.getText().equals("")){ - gr_ForceMapSelectionText.setVisible(false); -} -else{ - gr_ForceMapSelectionText.setVisible(true); -} - - - VOID - double - 1743509491686 - f_setMapViewBounds - -640 - -90 - - false - true - true - - GISObjects - List<GIS_Object> - - // Initialize min and max values -double minLat = Double.MAX_VALUE; -double maxLat = Double.MIN_VALUE; -double minLon = Double.MAX_VALUE; -double maxLon = Double.MIN_VALUE; - -// Loop through all GISRegions and find the bounding box -for(GIS_Object go : GISObjects){ - - GISRegion region = go.gisRegion; - double[] points = region.getPoints(); // Get the boundary points of the region - - for (int i = 0; i < points.length; i += 2) { // i+=2 because data is in lat, lon pairs - double lat = points[i]; // Latitude - double lon = points[i + 1]; // Longitude - - - - // Update min/max latitude and longitude - minLat = Math.min(minLat, lat); - maxLat = Math.max(maxLat, lat); - minLon = Math.min(minLon, lon); - maxLon = Math.max(maxLon, lon); - } -} - -//Make it slightly bigger, so it isnt exact on the line of the regions -minLat = minLat - 0.0001; -maxLat = maxLat + 0.0001; -minLon = minLon - 0.0001; -maxLon = maxLon + 0.0001; - -// Set the map to fit the calculated bounds -map.fitBounds(minLat, minLon, maxLat, maxLon); - - - VOID - double - 1743518032245 - f_setStartView - -640 - 285 - - false - true - true - //traceln("f_setStartView() reached!"); - -if(project_data.map_centre_latitude() != null && project_data.map_centre_longitude() != null && project_data.map_centre_latitude() != 0 && project_data.map_centre_longitude() != 0){ - map.setCenterLatitude(project_data.map_centre_latitude()); - map.setCenterLongitude(project_data.map_centre_longitude()); -} -else{ - ArrayList<GIS_Object> gisObjects_for_mapViewBounds = new ArrayList<GIS_Object>(); - if((settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0) && findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION).size() > 0){ - gisObjects_for_mapViewBounds.addAll(findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION)); - } - else{ - for (GIS_Object building : energyModel.pop_GIS_Buildings) { - if(building.gisRegion.isVisible()){ - gisObjects_for_mapViewBounds.add(building); - } - } - } - f_setMapViewBounds(gisObjects_for_mapViewBounds); -} - -if(project_data.map_scale() != null){ - map.setMapScale(project_data.map_scale()); -} - -va_Interface.navigateTo(); -v_currentViewArea = va_Interface; - - - VOID - double - 1743665953113 - f_setInfoText - -2010 - 120 - - false - true - true - - infoBubble - ShapeImage - - - descriptionText - String - - - xPosition - double - - - yPosition - double - - if ( p_currentActiveInfoBubble.size() > 0 && p_currentActiveInfoBubble.get(0) == infoBubble ) { - // If we click a second time on the same bubble it should close the window - p_currentActiveInfoBubble.clear(); - gr_infoText.setVisible(false); -} -else { - p_currentActiveInfoBubble.clear(); - p_currentActiveInfoBubble.add(infoBubble); - - int width_ch = 50; - // Set Text - Pair<String, Integer> p = v_infoText.restrictWidth(descriptionText, width_ch); - t_infoTextDescription.setText(p.getFirst()); - - // Set Size - rect_infoText.setWidth(width_ch * 7.5); // about 7.5 px per char for sans serif 14 pt - rect_infoText.setHeight(50 + p.getSecond() * 20); // about 50 px for title and 20 px per line for sans serif 14 pt - - // Set Position - // The group position is on the top left, not the centre. - double margin_px = 15; - //double posX = f_getAbsolutePosition(infoBubble).getX(); - //double posY = f_getAbsolutePosition(infoBubble).getY(); - if (xPosition < (v_currentViewArea.getX() + v_currentViewArea.getWidth()/2) ) { - // bubble is on the left half, so text should appear to the right - gr_infoText.setX( xPosition + margin_px + infoBubble.getWidth()/2); - } - else { - // bubble is on the right half, so text should appear to the left - gr_infoText.setX( xPosition - margin_px + infoBubble.getWidth()/2 - rect_infoText.getWidth()); - } - - // In AnyLogic the Y-Axis is inverted - if (yPosition > (v_currentViewArea.getY() + v_currentViewArea.getHeight()/2) ) { - // bubble is on the bottom half, so text should appear above - gr_infoText.setY( yPosition - margin_px + infoBubble.getHeight()/2 - rect_infoText.getHeight()); - } - else { - // bubble is on the top half, so text should appear below - gr_infoText.setY( yPosition + margin_px + infoBubble.getHeight()/2); - } - - // Position of close button - gr_closeInfoText.setX( width_ch * 7.5 - 20 ); // 20 px offset from the right hand side - - gr_infoText.setVisible(true); -} - - - RETURNS_VALUE - Pair<ShapeGroup, Point> - 1744894817569 - f_getGroupPositionIteration - true - -1980 - 265 - - false - true - true - - pair - Pair<ShapeGroup, Point> - - return new Pair(pair.getFirst().getGroup(), new Point(pair.getFirst().getX() + pair.getSecond().getX(), pair.getFirst().getY() + pair.getSecond().getY())); - - - RETURNS_VALUE - Point - 1744894817571 - f_getAbsolutePosition - true - -2000 - 240 - - false - true - true - - shape - Shape - - // Note: Only works if the Agent is not living in the space of the interface! - -// Start with the shape position -Point point = new Point(shape.getX(), shape.getY()); -traceln("point0: " + point); - -// Find presentation the shape is in to get the offset. -if (shape.getPresentable() == this) { - // The shape is on this canvas, no additional offset -} -else { - // The shape is in a (possibly nested) presentation - traceln("shape.getPresentable(): " + shape.getPresentable()); - traceln("shapetoplevel: " + shape.getPresentable().getPresentationShape()); - for (ShapeEmbeddedObjectPresentation ap : c_presentations) { - traceln("AP: " + ap); - traceln("AG: " + ap.getEmbeddedObject()); - } - ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable()); - if (presentation == null) { - throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); - } - traceln("point1: " + point); - - point.add( new Point(presentation.getX(), presentation.getY()) ); - // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. - traceln("point2: " + point); - - point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); - - traceln("point3: " + point); - Pair<ShapeEmbeddedObjectPresentation, Point> pair = new Pair(presentation, point); - while ( pair.getFirst().getPresentable() != this ) { - pair = f_getPresentationPositionIteration(pair); - traceln("pair: " + pair); - traceln("point_i: " + pair.getSecond()); - } - point = pair.getSecond(); -} - -// Recursively add the group offsets. -ShapeGroup group = shape.getGroup(); -traceln("group x: " + group.getX()); -traceln("group y: " + group.getY()); -Pair<ShapeGroup, Point> pair = new Pair(group, point); -while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { - pair = f_getGroupPositionIteration(pair); - traceln("point_j: " + pair.getSecond()); -} -return pair.getSecond(); - - - - - -/* -(main) tabs_presentation (tabs_presentation.getEmbeddedobject() = agent1) - (agent 1) tab_elec_presentation (tab_elec_presentation.getEmbeddedobject() = agent2) - (agent 2) shape (shape.getpresentable() = agent2) - - -findfirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable() ) => tab_elec_presentation - -tab_elec_presentation.getPresentable() => agent 1, so use this in the next iteration - -findfirst(c_presentations, ap -> ap.getEmbeddedObject() == tab_elec_presentation.getPresentable() ) => tabs_presentation - -*/ - - -/* - -double presentationOffsetX; -double presentationOffsetY; -if (shape.getPresentable() == this) { - // The shape is on this canvas, no additional offset - presentationOffsetX = 0.0; - presentationOffsetY = 0.0; -} -else { - traceln("getEmbeddedObject: " + c_presentations.get(0).getEmbeddedObject()); - traceln("getEmbeddedObject: " + c_presentations.get(1).getEmbeddedObject()); - traceln("shape.getPresentable()" + shape.getPresentable()); - traceln("agent presentable: " + agent.presentation); - traceln("this presentable: " + this.presentation); - ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == shape.getPresentable()); - if (presentation == null) { - throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); - } - presentationOffsetX = presentation.getX(); - presentationOffsetY = presentation.getY(); - // It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. - presentationOffsetX += presentation.getGroup().getX(); - presentationOffsetY += presentation.getGroup().getY(); - traceln("presentationOffsetX: " + presentationOffsetX); -} - -// Add the presentation offset to the shape position and then recursively add the group offsets. -Point point = new Point(shape.getX() + presentationOffsetX, shape.getY() + presentationOffsetY); -ShapeGroup group = shape.getGroup(); -Pair<ShapeGroup, Point> pair = new Pair(group, point); -while ( !(pair.getFirst() instanceof ShapeTopLevelPresentationGroup) ) { - pair = f_getGroupPositionIteration(pair); -} -return pair.getSecond(); - -*/ - - - - RETURNS_VALUE - Pair<ShapeEmbeddedObjectPresentation, Point> - 1744894817573 - f_getPresentationPositionIteration - true - -1980 - 285 - - false - true - true - - pair - Pair<ShapeEmbeddedObjectPresentation. Point> - - ShapeEmbeddedObjectPresentation presentation = findFirst(c_presentations, ap -> ap.getEmbeddedObject() == pair.getFirst().getPresentable()); -if (presentation == null) { - throw new RuntimeException("Shape not inside any presentation. Is the collection c_presentations filled with all agent presentations?"); -} -Point point = pair.getSecond(); -traceln("presentation agent: " + presentation.getEmbeddedObject()); -traceln("point in presentation iteration before: " + point); -point.add( new Point(presentation.getX(), presentation.getY()) ); -// It is possible that the agent presentation is also inside a group. See AnyLogic update 8.9.2. We assume these are not in nested groups. -traceln("point in presentation iteration middle: " + point); -point.add( new Point(presentation.getGroup().getX(), presentation.getGroup().getY()) ); -traceln("point in presentation iteration after: " + point); - -return new Pair(presentation, point); - - - VOID - double - 1744624088848 - f_harvestEnergyModelLoadData - true - -556 - -710 - - false - true - true - traceln("Start writing Electricity Load Balance data to excel!"); - -//Clear the sheet first -f_clearExportSheet(); - -//Set column names -excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); -excel_exportBalanceLoadData.setCellValue("Totale load van het Hele gebied [kWh]", "Electricity Load Balance", 1, 2); - -//Get energyModel profile -double[] loadArray_kW = energyModel.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); - -for (int i = 0; i < loadArray_kW.length ; i++) { - - //Time series - excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); - - //Data - excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 2); -} - -//Write file -excel_exportBalanceLoadData.writeFile(); - -traceln("Finished writing Electricity Load Balance data to excel!"); - - - VOID - double - 1744624088850 - f_harvestSelectedGCLoadData - true - -556 - -470 - - false - true - true - traceln("Start writing Electricity Load Balance data to excel!"); - -//Clear the sheet first -f_clearExportSheet(); - -//Initialize column index -int columnIndex = 2; - -//Initialize total balance flow for all selected GC -double[] cumulativeLoadArray_kW = new double[energyModel.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW().length]; - -//Loop over gc and add the data -for(GridConnection GC : c_selectedGridConnections){ - - //Add gc data - excel_exportBalanceLoadData.setCellValue(GC.p_ownerID, "Electricity Load Balance", 1, columnIndex); - - double[] loadArray_kW = GC.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); - - for (int i = 0; i < loadArray_kW.length; i++ ) { - excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, columnIndex); - - //Add to cumulative load array - cumulativeLoadArray_kW[i] += loadArray_kW[i]; - } - - //Add timestep column (only the first time) - if (columnIndex == 2) { - excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); - traceln("ArraySize: %s", loadArray_kW.length); - for (int i = 0; i < loadArray_kW.length ; i++) { - excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); - } - } - - //Increase columnIndex - columnIndex++; -} - -//Cumulative data column -if(c_selectedGridConnections.size() > 1){ - excel_exportBalanceLoadData.setCellValue("Totale load [kWh]", "Electricity Load Balance", 1, columnIndex); - for (int i = 0; i < cumulativeLoadArray_kW.length ; i++) { - excel_exportBalanceLoadData.setCellValue( cumulativeLoadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, columnIndex); - } -} - -//Write the file -excel_exportBalanceLoadData.writeFile(); - -traceln("Finished writing Electricity Load Balance data to excel!"); - - - VOID - double - 1744624088852 - f_harvestTotalBalanceLoadOfSelectedEnergyCoop - true - -556 - -590 - - false - true - true - traceln("Start writing Electricity Load Balance data to excel!"); - -//Clear the sheet first -f_clearExportSheet(); - -//Set column names -excel_exportBalanceLoadData.setCellValue("Tijd [u]", "Electricity Load Balance", 1, 1); -excel_exportBalanceLoadData.setCellValue("Totale load van de geselecteerde EnergyCoop [kWh]", "Electricity Load Balance", 1, 2); - -//Get energyModel profile -double[] loadArray_kW = v_customEnergyCoop.v_rapidRunData.am_totalBalanceAccumulators_kW.get(OL_EnergyCarriers.ELECTRICITY).getTimeSeries_kW(); - -for (int i = 0; i < loadArray_kW.length ; i++) { - - //Time series - excel_exportBalanceLoadData.setCellValue((i) * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 1); - - //Data - excel_exportBalanceLoadData.setCellValue( loadArray_kW[i] * energyModel.p_timeStep_h, "Electricity Load Balance", i+2, 2); -} - -//Write file -excel_exportBalanceLoadData.writeFile(); - -traceln("Finished writing Electricity Load Balance data to excel!"); - - - VOID - double - 1744985599017 - f_setAllFileDownloadersDisabled - true - -556 - -410 - - false - true - true - fileChooser_exportBalanceLoadEnergyModel.setEnabled(false); -fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(false); -fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(false); - - - VOID - double - 1744986150240 - f_clearExportSheet - true - -556 - -390 - - false - true - true - //Clear the sheet first -for (int row = 1; row <= 35137; row++) { - for (int col = 1; col <= p_maxNrSelectedGCForExport + 2; col++) { - excel_exportBalanceLoadData.setCellValue("", "Electricity Load Balance", row, col); - } -} - - - VOID - double - 1746085650084 - f_changeDefaultColorOfPrivateGC - -670 - 915 - - false - true - true - for(GIS_Object object : energyModel.pop_GIS_Objects){ - for(GridConnection GC : object.c_containedGridConnections){ - if(!GC.p_owner.b_dataIsAccessible){ - object.p_defaultFillColor = transparent(object.p_defaultFillColor, 0.6);//v_dataSharingDisagreedColor; - object.p_defaultLineStyle = LINE_STYLE_DOTTED; - object.f_style(null, null, null, null); - break; - } - } -} - -for(GIS_Building building : energyModel.pop_GIS_Buildings){ - for(GridConnection GC : building.c_containedGridConnections){ - if(!GC.p_owner.b_dataIsAccessible){ - building.p_defaultFillColor = transparent(building.p_defaultFillColor, 0.6);//v_dataSharingDisagreedColor; - building.p_defaultLineStyle = LINE_STYLE_DOTTED; - building.f_style(null, null, null, null); - break; - } - } -} - - - VOID - double - 1749741185117 - f_initialParkingSpacesOrder - 85 - -630 - - false - true - true - //Collections.shuffle(c_orderedParkingSpaces); - - - VOID - double - 1750247111856 - f_initialChargerOrder - 85 - -610 - - false - true - true - c_orderedV1GChargers = new ArrayList<J_EAChargePoint>(); -c_orderedV2GChargers = new ArrayList<J_EAChargePoint>(); -c_orderedPublicChargers = new ArrayList<GCPublicCharger>(); - -List<J_EAChargePoint> c_inactiveV1GChargers = new ArrayList<J_EAChargePoint>(); -List<J_EAChargePoint> c_inactiveV2GChargers = new ArrayList<J_EAChargePoint>(); - -for (GridConnection gc : energyModel.f_getActiveGridConnections()) { - for (J_EAChargePoint charger : gc.c_chargers) { - if (charger.getV1GCapable()) { - c_orderedV1GChargers.add(0, charger); - } - else { - c_orderedV1GChargers.add(charger); - } - if (charger.getV2GCapable()) { - c_orderedV2GChargers.add(0, charger); - } - else { - c_orderedV2GChargers.add(charger); - } - } -} - -for (GridConnection gc : energyModel.f_getPausedGridConnections()) { - for (J_EAChargePoint charger : gc.c_chargers) { - if (charger.getV1GCapable()) { - c_inactiveV1GChargers.add(0, charger); - } - else { - c_inactiveV1GChargers.add(charger); - } - if (charger.getV2GCapable()) { - c_inactiveV2GChargers.add(0, charger); - } - else { - c_inactiveV2GChargers.add(charger); - } - } -} - -c_orderedV1GChargers.addAll( c_inactiveV1GChargers ); -c_orderedV2GChargers.addAll( c_inactiveV2GChargers ); - -for (GCPublicCharger gc : energyModel.PublicChargers) { - if ( !gc.p_isChargingCentre ) { - c_orderedPublicChargers.add(gc); - } -} - -//Collections.shuffle(c_orderedPublicChargers); - - - VOID - double - 1750078798174 - f_initializeSpecialGISObjectsLegend - 1410 - 1630 - - false - true - true - int numberOfSpecialActiveGISObjectTypes = 0; - -for(OL_GISObjectType activeSpecialGISObjectType : c_modelActiveSpecialGISObjects){ - if(activeSpecialGISObjectType == OL_GISObjectType.PARKING){ - for(OL_ParkingSpaceType activeParkingSpaceType : c_modelActiveParkingSpaceTypes){ - numberOfSpecialActiveGISObjectTypes ++; - Pair<ShapeText, ShapeRectangle> legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); - f_setParkingSpaceLegendItem(activeParkingSpaceType, legendShapes.getFirst(), legendShapes.getSecond()); - } - } - else{ - numberOfSpecialActiveGISObjectTypes ++; - Pair<ShapeText, ShapeRectangle> legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); - f_setSpecialGISObjectLegendItem(activeSpecialGISObjectType, legendShapes.getFirst(), legendShapes.getSecond()); - - if(activeSpecialGISObjectType == OL_GISObjectType.CHARGER){ - numberOfSpecialActiveGISObjectTypes ++; - legendShapes = f_getNextSpecialLegendShapes(numberOfSpecialActiveGISObjectTypes); - legendShapes.getFirst().setVisible(true); - legendShapes.getSecond().setVisible(true); - legendShapes.getFirst().setText("Laadpaal/plein (Toegevoegd)"); - legendShapes.getSecond().setFillColor(v_newChargingStationColor); - legendShapes.getSecond().setLineColor(v_newChargingStationLineColor); - } - } -} - - - VOID - double - 1750261221085 - f_setTrafoText - 50 - 1700 - - false - true - true - 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; -} - - - VOID - double - 1750079113839 - f_setSpecialGISObjectLegendItem - 1430 - 1670 - - false - true - true - - activeSpecialGISObjectType - OL_GISObjectType - - - legendText - ShapeText - - - legendRect - ShapeRectangle - - legendText.setVisible(true); -legendRect.setVisible(true); - -switch(activeSpecialGISObjectType){ - case SOLARFARM: - legendText.setText("Zonneveld"); - legendRect.setFillColor(v_solarParkColor); - legendRect.setLineColor(v_solarParkLineColor); - break; - case WINDFARM: - legendText.setText("Windmolen"); - legendRect.setFillColor(v_windFarmColor); - legendRect.setLineColor(v_windFarmLineColor); - break; - case CHARGER: - legendText.setText("Laadpaal/plein (Bestaand)"); - legendRect.setFillColor(v_chargingStationColor); - legendRect.setLineColor(v_chargingStationLineColor); - break; - case BATTERY: - legendText.setText("Batterij"); - legendRect.setFillColor(v_batteryColor); - legendRect.setLineColor(v_batteryLineColor); - break; - case PARCEL: - legendText.setText("Nieuw Perceel"); - legendRect.setFillColor(v_parcelColor); - legendRect.setLineColor(v_parcelLineColor); - break; - case ELECTROLYSER: - legendText.setText("Electrolyser"); - legendRect.setFillColor(v_electrolyserColor); - legendRect.setLineColor(v_electrolyserLineColor); - break; -} - - - VOID - double - 1750080865693 - f_initializeLegend - 1390 - 1550 - - false - true - true - //Default GIS buildings -f_initializeDefaultGISBuildingsLegend(); - -//Special gis objects -f_initializeSpecialGISObjectsLegend(); - - - VOID - double - 1750089851073 - f_setParkingSpaceLegendItem - 1430 - 1690 - - false - true - true - - activeParkingSpaceType - OL_ParkingSpaceType - - - legendText - ShapeText - - - legendRect - ShapeRectangle - - legendText.setVisible(true); -legendRect.setVisible(true); - -switch(activeParkingSpaceType){ - case PUBLIC: - legendText.setText("Parkeerplek: publiek"); - legendRect.setFillColor(v_parkingSpaceColor_public); - legendRect.setLineColor(v_parkingSpaceLineColor_public); - break; - case PRIVATE: - legendText.setText("Parkeerplek: privé"); - legendRect.setFillColor(v_parkingSpaceColor_private); - legendRect.setLineColor(v_parkingSpaceLineColor_private); - break; - case ELECTRIC: - legendText.setText("Parkeerplek: electrisch"); - legendRect.setFillColor(v_parkingSpaceColor_electric); - legendRect.setLineColor(v_parkingSpaceLineColor_electric); - break; -} - - - RETURNS_VALUE - Pair<ShapeText, ShapeRectangle> - 1750092444018 - f_getNextSpecialLegendShapes - 1430 - 1650 - - false - true - true - - legendShapesNumber - int - - ShapeText legendText; -ShapeRectangle legendRect; - -switch(legendShapesNumber){ - case 1: - legendText = t_specialGISObjectLegend1; - legendRect = rect_specialGISObjectLegend1; - break; - case 2: - legendText = t_specialGISObjectLegend2; - legendRect = rect_specialGISObjectLegend2; - break; - case 3: - legendText = t_specialGISObjectLegend3; - legendRect = rect_specialGISObjectLegend3; - break; - case 4: - legendText = t_specialGISObjectLegend4; - legendRect = rect_specialGISObjectLegend4; - break; - case 5: - legendText = t_specialGISObjectLegend5; - legendRect = rect_specialGISObjectLegend5; - break; - case 6: - legendText = t_specialGISObjectLegend6; - legendRect = rect_specialGISObjectLegend6; - break; - case 7: - legendText = t_specialGISObjectLegend7; - legendRect = rect_specialGISObjectLegend7; - break; - case 8: - legendText = t_specialGISObjectLegend8; - legendRect = rect_specialGISObjectLegend8; - break; - case 9: - legendText = t_specialGISObjectLegend9; - legendRect = rect_specialGISObjectLegend9; - break; - case 10: - legendText = t_specialGISObjectLegend10; - legendRect = rect_specialGISObjectLegend10; - break; - case 11: - legendText = t_specialGISObjectLegend11; - legendRect = rect_specialGISObjectLegend11; - break; - case 12: - legendText = t_specialGISObjectLegend12; - legendRect = rect_specialGISObjectLegend12; - break; - default: - legendText = t_specialGISObjectLegend1; - legendRect = rect_specialGISObjectLegend1; - break; -} - -return new Pair(legendText, legendRect); - - - - VOID - double - 1750162397332 - f_initializeDefaultGISBuildingsLegend - 1410 - 1570 - - false - true - true - int numberOfDefaultActiveGISObjectTypes = 1;//Always start at 2 (1 ++) for the building types, cause 'selection' is always present (for now). - -for(OL_GISBuildingTypes activeDefaultGISBuildingType : c_modelActiveDefaultGISBuildings){ - numberOfDefaultActiveGISObjectTypes ++; - Pair<ShapeText, ShapeOval> legendShapes = f_getNextDefaultLegendShapes(numberOfDefaultActiveGISObjectTypes); - f_setDefaultGISBuildingLegendItem(activeDefaultGISBuildingType, legendShapes.getFirst(), legendShapes.getSecond()); -} - - - RETURNS_VALUE - Pair<ShapeText, ShapeOval> - 1750162514744 - f_getNextDefaultLegendShapes - 1430 - 1610 - - false - true - true - - legendShapesNumber - int - - ShapeText legendText; -ShapeOval legendOval; - -switch(legendShapesNumber){ - case 1: - legendText = t_defaultLegend1; - legendOval = oval_defaultLegend1; - break; - case 2: - legendText = t_defaultLegend2; - legendOval = oval_defaultLegend2; - break; - case 3: - legendText = t_defaultLegend3; - legendOval = oval_defaultLegend3; - break; - case 4: - legendText = t_defaultLegend4; - legendOval = oval_defaultLegend4; - break; - case 5: - legendText = t_defaultLegend5; - legendOval = oval_defaultLegend5; - break; - default: - legendText = t_defaultLegend1; - legendOval = oval_defaultLegend1; -} - -return new Pair(legendText, legendOval); - - - - VOID - double - 1750165143690 - f_setDefaultGISBuildingLegendItem - 1430 - 1590 - - false - true - true - - activeDefaultGISBuildingType - OL_GISBuildingTypes - - - legendText - ShapeText - - - legendOval - ShapeOval - - legendText.setVisible(true); -legendOval.setVisible(true); - -switch(activeDefaultGISBuildingType){ - case DETAILED_COMPANY: - legendText.setText("Gedetaileerd bedrijf: " + v_numberOfSurveyCompanies); - legendOval.setFillColor(v_detailedCompanyBuildingColor); - legendOval.setLineColor(v_detailedCompanyBuildingLineColor); - break; - case DEFAULT_COMPANY: - legendText.setText("Standaard bedrijf"); - legendOval.setFillColor(v_companyBuildingColor); - legendOval.setLineColor(v_companyBuildingLineColor); - break; - case HOUSE: - legendText.setText("Huizen"); - legendOval.setFillColor(v_houseBuildingColor); - legendOval.setLineColor(v_houseBuildingLineColor); - break; - case REMAINING: - legendText.setText("Overige gebouwen"); - legendOval.setFillColor(v_restBuildingColor); - legendOval.setLineColor(v_restBuildingLineColor); - break; -} - - - - VOID - double - 1752756002220 - f_setColorsBasedOnCongestion_objects - 1960 - 1800 - - false - true - true - - gis_area - GIS_Object - - if (gis_area.c_containedGridConnections.size() > 0) { - double maxLoad_fr_gis_object = 0; - boolean capacityKnown = false; - - for(GridConnection gc : gis_area.c_containedGridConnections){ - if(gc.v_rapidRunData != null){ - double maxLoad_fr_gc = 0; - double maxLoad_fr_gc_delivery = gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown ? gc.v_rapidRunData.getPeakDelivery_kW()/gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacity_kW : 0; - double maxLoad_fr_gc_feedin = gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW > 0 && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown ? gc.v_rapidRunData.getPeakFeedin_kW()/gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacity_kW : 0; - - switch(rb_mapOverlayLegend_congestion.getValue()){ - case 0: - maxLoad_fr_gc = maxLoad_fr_gc_delivery; - - if(gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ - capacityKnown = true; - } - break; - case 1: - maxLoad_fr_gc = maxLoad_fr_gc_feedin; - if(gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ - capacityKnown = true; - } - break; - case 2: - maxLoad_fr_gc = max(maxLoad_fr_gc_delivery, maxLoad_fr_gc_feedin); - if(maxLoad_fr_gc_delivery > maxLoad_fr_gc_feedin && gc.v_rapidRunData.connectionMetaData.contractedDeliveryCapacityKnown){ - capacityKnown = true; - } - else if(maxLoad_fr_gc_feedin > maxLoad_fr_gc_delivery && gc.v_rapidRunData.connectionMetaData.contractedFeedinCapacityKnown){ - capacityKnown = true; - } - break; - } - if(maxLoad_fr_gc > maxLoad_fr_gis_object){ - maxLoad_fr_gis_object = maxLoad_fr_gc; - } - } - } - - //Set colour based on found parameters - if(!capacityKnown && project_data.project_type() != RESIDENTIAL){ - gis_area.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); - gis_area.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); - } else if (maxLoad_fr_gis_object > 1) { - gis_area.gisRegion.setFillColor(v_gridNodeColorCongested); - gis_area.gisRegion.setLineColor(v_gridLineColorCongested); - } else if (maxLoad_fr_gis_object > 0.7) { - gis_area.gisRegion.setFillColor(v_gridNodeColorStrained); - gis_area.gisRegion.setLineColor(v_gridNodeLineColorStrained); - } else { - gis_area.gisRegion.setFillColor(v_gridNodeColorUncongested); - gis_area.gisRegion.setLineColor(v_gridNodeLineColorUncongested); - } -} - - - VOID - double - 1752756016324 - f_setColorsBasedOnCongestion_gridnodes - 1960 - 1820 - - false - true - true - - gn - GridNode - - - isLiveSim - boolean - - if (gn!=null && gn.gisRegion != null){ - double maxLoad_fr = 0; - if(isLiveSim){ - maxLoad_fr = abs(gn.v_currentLoad_kW)/gn.p_capacity_kW; - } - else{ - J_LoadDurationCurves loadCurves = gn.f_getDuurkrommes(); - double maxLoad_fr_delivery = gn.p_capacity_kW > 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(0))/gn.p_capacity_kW : 0; - double maxLoad_fr_feedin = gn.p_capacity_kW > 0 ? abs(loadCurves.ds_loadDurationCurveTotal_kW.getY(loadCurves.ds_loadDurationCurveTotal_kW.size()-1))/gn.p_capacity_kW : 0; - - switch(rb_mapOverlayLegend_congestion.getValue()){ - case 0: - maxLoad_fr = maxLoad_fr_delivery; - break; - case 1: - maxLoad_fr = maxLoad_fr_feedin; - break; - case 2: - maxLoad_fr = max(maxLoad_fr_delivery, maxLoad_fr_feedin); - break; - } - } - - if(!isLiveSim && !gn.p_realCapacityAvailable && project_data.project_type() != RESIDENTIAL){ - gn.gisRegion.setFillColor(v_gridNodeColorCapacityUnknown); - gn.gisRegion.setLineColor(v_gridNodeLineColorCapacityUnknown); - } else if (maxLoad_fr > 1) { - gn.gisRegion.setFillColor(v_gridNodeColorCongested); - gn.gisRegion.setLineColor(v_gridLineColorCongested); - } else if (maxLoad_fr > 0.7) { - gn.gisRegion.setFillColor(v_gridNodeColorStrained); - gn.gisRegion.setLineColor(v_gridNodeLineColorStrained); - } else { - gn.gisRegion.setFillColor(v_gridNodeColorUncongested); - gn.gisRegion.setLineColor(v_gridNodeLineColorUncongested); - } - - if( gn == v_clickedGridNode && gn != v_previousClickedGridNode){ // dit zorgt ervoor dat de kleuringfunctie correct werkt in zowel live stand als pauze stand - gn.gisRegion.setFillColor( v_selectionColor ); - gn.gisRegion.setLineColor( orange ); - } -} - - - VOID - double - 1752836715726 - f_clearSelectionAndSelectEnergyModel - 50 - 1240 - - false - true - true - f_deselectPreviousSelect(); -f_selectEnergyModel(); - - - VOID - double - 1752837115143 - f_styleLVLV - -650 - 470 - - false - true - true - - gisregion - GISRegion - - gisregion.setLineStyle( LINE_STYLE_SOLID ); -gisregion.setLineColor( v_LVLVLineColor ); -gisregion.setLineWidth(2); -gisregion.setFillColor(v_LVLVNodeColor); - - - VOID - double - 1753085860778 - f_initializeMapOverlayRadioButton - 1920 - 1450 - - false - true - true - //Set active map overlay types if they are set in the project settings -if(settings.activeMapOverlayTypes() != null && settings.activeMapOverlayTypes().size() > 0){ - c_loadedMapOverlayTypes = new ArrayList<OL_MapOverlayTypes>(settings.activeMapOverlayTypes()); - if(!c_loadedMapOverlayTypes.contains(OL_MapOverlayTypes.DEFAULT)){ - c_loadedMapOverlayTypes.add(0, OL_MapOverlayTypes.DEFAULT); // Force default to be available - } -} -else{//Take the default - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.DEFAULT); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.ELECTRICITY_CONSUMPTION); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.PV_PRODUCTION); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.GRID_NEIGHBOURS); - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.CONGESTION); - if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - c_loadedMapOverlayTypes.add(OL_MapOverlayTypes.PARKING_TYPE); - } -} - - -//Adjust the visualisation of the radiobuttons -Presentable presentable = gr_mapOverlayLegenda.getPresentable(); -boolean ispublic = true; -double x = 756; -double y = c_loadedMapOverlayTypes.size() < 6 ? 837 : 837 - 18; -double width = 130; -double height = 0;//Not needed, automatically adjust by adding options -Color textColor = Color.BLACK; -boolean enabled = true; -Font font = new Font("Dialog", Font.PLAIN, 11); -boolean vertical = true; - - -//Set words for the radiobutton options -List<String> RadioButtonOptions_list = new ArrayList<String>(); -for(OL_MapOverlayTypes mapOverlayType : c_loadedMapOverlayTypes){ - switch(mapOverlayType){ - case DEFAULT: - RadioButtonOptions_list.add("Standaard"); - break; - case ELECTRICITY_CONSUMPTION: - RadioButtonOptions_list.add("Elektriciteitsverbruik"); - break; - case PV_PRODUCTION: - RadioButtonOptions_list.add("PV Opwek"); - break; - case GRID_NEIGHBOURS: - RadioButtonOptions_list.add("Energie Buren"); - break; - case CONGESTION: - RadioButtonOptions_list.add("Netbelasting"); - break; - case ENERGY_LABEL: - RadioButtonOptions_list.add("Energielabel"); - break; - case PARKING_TYPE: - RadioButtonOptions_list.add("Parkeer type"); - break; - } -} - -String[] RadioButtonOptions = RadioButtonOptions_list.toArray(String[]::new); - -//Create the radiobutton and set the correct action. -rb_mapOverlay = new ShapeRadioButtonGroup(presentable, ispublic, x ,y, width, height, textColor, enabled, font, vertical, RadioButtonOptions){ - @Override - public void action() { - f_setMapOverlay(); - } -}; - -presentation.add(rb_mapOverlay); - -//For now: Adjust location of radiobutton title if 6 buttons -if(c_loadedMapOverlayTypes.size() > 5){ - gr_colorings.setY(-17); -} - - - VOID - double - 1753096794863 - f_setMapOverlay - 1920 - 1540 - - false - true - true - //reset legend -gr_defaultLegenda.setVisible(false); -gr_mapOverlayLegend_ElectricityConsumption.setVisible(false); -gr_mapOverlayLegend_PVProduction.setVisible(false); -gr_mapOverlayLegend_gridNeighbours.setVisible(false); -gr_mapOverlayLegend_congestion.setVisible(false); -gr_mapOverlayLegend_EnergyLabel.setVisible(false); -b_updateLiveCongestionColors = false; - -if(!b_inEnergyHubMode){ - f_clearSelectionAndSelectEnergyModel(); -} - -//Get selected map overlay type, based on loaded order of the radio buttons -OL_MapOverlayTypes selectedMapOverlayType = c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()); - -//Set the correct map overlay -switch(selectedMapOverlayType){ - case DEFAULT: - f_setMapOverlay_Default(); - break; - case ELECTRICITY_CONSUMPTION: - f_setMapOverlay_ElectricityConsumption(); - break; - case PV_PRODUCTION: - f_setMapOverlay_PVProduction(); - break; - case GRID_NEIGHBOURS: - f_setMapOverlay_GridTopology(); - break; - case CONGESTION: - f_setMapOverlay_Congestion(); - break; - case ENERGY_LABEL: - f_setMapOverlay_EnergyLabel(); - break; - case PARKING_TYPE: - f_setMapOverlay_ParkingType(); - break; -} - - - VOID - double - 1753097345978 - f_setMapOverlay_ElectricityConsumption - 1940 - 1590 - - false - true - true - //Set legend -b_updateLiveCongestionColors = true; -gr_mapOverlayLegend_ElectricityConsumption.setVisible(true); - -//Colour gis objects -if (project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnConsumptionProfileHouseholds(building); - } -} -else { - if(energyModel.v_rapidRunData == null){ - f_setErrorScreen("Dit overzicht wordt pas beschikbaar na het uitvoeren van een jaarsimulatie. In plaats daarvan is de standaard kaart geselecteerd.", 0, 0); - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); - return; - } - gr_mapOverlayLegend_ElectricityConsumption.setVisible(true); - for (GIS_Building building : energyModel.pop_GIS_Buildings){ - if(building.gisRegion.isVisible()){ - f_setColorsBasedOnElectricityConsumption(building); - } - } - /*for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_setColorsBasedOnConsumpion(object); - }*/ -} - - - VOID - double - 1753097409446 - f_setMapOverlay_PVProduction - 1940 - 1660 - - false - true - true - //Set legend -b_updateLiveCongestionColors = true; -gr_mapOverlayLegend_PVProduction.setVisible(true); - -//Colour gis objects -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnProduction(building); -} -/*for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_setColorsBasedOnProduction(object); -}*/ - - - VOID - double - 1753097484078 - f_setMapOverlay_GridTopology - 1940 - 1710 - - false - true - true - //Set legend -gr_mapOverlayLegend_gridNeighbours.setVisible(true); -b_updateLiveCongestionColors = false; - -//Colour gis objects -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnGridTopology_objects(building); -} -/*for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_setColorsBasedOnGridTopology_objects(object); -}*/ -for (GridNode GN : energyModel.pop_gridNodes){ - f_setColorsBasedOnGridTopology_gridnodes(GN); -} - - - VOID - double - 1753097518541 - f_setMapOverlay_Congestion - 1940 - 1780 - - false - true - true - if(energyModel.v_rapidRunData == null){ - f_setErrorScreen("Dit overzicht wordt pas beschikbaar na het uitvoeren van een jaarsimulatie. In plaats daarvan is de standaard kaart geselecteerd.", 0, 0); - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.DEFAULT),true); - return; -} - -//Set legend -gr_mapOverlayLegend_congestion.setVisible(true); -b_updateLiveCongestionColors = false; - -//Colour gis objects -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnCongestion_objects(building); -} -/* -for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_setColorsBasedOnCongestion_objects(object); -} -*/ -for (GridNode GN : energyModel.pop_gridNodes){ - f_setColorsBasedOnCongestion_gridnodes(GN, false); -} - - - VOID - double - 1753097561639 - f_setMapOverlay_Default - 1940 - 1565 - - false - true - true - b_updateLiveCongestionColors = true; -gr_defaultLegenda.setVisible(true); -for (GIS_Building b: energyModel.pop_GIS_Buildings) { - f_styleAreas(b); -} -/*for (GIS_Object object : energyModel.pop_GIS_Objects){ - f_styleAreas(object); -}*/ - - - VOID - double - 1753108764992 - f_setMapOverlay_EnergyLabel - 1940 - 1850 - - false - true - true - //Set legend -b_updateLiveCongestionColors = true; -gr_mapOverlayLegend_EnergyLabel.setVisible(true); - -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnEnergyLabels(building); -} - - - VOID - double - 1753440028514 - f_setShapePresentationOnTop - -640 - -60 - - false - true - true - - shape - Shape - - presentation.remove(shape); -presentation.insert(presentation.size(), shape); - - - VOID - double - 1753713001191 - f_updateOrderedListsAfterDeserialising - true - 80 - -490 - - false - true - true - - newEnergyModel - EnergyModel - - // Update references of GClists -for (int i=0; i< c_orderedPVSystemsHouses.size(); i++) { - String GCid = c_orderedPVSystemsHouses.get(i).p_gridConnectionID; - c_orderedPVSystemsHouses.set(i,findFirst(newEnergyModel.Houses, x->x.p_gridConnectionID == GCid)); -} - -for (int i=0; i< c_orderedPVSystemsCompanies.size(); i++) { - String GCid = c_orderedPVSystemsCompanies.get(i).p_gridConnectionID; - c_orderedPVSystemsCompanies.set(i,findFirst(newEnergyModel.UtilityConnections, x->x.p_gridConnectionID == GCid)); -} - -for (int i=0; i< c_orderedHeatingSystemsCompanies.size(); i++) { - String GCid = c_orderedHeatingSystemsCompanies.get(i).p_gridConnectionID; - c_orderedHeatingSystemsCompanies.set(i,findFirst(newEnergyModel.UtilityConnections, x->x.p_gridConnectionID == GCid)); -} - -for (int i=0; i< c_orderedHeatingSystemsHouses.size(); i++) { - String GCid = c_orderedHeatingSystemsHouses.get(i).p_gridConnectionID; - c_orderedHeatingSystemsHouses.set(i,findFirst(newEnergyModel.Houses, x->x.p_gridConnectionID == GCid)); -} - -for (int i=0; i< c_orderedPublicChargers.size(); i++) { - String GCid = c_orderedPublicChargers.get(i).p_gridConnectionID; - c_orderedPublicChargers.set(i,findFirst(newEnergyModel.PublicChargers, x->x.p_gridConnectionID == GCid)); -} - -// TODO: Update references of J_EAlists - - - - VOID - double - 1753440184174 - f_initializePresentationOrder - -660 - 200 - - false - true - true - //Set order of certain layovers and submenus -f_setShapePresentationOnTop(map); -f_setShapePresentationOnTop(gr_zoomButton); -f_setShapePresentationOnTop(gr_sliderClickBlocker); -f_setShapePresentationOnTop(gr_forceMapSelection); -f_setShapePresentationOnTop(gr_filterInterface); -f_setShapePresentationOnTop(gr_infoText); - - - - VOID - double - 1753445407428 - f_setForcedClickScreenVisibility - 140 - -860 - - false - true - true - - showForcedClickScreen - boolean - - gr_forceMapSelection.setVisible(showForcedClickScreen); - - - VOID - double - 1753446312775 - f_selectEnergyHubGC - 2240 - -2090 - - false - true - true - - clickx - double - - - clicky - double - - if(b_inManualFilterSelectionMode){ - f_selectManualFilteredGC(clickx, clicky); -} -else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || - c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ - f_selectGridLoop(clickx, clicky); - } - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - f_selectNeighborhood(clickx, clicky); - } -} - - - VOID - double - 1753698716095 - f_startEnergyHubConfiguration - 2240 - -2180 - - false - true - true - pauseSimulation(); - -b_inEnergyHubMode = true; -b_inEnergyHubSelectionMode = true; - -f_setForcedClickScreenText(""); -f_setForcedClickScreenVisibility(true); - -cb_showFilterInterface.setSelected(true, true); -gr_filterInterface.setPos(170, 580); - - - VOID - double - 1753698810590 - f_finalizeEnergyHubConfiguration - 2240 - -2060 - - false - true - true - if(b_inEnergyHubSelectionMode){ - if(button_completeManualSelectionMode.isVisible()){ - button_completeManualSelectionMode.action(); - } - - - //Move scenario radiobuttons over - f_getScenarioButtons().setPos( - gr_energyHubPresentation.getX() + uI_EnergyHub.rect_scenarios.getX() + 25.0, - gr_energyHubPresentation.getY() + uI_EnergyHub.rect_scenarios.getY() + 50.0 - ); - - //Set map in correct pos and navigate to e-hub view - map.setPos( - gr_energyHubPresentation.getX() + uI_EnergyHub.rect_map.getX() + 10.0, - gr_energyHubPresentation.getY() + uI_EnergyHub.rect_map.getY() + 10.0 - ); - map.setScale( 0.85, 0.85 ); - va_EHubDashboard.navigateTo(); - v_currentViewArea = va_EHubDashboard; - - //Copy selected GC and coop to e-hub dashboard - v_customEnergyCoop.p_actorID = "eHubConfiguratorCoop"; - uI_EnergyHub.v_energyHubCoop = v_customEnergyCoop; - - //Set E-hub selection mode false - b_inEnergyHubSelectionMode = false; - - uI_EnergyHub.f_initializeEnergyHubDashboard(); -} - - - - VOID - ArrayList<GridConnection> - 1753713085487 - f_updateGClistAfterDeserialisation - true - 95 - -470 - - false - true - true - - GClist - ArrayList<? extends GridConnection> - - - newEnergyModel - EnergyModel - - for (int i=0; i< GClist.size(); i++) { - String GCid = GClist.get(i).p_gridConnectionID; - GClist.set(i,findFirst(newEnergyModel.c_gridConnections, x->x.p_gridConnectionID == GCid)); -} - - - - - VOID - ArrayList<GridConnection> - 1753713662613 - f_updateJ_EAlistAfterDeserialisation - true - 110 - -450 - - false - true - true - - EAlist - ArrayList<J_EA> - - - newEnergyModel - EnergyModel - - for (int i=0; i< EAlist.size(); i++) { - String GCid = EAlist.get(i).getParentAgent();p_gridConnectionID; - EAlist.set(i,findFirst(newEnergyModel.c_gridConnections, x->x.p_gridConnectionID == GCid)); -} - - - - - VOID - double - 1753881971788 - f_createUITabs_default - -650 - 620 - - false - true - true - // CHOOSE WHICH TABS YOU WANT TO BE ABLE TO SHOW FOR YOUR PROJECT -// (OVERRIDE FUNCTION IN CHILD IF YOU WANT OTHER THAN DEFAULT) - -// Adding the (child) tabs to the tabArea population - -// If you use an extension of a tab, you must update the pointer to the instance of the interface -// Something like: tabElectricity.zero_Interface = loader_Project.zero_Interface; -// No update to the pointer is needed for the generic tabs - - -uI_Tabs.add_pop_tabElectricity(); -uI_Tabs.add_pop_tabHeating(); -uI_Tabs.add_pop_tabMobility(); - -// Group visibilities -// When using an extension of a generic tab don't forget to typecast it! -if (project_data.project_type() == OL_ProjectType.RESIDENTIAL) { - ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_ResidentialArea().setVisible(true); - ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersResidentialArea().setVisible(true); - ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_residential().setVisible(true); -} -else { - uI_Tabs.add_pop_tabEHub(); - ((tabElectricity)uI_Tabs.pop_tabElectricity.get(0)).getGroupElectricityDemandSliders_Businesspark().setVisible(true); - ((tabHeating)uI_Tabs.pop_tabHeating.get(0)).getGroupHeatDemandSlidersCompanies().setVisible(true); - ((tabMobility)uI_Tabs.pop_tabMobility.get(0)).getGr_mobilitySliders_default().setVisible(true); - ((tabEHub)uI_Tabs.pop_tabEHub.get(0)).getGroupHubSliders().setVisible(true); -} - - - VOID - double - 1753882411689 - f_initializePrivateAndPublicParkingCarsOrder - 85 - -590 - - false - true - true - //Get all public and private parked cars -c_orderedVehiclesPrivateParking = new ArrayList<J_EAVehicle>(); -List<J_EADieselVehicle> allPublicParkedCars = new ArrayList<J_EADieselVehicle>(); -for (GCHouse house : energyModel.Houses) { - if (house.p_eigenOprit) { - c_orderedVehiclesPrivateParking.addAll(house.c_vehicleAssets); - } - else{ - allPublicParkedCars.addAll(house.c_dieselVehicles); - } -} - -//Shuffle the collections to not have skewed initialization -//Collections.shuffle(c_orderedVehiclesPrivateParking); -//Collections.shuffle(allPublicParkedCars); - -//Get the total amount of public chargers -int totalChargers = c_orderedPublicChargers.size(); - -if(totalChargers > 0){ - // Fair distribution of vehicles across chargers - List<Integer> numberOfCarsPerCharger = f_getNumberOfCarsPerCharger(allPublicParkedCars.size(), totalChargers); - - // Assign vehicles to chargers - c_mappingOfVehiclesPerCharger.clear(); - int index = 0; - for (int i = 0; i < totalChargers; i++) { - GCPublicCharger charger = c_orderedPublicChargers.get(i); - int numberOfCars = numberOfCarsPerCharger.get(i); - - List<J_EADieselVehicle> assignedCars = new ArrayList<>(allPublicParkedCars.subList(index, index + numberOfCars)); - c_mappingOfVehiclesPerCharger.put(charger.p_uid, assignedCars); - - // Place vehicles depending on whether the charger is active - if (charger.v_isActive) { - for (J_EADieselVehicle car : assignedCars) { - J_ActivityTrackerTrips tripTracker = car.getTripTracker(); //Needed, as triptracker is removed when removeEnergyAsset is called. - car.removeEnergyAsset(); - car.setTripTracker(tripTracker);//Re-set the triptracker again, for storing. - } - } - - index += numberOfCars; - } -} - - - - VOID - double - 1753884000493 - f_simulateYearFromMainInterface - 1980 - 390 - - false - true - true - -gr_simulateYear.setVisible(false); -gr_loadIconYearSimulation.setVisible(true); - -new Thread( () -> { - //Run rapid run - energyModel.f_runRapidSimulation(); - - //After rapid run: remove loading screen - f_removeAllSimulateYearScreens(); - - if (c_selectedGridConnections.size() == 0){//Update main area collection - uI_Results.f_updateResultsUI(energyModel); - } - else if (c_selectedGridConnections.size() == 1){//Update selected GC area collection - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } - else if(c_selectedGridConnections.size() > 1){//Update COOP area collection - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - if (uI_EnergyHub != null && uI_EnergyHub.v_energyHubCoop != null) { - uI_EnergyHub.uI_Results.f_updateResultsUI(uI_EnergyHub.v_energyHubCoop); - } - - //Update and show kpi summary chart after run - if(settings.showKPISummary() != null && settings.showKPISummary() && v_clickedObjectType != OL_GISObjectType.GRIDNODE){ - uI_Results.getCheckbox_KPISummary().setSelected(true, true); - } - - //Enable radio buttons again - uI_Results.f_enableNonLivePlotRadioButtons(true); - if(uI_EnergyHub != null){ - uI_EnergyHub.uI_Results.f_enableNonLivePlotRadioButtons(true); - } - if(uI_Company != null){ - uI_Company.uI_Results.f_enableNonLivePlotRadioButtons(true); - } - - b_resultsUpToDate = true; -}).start(); - - - VOID - double - 1753951802256 - f_initialPTSystemsOrder_households - 85 - -670 - - false - true - true - List<GCHouse> houses = new ArrayList<GCHouse>(energyModel.Houses.findAll( x -> true)); -List<GCHouse> housesWithoutPT = houses.stream().filter( gc -> !gc.v_liveAssetsMetaData.activeAssetFlows.contains(OL_AssetFlowCategories.ptProductionHeat_kW) ).collect(Collectors.toList()); -List<GCHouse> housesWithPT = new ArrayList<>(houses); -housesWithPT.removeAll(housesWithoutPT); - -c_orderedPTSystemsHouses = new ArrayList<>(housesWithoutPT); -c_orderedPTSystemsHouses.addAll(housesWithPT); - - - - VOID - double - 1754312747144 - f_setMapOverlay_ParkingType - 1940 - 1900 - - false - true - true - //Set legend -b_updateLiveCongestionColors = true; - -//Colour gis objects -for (GIS_Building building : energyModel.pop_GIS_Buildings){ - f_setColorsBasedOnParkingType_objects(building); -} -for (GridNode GN : energyModel.pop_gridNodes){ - f_setColorsBasedOnParkingType_gridnodes(GN); -} - - - VOID - double - 1754312755135 - f_setColorsBasedOnParkingType_objects - 1960 - 1920 - - false - true - true - - gis_area - GIS_Object - - if (gis_area.c_containedGridConnections.size() > 0) { - - //Unkown by default - Color objectColor = v_parkingSpaceColor_unkown; - Color objectLineColor = v_parkingSpaceLineColor_unkown; - - //Check if houses and if public parking - boolean containsHouses = false; - boolean containsHousesWithPublicParking = false; - for(GridConnection gc : gis_area.c_containedGridConnections){ - if(gc instanceof GCHouse){ - containsHouses = true; - if(!((GCHouse)gc).p_eigenOprit){ - containsHousesWithPublicParking = true; - } - } - } - - //Change color based on parking type if houses present - if(containsHouses){ - if(containsHousesWithPublicParking){ - objectColor = v_parkingSpaceColor_public; - objectLineColor = v_parkingSpaceLineColor_public; - } - else{ - objectColor = v_parkingSpaceColor_private; - objectLineColor = v_parkingSpaceLineColor_private; - } - } - gis_area.f_style(objectColor, objectLineColor, null, null); -} - - - VOID - double - 1754314128315 - f_setColorsBasedOnParkingType_gridnodes - 1960 - 1940 - - false - true - true - - GN - GridNode - - if(GN.gisRegion != null){ - GN.gisRegion.setFillColor(v_parkingSpaceColor_unkown); - GN.gisRegion.setLineColor(v_parkingSpaceLineColor_unkown); -} - - - RETURNS_VALUE - List<Integer> - 1756122011053 - f_getNumberOfCarsPerCharger - 110 - -570 - - false - true - true - - totalPublicParkedCars - int - - - totalPublicChargers - int - - List<Integer> numberOfCarsPerCharger = new ArrayList<>(); -if(totalPublicChargers > 0){ - - - int baseNumberOfCars = (int) floor(totalPublicParkedCars / totalPublicChargers); //Could also simply be totalPublicParkedCars / totalPublicChargers, as int/int is already floored, but just to make sure what should happen here it is written in full - int remainingCars = totalPublicParkedCars % totalPublicChargers; // extra vehicles that can be distributed - - for (int i = 0; i < totalPublicChargers; i++) { - if (i < remainingCars) { - numberOfCarsPerCharger.add(baseNumberOfCars + 1); // some chargers get one extra - } else { - numberOfCarsPerCharger.add(baseNumberOfCars); - } - } -} - -return numberOfCarsPerCharger; - - - RETURNS_VALUE - ShapeRadioButtonGroup - 1756369604291 - f_getScenarioButtons - -1020 - 100 - - false - true - true - return rb_scenarios; - - - VOID - double - 1756994047356 - f_enableAllPlots - -290 - 680 - - false - true - true - - resultsUI - UI_Results - - - selectedObjectInterface - I_EnergyData - - if (resultsUI.f_getSelectedObjectData() != null) { - uI_Results.f_updateResultsUI(selectedObjectInterface); - uI_Results.f_enableNonLivePlotRadioButtons(true); -} - - - VOID - double - 1756995218301 - f_setAllSimulateYearScreens - -290 - 700 - - false - true - true - gr_simulateYear.setVisible(true); -if(uI_EnergyHub != null){ - uI_EnergyHub.gr_simulateYearEnergyHub.setVisible(true); -} -if(uI_Company != null){ - uI_Company.gr_simulateYearScreen.setVisible(true); -} - - - VOID - double - 1756997038652 - f_removeAllSimulateYearScreens - -290 - 720 - - false - true - true - gr_simulateYear.setVisible(false); -gr_loadIconYearSimulation.setVisible(false); -if(uI_EnergyHub != null){ - uI_EnergyHub.gr_simulateYearEnergyHub.setVisible(false); - uI_EnergyHub.gr_loadIconYearSimulationEnergyHub.setVisible(false); -} -if(uI_Company != null){ - uI_Company.gr_simulateYearScreen.setVisible(false); - uI_Company.gr_loadIcon.setVisible(false); -} - - - VOID - double - 1760014973975 - f_cancelEnergyHubConfiguration - 2250 - -2160 - - false - true - true - button_clearFilters.action(); - -b_inEnergyHubMode = false; -b_inEnergyHubSelectionMode = false; - -f_setForcedClickScreenText(""); -f_setForcedClickScreenVisibility(false); - -cb_showFilterInterface.setSelected(false, true); - - - VOID - double - 1760085891920 - f_filterHasEV - -1550 - 350 - - false - true - true - - toBeFilteredGC - ArrayList<GridConnection> - - c_selectedGridConnections = new ArrayList<>(findAll(toBeFilteredGC, GC -> GC.c_electricVehicles.size() > 0)); -//Werkt nog niet helemaal naar behoren, want ghost assets worden nog niet aangemaakt, -//en dus hebben bedrijven met ghost ev geen c_electricVehicles en dus komen niet door deze filter. -// --> Als ghost vehicles ook worden aangemaakt, werkt het wel. - - - VOID - double - 1760955904715 - f_initializeAdditionalVehicles - 85 - -520 - - false - true - true - for(GridConnection GC : energyModel.UtilityConnections){ - c_additionalVehicles.put(GC.p_uid, new ArrayList<J_EAVehicle>()); -} - - - VOID - double - 1760978860758 - f_createAdditionalUIs - -280 - 400 - - false - true - true - //Energy hub dashboard -if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ - uI_EnergyHub = add_pop_UI_EnergyHub(); -} - -//Private companyUI dashboard -if(energyModel.UtilityConnections.size() > 0){ - uI_Company = add_pop_UI_Company(); -} - -/* -//Hydrogen dashboard NOT FINISHED -for(GCEnergyConversion conversionGC : energyModel.EnergyConversionSites){ - for(J_EAConversion conversionEA : conversionGC.c_conversionAssets){ - if(conversionEA instanceof J_EAConversionElectrolyser){ - uI_Hydrogen = add_pop_UI_Hydrogen(); - break; - } - } -} - -//Battery dashboard NOT FINISHED -for(GCGridBattery batteryGC : energyModel.GridBatteries){ - if(batteryGC.c_connectedGISObjects.size()>0){ - uI_Battery = add_pop_UI_Battery(); - break; - } -} -*/ - - - VOID - double - 1761060882101 - f_setCompaniesScenario - -1160 - 445 - - false - true - true - - scenarioMap - LinkedHashMap - - //Solution for now -int companyUIScenarioRBIndex = 0; -if(scenarioMap == c_scenarioMap_Current){ - companyUIScenarioRBIndex = 0; -} -else if(scenarioMap == c_scenarioMap_Future){ - companyUIScenarioRBIndex = 1; -} -else{ - throw new RuntimeException("Tried to call the setCompaniesScenario function with a non existing companyUI scenario"); -} - -//Set companyUI to correct radio button setting -uI_Company.b_runningMainInterfaceScenarioSettings = true; -for (GCUtility GC : energyModel.UtilityConnections){ - uI_Company.f_setCompanyUI(GC); - uI_Company.getRb_scenariosPrivateUI().setValue(companyUIScenarioRBIndex, true); -} -uI_Company.b_runningMainInterfaceScenarioSettings = false; - - - VOID - double - 1761117997540 - f_initializeScenarioRadioButton - -1180 - 60 - - false - true - true - //Set the default visualisation of the radiobuttons -Presentable presentable = this.presentation.getPresentable(); -boolean ispublic = true; -double x = rb_scenarios_template.getX(); -double y = rb_scenarios_template.getY(); -double width = rb_scenarios_template.getWidth(); -double height = 0;//Not needed, automatically adjust by adding options -Color textColor = Color.BLACK; -boolean enabled = true; -Font font = new Font("Dialog", Font.PLAIN, 14); -boolean vertical = true; - -//Set words for the radiobutton options -String[] RadioButtonOptions = f_getScenarioOptions(); - -//Check if it contains the custom option -boolean containsCustomOption = false; -for(String scenarioOption : RadioButtonOptions){ - if(scenarioOption.equals("Custom")){ - containsCustomOption = true; - } -} - -if(!containsCustomOption){ - traceln("WARNING: Scenario radiobutton option 'Custom' was not included in the custom scenario options, it has automatically been added!"); - RadioButtonOptions = Arrays.copyOf(RadioButtonOptions, RadioButtonOptions.length + 1); - RadioButtonOptions[RadioButtonOptions.length - 1] = "Custom"; -} - -//Create the radiobutton and set the correct action. -rb_scenarios = new ShapeRadioButtonGroup(presentable, ispublic, x ,y, width, height, textColor, enabled, font, vertical, RadioButtonOptions){ - @Override - public void action() { - f_scenarioRadioButtonAction(); - } -}; - -presentation.add(rb_scenarios); - -//For now: Adjust location of radiobutton title if 6 buttons -if(c_loadedMapOverlayTypes.size() > 5){ - gr_colorings.setY(-17); -} - - - RETURNS_VALUE - String - 1761119066060 - f_setSelectedScenario - -1170 - 200 - - false - true - true - //Default scenario switch statement, override this function if you want to add/change scenario options! -String selected_scenario = ""; - -switch(rb_scenarios.getValue()){ - case 0: - selected_scenario = "Huidige situatie"; - f_setScenario_Current(); - - break; - case 1: - if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ - selected_scenario = "Toekomstplannen"; - f_setScenario_Future(); - } - else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - selected_scenario = "Custom"; - t_scenarioDescription.setText(t_scenario_custom); - } - break; - case 2: - selected_scenario = "Custom"; - t_scenarioDescription.setText(t_scenario_custom); - break; - - default: - traceln("Unsupported scenario selected"); -} - -return selected_scenario; - - - RETURNS_VALUE - String[] - 1761119264046 - f_getScenarioOptions - -1150 - 80 - - false - true - true - //OVERRIDE THIS FUNCTION IF YOU WANT TO ADJUST THE SCENARIO OPTIONS. -// -> MAKE SURE TO ALWAYS INCLUDE A CUSTOM -String[] scenarioOptions = null; -if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ - scenarioOptions = new String[]{"Huidige situatie", "Toekomstplannen", "Custom"}; -} -else if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - scenarioOptions = new String[]{"Huidige situatie", "Custom"}; -} -return scenarioOptions; - - - VOID - double - 1761119479231 - f_setScenario_Future - -1160 - 270 - - false - true - true - if(c_scenarioMap_Future != null){ - f_setCompaniesScenario(c_scenarioMap_Future); -} -//Set specifc assets active/non-active -f_projectSpecificScenarioSettings("Future"); - -//Set the scenario text -t_scenarioDescription.setText(t_scenario_future); - - - VOID - double - 1761119479233 - f_setScenario_Current - -1160 - 225 - - false - true - true - if(c_scenarioMap_Current != null){ - f_setCompaniesScenario(c_scenarioMap_Current); -} -//Reset sliders for households -if(project_data.project_type() == OL_ProjectType.RESIDENTIAL && p_residentialScenario_Current != null){ - f_setResidentialScenario_Current(); -} - - -//Set specifc assets active/non-active -f_projectSpecificScenarioSettings("Current"); - -//Set the scenario text -t_scenarioDescription.setText(t_scenario_current); - - - VOID - double - 1761119842140 - f_resetSpecialSlidersAndButtons - -1160 - 365 - - false - true - true - uI_Tabs.pop_tabEHub.get(0).getButton_remove_nfato().action(); - - - - - - - -//Project specific sliders and buttons reset -f_resetProjectSpecificSlidersAndButtons(); - - - VOID - double - 1761121949197 - f_resetProjectSpecificSlidersAndButtons - -1140 - 385 - - false - true - true - //OVERRIDE THIS FUNCTION IF YOU WANT TO RESET CERTAIN CUSTOM SLIDERS -//AND BUTTONS THAT ARE NOT IN THE GENERIC LOADERFACE - - - VOID - double - 1761122139097 - f_projectSpecificScenarioSettings - -1160 - 415 - - false - true - true - - selectedScenario - String - - //OVERRIDE IF THIS IS NEEDED FOR YOUR SPECIFIC PROJECT - -//Example code: -/* -//Find specific scenario assets -GridConnection testGC_new = findFirst(energyModel.UtilityConnections, GC -> GC.p_gridConnectionID.equals("testGC_nieuwBouw")); -GIS_Building testBuilding_additionalBuilding = findFirst(energyModel.pop_GIS_Buildings, B -> B.p_id.equals("testBuilding_additionalBuilding")); - -switch(selectedScenario){ - case "Current": - //Pause assets - testGC_new.f_setActive(false); - testBuilding_additionalBuilding.gisRegion.setVisible(false); - break; - - case "Future": - //Unpause assets - testGC_new.f_setActive(true); - testBuilding_additionalBuilding.gisRegion.setVisible(true); - break; -} -*/ - - - - VOID - double - 1761132028131 - f_setResidentialScenario_Current - -1160 - 465 - - false - true - true - ////Electricity -tabElectricity tabElec = uI_Tabs.pop_tabElectricity.get(0); - -double pv_pct = p_residentialScenario_Current.getHousesWithPV_pct(); -tabElec.sl_householdPVResidentialArea_pct.setValue(roundToInt(pv_pct), true); - -double battery_pct = p_residentialScenario_Current.getPvHousesWithBattery_pct(); -tabElec.sl_householdBatteriesResidentialArea_pct.setValue(roundToInt(battery_pct), true); - -//Electric cooking -double cooking_pct = p_residentialScenario_Current.getCooking_pct(); -tabElec.sl_householdElectricCookingResidentialArea_pct.setValue(roundToInt(cooking_pct), true); - -//Consumption growth -double electricityDemandIncrease_pct = p_residentialScenario_Current.getElectricityDemandIncrease_pct(); -tabElec.sl_electricityDemandIncreaseResidentialArea_pct.setValue(roundToInt(electricityDemandIncrease_pct), true); - -//Gridbatteries -double averageNeighbourhoodBatterySize_kWh = p_residentialScenario_Current.getAverageNeighbourhoodBatterySize_kWh(); -tabElec.sl_gridBatteriesResidentialArea_kWh.setValue(averageNeighbourhoodBatterySize_kWh, true); - -////Heating -tabHeating tabHeat = uI_Tabs.pop_tabHeating.get(0); - -double housesWithGasBurners_pct = p_residentialScenario_Current.getHousesWithGasBurners_pct(); -double housesWithHybridHeatpump_pct = p_residentialScenario_Current.getHousesWithHybridHeatpump_pct(); -double housesWithElectricHeatpump_pct = p_residentialScenario_Current.getHousesWithElectricHeatpump_pct(); -boolean cb_householdHTDistrictHeatingActive = p_residentialScenario_Current.getCb_householdHTDistrictHeatingActive(); -boolean cb_householdLTDistrictHeatingActive = p_residentialScenario_Current.getCb_householdLTDistrictHeatingActive(); - -if(cb_householdHTDistrictHeatingActive || cb_householdLTDistrictHeatingActive){ - tabHeat.sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, false); - tabHeat.sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, false); - tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, false); - if(cb_householdHTDistrictHeatingActive){ - tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); - tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, true); - } - else if(cb_householdLTDistrictHeatingActive){ - tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); - tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, true); - } -} -else{ - tabHeat.sl_householdGasBurnerResidentialArea_pct.setValue(housesWithGasBurners_pct, true); - tabHeat.sl_householdHybridHeatpumpResidentialArea.setValue(housesWithHybridHeatpump_pct, true); - tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.setValue(housesWithElectricHeatpump_pct, true); - tabHeat.cb_householdHTDistrictHeatingResidentialArea.setSelected(cb_householdHTDistrictHeatingActive, false); - tabHeat.cb_householdLTDistrictHeatingResidentialArea.setSelected(cb_householdLTDistrictHeatingActive, false); -} - - -//Houses with Airco -double pctOfHousesWithAirco = p_residentialScenario_Current.getHousesWithAirco_pct(); -tabHeat.sl_householdAircoResidentialArea_pct.setValue(pctOfHousesWithAirco, true); - -//Houses with better isolation -double pctOfHousesWithImprovedInsulation = p_residentialScenario_Current.getHousesWithImprovedInsulation_pct(); -tabHeat.sl_householdHeatDemandReductionResidentialArea_pct.setValue(roundToInt(pctOfHousesWithImprovedInsulation), true); - -//PT -double nbHousesWithPT_pct = p_residentialScenario_Current.getNbHousesWithPT_pct(); -tabHeat.sl_rooftopPTHouses_pct.setValue(roundToInt(nbHousesWithPT_pct), true); - - - -////Mobility -tabMobility tabMob = uI_Tabs.pop_tabMobility.get(0); - -//Private EV -double privateEVs_pct = p_residentialScenario_Current.getPrivateEVs_pct(); -double privateEVsThatSupportV2G_pct = p_residentialScenario_Current.getPrivateEVsThatSupportV2G_pct(); -tabMob.sl_privateEVsResidentialArea_pct.setValue(roundToInt(privateEVs_pct), true); -tabMob.sl_EVsThatSupportV2G_pct.setValue(roundToInt(privateEVsThatSupportV2G_pct), true); - -//Selected charging mode -String selectedChargingAttitudeStringPrivateEV = p_residentialScenario_Current.getSelectedChargingAttitudeStringPrivateEVs(); -boolean V2GActivePrivateEV = p_residentialScenario_Current.getV2GActivePrivateEVs(); - -tabMob.cb_chargingAttitudePrivateParkedCars.setValue(selectedChargingAttitudeStringPrivateEV, true); -tabMob.cb_activateV2GPrivateParkedCars.setSelected(V2GActivePrivateEV, true); - -//Chargers -double activePublicChargers_pct = p_residentialScenario_Current.getActivePublicChargers_pct(); -tabMob.sl_publicChargersResidentialArea_pct.setValue(roundToInt(activePublicChargers_pct), true); - -double V1G_pct = p_residentialScenario_Current.getChargersV1G_pct(); -double V2G_pct = p_residentialScenario_Current.getChargersV2G_pct(); -tabMob.sl_chargersThatSupportV1G_pct.setValue(roundToInt(V1G_pct), true); -tabMob.sl_chargersThatSupportV2G_pct.setValue(roundToInt(V2G_pct), true); - -//Selected charging mode -String selectedChargingAttitudeStringChargers = p_residentialScenario_Current.getSelectedChargingAttitudeStringChargers(); -boolean V2GActiveChargers = p_residentialScenario_Current.getV2GActiveChargers(); - -tabMob.cb_chargingAttitudePrivatePublicChargers.setValue(selectedChargingAttitudeStringChargers, true); -tabMob.cb_activateV2GPublicChargers.setSelected(V2GActiveChargers, true); - - - VOID - double - 1761134737334 - f_storeResidentialScenario_Current - -1180 - 130 - - false - true - true - //Create the class that will store the initial slider settings of a residential model -p_residentialScenario_Current = new J_SliderSettings_Residential(); - -////Electricity -if(uI_Tabs.pop_tabElectricity.size() > 0){ - tabElectricity tabElec = uI_Tabs.pop_tabElectricity.get(0); - - double housesWithPV_pct = tabElec.sl_householdPVResidentialArea_pct.getValue(); - p_residentialScenario_Current.setHousesWithPV_pct(housesWithPV_pct); - - double pvHousesWithBattery_pct = tabElec.sl_householdBatteriesResidentialArea_pct.getValue(); - p_residentialScenario_Current.setPvHousesWithBattery_pct(pvHousesWithBattery_pct); - - - //Electric cooking - double cooking_pct = tabElec.sl_householdElectricCookingResidentialArea_pct.getValue(); - p_residentialScenario_Current.setCooking_pct(cooking_pct); - - //Consumption growth - double electricityDemandIncrease_pct = tabElec.sl_electricityDemandIncreaseResidentialArea_pct.getValue(); - p_residentialScenario_Current.setElectricityDemandIncrease_pct(electricityDemandIncrease_pct); - - //Gridbatteries - double averageNeighbourhoodBatterySize_kWh = tabElec.sl_gridBatteriesResidentialArea_kWh.getValue(); - p_residentialScenario_Current.setAverageNeighbourhoodBatterySize_kWh(averageNeighbourhoodBatterySize_kWh); -} - -////Heating -if(uI_Tabs.pop_tabHeating.size() > 0){ - tabHeating tabHeat = uI_Tabs.pop_tabHeating.get(0); - - double housesWithGasBurners_pct = tabHeat.sl_householdGasBurnerResidentialArea_pct.getValue(); - double housesWithHybridHeatpump_pct = tabHeat.sl_householdHybridHeatpumpResidentialArea.getValue(); - double housesWithElectricHeatpump_pct = tabHeat.sl_householdElectricHeatPumpResidentialArea_pct.getValue(); - boolean cb_householdHTDistrictHeatingActive = tabHeat.cb_householdHTDistrictHeatingResidentialArea.isSelected(); - boolean cb_householdLTDistrictHeatingActive = tabHeat.cb_householdLTDistrictHeatingResidentialArea.isSelected(); - - p_residentialScenario_Current.setHousesWithGasBurners_pct(housesWithGasBurners_pct); - p_residentialScenario_Current.setHousesWithHybridHeatpump_pct(housesWithHybridHeatpump_pct); - p_residentialScenario_Current.setHousesWithElectricHeatpump_pct(housesWithElectricHeatpump_pct); - p_residentialScenario_Current.setCb_householdHTDistrictHeatingActive(cb_householdHTDistrictHeatingActive); - p_residentialScenario_Current.setCb_householdLTDistrictHeatingActive(cb_householdLTDistrictHeatingActive); - - - //Houses with Airco - double housesWithAirco_pct = tabHeat.sl_householdAircoResidentialArea_pct.getValue(); - p_residentialScenario_Current.setHousesWithAirco_pct(housesWithAirco_pct); - - //Houses with better isolation - double housesWithImprovedInsulation_pct = tabHeat.sl_householdHeatDemandReductionResidentialArea_pct.getValue(); - p_residentialScenario_Current.setHousesWithImprovedInsulation_pct(housesWithImprovedInsulation_pct); - - //PT - double nbHousesWithPT_pct = tabHeat.sl_rooftopPTHouses_pct.getValue(); - p_residentialScenario_Current.setNbHousesWithPT_pct(nbHousesWithPT_pct); -} - -////Mobility -if(uI_Tabs.pop_tabMobility.size() > 0){ - tabMobility tabMob = uI_Tabs.pop_tabMobility.get(0); - - //Private EV - double privateEVs_pct = tabMob.sl_privateEVsResidentialArea_pct.getValue(); - double privateEVsThatSupportV2G_pct = tabMob.sl_EVsThatSupportV2G_pct.getValue(); - p_residentialScenario_Current.setPrivateEVs_pct(privateEVs_pct); - p_residentialScenario_Current.setPrivateEVsThatSupportV2G_pct(privateEVsThatSupportV2G_pct); - - //Selected charging mode - String selectedChargingAttitudeStringPrivateEVs = tabMob.cb_chargingAttitudePrivateParkedCars.getValue(); - boolean V2GActivePrivateEVs = tabMob.cb_activateV2GPrivateParkedCars.isSelected(); - p_residentialScenario_Current.setSelectedChargingAttitudeStringPrivateEVs(selectedChargingAttitudeStringPrivateEVs); - p_residentialScenario_Current.setV2GActivePrivateEVs(V2GActivePrivateEVs); - - //Chargers - double activePublicChargers_pct = tabMob.sl_publicChargersResidentialArea_pct.getValue(); - double chargersV1G_pct = tabMob.sl_chargersThatSupportV1G_pct.getValue(); - double chargersV2G_pct = tabMob.sl_chargersThatSupportV2G_pct.getValue(); - - p_residentialScenario_Current.setActivePublicChargers_pct(activePublicChargers_pct); - p_residentialScenario_Current.setChargersV1G_pct(chargersV1G_pct); - p_residentialScenario_Current.setChargersV2G_pct(chargersV2G_pct); - - //Selected charging mode - String selectedChargingAttitudeStringChargers = tabMob.cb_chargingAttitudePrivatePublicChargers.getValue(); - boolean V2GActiveChargers = tabMob.cb_activateV2GPublicChargers.isSelected(); - p_residentialScenario_Current.setSelectedChargingAttitudeStringChargers(selectedChargingAttitudeStringChargers); - p_residentialScenario_Current.setV2GActiveChargers(V2GActiveChargers); -} - - - RETURNS_VALUE - String - 1762253228735 - f_getDateAndTimeString - 940 - -340 - - false - true - true - Date date = energyModel.f_getDate(); - -SimpleDateFormat formatter = new SimpleDateFormat(); -formatter.applyPattern("dd MMM yyyy, kk:mm"); - -return formatter.format(date); - - - RETURNS_VALUE - String - 1762253251373 - f_getDateString - 940 - -320 - - false - true - true - Date date = energyModel.f_getDate(); - -SimpleDateFormat formatter = new SimpleDateFormat(); -formatter.applyPattern("dd MMM yyyy"); - -return formatter.format(date); - - - VOID - double - 1762356801733 - f_setLoadingScreen - 3080 - 930 - - false - true - true - - visibility - boolean - - - xOffset - double - - - yOffset - double - - if (visibility) { - // Screen Size / View Area is 1920 x 980, so centre at 960, 490 - // Icon Size is 180 x 180, so top left at 960 - 90 = 870, 490 - 90 = 400 - double xPos = 870 + xOffset; - double yPos = 400 + yOffset; - - image_loadingScreenIcon.setPos(xPos, yPos); - - // Make sure the image is at the top of the presentation level - f_setShapePresentationOnTop(image_loadingScreenIcon); - image_loadingScreenIcon.setVisible(true); -} -else { - image_loadingScreenIcon.setVisible(false); -} - - - VOID - double - 1762533624267 - f_scenarioRadioButtonAction - -1180 - 180 - - false - true - true - //Set boolean of running main interface scenario true -b_runningMainInterfaceScenarios = true; - -////Set selected scenario -String selected_scenario = f_setSelectedScenario(); - -//Set scenario name text to the correct scenario -t_scenarioName.setText("Scenario: " + selected_scenario); -traceln("Selected scenario: \"" + selected_scenario + "\""); - -//Deselect the selected building, if selected GC is now paused -if(c_selectedGridConnections.size()>0 && !c_selectedGridConnections.get(0).v_isActive){ - f_clearSelectionAndSelectEnergyModel(); -} - -//Set boolean of running main interface scenario false -b_runningMainInterfaceScenarios = false; - -if(!selected_scenario.equals("Custom")){ - f_resetSettings(); - - f_updateMainInterfaceSliders(); - - //Colour recolor pv map again if it is active - if(c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); - } -} - - - -/* -//Pause simulation and set loading screen -pauseSimulation(); -f_setLoadingScreen(true, 0, 0); - -new Thread( () -> { - - //Set selected scenario - String selected_scenario = f_setSelectedScenario(); - - //Set scenario name text to the correct scenario - t_scenarioName.setText("Scenario: " + selected_scenario); - traceln("Selected scenario: \"" + selected_scenario + "\""); - - //Deselect the selected building, if selected GC is now paused - if(c_selectedGridConnections.size()>0 && !c_selectedGridConnections.get(0).v_isActive){ - f_clearSelectionAndSelectEnergyModel(); - } - - //Set boolean of running main interface scenario true - b_runningMainInterfaceScenarios = false; - - if(!selected_scenario.equals("Custom")){ - f_resetSettings(); - - f_updateMainInterfaceSliders(); - - //Colour recolor pv map again if it is active - if(c_loadedMapOverlayTypes.get(rb_mapOverlay.getValue()) == OL_MapOverlayTypes.PV_PRODUCTION){ - rb_mapOverlay.setValue(c_loadedMapOverlayTypes.indexOf(OL_MapOverlayTypes.PV_PRODUCTION),true); - } - } - - //Resume live simulation and remove loading screen - runSimulation(); - f_setLoadingScreen(false, 0, 0); - -}).start(); -*/ - - - VOID - double - 1762775121080 - f_setScenarioToCustom - -1160 - 315 - - false - true - true - String[] scenarioOptions = f_getScenarioOptions(); - -int customOptionIndex = 0; -for(String scenarioOption : scenarioOptions){ - if(scenarioOption.equals("Custom")){ - break; - } - customOptionIndex++; -} - -rb_scenarios.setValue(customOptionIndex, true); - - - VOID - double - 1763657360843 - f_setFilterComboBoxOptions - -1580 - 50 - - false - true - true - //Check wheter a filter will result in anything. The order it is added here, is the order it will show up in the filter drop down menu. -if(energyModel.Houses.size() > 0){ - c_cbFilterOptions.add(OL_FilterOptionsGC.HOUSES); -} -if(energyModel.UtilityConnections.size() > 0){ - c_cbFilterOptions.add(OL_FilterOptionsGC.COMPANIES); - if(v_numberOfSurveyCompanies > 0){ - c_cbFilterOptions.add(OL_FilterOptionsGC.DETAILED); - } -} - -if(findAll(energyModel.pop_GIS_Objects, gisObject -> gisObject.p_GISObjectType == OL_GISObjectType.REGION).size() > 1){ - c_cbFilterOptions.add(SELECTED_NEIGHBORHOOD); -} -if(b_gridLoopsAreDefined){ - c_cbFilterOptions.add(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP); -} - - -//More specific default options only available if GC accestype is full -if(user.GCAccessType == OL_UserGCAccessType.FULL){ - c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_PV); - if(c_cbFilterOptions.contains(OL_FilterOptionsGC.COMPANIES)){ - c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_TRANSPORT); - c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_EV); - } - else{ - for (J_EA ea : energyModel.c_energyAssets) { - if (ea instanceof J_EAVehicle) { - c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_TRANSPORT); - c_cbFilterOptions.add(OL_FilterOptionsGC.HAS_EV); - break; - } - } - } -} - -c_cbFilterOptions.add(OL_FilterOptionsGC.NONDETAILED); - - -String[] filterOptionsNames = new String[1 + c_cbFilterOptions.size()]; -filterOptionsNames[0] = "-"; -for(int j = 1; j < c_cbFilterOptions.size() + 1; j++){ - filterOptionsNames[j] = map_filterOptionUINames.get(c_cbFilterOptions.get(j-1)); -} - -cb_filterOptions.setItems(filterOptionsNames, false); - -//Set cb to correct option -cb_filterOptions.setValueIndex(0, false); - - -//Create the reverse of map_filterOptionUINames -> map_UINamesFilterOption -map_UINamesFilterOption = new HashMap<>(); -for (Map.Entry<OL_FilterOptionsGC, String> entry : map_filterOptionUINames.entrySet()) { - map_UINamesFilterOption.put(entry.getValue(), entry.getKey()); -} - - - - VOID - double - 1764776636006 - f_selectEnergyModel - 70 - 1220 - - false - true - true - v_clickedObjectType = OL_GISObjectType.REGION; -uI_Results.f_updateResultsUI(energyModel); - -//Enable kpi summary button -uI_Results.getCheckbox_KPISummary().setEnabled(true); - - - RETURNS_VALUE - boolean - 1764777516393 - f_checkIfGCsAreAccesible - -670 - 875 - - false - true - true - - GCList - List<GridConnection> - - if(!settings.isPublicModel() && user.GCAccessType == OL_UserGCAccessType.FULL){ - return true; -} -if(GCList.size() >= p_minSelectedGCForPublicAggregation){ - return true; -} -for(GridConnection GC : GCList){ - if(!GC.p_owner.b_dataIsAccessible){ - return false; - } -} -return true; - - - RETURNS_VALUE - List<GridConnection> - 1765207097247 - f_getMainInterfaceSliderEAGCs - -650 - 640 - - false - true - true - List<GridConnection> electricityTabEASliderGCs = new ArrayList<GridConnection>(); - -//Find the energy production slider gcs that are not specificly for the EnergyHub -List<GCEnergyProduction> electricityTabEASliderGCs_prod = findAll(energyModel.EnergyProductionSites, sliderProd -> - sliderProd.p_isSliderGC && - !sliderProd.p_gridConnectionID.equals(p_defaultEnergyHubSliderGCName_solarfarm) && - !sliderProd.p_gridConnectionID.equals(p_defaultEnergyHubSliderGCName_windfarm)); -if(electricityTabEASliderGCs_prod.size() == 2){ - electricityTabEASliderGCs.addAll(electricityTabEASliderGCs_prod); -} -else{ - throw new RuntimeException("electricityTabEASliderGCs_prod.size() != 2 -> Should be exactly 2, one solarfarm and one windfarm."); -} - -//Find the GridBattery slider gcs that are not specificly for the EnergyHub -List<GCGridBattery> electricityTabEASliderGCs_bat = findAll(energyModel.GridBatteries, sliderBat -> sliderBat.p_isSliderGC && - !sliderBat.p_gridConnectionID.equals("EnergyHub battery slider")); - -if(project_data.project_type() == OL_ProjectType.BUSINESSPARK && electricityTabEASliderGCs_bat.size() != 1){ - throw new RuntimeException("electricityTabEASliderGCs_bat.size() != 1 -> Should be exactly 1 for businesspark models."); -} -else{ - electricityTabEASliderGCs.addAll(electricityTabEASliderGCs_bat); -} - -return electricityTabEASliderGCs; - - - - - 1744624088854 - excel_exportBalanceLoadData - true - -555 - -365 - - false - true - true - - zerointerfaceloader - Export_ModelData.xlsx - - false - true - true - - - - - 1658477103135 - connections - 50 - -230 - - false - true - true - false - COLLECTION_OF_LINKS - true - Object - SOLID - 1 - -16777216 - UNDER_AGENTS - NONE - END - - - - - 1708522361909 - pop_UI_Company - -260 - 460 - - false - true - true - - zerointerfaceloader - UI_company - - - - zerointerfaceloader - UI_company - 1708522361868 - - - - - p_companyName - - - p_maxAddedVehicles - - - p_scenarioSettings_Current - - - p_scenarioSettings_Future - - - p_gridConnection - - - true - - 0 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - EMPTY - - 1658477089963 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1709049456144 - pop_UI_Battery - -260 - 540 - - false - true - true - - zerointerfaceloader - UI_Battery - - - - zerointerfaceloader - UI_Battery - 1709049456141 - - - - - p_amountOfGISObjects - - - p_amountOfGC - - - true - - 0 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - EMPTY - - 1658477089962 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1716193013122 - uI_Results - -670 - 760 - - false - true - true - 1716193014596 - - digital_twin_results - UI_Results - - - - digital_twin_results - UI_Results - 1704197366556 - - - - - energyModel - - energyModel - - - - p_cutOff_MWh - - - gr_infoText - - gr_infoText - - - - gr_closeInfoText - - gr_closeInfoText - - - - t_infoTextDescription - - t_infoTextDescription - - - - rect_infoText - - rect_infoText - - - - p_currentActiveInfoBubble - - p_currentActiveInfoBubble - - - - false - - 100 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089961 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1717506326727 - pop_UI_Hydrogen - -260 - 500 - - false - true - true - - zerointerfaceloader - UI_Hydrogen - - - - zerointerfaceloader - UI_Hydrogen - 1717506309785 - - - - - p_amountOfGISObjects - - - p_amountOfGC - - - true - - 0 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - "" - - EMPTY - - 1658477089960 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722252541830 - uI_Tabs - -670 - 581 - - false - true - true - 1722252542596 - - zerointerfaceloader - UI_Tabs - - - - zerointerfaceloader - UI_Tabs - 1722245292191 - - - - false - - 100 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - "" - - SPECIFIED_NUMBER - - 1658477089959 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - 1722252541830 - pop_UI_EnergyHub - -260 - 420 - - false - true - true - 1747229957336 - - zerointerfaceloader - UI_EnergyHub - - - - zerointerfaceloader - UI_EnergyHub - 1709049506460 - - - - - p_energyHubBackGroundColor - - - p_energyHubLineColor - - - p_energyHubLineWidth - - - p_energyHubLineStyle - - - true - - 0 - - ARRAY_LIST_BASED - XYZ - - 0 - - - 0 - - - "" - - EMPTY - - 0 - - - ONE_AGENT_PER_DATABASE_RECORD - - - - - - 1658477103139 - level - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - 1756124196459 - rect_sliderCollectionOrdering - 0 - -800 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -14774017 - null - SOLID - 1220 - 400 - 0.0 - -1 - null - - - 1701947860073 - rect_canvas - -600 - -200 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 6000 - 2400 - 0.0 - -1 - null - - - 1701952231399 - rect_gismap - 400 - 85 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1020 - 675 - 0.0 - - zenmocolor_blue3.getFillColor() - null - - - 1747229984708 - gr_energyHubPresentation - 2600 - -2200 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1747229957336 - pop_UI_EnergyHub_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 52.565832561661324 - 6.28960063917648 - - - - - 1724074923402 - gr_logos - 940 - -10 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074980260 - rect_logoBackground - -960 - -70 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1960 - 160 - 0.0 - 682673374 - v_backgroundColor - null - - - 1724074987235 - image_tueLogo - 730 - 25 - - true - true - false - SHAPE_DRAW_2D3D - getExperimentHost().openWebSite("https://www.tue.nl/en/"); - false - 0 - 205.802 - 60 - 0.0 - - - zerointerfaceloader - logo_TUe_red.png - - - zerointerfaceloader - logo_TUe_white.png - - - false - - - 1731938214224 - image_luxLogo - -858 - 13 - - true - true - false - SHAPE_DRAW_2D3D - //Go to website on click -getExperimentHost().openWebSite("https://lux.energy/"); - - false - 0 - 216 - 90.947 - 0.0 - - - zerointerfaceloader - logo_lux-energy-twin.png - - - false - - - 1758877617096 - image_zenmoLogo - 532 - 16 - - true - true - false - SHAPE_DRAW_2D3D - getExperimentHost().openWebSite("https://zenmo.com/"); - false - 0 - 170 - 73 - 0.0 - - - zerointerfaceloader - logo_zenmo.png - - - false - - - - - 1665052211228 - rect_mainFunctions - -700 - 0 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 680 - 1060 - 0.0 - -1 - null - - - 1705481955546 - rect_simulationEngine - -270 - 860 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 250 - 200 - 0.0 - -1 - null - - - 1665052603927 - rect_input - -700 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16744448 - null - SOLID - 169 - 40 - 0.0 - -1 - null - - - 1665052191319 - t_input - -640 - 5 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16744448 - Input - - SansSerif - 18 - - - LEFT - - - 1690205003572 - line_simulationEngine - -230 - 890 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 170 - 0 - 0 - - - 1690205003577 - t_simulationEngine - -151 - 870 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simulation engine - - SansSerif - 14 - - - CENTER - - - 1690975123923 - t_date - 420 - 54 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Datum - energyModel.v_isRapidRun ? f_getDateString() : f_getDateAndTimeString() - - SansSerif - 16 - - - LEFT - - - 1696520897606 - gr_zoomButton - 1330 - 680 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1696520897608 - arc_zoomIn - -2.5319999999999965 - -20.114000000000004 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -13882324 - null - SOLID - 0 - 0.0 - 17.53 - 40 - -179.1999969482422 - 178.1999969482422 - -13882324 - null - - - 1696520897610 - arc_zoomOut - -2.483000000000004 - 8.137 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -13882324 - null - SOLID - 0 - 0.0 - 17.483 - 40 - 1.2000000476837158 - 178.1999969482422 - -13882324 - null - - - 1696520897612 - rect_zoomButton - -20 - -20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -13882324 - null - SOLID - 35 - 28 - 0.0 - -13882324 - null - - - 1696520897614 - line_zoomButtonSeperator - -16 - -5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 1 - 0 - 1 - 0 - 27 - 0 - 0 - - - 1696520897616 - line_zoomIn1 - -9 - -21 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 12 - 0 - 0 - - - 1696520897618 - line_zoomIn2 - -3 - -27 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 12 - 0 - - - 1696520897620 - line_zoomOut - -10 - 8 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 15 - 0 - 0 - - - 1696520897622 - rect_zoomIn - -20 - -35 - - true - true - false - SHAPE_DRAW_2D3D - map.zoomIn(); - false - 0 - 10 - 1 - - null - SOLID - 35 - 30 - 0.0 - - null - - - 1696520897624 - rect_zoomOut - -20 - -5 - - true - true - false - SHAPE_DRAW_2D3D - map.zoomOut(); - false - 0 - 10 - 1 - - null - SOLID - 35 - 30 - 0.0 - - null - - - - - 1696837759915 - t_legendaColors - 380 - 1020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Legenda Colors - - SansSerif - 18 - - - LEFT - - - 1696863329245 - t_mapClickingFunctions - 40 - 1020 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Map connections and clicking - - SansSerif - 18 - - - LEFT - - - 1702552223737 - t_stylingFunctions - -680 - 301 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Interface styling: - - SansSerif - 14 - - - LEFT - - - 1704210756310 - gr_clickedObjectInfo - 370 - 220 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1713259123999 - rect_clickedObjectInfo - 40 - -131 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - zenmocolor_blue3.getFillColor() - null - SOLID - 555 - 20 - 0.0 - -1 - zenmocolor_blue3.getFillColor() - null - - - 1701879145306 - t_clickedObjectInfo - 321 - -129 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer een gebouw - v_clickedObjectText.equals("None") ? -"Selecteer een gebouw of trafostation" : -v_clickedObjectText - - SansSerif - 12 - - - CENTER - - - - - 1705663500141 - t_buildingColors - 680 - 1030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Building colors - - SansSerif - 14 - - - LEFT - - - 1705663820235 - t_gridnodeColors - 1022 - 1030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - GridNode colors - - SansSerif - 14 - - - LEFT - - - 1705664522164 - t_specificBuildingColors - 680 - 1250 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Specific building colors - - SansSerif - 14 - - - LEFT - - - 1705667994053 - t_areaColors - 1300 - 1180 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Area colors - - SansSerif - 14 - - - LEFT - - - 1706004011983 - txt_generalColors - 1300 - 1030 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - General styling - - SansSerif - 14 - - - LEFT - - - false - 1708522580070 - button_goToUI - 1140 - 87 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - if(energyModel.v_rapidRunData != null){ - switch(v_clickedObjectType){ - - case BUILDING: - uI_Company.f_setCompanyUI(c_selectedGridConnections.get(0)); - uI_Company.va_companyUI.navigateTo(); - v_currentViewArea = uI_Company.va_companyUI; - break; - - case ELECTROLYSER: - //uI_Hydrogen.f_setHydrogenUI(c_selectedGridConnections.get(0)); - uI_Hydrogen.va_hydrogenUI.navigateTo(); - v_currentViewArea = uI_Hydrogen.va_hydrogenUI; - break; - - case BATTERY: - //uI_Battery.f_setBatteryUI(c_selectedGridConnections.get(0)); - uI_Battery.va_batteryUI.navigateTo(); - v_currentViewArea = uI_Battery.va_batteryUI; - break; - - case SOLARFARM: - case WINDFARM: - case CHARGER: - default: - break; - } -} -else{ - f_setErrorScreen("Je kan alleen naar de companyUI gaan als er een jaar simulatie is voltooid.", 0, 0); -} - - - - - Ga naar bedrijfs interface - - - - 1708595212229 - txt_additionalUIs - -290 - 370 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Additional UIs: - - SansSerif - 14 - - - LEFT - - - false - 1709718299889 - rb_scenarios_template - 19.333 - 144.667 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - false - true - f_scenarioRadioButtonAction(); - - - - 0 - VERTICAL - - - - false - - - - 1709718299891 - t_scenarios - 19.333 - 118.667 - - true - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer een scenario - - Calibri - 20 - - - LEFT - - - 1709718299897 - gr_scenarioDescription - 199.333 - 374.667 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1709718299901 - t_scenarioDescription - 0.667 - -24.667 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Het huidige scenario bevat de energie dynamieken van dit moment. -Dit omvat o.a. de huidige zonnepanelen op de daken van huizen en -bedrijven, het aantal voertuigen per type, de electriciteitsconsumptie -van het gebied, en de huidige gasconsumptie voor verwarming. - - SansSerif - 11 - - - CENTER - - - 1709718299903 - t_scenarioName - 0 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Huidig scenario - - Calibri - 16 - - - CENTER - - - - - 1710174312959 - t_resultsUIFunctions - -680 - 730 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Results UI initialization - - SansSerif - 14 - - - LEFT - - - 1713429772427 - t_scenarioDictionaries - -290 - 290 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Scenario dictionaries - - SansSerif - 12 - - - LEFT - - - 1713431901010 - t_initializationFunctions - -680 - 150 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Interface initialization functions - - SansSerif - 14 - - - LEFT - - - 1715951689412 - t_inputParameters - -680 - 50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Input Parameters - - SansSerif - 14 - - - LEFT - - - false - 1716988295617 - button_gotoEngine - -260 - 960 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - energyModel.va_engine.navigateTo(); - - - - Go to Engine - - - - 1719217632486 - line_ordereringDescription - 40 - -755 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 1 - 0 - 1 - 0 - 210 - 0 - 0 - - - 1719217632488 - t_ordereringDescription - 40 - -780 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Initial conditions & ordering - - SansSerif - 16 - - - LEFT - - - 1719829894799 - t_outsideTemperature - 1326 - 17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -7631989 - Buitentemperatuur: 23 graden - "Buiten temperatuur " + v_outsideTemperature + " graden" - - Cambria - 10 - - - RIGHT - - - 1719829988146 - t_solarIrradiance - 1326 - 42 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -7631989 - Zonne instraling: 12 w/m2 - "Zonneinstraling " + v_solarIrradiance + " W/m2" - - Cambria - 10 - - - RIGHT - - - 1719829993001 - t_windSpeed - 1326 - 67 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -7631989 - Windsnelheid: hoog - "Windsnelheid: " + v_windspeed - - Cambria - 10 - - - RIGHT - - - 1719847144211 - plot_outsideTemperature - 1335 - 12 - - true - true - false - SHAPE_DRAW_2D3D - true - - 1751013532916 - true - 1719907200000 - - 0 - HOUR - - - 1 - HOUR - - - false - 84 - 23 - - -16777216 - - 0 - 0 - 84 - 23 - -1 - -16777216 - -6632142 - - - SOUTH - -16777216 - 30 - - - NONE - NONE - -10496 - - false - MOVEMENT_WITH_TIME - MODEL_TIME_UNIT - -5 - 28 - FIXED - true - LINEAR - - Title - 1719847144208 - my_dataset - -16776961 - v_outsideTemperature - true - NONE - 1.0 - - 96 - 96 - true - HH_mm - - - 1719848137592 - plot_solarIrradiance - 1335 - 38 - - true - true - false - SHAPE_DRAW_2D3D - true - - 1751013532918 - true - 1719907200000 - - 0 - HOUR - - - 1 - HOUR - - - false - 84 - 23 - - -16777216 - - 0 - 0 - 84 - 23 - -1 - -16777216 - -6632142 - - - SOUTH - -16777216 - 30 - - - NONE - NONE - -10496 - - false - MOVEMENT_WITH_TIME - MODEL_TIME_UNIT - 0 - 1000 - FIXED - true - LINEAR - - Title - 1719848137589 - my_dataset - -10496 - v_solarIrradiance - true - NONE - 1.0 - - 96 - 96 - true - HH_mm - - - 1720909739871 - gr_multipleBuildingInfo - 1040 - 55 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - false - 1720904897811 - button_nextBuilding - -65 - 32 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - v_selectedGridConnectionIndex < v_nbGridConnectionsInSelectedBuilding - if (v_selectedGridConnectionIndex < v_nbGridConnectionsInSelectedBuilding ){ - v_selectedGridConnectionIndex += 1; - - c_selectedGridConnections = new ArrayList<>(); - - if(v_customEnergyCoop != null){ - energyModel.f_removeEnergyCoop(v_customEnergyCoop); - v_customEnergyCoop = null; - } - - if( v_selectedGridConnectionIndex > 0){ - c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } - /* - else { - c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - */ - /* - //Update the resultsUI - f_updateUIResultsData(); - */ - - //Set dashboard UI button - f_setUIButton(); -} - - - - Toon volgend adres - - - - false - 1720904921271 - button_previousBuilding - -65 - 53 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - v_selectedGridConnectionIndex > 0 - if (v_selectedGridConnectionIndex > 0){ - c_selectedGridConnections = new ArrayList<>(); - v_selectedGridConnectionIndex -= 1; - - if( v_selectedGridConnectionIndex > 0){ - c_selectedGridConnections.add(c_selectedObjects.get(0).c_containedGridConnections.get(v_selectedGridConnectionIndex -1)); - uI_Results.f_updateResultsUI(c_selectedGridConnections.get(0)); - } - else { - c_selectedGridConnections.addAll(c_selectedObjects.get(0).c_containedGridConnections); - - v_customEnergyCoop = energyModel.f_addEnergyCoop(c_selectedGridConnections); - uI_Results.f_updateResultsUI(v_customEnergyCoop); - } - - /* - //Update the resultsUI - f_updateUIResultsData(); - */ - - //Set dashboard UI button - f_setUIButton(); -} - - - - - - - Toon vorig adres - - - - 1720908988631 - t_multipleBuildingInfo - -360 - 57 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Je kijkt naar de som van alle 5 addressen samen in het geselecteerde pand - v_selectedGridConnectionIndex > 0 && c_selectedGridConnections.size() > 0 && c_selectedGridConnections.get(0).p_owner.p_detailedCompany ? -"Je kijkt naar: " + c_selectedGridConnections.get(0).p_ownerID + ", " + c_selectedGridConnections.get(0).p_address.getAddress() -: -v_selectedGridConnectionIndex > 0 ? -"Je kijkt naar het " + (v_selectedGridConnectionIndex ) + "e adres in het geselecteerde pand" -: -"Je kijkt naar de som van alle " + v_nbGridConnectionsInSelectedBuilding + " addressen in dit pand" - - SansSerif - 11 - - - CENTER - - - - - 1721819768547 - rect_CustomColors - 1880 - 1400 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -10496 - null - SOLID - 630 - 610 - 0.0 - -1 - null - - - 1721819794985 - txt_mapOverlayFunctionalities - 1900 - 1410 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Map Overlay Functionalities - - - SansSerif - 18 - - - LEFT - - - 1722252542596 - uI_Tabs_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 52.51902183517265 - 6.169494834925871 - - - 1724419174775 - rect_scenarioText - -1210 - 0 - - false - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 460 - 700 - 0.0 - -1 - null - - - 1724419379552 - txt_scenarioFunctions - -1190 - 20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Scenario functions, text and settings - - SansSerif - 14 - - - LEFT - - - false - 1725017697644 - checkbox_cabels - 20 - 460 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - for(GISRoute GISCable : c_LVCables){ - GISCable.setVisible(b_showCables); -} - -for(GISRoute GISCable : c_MVCables){ - GISCable.setVisible(b_showCables); -} - - - - - Toon stroom kabels - false - true - b_showCables - - - - 1725020138710 - map - 410 - 130 - - true - true - false - true - SHAPE_DRAW_2D3D - if(b_inEnergyHubMode ){ - if(b_inEnergyHubSelectionMode){ - f_selectEnergyHubGC(clickx, clicky); - } -} -else if(b_inManualFilterSelectionMode){ - f_selectManualFilteredGC(clickx, clicky); -} -else{ - if (uI_Tabs.pop_tabEHub.size() > 0 && uI_Tabs.pop_tabEHub.get(0).b_NFATOListener) { - uI_Tabs.pop_tabEHub.get(0).f_checkGISRegion(clickx, clicky); - } - else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || - c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ - f_selectGridLoop(clickx, clicky); - } - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - f_selectNeighborhood(clickx, clicky); - } - } - - else { - if(c_selectedFilterOptions.size() > 0){ - f_removeAllFilters(); - } - f_selectGISRegion(clickx, clicky); - } -} - false - 1000 - 620 - if(b_inEnergyHubMode ){ - if(b_inEnergyHubSelectionMode){ - f_selectEnergyHubGC(clickx, clicky); - } -} -else if(b_inManualFilterSelectionMode){ - f_selectManualFilteredGC(clickx, clicky); -} -else{ - if (uI_Tabs.pop_tabEHub.size() > 0 && uI_Tabs.pop_tabEHub.get(0).b_NFATOListener) { - uI_Tabs.pop_tabEHub.get(0).f_checkGISRegion(clickx, clicky); - } - else if (c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) || - c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP)){ - f_selectGridLoop(clickx, clicky); - } - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD)){ - f_selectNeighborhood(clickx, clicky); - } - } - - else { - if(c_selectedFilterOptions.size() > 0){ - f_removeAllFilters(); - } - f_selectGISRegion(clickx, clicky); - } -} - - 52.539123187983904 - 6.173604854475837 - 25000 - -4144960 - -1 - true - false - https://a.tile.openstreetmap.org/[zoom]/[x]/[y].png - WEB_SERVICE - CREATE_STRAIGHT_LINE - CAR - FASTEST - DIJKSTRABI - false - - - true - 1000 - - - 1725456122345 - txt_sliderInitialization - -680 - 551 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Slider Initialization - - SansSerif - 14 - - - LEFT - - - 1725525689286 - txt_GISObjectCreationFunctions - -290 - 60 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - GIS Object creation functions - - SansSerif - 14 - - - LEFT - - - 1730113808401 - gr_uI_Results_presentation - 1440 - 230 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1716193014596 - uI_Results_presentation - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - AUTOMATICALLY_CALCULATED - 1000 - 1000000000 - 52.52173648990926 - 6.109451573117503 - - - - - 1734442437753 - rect_filterFunctions - -1620 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 360 - 630 - 0.0 - -1 - null - - - 1734443343976 - t_selectionColors - 380 - 1050 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selection colors - - SansSerif - 14 - - - LEFT - - - 1734443865835 - txt_filterFunctions - -1580 - 20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Filter Functions - - SansSerif - 14 - - - LEFT - - - false - 1734444497900 - cb_showFilterInterface - 20 - 480 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - cb_showFilterInterface.isEnabled() - true - !settings.isPublicModel() && c_cbFilterOptions.size() > 0 - gr_filterInterface.setVisible(cb_showFilterInterface.isSelected()); - -if(!cb_showFilterInterface.isSelected()){ - button_clearFilters.action(); - gr_sliderClickBlocker.setVisible(false); -} -else{ - gr_sliderClickBlocker.setVisible(true); - gr_filterInterface.setPos(170, 710); -} - - - - Filter opties - false - - - - 1734444441402 - gr_filterInterface - -1470 - 830 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1734443987142 - rect_filterInterface - -150 - -180 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 350 - 350 - 0.0 - -1 - null - - - 1734443492902 - txt_filterDescription - -130 - -140 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selecteer gebouwen: - - SansSerif - 12 - - - LEFT - - - false - 1734442617547 - cb_filterOptions - -10 - -140 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - true - !gr_ForceMapSelectionText.isVisible() - f_setFilter(map_UINamesFilterOption.get(cb_filterOptions.getValue())); - -cb_filterOptions.setValueIndex(0); - - - - false - - - - - - - - - - - false - - - - 1734443541801 - txt_activeFilters - -130 - -110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geen Actieve Filters. - !t_activeFilters.getText().equals("") ? "Actieve filters:" : "Geen Actieve Filters." - - SansSerif - 12 - - - LEFT - - - 1734444104065 - t_activeFilters - -130 - -90 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 12 - - - LEFT - - - 1734444671650 - txt_filterInterface - 25 - -170 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Filter opties - - SansSerif - 14 - - - CENTER - - - false - 1734446701124 - button_clearFilters - 40 - 130 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - c_filterSelectedGridLoops.clear(); -c_filterSelectedNeighborhoods.clear(); -c_manualFilterSelectedGC.clear(); -c_manualFilterDeselectedGC.clear(); -b_inManualFilterSelectionMode = false; -if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); -} - -f_setForcedClickScreenText(""); -if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); -} - -f_removeAllFilters(); -traceln("Alle filters zijn verwijderd."); - - - - Verwijder alle filters - - - - 1734524446136 - t_selectedGridLoop - -130 - 140 - - true - true - false - SHAPE_DRAW_2D - c_selectedFilterOptions.contains(OL_FilterOptionsGC.GRIDTOPOLOGY_SELECTEDLOOP) - false - 0 - 0.0 - -16777216 - - c_filterSelectedGridLoops.size() == 1 ? "Geselecteerde lus: " + c_filterSelectedGridLoops.get(0).p_gridNodeID : c_filterSelectedGridLoops.size() > 1 ? "Meerdere lussen geselecteerd." : "Geen lus geselecteerd." - - SansSerif - 12 - - - LEFT - - - 1737640715642 - t_selectedNBh - -130 - 117 - - true - true - false - SHAPE_DRAW_2D - c_selectedFilterOptions.contains(OL_FilterOptionsGC.SELECTED_NEIGHBORHOOD) - false - 0 - 0.0 - -16777216 - - c_filterSelectedNeighborhoods.size() == 1 ? "Geselecteerde buurt: " + c_filterSelectedNeighborhoods.get(0).p_id : c_filterSelectedNeighborhoods.size() > 1 ? "Meerdere buurten geselecteerd." : "Geen buurt geselecteerd." - - SansSerif - 12 - - - LEFT - - - false - 1742227694564 - button_removeManualSelection - 40 - 85 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - !(c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty()) - if(c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - c_manualFilterSelectedGC.clear(); - c_manualFilterDeselectedGC.clear(); - - f_setForcedClickScreenText(""); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); - } - - b_inManualFilterSelectionMode = false; - if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); - } -} - - - - Wis handmatige selectie - - - - false - 1743092954558 - button_manualFilterSelection - 40 - 50 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - user.GCAccessType == OL_UserGCAccessType.FULL && (!gr_ForceMapSelectionText.isVisible() || b_inManualFilterSelectionMode) - if(!b_inManualFilterSelectionMode){ - b_inManualFilterSelectionMode = true; - - f_setForcedClickScreenText("(De)Selecteer gebouwen"); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(true); - } - - if(!c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); - } -} -else{ - b_inManualFilterSelectionMode = false; - - f_setForcedClickScreenText(""); - if(!b_inEnergyHubSelectionMode){ - f_setForcedClickScreenVisibility(false); - } - - if (c_manualFilterSelectedGC.isEmpty() && c_manualFilterDeselectedGC.isEmpty() && c_selectedFilterOptions.contains(OL_FilterOptionsGC.MANUAL_SELECTION)){ - f_setFilter(OL_FilterOptionsGC.MANUAL_SELECTION); - } -} - - - - Handmatige selectie - b_inManualFilterSelectionMode ? "Selectie voltooien" : "Handmatige selectie" - - - - - - 1736337963311 - gr_errorScreen - 3380 - -100 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1736344526647 - rect_errorScreenGrayOut - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - //traceln(); - false - 0 - 10 - 1 - -2049715245 - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - - - 1736443451929 - rect_errorScreenClickBlocking - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - double click_block = 0; - false - 0 - 10 - 1 - -2049715245 - null - null - SOLID - 1920 - 980 - 0.0 - -2049715245 - null - null - - - 1747320252784 - rect_errorMessage - 690 - 380 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 4 - -65536 - null - SOLID - 540 - 200 - 0.0 - -1 - null - 10 - - - 1736337707551 - t_errorMessage - 960 - 430 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - TYPE YOUR ERROR MESSAGE HERE - - SansSerif - 24 - - - CENTER - - - 1736338014404 - button_errorOK - 960 - 550 - - true - true - false - SHAPE_DRAW_2D3D - gr_errorScreen.setVisible(false); - false - 0 - 0.0 - - - 1736338014406 - rect_errorOK - -60 - -20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 120 - 40 - 0.0 - -1 - null - - - 1736338014408 - txt_errorOK - 0 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Ok - - SansSerif - 18 - - - CENTER - - - - - - - 1742482935391 - gr_sliderClickBlocker - -440 - -1860 - - true - false - false - true - SHAPE_DRAW_2D3D - 200 - 750 - false - 0 - 0.0 - - - 1742482847835 - rect_sliderClickBlocker - -200 - -240 - - true - true - false - SHAPE_DRAW_2D3D - int clickBlocker; - false - 0 - 10 - 1 - - null - SOLID - 400 - 470 - 0.0 - -1 - new Color(255, 255, 255, 0) - null - - - 1742482890780 - rect_sliderClickBlocker2 - -200 - -240 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 400 - 470 - 0.0 - 16777215 - null - - - - - 1744624088806 - gr_writeDataToExcel - true - -410 - -730 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1744624088808 - rect_exportToExcelFunctions - -190 - -120 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 450 - 530 - 0.0 - -1 - null - - - false - 1744624088810 - fileChooser_exportBalanceLoadEnergyModel - -156 - -30 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - false - fileChooser_exportBalanceLoadEnergyModel.setEnabled(false); - - - - Klik om kwartierwaarden excel te downloaden (Totaal gebied) - DOWNLOAD - .xlsx, .xls - Export_ModelData.xlsx - - - - false - 1744624088812 - button_exportBalanceLoadEnergyModel - -156 - -70 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - f_setAllFileDownloadersDisabled(); - -f_harvestEnergyModelLoadData(); - -fileChooser_exportBalanceLoadEnergyModel.setEnabled(true); - - - - Schrijf kwartierwaarden naar excel (hele gebied) - - - - 1744624088814 - txt_writeToExcelFunctions - -150 - -100 - - true - true - false - true - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Write data to excel (Un-ignore if you want to use this) - - SansSerif - 14 - - - LEFT - - - false - 1744624088816 - button_exportBalanceLoadSelectedCompanies - -156 - 170 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - c_selectedGridConnections.size() > 0 && c_selectedGridConnections.size()< p_maxNrSelectedGCForExport + 1 - f_setAllFileDownloadersDisabled(); - -f_harvestSelectedGCLoadData(); - -fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(true); - - - - Schrijf kwartierwaarden naar excel (Geselecteerde bedrijven) - - - - false - 1744624088818 - fileChooser_exportBalanceLoadSelectedCompanies - -156 - 210 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - false - fileChooser_exportBalanceLoadSelectedCompanies.setEnabled(false); - - - - Klik om kwartierwaarden excel te downloaden (Geselecteerde bedrijven) - DOWNLOAD - .xlsx, .xls - Export_ModelData.xlsx - - - - false - 1744624088820 - fileChooser_exportBalanceLoadSelectedEnergyCoop - -156 - 90 - - true - true - false - SHAPE_DRAW_2D3D - - false - -1 - -16777216 - false - fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(false); - - - - Klik om kwartierwaarden excel te downloaden (Totaal geselecteerde COOP) - DOWNLOAD - .xlsx, .xls - Export_ModelData.xlsx - - - - false - 1744624088822 - button_exportBalanceLoadSelectedEnergyCoop - -156 - 50 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - c_selectedGridConnections.size() > 1 && v_customEnergyCoop != null - f_setAllFileDownloadersDisabled(); - -f_harvestTotalBalanceLoadOfSelectedEnergyCoop(); - -fileChooser_exportBalanceLoadSelectedEnergyCoop.setEnabled(true); - - - - Schrijf kwartierwaarden naar excel (Totaal van Geselecteerde Coop) - - - - - - 1745935981029 - txt_dataAccesibilityFunctionalities - -680 - 845 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Data Accesibility Functionalities - - SansSerif - 12 - - - LEFT - - - 1746110300955 - rect_ìnfoBubbleFunctions - -2070 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 360 - 350 - 0.0 - -1 - null - - - 1746110305368 - txt_infoBubbleFunctions - -2040 - 30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Info Bubble Functions - - SansSerif - 14 - - - LEFT - - - 1746187848442 - gr_publicVersionWarningMessage - 460 - -2160 - - true - true - false - SHAPE_DRAW_2D3D - 740 - 40 - settings.isPublicModel() - false - 0 - 0.0 - - - 1746027175818 - txt_publicVersion - -20 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -65536 - Dit is een publieke versie met beperkte functionaliteiten - - SansSerif - 24 - - - CENTER - - - 1746187821228 - i_publicVersionWarningMessage - 304 - -14 - - true - true - false - SHAPE_DRAW_2D3D - f_setInfoText(i_publicVersionWarningMessage, v_infoText.publicVersionWarning, i_publicVersionWarningMessage.getX() + gr_publicVersionWarningMessage.getX(), i_publicVersionWarningMessage.getY() + gr_publicVersionWarningMessage.getY()); - false - 0 - 20 - 20 - 0.0 - - - zerointerfaceloader - icon_i.png - - - false - - - - - 1750078687228 - rect_dynamicLegend - 1360 - 1400 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -65536 - null - SOLID - 470 - 310 - 0.0 - -1 - null - - - 1750078716831 - txt_dynamicLegend - 1380 - 1420 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Dynamic legend functionality - - SansSerif - 18 - - - LEFT - - - 1752231354833 - txt_visualObjects - -290 - 140 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - GIS Objects pure for visuals - - SansSerif - 14 - - - LEFT - - - 1746110287596 - gr_infoText - -2260 - 360 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1746110662246 - rect_infoText - 0 - 0 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 620 - 170 - 0.0 - -1 - null - 10 - - - 1746110287600 - gr_closeInfoText - 600 - 20 - - true - true - false - SHAPE_DRAW_2D3D - p_currentActiveInfoBubble.clear(); -gr_infoText.setVisible(false); - false - 0 - 0.0 - - - 1746110287602 - oval_closeInfoText - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 12 - 40 - 0.0 - -12566464 - null - - - 1746110287604 - line_closeInfoText1 - -6 - 6 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 1 - 0 - 1 - 0 - 12 - -12 - 0 - - - 1746110287606 - line_closeInfoText2 - 6 - 6 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -1 - null - SOLID - 1 - 0 - 1 - 0 - -12 - -12 - 0 - - - - - 1746110287608 - t_infoTextHeader - 20 - 20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Extra Informatie - - Calibri - 18 - - - LEFT - - - 1746110287610 - t_infoTextDescription - 20 - 50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat -nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui -officia deserunt mollit anim id est laborum." - - SansSerif - 14 - - - LEFT - - - - - 1742296970246 - gr_forceMapSelection - 1080 - -1480 - - true - false - false - SHAPE_DRAW_2D3D - 960 - 500 - false - 0 - 0.0 - - - 1742297070582 - rect_forceMapSelectionClickBlocker1 - -960 - -500 - - true - true - false - SHAPE_DRAW_2D3D - int clickblocker; - false - 0 - 10 - 1 - - null - SOLID - 410 - 980 - 0.0 - 16777215 - null - - - 1742297242137 - rect_forceMapSelectionClickBlocker2 - -550 - -500 - - true - true - false - SHAPE_DRAW_2D3D - int clickblocker; - false - 0 - 10 - 1 - - null - SOLID - 1000 - 130 - 0.0 - 16777215 - null - - - 1742297244098 - rect_forceMapSelectionClickBlocker3 - -550 - 250 - - true - true - false - SHAPE_DRAW_2D3D - int clickblocker; - false - 0 - 10 - 1 - - null - SOLID - 1000 - 230 - 0.0 - 16777215 - null - - - 1742297246008 - rect_forceMapSelectionClickBlocker4 - 450 - -500 - - true - true - false - SHAPE_DRAW_2D3D - int clickblocker; - false - 0 - 10 - 1 - - null - SOLID - 510 - 980 - 0.0 - 16777215 - null - - - 1742296784951 - rect_forceMapSelection1 - -960 - -620 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 410 - 1200 - 0.0 - -1765752640 - v_forcedClickScreenColor - null - - - 1742296859875 - rect_forceMapSelection2 - -550 - -620 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1000 - 250 - 0.0 - -1765752640 - v_forcedClickScreenColor - null - - - 1742296941081 - rect_forceMapSelection3 - -550 - 250 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1000 - 330 - 0.0 - -1765752640 - v_forcedClickScreenColor - null - - - 1742296952388 - rect_forceMapSelection4 - 450 - -620 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 510 - 1200 - 0.0 - -1765752640 - v_forcedClickScreenColor - null - - - 1753446087501 - gr_ForceMapSelectionText - -40 - -320 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1742300401759 - rect_selectText - -440 - -40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 2 - -16777216 - null - SOLID - 860 - 70 - 0.0 - -1 - null - 10 - - - false - 1753445072603 - button_completeManualSelectionMode - 220 - -30 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - gr_ForceMapSelectionText.isVisible() && b_inManualFilterSelectionMode - true - button_completeManualSelectionMode.isVisible() - if(b_inManualFilterSelectionMode){ - button_manualFilterSelection.action(); -} - - - - Voltooi handmatige selectie - - - - 1742300418297 - t_forcedClickMessage - -10 - -30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - - - SansSerif - 36 - - - CENTER - - - - - 1760015470890 - gr_energyHubSelectionButtons - 10 - -240 - - true - true - false - SHAPE_DRAW_2D - b_inEnergyHubSelectionMode //&& gr_forceMapSelection.isVisible() - false - 0 - 0.0 - - - 1760020289242 - gr_completeEnergyHubSelection_grayedOut - -770 - 550 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - - - 1760020289244 - button_completeSelection_grayedOut - -140 - -40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 3 - -8355712 - null - SOLID - 275 - 75 - 0.0 - -2302756 - null - 10 - - - 1760020289246 - txt_completeEnergyHubSelection_grayedOut - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -8355712 - Voltooien - - SansSerif - 28 - - - CENTER - - - - - 1760015470892 - gr_completeEnergyHubSelection - -770 - 550 - - true - true - false - SHAPE_DRAW_2D - c_selectedGridConnections.size()>1 - f_finalizeEnergyHubConfiguration(); - false - 0 - 0.0 - - - 1760015470894 - button_completeSelection - -140 - -40 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 275 - 75 - 0.0 - -1 - null - 10 - - - 1760015470896 - txt_completeEnergyHubSelection - 0 - -20 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Voltooien - - SansSerif - 28 - - - CENTER - - - - - 1760015470898 - gr_energieHubConfiguratorTxt - -60 - -190 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - - - 1760015470900 - rect_energyHubConfigurator - -500 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 2 - -16777216 - uI_EnergyHub.p_energyHubLineColor - null - SOLID - 1000 - 90 - 0.0 - -1 - uI_EnergyHub.p_energyHubBackGroundColor - null - 10 - - - 1760015470902 - txt_energyHubConfigurator - 0 - -35 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energie Hub Configurator - - SansSerif - 48 - - - CENTER - - - - - 1760015470904 - gr_cancelEnergyHubConfiguration - -820 - 630 - - true - true - false - SHAPE_DRAW_2D - f_cancelEnergyHubConfiguration(); - false - 0 - 0.0 - - - 1760015470906 - button_cancelEnergyHubConfiguration - -90 - -30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 10 - 3 - -2345659 - null - SOLID - 275 - 75 - 0.0 - -1 - null - 10 - - - 1760015470908 - txt_cancelEnergyHubConfiguration - 48 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Annuleer - - SansSerif - 28 - - - CENTER - - - - - - - - - 1753440008648 - gr_supportFunctions - -540 - -110 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1716419413991 - rect_supportFunctions - -140 - -80 - - true - true - false - true - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 300 - 160 - 0.0 - -1 - null - - - 1716419425042 - t_supportFunctions - -120 - -70 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Support functions - - SansSerif - 14 - - - LEFT - - - - - 1701951640330 - gr_legenda - 910 - 880 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1701951640332 - rect_legendaBackground - true - -510 - -110 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 1020 - 210 - 0.0 - -542254 - zenmocolor_red3.getFillColor() - null - - - 1701951640336 - rect_legenda - -500 - -90 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -6632142 - zenmocolor_blue3.getFillColor() - null - SOLID - 1000 - 183 - 0.0 - -1 - null - - - 1701951640338 - t_legenda - -470 - -110 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Legenda - - Calibri - 18 - - - LEFT - - - 1701951640396 - line_legendaSeperator1 - -165 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 140 - 0 - - - 1724074247375 - line_legendaSeperator2 - -10 - -70 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 0 - 140 - 0 - - - 1724074154126 - gr_infrastructure - -340 - 5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074154148 - t_infrastructure - -60 - -79 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Infrastructuur - - Calibri - 16 - - - LEFT - - - 1724074154158 - line_infrastructure - -120 - -59 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 271 - 0 - 0 - - - 1724074839746 - gr_gridnodes - -75 - -19 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074853961 - polyline_congestedGridnode - -55 - 40 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - v_gridLineColorCongested - null - SOLID - 1 - 0 - 1 - 0 - - v_gridNodeColorCongested - null - - - 0 - 0 - 0 - - - 10 - -14 - 0 - - - 20 - 0 - 0 - - - 0 - 0 - 0 - - - false - - - 1724074853963 - txt_congestedGridnode - -25 - 25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Trafo overbelast - - SansSerif - 12 - - - LEFT - - - 1724074853967 - polyline_gridnode - -55 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - v_MVLVLineColor - null - SOLID - 1 - 0 - 1 - 0 - - v_MVLVNodeColor - null - - - 0 - 0 - 0 - - - 10 - -14 - 0 - - - 20 - 0 - 0 - - - 0 - 0 - 0 - - - false - - - 1724074853969 - txt_gridnode - -25 - -21 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Trafo stabiel - - SansSerif - 12 - - - LEFT - - - 1724074853971 - polyline_strainedGridnode - -55 - 15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - v_gridNodeLineColorStrained - null - SOLID - 1 - 0 - 1 - 0 - - v_gridNodeColorStrained - null - - - 0 - 0 - 0 - - - 10 - -14 - 0 - - - 20 - 0 - 0 - - - 0 - 0 - 0 - - - false - - - 1724074853973 - txt_strainedGridnode - -25 - 2 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Trafo belast - - SansSerif - 12 - - - LEFT - - - - - 1724074839748 - gr_cables - 75 - 5 - - true - true - false - SHAPE_DRAW_2D3D - b_showCables - false - 0 - 0.0 - - - 1724074864095 - t_HV - true - -15 - 15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - HS-net - - SansSerif - 12 - - - LEFT - - - 1724074864097 - line_HV - true - -40 - 25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -16776961 - v_HVGridColor - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074870571 - t_MV - -15 - -50 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - MS-net - - SansSerif - 12 - - - LEFT - - - 1724074870573 - t_LV - -15 - -25 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - LS-net - - SansSerif - 12 - - - LEFT - - - 1724074870575 - line_LV - -40 - -15 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -6737204 - v_LVGridColor - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074870577 - line_MV - -40 - -40 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 2.5 - -12156236 - v_MVGridColor - null - SOLID - 1 - 0 - 1 - 0 - 10 - 0 - 0 - - - 1724074875518 - t_gasNetwork - true - -15 - -2.5 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Gasnet - - SansSerif - 12 - - - LEFT - - - 1724074875520 - oval_gasNetwork - true - -35 - 5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 5.75 - 40 - 0.0 - -1 - v_gasGridColor - null - - - - - - - 1724074493431 - gr_buildings - 80 - 10 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074500599 - t_buildings - 50 - -84 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Gebouwen - - Calibri - 16 - - - LEFT - - - 1724074502826 - line_buildings - 380 - -64 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - -458 - 0 - 0 - - - 1724074508882 - gr_colorings - -180 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074508886 - txt_colorings - 4 - -71 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Kleur gebouwen o.b.v.: - - SansSerif - 11 - - - CENTER - - - - - - - 1753868816347 - gr_mapOverlayLegenda - 1750 - 840 - - true - true - false - SHAPE_DRAW_2D3D - 70 - 20 - false - 0 - 0.0 - - - 1753868816349 - gr_mapOverlayLegend_ElectricityConsumption - 180 - -10 - - true - false - false - SHAPE_DRAW_2D3D - 0 - -10 - false - 0 - 0.0 - - - 1753868816351 - rect_mapOverlayLegend_ElectricityConsumption1 - -60 - -52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -1 - null - - - 1753868816353 - rect_mapOverlayLegend_ElectricityConsumption2 - -60 - -28 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -32 - null - - - 1753868816355 - rect_mapOverlayLegend_ElectricityConsumption3 - -60 - -4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -263774 - null - - - 1753868816357 - rect_mapOverlayLegend_ElectricityConsumption4 - -60 - 20 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -1063822 - null - - - 1753868816359 - rect_mapOverlayLegend_ElectricityConsumption5 - -60 - 44 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -3318692 - null - - - 1753868816361 - txt_mapOverlayLegend_ElectricityConsumption1 - -20 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 10 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 1500 kWh / jaar" : "< 10 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816363 - txt_mapOverlayLegend_ElectricityConsumption2 - -20 - -28 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 50 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 2500 kWh / jaar" : "< 50 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816365 - txt_mapOverlayLegend_ElectricityConsumption3 - -20 - -3 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 150 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 4000 kWh / jaar" : "< 150 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816367 - txt_mapOverlayLegend_ElectricityConsumption4 - -20 - 21 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 500 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 6000 kWh / jaar" : "< 500 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816369 - txt_mapOverlayLegend_ElectricityConsumption5 - -20 - 45 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - > 500 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "> 6000 kWh / jaar" : "> 500 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - - - 1753868816371 - gr_defaultLegenda - 10 - 10 - - true - true - false - SHAPE_DRAW_2D3D - 10 - 10 - false - 0 - 0.0 - - - 1753868816373 - oval_defaultLegend4 - -60 - 10 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1753868816375 - t_defaultLegend2 - -39.5 - -47.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Gedetaileerd bedrijf - - SansSerif - 12 - - - LEFT - - - 1753868816377 - t_defaultLegend5 - -39.5 - 27.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Overig - - SansSerif - 12 - - - LEFT - - - 1753868816379 - oval_defaultLegend5 - -60 - 35 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1753868816381 - t_defaultLegend3 - -39.5 - -22.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Bedrijf - - SansSerif - 12 - - - LEFT - - - 1753868816383 - oval_defaultLegend2 - -60 - -40 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1753868816385 - t_defaultLegend4 - -39.5 - 2.5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Huis - - SansSerif - 12 - - - LEFT - - - 1753868816387 - oval_defaultLegend3 - -60 - -15 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - null - - - 1753868816389 - t_defaultLegend1 - -39.5 - -72.5 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Selectie - - SansSerif - 12 - - - LEFT - - - 1753868816391 - oval_defaultLegend1 - -60 - -65 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 6.5 - 40 - 0.0 - -1 - v_selectionColor - null - - - - - 1753868816393 - gr_mapOverlayLegend_PVProduction - 380 - 0 - - true - false - false - SHAPE_DRAW_2D3D - 0 - -10 - false - 0 - 0.0 - - - 1753868816395 - rect_mapOverlayLegend_PVProduction1 - -60 - -52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -1 - null - - - 1753868816397 - rect_mapOverlayLegend_PVProduction2 - -60 - -28 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -256 - null - - - 1753868816399 - rect_mapOverlayLegend_PVProduction3 - -60 - -4 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -10496 - null - - - 1753868816401 - txt_mapOverlayLegend_PVProduction1 - -20 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Geen opwek - - SansSerif - 10 - - - LEFT - - - 1753868816403 - txt_mapOverlayLegend_PVProduction2 - -20 - -28 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - < 100 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "< 5000 kWh / jaar" : "< 100 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - 1753868816405 - txt_mapOverlayLegend_PVProduction3 - -20 - -3 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - > 100 MWh / jaar - project_data.project_type() == OL_ProjectType.RESIDENTIAL ? "> 5000 kWh / jaar" : "> 100 MWh / jaar" - - SansSerif - 10 - - - LEFT - - - - - 1753868816407 - gr_mapOverlayLegend_gridNeighbours - 600 - 0 - - true - false - false - SHAPE_DRAW_2D3D - 0 - -10 - false - 0 - 0.0 - - - 1753868816409 - rect_mapOverlayLegend_gridNeighbours1 - -60 - -52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -8355712 - null - - - 1753868816411 - rect_mapOverlayLegend_gridNeighbours2 - -60 - -28 - - true - true - false - SHAPE_DRAW_2D3D - txt_mapOverlayLegend_gridNeighbours2.isVisible() - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -16776961 - null - - - 1753868816413 - rect_mapOverlayLegend_gridNeighbours3 - -60 - -4 - - true - true - false - SHAPE_DRAW_2D3D - txt_mapOverlayLegend_gridNeighbours3.isVisible() - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -65536 - null - - - 1753868816415 - txt_mapOverlayLegend_gridNeighbours1 - -20 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Onbekend - - SansSerif - 10 - - - LEFT - - - 1753868816417 - txt_mapOverlayLegend_gridNeighbours2 - -20 - -28 - - true - true - false - SHAPE_DRAW_2D - v_amountOfDefinedGridLoops > 0 - false - 0 - 0.0 - -16777216 - Lus 1 - - SansSerif - 10 - - - LEFT - - - 1753868816419 - txt_mapOverlayLegend_gridNeighbours3 - -20 - -3 - - true - true - false - SHAPE_DRAW_2D - v_amountOfDefinedGridLoops > 1 - false - 0 - 0.0 - -16777216 - Lus 2 - - SansSerif - 10 - - - LEFT - - - 1753868816421 - rect_mapOverlayLegend_gridNeighbours4 - -60 - 20 - - true - true - false - SHAPE_DRAW_2D3D - txt_mapOverlayLegend_gridNeighbours4.isVisible() - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -16711936 - null - - - 1753868816423 - txt_mapOverlayLegend_gridNeighbours4 - -20 - 20 - - true - true - false - SHAPE_DRAW_2D - v_amountOfDefinedGridLoops > 2 - false - 0 - 0.0 - -16777216 - Lus 3 - - SansSerif - 10 - - - LEFT - - - 1753868816425 - txt_mapOverlayLegend_gridNeighbours5 - -18 - 50 - - true - false - false - SHAPE_DRAW_2D - v_amountOfDefinedGridLoops > 4 - false - 0 - 0.0 - -16777216 - Etc. - - SansSerif - 10 - - - LEFT - - - - - 1753868816427 - gr_mapOverlayLegend_congestion - 800 - 0 - - true - false - false - SHAPE_DRAW_2D3D - 10 - -10 - false - 0 - 0.0 - - - false - 1753868816429 - rb_mapOverlayLegend_congestion - -80 - 5 - - true - true - false - SHAPE_DRAW_2D3D - - false - -16777216 - true - rb_mapOverlay.setValue(rb_mapOverlay.getValue(), true); - - - - VERTICAL - - - - false - - - - 1753868816431 - txt_mapOverlayLegend_congestion3 - -80 - -10 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Type belasting: - - SansSerif - 11 - - - LEFT - - - 1753868816433 - rect_mapOverlayLegend_congestion1 - -80 - -55 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 25 - 15 - 0.0 - -8355712 - null - - - 1753868816435 - txt_mapOverlayLegend_congestion1 - -40 - -55 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Onbekende capaciteit - - SansSerif - 10 - - - LEFT - - - 1753868816437 - i_mapOverlayLegend_congestion_Degrees - 60 - -33 - - true - true - false - SHAPE_DRAW_2D3D - f_setInfoText(i_mapOverlayLegend_congestion_Degrees, v_infoText.i_mapOverlayLegend_congestion_Degrees, i_mapOverlayLegend_congestion_Degrees.getX() + gr_mapOverlayLegend_congestion.getX() + gr_mapOverlayLegenda.getX() + gr_legenda.getX(), i_mapOverlayLegend_congestion_Degrees.getY() + gr_mapOverlayLegend_congestion.getY() + gr_mapOverlayLegenda.getY() + gr_legenda.getY()); - false - 0 - 20 - 20 - 0.0 - - - zerointerfaceloader - icon_i.png - - - false - - - 1753868816439 - gr_rect_mapOverlayLegend_congestion2 - -65 - -25 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1753868816441 - rect_mapOverlayLegend_congestion21 - -15 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 8 - 15 - 0.0 - -16744448 - null - - - 1753868816443 - rect_mapOverlayLegend_congestion22 - -7 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 9 - 15 - 0.0 - -23296 - null - - - 1753868816445 - rect_mapOverlayLegend_congestion23 - 2 - -7 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 8 - 15 - 0.0 - -65536 - null - - - - - 1753868816447 - txt_mapOverlayLegend_congestion2 - -40 - -30 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Stabiel - Overbelast - - SansSerif - 10 - - - LEFT - - - 1753868816449 - i_mapOverlayLegend_congestion_Types - -5 - -12 - - true - true - false - SHAPE_DRAW_2D3D - f_setInfoText(i_mapOverlayLegend_congestion_Types, v_infoText.i_mapOverlayLegend_congestion_Types, i_mapOverlayLegend_congestion_Types.getX() + gr_mapOverlayLegend_congestion.getX() + gr_mapOverlayLegenda.getX() + gr_legenda.getX(), i_mapOverlayLegend_congestion_Types.getY() + gr_mapOverlayLegend_congestion.getY() + gr_mapOverlayLegenda.getY() + gr_legenda.getY()); - false - 0 - 20 - 20 - 0.0 - - - zerointerfaceloader - icon_i.png - - - false - - - - - 1758020855460 - gr_mapOverlayLegend_EnergyLabel - 985 - -5 - - true - false - false - SHAPE_DRAW_2D3D - 10 - -20 - false - 0 - 0.0 - - - 1758020855462 - rect_mapOverlayLegend_EnergyLabelA - -60 - -52 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -16751616 - v_energyLabelAColor - null - - - 1758020855464 - rect_mapOverlayLegend_EnergyLabelB - -60 - -35 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -16744448 - v_energyLabelBColor - null - - - 1758020855466 - rect_mapOverlayLegend_EnergyLabelC - -60 - -18 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -6632142 - v_energyLabelCColor - null - - - 1758020855468 - rect_mapOverlayLegend_EnergyLabelD - -60 - -1 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -10496 - v_energyLabelDColor - null - - - 1758020855470 - rect_mapOverlayLegend_EnergyLabelE - -60 - 16 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -23296 - v_energyLabelEColor - null - - - 1758020855472 - txt_mapOverlayLegend_EnergyLabelA - -20 - -51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel A - - SansSerif - 10 - - - LEFT - - - 1758020855474 - txt_mapOverlayLegend_EnergyLabelB - -20 - -35 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel B - - SansSerif - 10 - - - LEFT - - - 1758020855476 - txt_mapOverlayLegend_EnergyLabelC - -20 - -17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel C - - SansSerif - 10 - - - LEFT - - - 1758020855478 - txt_mapOverlayLegend_EnergyLabelD - -20 - 0 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel D - - SansSerif - 10 - - - LEFT - - - 1758020855480 - txt_mapOverlayLegend_EnergyLabelE - -20 - 17 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel E - - SansSerif - 10 - - - LEFT - - - 1758022404682 - rect_mapOverlayLegend_EnergyLabelF - -60 - 33 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -47872 - v_energyLabelFColor - null - - - 1758022404684 - txt_mapOverlayLegend_EnergyLabelF - -20 - 34 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel F - - SansSerif - 10 - - - LEFT - - - 1758022520158 - rect_mapOverlayLegend_EnergyLabelG - -60 - 50 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -65536 - v_energyLabelGColor - null - - - 1758022520160 - txt_mapOverlayLegend_EnergyLabelG - -20 - 51 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Energielabel G - - SansSerif - 10 - - - LEFT - - - 1758026700134 - rect_mapOverlayLegend_EnergyLabelUnknown - -60 - 67 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -8355712 - null - SOLID - 25 - 15 - 0.0 - -8355712 - v_energyLabelUnknownColor - null - - - 1758026700136 - txt_mapOverlayLegend_EnergyLabelUnknown - -20 - 68 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Onbekend - - SansSerif - 10 - - - LEFT - - - - - - - 1750161603547 - gr_specificGISObjectLegend - 440 - 0 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1724074583633 - rect_specialGISObjectLegend1 - -180 - -40 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1724074583635 - t_specialGISObjectLegend1 - -150 - -40 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079302589 - rect_specialGISObjectLegend2 - -180 - -20 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079302591 - t_specialGISObjectLegend2 - -150 - -20 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079303790 - rect_specialGISObjectLegend3 - -180 - 0 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079303792 - t_specialGISObjectLegend3 - -150 - 0 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079304863 - rect_specialGISObjectLegend4 - -180 - 20 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079304865 - t_specialGISObjectLegend4 - -150 - 20 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079305949 - rect_specialGISObjectLegend5 - -180 - 40 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079305951 - t_specialGISObjectLegend5 - -150 - 40 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750079521906 - rect_specialGISObjectLegend6 - -180 - 60 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750079521908 - t_specialGISObjectLegend6 - -150 - 60 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093126455 - gr_extendedLegend - 170 - 960 - - true - false - false - SHAPE_DRAW_2D3D - 120 - -5 - false - 0 - 0.0 - - - 1750093048056 - rect_extendedLegend_line - true - -100 - -100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - SOLID - 200 - 205 - 0.0 - -542254 - rect_legendaBackground.getFillColor() - null - - - 1760980017754 - rect_extendedLegendLine - -114 - -85 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -6632142 - rect_legenda.getLineColor() - null - SOLID - 204 - 183 - 0.0 - -1 - null - - - 1750092986493 - rect_extendedLegend - -115 - -84.5 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 0 - - null - SOLID - 204 - 182 - 0.0 - -1 - null - - - 1750093291589 - rect_specialGISObjectLegend7 - -90 - -35 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093291591 - t_specialGISObjectLegend7 - -60 - -35 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093292693 - rect_specialGISObjectLegend8 - -90 - -15 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093292695 - t_specialGISObjectLegend8 - -60 - -15 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093293851 - rect_specialGISObjectLegend9 - -90 - 5 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093293853 - t_specialGISObjectLegend9 - -60 - 5 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093295400 - rect_specialGISObjectLegend10 - -90 - 25 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093295402 - t_specialGISObjectLegend10 - -60 - 25 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093296550 - rect_specialGISObjectLegend11 - -90 - 45 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093296552 - t_specialGISObjectLegend11 - -60 - 45 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093324907 - rect_specialGISObjectLegend12 - -90 - 65 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 15 - 15 - 0.0 - -1 - null - - - 1750093324909 - t_specialGISObjectLegend12 - -60 - 65 - - true - false - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Zonneweide - - SansSerif - 12 - - - LEFT - - - 1750093436378 - line - -115 - -49 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - null - SOLID - 1 - 0 - 1 - 0 - 192 - 0 - 0 - - - - - 1750092915668 - t_seeMoreLegend - 0 - -70 - - true - true - false - SHAPE_DRAW_2D - t_specialGISObjectLegend7.isVisible(); - if(!gr_extendedLegend.isVisible()){ - gr_extendedLegend.setVisible(true); - t_seeMoreLegend.setText("Zie minder..."); -} -else{ - gr_extendedLegend.setVisible(false); - t_seeMoreLegend.setText("Zie meer..."); -} - false - 0 - 0.0 - -14774017 - Zie meer... - - SansSerif - 10 - - - LEFT - - - - - - - 1753883303789 - gr_simulateYearScreen - 1920 - 160 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1709717180404 - gr_loadIconYearSimulation - -261 - -25 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 0.0 - - - 1709717180406 - rect_loadIconSmall - -219 - -50 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -1644806 - zenmocolor_blue1.getFillColor() - null - DASHED - 460 - 250 - 0.0 - -369756683 - null - - - 1709717180408 - image_loadIconSmall - -19 - 60 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - zerointerfaceloader - icon_loading.gif - - - false - - - 1709717180410 - t_loadIconSmall - 12 - 15 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Jaar wordt gesimuleerd - - SansSerif - 22 - - - CENTER - - - - - 1709717180367 - gr_simulateYear - 270 - 20 - - true - false - false - SHAPE_DRAW_2D3D - -250 - 20 - false - 0 - 0.0 - - - 1709717180369 - rect_simulateYearScreenSmall - -230 - -95 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - - null - DASHED - 460 - 185 - 0.0 - -1 - zenmocolor_blue2.getFillColor() - null - - - 1709717180371 - gr_simulateYearButton - 10 - 50 - - true - true - false - SHAPE_DRAW_2D3D - f_simulateYearFromMainInterface(); - false - 0 - 0.0 - - - 1709717180373 - t_simulateYearToCalculateCostsSmall - 10 - -60 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Simuleer jaar voor KPI's - - SansSerif - 22 - - - CENTER - - - 1709717180375 - image_simulateYearToCalculateCostsSmall - -200 - -75 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 60 - 60 - 0.0 - - - zerointerfaceloader - icon_greater_than.png - - - false - - - - - - - - - 1758032385328 - txt_cablesAndPipesColors - 380 - 1150 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Cables and pipes colors - - SansSerif - 14 - - - LEFT - - - 1758032461183 - txt_mapOverlayColors - 380 - 1270 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Specific map overlay colors - - SansSerif - 14 - - - LEFT - - - 1758878134333 - zenmocolor_blue3 - 1920 - 1260 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -4069658 - null - - - 1758878337017 - zenmocolor_blue - 1920 - 1020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -16744828 - null - - - 1758878373971 - zenmocolor_blue1 - 1920 - 1100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -14115680 - null - - - 1758878411330 - zenmocolor_yellow - 2020 - 1020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -212480 - null - - - 1758878483028 - zenmocolor_yellow1 - 2020 - 1100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -405954 - null - - - 1758878529753 - zenmocolor_yellow2 - 2020 - 1180 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -402308 - null - - - 1758878532475 - zenmocolor_yellow3 - 2020 - 1260 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -398405 - null - - - 1758878539502 - zenmocolor_red - 1820 - 1020 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -1834917 - null - - - 1758878547235 - zenmocolor_red1 - 1820 - 1100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -1426815 - null - - - 1758878550221 - zenmocolor_red2 - 1820 - 1180 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -886359 - null - - - 1758878552357 - zenmocolor_red3 - 1820 - 1260 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -542254 - null - - - 1758878556881 - zenmocolor_blue2 - 1920 - 1180 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -16777216 - null - SOLID - 80 - 60 - 0.0 - -10502977 - null - - - 1758882933738 - line1 - 10 - 300 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -402308 - null - SOLID - 1 - 0 - 1 - 0 - 375 - 0 - 0 - - - 1758882973077 - line2 - 10 - 440 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -402308 - null - SOLID - 1 - 0 - 1 - 0 - 375 - 0 - 0 - - - 1758882977187 - line3 - 5 - 100 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 1 - -402308 - null - SOLID - 1 - 0 - 1 - 0 - 375 - 0 - 0 - - - 1761138344359 - txt_projectSpecificScenarios - -1190 - 500 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Project specific scenarios - - SansSerif - 14 - - - LEFT - - - 1762354401486 - image_loadingScreenIcon - 3470 - 3040 - 680 - - true - false - false - SHAPE_DRAW_2D3D - false - 0 - 180 - 180 - 0.0 - - - zerointerfaceloader - icon_loading.gif - - - false - - - 1765273010072 - rect_defaultSliderNames - 400 - 2000 - - true - true - false - SHAPE_DRAW_2D3D - false - 0 - 10 - 3 - -16777216 - null - SOLID - 420 - 170 - 0.0 - -1 - null - - - 1765273035274 - txt_defaultSliderNames - 410 - 2010 - - true - true - false - SHAPE_DRAW_2D - false - 0 - 0.0 - -16777216 - Default Slider Names - - SansSerif - 16 - - - LEFT - - - - - 1699290897134 - level1 - 0 - 0 - - true - true - false - SHAPE_DRAW_2D3D - 0 - DIM_NON_CURRENT - - - - - 1696520909213 - va_Interface - 0 - 0 - - false - true - false - - <Width>1920</Width> - <Height>980</Height> - </Area> - <Area> - <Id>1747229303402</Id> - <Name>va_EHubDashboard</Name> - <X>2600</X> - <Y>-2200</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Title/> - <Width>1920</Width> - <Height>980</Height> - </Area> - </Areas> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1726584205735</Id> - <Name>Zero_Loader</Name> - <Import>import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.databind.node.TextNode; -import com.fasterxml.jackson.databind.node.NumericNode; -import com.fasterxml.jackson.core.type.TypeReference; - -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.annotation.JsonAutoDetect; - -import java.io.FileOutputStream; -import java.util.stream.Stream; -import java.util.stream.IntStream; -import java.util.Dictionary.*; -import java.util.Hashtable.*; -import java.util.*; -import java.util.stream.Collectors; -import org.apache.commons.lang3.tuple.Triple; - -import java.io.*; -import java.io.File; -import java.io.IOException; -//import java.util.Date; -import java.text.SimpleDateFormat; -import com.fasterxml.jackson.databind.node.JsonNodeFactory; - - -//Possibility to turn of traceln -import java.io.OutputStream; -import java.io.PrintStream; - -//Import survey API library -import com.zenmo.vallum.Vallum; -import com.zenmo.zummon.companysurvey.TimeSeries; - -import zeroPackage.ZeroMath; -import com.zenmo.zummon.companysurvey.PandIDKt; -import com.zenmo.vallum.PandKt; -import kotlinx.datetime.DateTimeUnit; - -import com.zenmo.zummon.companysurvey.HeatingType; -import com.querydsl.core.types.dsl.CaseBuilder; - -import energy.lux.uplux.*; -import java.util.UUID;</Import> - <Generic>false</Generic> - <GenericParameter> - <Id>1726584205730</Id> - <Name>1726584205730</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>GIS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>false</AutoCreate> - <Id>1658477089958</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1658563200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>p_timeStep_h</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1726584205731</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1726584205903</CurrentLevel> - <ConnectionsId>1726584206083</ConnectionsId> - <Variables> - <Variable Class="PlainVariable"> - <Id>1726584205883</Id> - <Name>v_timeOfModelStart_ms</Name> - <X>1560</X> - <Y>140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1726584205885</Id> - <Name>v_modelStartUpDuration_s</Name> - <X>1560</X> - <Y>160</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1726584205887</Id> - <Name>v_simStartYear</Name> - <X>1560</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1733235094633</Id> - <Name>v_numberOfSurveyCompanies</Name> - <X>1560</X> - <Y>240</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>int</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1733389557748</Id> - <Name>v_simStartHour_h</Name> - <Description>The hour 0 is defined as january 1st, 00:00h in the year energyModel.p_year</Description> - <X>1560</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>0</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1733390702422</Id> - <Name>v_simDuration_h</Name> - <X>1560</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - <InitialValue Class="CodeValue"> - <Code>8760</Code> - </InitialValue> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1737972861302</Id> - <Name>map_buildingData_Vallum</Name> - <X>-370</X> - <Y>395</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>Map<String, com.zenmo.bag.Pand></Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1753450969530</Id> - <Name>v_objectMapper</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2450</X> - <Y>49</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>ObjectMapper</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1755876520422</Id> - <Name>v_probabilityForAdditionalCar_privateParking</Name> - <X>1560</X> - <Y>190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="PlainVariable"> - <Id>1755876547633</Id> - <Name>v_probabilityForAdditionalCar_publicParking</Name> - <X>1560</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" - Constant="false" - AccessType="public" - StaticVariable="false"> - <Type>double</Type> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206064</Id> - <Name>zero_Interface</Name> - <X>30</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>Zero_Interface</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206062</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206070</Id> - <Name>defaultProfiles_data</Name> - <X>-370</X> - <Y>280</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>DefaultProfiles_data</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206068</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206073</Id> - <Name>project_data</Name> - <Description>Should be filled with the Project_data record created in the startup of the project model</Description> - <X>-370</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>Project_data</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206071</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206076</Id> - <Name>settings</Name> - <Description>Should be filled with the settings record created in the startup of the project model</Description> - <X>-370</X> - <Y>250</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>Settings</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206074</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1726584206079</Id> - <Name>user</Name> - <X>-370</X> - <Y>210</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>User</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1726584206077</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1762184918471</Id> - <Name>p_userIdToken</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2630</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>String</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <ParameterEditor> - <Id>1762184918469</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="Parameter"> - <Id>1761907535651</Id> - <Name>p_remainingTotals</Name> - <X>1560</X> - <Y>290</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" ModificatorType="STATIC"> - <Type>J_RemainingTotalsManager</Type> - <UnitType>NONE</UnitType> - <SdArray>false</SdArray> - <DefaultValue Class="CodeValue"> - <Code>new J_RemainingTotalsManager(avgc_data)</Code> - </DefaultValue> - <ParameterEditor> - <Id>1761907535649</Id> - <EditorContolType>TEXT_BOX</EditorContolType> - <MinSliderValue>0</MinSliderValue> - <MaxSliderValue>100</MaxSliderValue> - <DelimeterType>NO_DELIMETER</DelimeterType> - </ParameterEditor> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205737</Id> - <Name>c_gridNodeIDsInScope</Name> - <X>1560</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>String</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205739</Id> - <Name>c_companyBuilding_data</Name> - <X>-370</X> - <Y>415</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205741</Id> - <Name>c_gridNode_data</Name> - <X>-370</X> - <Y>360</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GridNode_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205743</Id> - <Name>c_surveyCompanyBuilding_data</Name> - <X>-380</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="private" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205745</Id> - <Name>c_houseBuilding_data</Name> - <X>-370</X> - <Y>435</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205747</Id> - <Name>c_solarfarm_data</Name> - <X>-370</X> - <Y>482</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Solarfarm_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205749</Id> - <Name>c_windfarm_data</Name> - <X>-370</X> - <Y>502</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Windfarm_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205751</Id> - <Name>c_electrolyser_data</Name> - <X>-370</X> - <Y>521</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Electrolyser_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205753</Id> - <Name>c_battery_data</Name> - <X>-370</X> - <Y>540</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Battery_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205755</Id> - <Name>c_cable_data</Name> - <X>-370</X> - <Y>650</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Cable_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205757</Id> - <Name>c_neighbourhood_data</Name> - <X>-370</X> - <Y>590</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Neighbourhood_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205759</Id> - <Name>c_remainingBuilding_data</Name> - <X>-370</X> - <Y>455</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205763</Id> - <Name>c_chargingstation_data</Name> - <X>-370</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Chargingstation_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1726584205765</Id> - <Name>c_parcel_data</Name> - <X>-370</X> - <Y>630</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Parcel_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1737744140895</Id> - <Name>c_vallumBuilding_data</Name> - <X>-380</X> - <Y>930</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>Building_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1748944117397</Id> - <Name>c_customProfiles_data</Name> - <X>-370</X> - <Y>300</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>CustomProfile_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1749631164240</Id> - <Name>c_gridNodeIDsWithProfiles</Name> - <X>1560</X> - <Y>350</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>String</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1749649688266</Id> - <Name>c_chargerProfiles_data</Name> - <X>-370</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>ChargerProfile_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1749738339329</Id> - <Name>c_parkingSpace_data</Name> - <X>-370</X> - <Y>610</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>ParkingSpace_data</ElementClass> - <ValueElementClass>String</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1759135072429</Id> - <Name>c_GISregions</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2450</X> - <Y>149</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> - <CollectionClass>LinkedHashMap</CollectionClass> - <ElementClass>String</ElementClass> - <ValueElementClass>GISRegion</ValueElementClass> - </Properties> - </Variable> - <Variable Class="CollectionVariable"> - <Id>1763648784984</Id> - <Name>c_activeNBH</Name> - <X>1540</X> - <Y>420</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Properties SaveInSnapshot="true" AccessType="private" StaticVariable="false"> - <CollectionClass>ArrayList</CollectionClass> - <ElementClass>GIS_Object</ElementClass> - <ValueElementClass>GISRegion</ValueElementClass> - </Properties> - </Variable> - </Variables> - <Functions> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205769</Id> - <Name>f_createGISRegions</Name> - <Description>Creates the outline of the simulated area</Description> - <X>1546.739</X> - <Y>539</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>// Create neighborhoods and draw them -for (Neighbourhood_data NBH : c_neighbourhood_data) { - GIS_Object area = energyModel.add_pop_GIS_Objects(); - - area.p_id = NBH.neighbourhoodname(); - area.p_GISObjectType = f_getNBHGISObjectType(area, NBH.neighbourhoodcode(), NBH.neighbourhoodtype()); - - //Create gisregion - area.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(NBH.polygon(), area.p_GISObjectType)); - - //Style area - zero_Interface.f_styleSimulationAreas(area); - zero_Interface.c_GISNeighborhoods.add(area); - - - //Energy totals - p_remainingTotals.addNBH(NBH); -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205771</Id> - <Name>f_createGridConnections</Name> - <X>90</X> - <Y>250</Y> - <Label> - <X>11</X> - <Y>1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Energy production sites -f_createSolarParks(); -f_createWindFarms(); - -//Other infra assets -f_createChargingStations(); -f_createElectrolysers(); -f_createBatteries(); - -//Consumers -f_createCompanies(); -f_createHouses();</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205773</Id> - <Name>f_configureEngine_default</Name> - <Description>Generieke functie die flexibele modelconfiguratie mogelijk maakt op basis van externe data. Expliciet gemodelleerd om profiling en volgorde van initialisatie te kunnen controleren. - -@param: none -@return: none -@since: Sprint 6 -@author: Jorrit</Description> - <X>79</X> - <Y>191</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Set basic input files -energyModel.p_truckTripsCsv = inputCSVtruckTrips; -energyModel.p_householdTripsCsv = inputCSVhouseholdTrips; -energyModel.p_cookingPatternCsv = inputCSVcookingActivities; - -//Initialize specific slider GC -f_initializeSpecificSliderGC(); - -//Actors -f_createActors(); - -//Create regions and initialize energy totals per region -f_createGISRegions(); - -if(user.NBHAccessType != null && user.NBHAccessType != OL_UserNBHAccessType.FULL){ - f_removeObjectsNotInActiveNBH(); -} - -//Grid nodes -f_createGridNodes(); - -//Grid connections -f_createGridConnections(); - -//Additional GIS objects -f_createAdditionalGISObjects(); - -//Initialize the engine -energyModel.p_runStartTime_h = v_simStartHour_h; -energyModel.p_runEndTime_h = v_simStartHour_h + v_simDuration_h; -energyModel.f_initializeEngine(); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205775</Id> - <Name>f_createGridNodes</Name> - <X>50</X> - <Y>540</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>OL_GridNodeType nodeType; -GISRegion gisregion; - -// Grid operator (for now only one in the area) -GridOperator Grid_Operator = findFirst(energyModel.pop_gridOperators, p->p.p_actorID.equals(project_data.grid_operator())) ; - -for (GridNode_data GN_data : c_gridNode_data) { - // if no scope selected, or if node has 'all scopes' in input file or if the node specific scope is selected (exists in the arrayList) - if( settings.subscopesToSimulate() == null || settings.subscopesToSimulate().isEmpty() || GN_data.subscope() == null || settings.subscopesToSimulate().indexOf(GN_data.subscope()) > -1 ){ - if (GN_data.status()) { - GridNode GN = energyModel.add_pop_gridNodes(); - GN.p_gridNodeID = GN_data.gridnode_id(); - c_gridNodeIDsInScope.add(GN.p_gridNodeID); - - // Check wether transformer capacity is known or estimated - GN.p_capacity_kW = GN_data.capacity_kw(); - GN.p_originalCapacity_kW = GN.p_capacity_kW; - GN.p_realCapacityAvailable = GN_data.is_capacity_available(); - - // Basic GN information - //GN.p_nodeStatus = GN_data.status(); - GN.p_description = GN_data.description(); - String nodeTypeString = GN_data.type(); - - // Connect - GN.p_parentNodeID = GN_data.parent_node_id(); // Needs to be manually defined in the excel file of the nodes! - GN.p_ownerGridOperator = Grid_Operator; - - //Define node type - switch (nodeTypeString) { - case "LVLV": - GN.p_nodeType = OL_GridNodeType.LVLV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "MVLV": - GN.p_nodeType = OL_GridNodeType.MVLV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "SUBMV": - GN.p_nodeType = OL_GridNodeType.SUBMV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "MVMV": - GN.p_nodeType = OL_GridNodeType.MVMV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - case "HVMV": - GN.p_nodeType = OL_GridNodeType.HVMV; - GN.p_energyCarrier = OL_EnergyCarriers.ELECTRICITY; - break; - default: - traceln("There is a gridnode in your input file with an incorrect node type"); - break; - } - - //Define GN location - GN.p_latitude = GN_data.latitude(); - GN.p_longitude = GN_data.longitude(); - GN.setLatLon(GN.p_latitude, GN.p_longitude); - - //Create gis region - GN.gisRegion = zero_Interface.f_createGISObject(f_createGISNodesTokens(GN)); - zero_Interface.f_styleGridNodes(GN); - - //Grid operator nodes - Grid_Operator.c_electricityGridNodes.add(GN); - - - //Gridnode service area - if (GN_data.service_area_polygon() != null){ - //Create service area gis object - GN.p_serviceAreaGisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(GN_data.service_area_polygon(), OL_GISObjectType.GN_SERVICE_AREA)); - - //Add to hashmap - zero_Interface.c_GISNetplanes.add( GN.p_serviceAreaGisRegion ); - } - - //Gridnode profile - if(GN_data.profile_data_kWh() != null){ - f_addGridNodeProfile(GN, GN_data.profile_data_kWh()); - } - } - } -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[]</ReturnType> - <Id>1726584205777</Id> - <Name>f_createGISObjectsTokens</Name> - <X>1565.241</X> - <Y>700</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>RegionCoords</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>GISObjectType</Name> - <Type>OL_GISObjectType</Type> - </Parameter> - <Body>if (RegionCoords.startsWith("MultiPolygon")){ - RegionCoords = RegionCoords.replace("MultiPolygon (((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace(")))",""); -} -else if(RegionCoords.startsWith("MULTIPOLYGON")){ - RegionCoords = RegionCoords.replace("MULTIPOLYGON (((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace(")))",""); -} -else if(RegionCoords.startsWith("Poly")){ - RegionCoords = RegionCoords.replace("Polygon ((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace("))",""); -} -else if(RegionCoords.startsWith("POLYGON")){ - RegionCoords = RegionCoords.replace("POLYGON ((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace("))",""); -} -else if(RegionCoords.startsWith("MultiLineString")){ - RegionCoords = RegionCoords.replace("MultiLineString ((",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace("))",""); -} -else if(RegionCoords.startsWith("LineString")){ - RegionCoords = RegionCoords.replace("LineString (",""); - RegionCoords = RegionCoords.replace(","," "); - RegionCoords = RegionCoords.replace(")",""); -} -else { - traceln("GIS coordinaten in de excel data die niet starten met Multi of Poly"); -} - - - -if(RegionCoords.contains(")(") || RegionCoords.contains(") (") || RegionCoords.contains(") (")){ - if (GISObjectType == OL_GISObjectType.ANTI_LAYER){ - RegionCoords = RegionCoords.replace(")("," "); // Combine all polies into one! - RegionCoords = RegionCoords.replace(") ("," "); // Combine all polies into one! - } - else{ - RegionCoords = RegionCoords.split("\\)")[0]; - } -} - -RegionCoords = RegionCoords.replace(" "," "); -String delims = " "; -String[] tokens; -tokens = RegionCoords.split(delims); - -int nbCoords = tokens.length; -double[] GISCoords = new double[nbCoords]; - -for (int i=0; i<nbCoords; i++) { - if (i % 2 == 0) { // latitudes - GISCoords[i]=Double.parseDouble(tokens[i+1]); - } else { // longitudes - GISCoords[i]=Double.parseDouble(tokens[i-1]); - } -} -return GISCoords;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205779</Id> - <Name>f_importExcelTablesToDB</Name> - <Description>Automatisch inladen van excel files uit de model map naar de database. - -@author: Ate -@since: 14-12-23</Description> - <X>-390</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//inputHouseholdTrips.readFile(); -//inputCookingActivities.readFile(); -//inputTruckTrips.readFile(); - -//inputCSVcookingActivities.readFile(); -//inputCSVcookingActivities. - -if(settings.reloadDatabase()){ - - //Get the database names that are selected for reloading - List<String[]> databaseNames = project_data.databaseNames(); - - //Get the model database - ModelDatabase modelDB = getEngine().getModelDatabase(); - - //Loop over all databases - for(String[] databaseName : databaseNames){ - - //Create the file path string - String filePathString = "data_" + project_data.project_name() + "/" + databaseName[0] + "_" + project_data.project_name() + ".xlsx"; - - //If file exists, load it into the database - File f = new File(filePathString); - if(f.exists() && !f.isDirectory()) { - Database myFileDatabase = new Database(this, databaseName[1], filePathString); - modelDB.importFromExternalDB(myFileDatabase.getConnection(), databaseName[1], databaseName[1], true, false); - traceln("Database %s has been updated.", databaseName[1]); - } else { // if file does not exist, clear the database to make sure there are no wrong values in the simulation! - executeStatement("DELETE FROM " + databaseName[1] + " c"); - traceln("File not found, database %s has been cleared!", databaseName[1]); - } - } - - //Overwrite specific database values - f_overwriteSpecificDatabaseValues(); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205785</Id> - <Name>f_createSolarParks</Name> - <Description>Function used to generate solar parks: grid connections and park owner (connection owner actor)</Description> - <X>430.001</X> - <Y>790.001</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>ConnectionOwner owner; -GCEnergyProduction solarpark; - -List<String> existing_actors = new ArrayList(); -List<String> existing_solarFields = new ArrayList(); - -for (Solarfarm_data dataSolarfarm : f_getSolarfarmsInSubScope(c_solarfarm_data)) { // MOET NOG CHECK OF ZONNEVELD ACTOR AL BESTAAT OP, zo ja --> Zonneveld koppelen aan elkaar en niet 2 GC en 2 actoren maken. - - if (!existing_solarFields.contains( dataSolarfarm.gc_id() )) { - solarpark = energyModel.add_EnergyProductionSites(); - - solarpark.set_p_gridConnectionID( dataSolarfarm.gc_id() ); - solarpark.set_p_name( dataSolarfarm.gc_name() ); - - //Check wether it can be changed using sliders - solarpark.p_isSliderGC = dataSolarfarm.isSliderGC(); - - //Grid Capacity - solarpark.v_liveConnectionMetaData.physicalCapacity_kW = dataSolarfarm.connection_capacity_kw(); - if ( dataSolarfarm.connection_capacity_kw() > 0 ) { - solarpark.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataSolarfarm.contracted_feed_in_capacity_kw() != null) { - solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.contracted_feed_in_capacity_kw(); - solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - solarpark.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataSolarfarm.connection_capacity_kw(); - solarpark.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - - //solarpark.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - solarpark.set_p_ownerID( dataSolarfarm.owner_id() ); - solarpark.set_p_parentNodeElectricID( dataSolarfarm.gridnode_id() ); - - solarpark.v_isActive = dataSolarfarm.initially_active() ; - - //Add EA - f_addEnergyProduction(solarpark, OL_EnergyAssetType.PHOTOVOLTAIC, "Solar farm" , dataSolarfarm.capacity_electric_kw()); - - - if (!existing_actors.contains(solarpark.p_ownerID)){ // check if owner exists already, if not, create new owner. - owner = energyModel.add_pop_connectionOwners(); - - owner.set_p_actorID( dataSolarfarm.owner_id()); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.SOLARFARM_OP ); - owner.b_dataSharingAgreed = true; - existing_actors.add(owner.p_actorID); - } - else { // Owner exists already: add new GC to existing owner - owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataSolarfarm.owner_id())); - } - - solarpark.set_p_owner( owner ); - - existing_solarFields.add(solarpark.p_gridConnectionID); - } - else { // solarpark and its owner exist already, only create new gis building which is added to the park - solarpark = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataSolarfarm.gc_id()) ); - owner = solarpark.p_owner; - - } - - if (dataSolarfarm.polygon() != null) { - //Create GIS object for the solar park - GIS_Object area = f_createGISObject( dataSolarfarm.gc_name(), dataSolarfarm.latitude(), dataSolarfarm.longitude(), dataSolarfarm.polygon(), OL_GISObjectType.SOLARFARM); - - //Add to collections - area.c_containedGridConnections.add(solarpark); - solarpark.c_connectedGISObjects.add(area); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_solarParkColor ); - area.set_p_defaultLineColor( zero_Interface.v_solarParkLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } -} -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205787</Id> - <Name>f_createBatteries</Name> - <Description>Function used to create (neighborhood) battery grid connection and actor</Description> - <X>430.001</X> - <Y>930</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>for (Battery_data dataBattery : f_getBatteriesInSubScope(c_battery_data)) { // MOET NOG CHECK OF battery ACTOR AL BESTAAT OP, zo ja --> battery koppelen aan elkaar en niet 2 GC en 2 actoren maken. - - ConnectionOwner owner = energyModel.add_pop_connectionOwners(); - GCGridBattery gridbattery = energyModel.add_GridBatteries(); - - //Owner parameters - owner.set_p_actorID( dataBattery.owner_id() ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.BATTERY_OP ); - owner.b_dataSharingAgreed = true; - - //GC parameters - gridbattery.set_p_gridConnectionID( dataBattery.gc_id () ); - gridbattery.set_p_name( dataBattery.gc_name() ); - gridbattery.set_p_ownerID( dataBattery.owner_id() ); - gridbattery.set_p_owner( owner ); - gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); - - //Check wether it can be changed using sliders - gridbattery.p_isSliderGC = dataBattery.isSliderGC(); - - //Grid Capacity - gridbattery.v_liveConnectionMetaData.physicalCapacity_kW = dataBattery.connection_capacity_kw(); - if ( dataBattery.connection_capacity_kw() > 0 ) { - gridbattery.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataBattery.contracted_delivery_capacity_kw() != null ) { - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.contracted_delivery_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - else { - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataBattery.connection_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - if ( dataBattery.contracted_feed_in_capacity_kw() != null ) { - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.contracted_feed_in_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataBattery.connection_capacity_kw(); - gridbattery.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - gridbattery.set_p_parentNodeElectricID( dataBattery.gridnode_id() ); - //gridbattery.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - - switch (dataBattery.operation_mode()) { - case PRICE: - gridbattery.f_setBatteryManagement(new J_BatteryManagementPrice(gridbattery)); - break; - case PEAK_SHAVING_PARENT_NODE: - J_BatteryManagementPeakShaving batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); - GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals(gridbattery.p_parentNodeElectricID)); - if (gn == null) { - throw new RuntimeException("Could not find GridNode with ID: " + gridbattery.p_parentNodeElectricID + " for GCGridBattery"); - } - batteryAlgorithm.setTarget(gn); - gridbattery.f_setBatteryManagement(batteryAlgorithm); - break; - case PEAK_SHAVING_COOP: - // target agent is still null, should be set at the moment of coop creation - batteryAlgorithm = new J_BatteryManagementPeakShaving(gridbattery); - batteryAlgorithm.setTargetType( OL_ResultScope.ENERGYCOOP ); - gridbattery.f_setBatteryManagement(batteryAlgorithm); - break; - default: - throw new RuntimeException("Battery Operation Mode: " + dataBattery.operation_mode() + " is not supported for GCGridBattery."); - } - - //Get initial state - gridbattery.v_isActive = dataBattery.initially_active(); - - if (dataBattery.polygon() != null) { - //Create gis object for the battery - GIS_Object area = f_createGISObject( dataBattery.gc_name(), dataBattery.latitude(), dataBattery.longitude(), dataBattery.polygon(), OL_GISObjectType.BATTERY); - - //Add to collections - gridbattery.c_connectedGISObjects.add(area); - area.c_containedGridConnections.add(gridbattery); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_batteryColor ); - area.set_p_defaultLineColor( zero_Interface.v_batteryLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } - //Create energy asset for the battery - f_addStorage(gridbattery, dataBattery.capacity_electric_kw(), dataBattery.storage_capacity_kwh(), OL_EnergyAssetType.STORAGE_ELECTRIC ); - -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205789</Id> - <Name>f_createElectrolysers</Name> - <Description>Function used to create electrolyser grid connections and actors</Description> - <X>430</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>ConnectionOwner owner; -List<String> existing_actors = new ArrayList(); - - -for (Electrolyser_data dataElectrolyser : f_getElectrolysersInSubScope(c_electrolyser_data)) { - GCEnergyConversion H2Electrolyser = energyModel.add_EnergyConversionSites(); - - H2Electrolyser.set_p_gridConnectionID( dataElectrolyser.gc_id() ); - H2Electrolyser.set_p_name( dataElectrolyser.gc_name() ); - //H2Electrolyser.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - H2Electrolyser.set_p_ownerID( dataElectrolyser.owner_id() ); - H2Electrolyser.set_p_parentNodeElectricID( dataElectrolyser.gridnode_id() ); - - //Grid Capacity - H2Electrolyser.v_liveConnectionMetaData.physicalCapacity_kW = dataElectrolyser.connection_capacity_kw(); - if ( dataElectrolyser.connection_capacity_kw() > 0 ) { - H2Electrolyser.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataElectrolyser.contracted_delivery_capacity_kw() != null ) { - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.contracted_delivery_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - else { - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataElectrolyser.connection_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - if ( dataElectrolyser.contracted_feed_in_capacity_kw() != null ) { - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.contracted_feed_in_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataElectrolyser.connection_capacity_kw(); - H2Electrolyser.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - - - H2Electrolyser.v_isActive = dataElectrolyser.initially_active(); - H2Electrolyser.p_minProductionRatio = dataElectrolyser.min_production_ratio(); - - //Electrolyser operation mode - H2Electrolyser.set_p_electrolyserOperationMode( dataElectrolyser.default_operation_mode()); - - //Create EA for the electrolyser GC - J_EAConversionElectrolyser h2ElectrolyserEA = new J_EAConversionElectrolyser(H2Electrolyser, dataElectrolyser.capacity_electric_kw(), dataElectrolyser.conversion_efficiency(), energyModel.p_timeStep_h, OL_ElectrolyserState.STANDBY, dataElectrolyser.load_change_time_s(), dataElectrolyser.start_up_time_shutdown_s(), dataElectrolyser.start_up_time_standby_s(), dataElectrolyser.start_up_time_idle_s()); - - if (!existing_actors.contains(H2Electrolyser.p_ownerID)){ // check if owner exists already, if not, create new owner. - owner = energyModel.add_pop_connectionOwners(); - - owner.set_p_actorID( H2Electrolyser.p_ownerID ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.ELECTROLYSER_OP ); - owner.b_dataSharingAgreed = true; - } - else { // Owner exists already: add new GC to existing owner - owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataElectrolyser.owner_id())); - } - - H2Electrolyser.set_p_owner( owner ); - - if (dataElectrolyser.polygon() != null) { - //Create GIS object for the electrolyser - GIS_Object area = f_createGISObject( dataElectrolyser.gc_name(), dataElectrolyser.latitude(), dataElectrolyser.longitude(), dataElectrolyser.polygon(), OL_GISObjectType.ELECTROLYSER); - - //Add to collections - area.c_containedGridConnections.add(H2Electrolyser); - H2Electrolyser.c_connectedGISObjects.add(area); - - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_electrolyserColor ); - area.set_p_defaultLineColor( zero_Interface.v_electrolyserLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205791</Id> - <Name>f_createWindFarms</Name> - <Description>Function used to create all windfarm grid connections, actors, EAs and GISObjects</Description> - <X>430.001</X> - <Y>810</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>ConnectionOwner owner; -GCEnergyProduction windfarm; - -List<String> existing_actors = new ArrayList(); -List<String> existing_windFarms = new ArrayList(); - -for (Windfarm_data dataWindfarm : f_getWindfarmsInSubScope(c_windfarm_data)) { - if (!existing_windFarms.contains(dataWindfarm.gc_id())) { // Check if windfarm exists already, if not, create new windfarm GC + turbine - windfarm = energyModel.add_EnergyProductionSites(); - - windfarm.set_p_gridConnectionID( dataWindfarm.gc_id() ); - windfarm.set_p_name( dataWindfarm.gc_name() ); - - //Check wether it can be changed using sliders - windfarm.p_isSliderGC = dataWindfarm.isSliderGC(); - - //Grid capacity - windfarm.v_liveConnectionMetaData.physicalCapacity_kW = dataWindfarm.connection_capacity_kw(); - if ( dataWindfarm.connection_capacity_kw() > 0 ) { - windfarm.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - if ( dataWindfarm.contracted_feed_in_capacity_kw() != null) { - windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.contracted_feed_in_capacity_kw(); - windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else { - windfarm.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataWindfarm.connection_capacity_kw(); - windfarm.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - //windfarm.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - windfarm.set_p_ownerID( dataWindfarm.owner_id() ); - windfarm.set_p_parentNodeElectricID( dataWindfarm.gridnode_id() ); - - //Get initial state - windfarm.v_isActive = dataWindfarm.initially_active(); - - //Create EA for the windturbine GC - f_addEnergyProduction(windfarm, OL_EnergyAssetType.WINDMILL, "Windmill onshore", dataWindfarm.capacity_electric_kw()); - - if (!existing_actors.contains(windfarm.p_ownerID)){ // check if owner exists already, if not, create new owner. - owner = energyModel.add_pop_connectionOwners(); - - owner.set_p_actorID( windfarm.p_ownerID ); - //owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.WINDFARM_OP ); - owner.b_dataSharingAgreed = true; - } - else { // Owner exists already: add new GC to existing owner - owner = findFirst(energyModel.f_getConnectionOwners(), p -> p.p_actorID.equals(dataWindfarm.owner_id())); - } - - windfarm.set_p_owner( owner ); - - existing_windFarms.add(windfarm.p_gridConnectionID); - } - else { // winfarm and its owner exist already, only create new gis building which is added to the farm - windfarm = findFirst(energyModel.EnergyProductionSites, p -> p.p_gridConnectionID.equals(dataWindfarm.gc_id()) ); - owner = windfarm.p_owner; - - } - - //Create GIS object for the windfarm - if (dataWindfarm.polygon() != null) { - GIS_Object area = f_createGISObject( dataWindfarm.gc_name(), dataWindfarm.latitude(), dataWindfarm.longitude(), dataWindfarm.polygon(), OL_GISObjectType.WINDFARM ); - - //Add to collections - area.c_containedGridConnections.add(windfarm); - windfarm.c_connectedGISObjects.add(area); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_windFarmColor ); - area.set_p_defaultLineColor( zero_Interface.v_windFarmLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[]</ReturnType> - <Id>1726584205793</Id> - <Name>f_createGISNodesTokens</Name> - <X>70</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GN</Name> - <Type>GridNode</Type> - </Parameter> - <Body>double scaling_factor_LVLV = zero_Interface.v_LVLVNodeSize; -double scaling_factor_MVLV = zero_Interface.v_MVLVNodeSize; -double scaling_factor_MVMV = zero_Interface.v_MVMVNodeSize; -double scaling_factor_HVMV = zero_Interface.v_HVMVNodeSize; - -int nb_GISCoords; -String node_shape = "TRIANGLE"; -double scaling_factor_gridnode = 0; - -switch( GN.p_nodeType ) { - case LVLV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_LVLV; - break; - case MVLV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_MVLV; - break; - case SUBMV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_MVLV; - break; - case MVMV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_MVMV; - break; - case HVMV: - nb_GISCoords = 6; - node_shape = "TRIANGLE"; - scaling_factor_gridnode = scaling_factor_HVMV; - break; - case HT: - nb_GISCoords = 6; - break; - case MT: - nb_GISCoords = 6; - break; - case LT: - nb_GISCoords = 6; - break; - case LT5thgen: - nb_GISCoords = 6; - break; - default: - nb_GISCoords = 6; -} - -double[] GISCoords = new double[nb_GISCoords]; - - -switch(node_shape){ - - case "TRIANGLE": - //latitudes - GISCoords[0]=GN.p_latitude; - GISCoords[2]=GN.p_latitude - scaling_factor_gridnode*0.00001; - GISCoords[4]=GN.p_latitude - scaling_factor_gridnode*0.00001; - - //longitudes - GISCoords[1]=GN.p_longitude; - GISCoords[3]=GN.p_longitude + scaling_factor_gridnode*0.00001; - GISCoords[5]=GN.p_longitude - scaling_factor_gridnode*0.00001; - break; - case "DIAMOND": - //latitudes - GISCoords[0]=GN.p_latitude; - GISCoords[2]=GN.p_latitude - scaling_factor_gridnode*0.00001; - GISCoords[4]=GN.p_latitude; - GISCoords[6]=GN.p_latitude + scaling_factor_gridnode*0.00001; - - //longitudes - GISCoords[1]=GN.p_longitude; - GISCoords[3]=GN.p_longitude + scaling_factor_gridnode*0.00001; - GISCoords[5]=GN.p_longitude + scaling_factor_gridnode*0.00001*2; - GISCoords[7]=GN.p_longitude + scaling_factor_gridnode*0.00001; - break; - /* - case "CIRCLE": - // if you want Circle coordinates --> - //x = r * cos(t) + a - //y = r * sin(t) + b - //t is an angle between 0 and 2π (more steps is more circle points, about 10-12 should suffice. --> adjust nb_GISCoords accordingly - // r is the radius: 0.000009 degrees in latitude is about 1 meter - // a and b are latitude and longitude - break; - */ -} - -return GISCoords; - - - - - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205795</Id> - <Name>f_createEnergyActors</Name> - <Description>Function used to generate specific actors like grid operator, energy supplier and energy coop. Actors used to create variable pricing.</Description> - <X>60</X> - <Y>460</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>// Create the grid operator -GridOperator GO = energyModel.add_pop_gridOperators(); - -GO.p_actorID = project_data.grid_operator(); -GO.p_hasCongestionPricing = project_data.hasCongestionPricing() != null ? project_data.hasCongestionPricing() : false; - - -// Create the energy coop -if (project_data.energy_coop() != null && !project_data.energy_coop().equals("None")){ - - EnergyCoop EC = energyModel.add_pop_energyCoops(); - - EC.p_actorID = project_data.energy_coop(); - EC.p_gridOperator = GO; - //EC.p_CoopParent = EC.p_actorID; // WAT BETEKENT COOP PARENT?? -} - - -// Energy supplier -if (project_data.energy_supplier() != null && !project_data.energy_supplier().equals("None")){ - - EnergySupplier ES = energyModel.add_pop_energySuppliers(); - - ES.p_actorID = project_data.energy_supplier(); -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205799</Id> - <Name>f_createGenericCompanies</Name> - <Description>Creating the companies (using a single GC) + owned buildings, that have not filled in the survey. If created, they will be simulated using average values, scaled with the totals (CBS data) of the area.</Description> - <X>430</X> - <Y>533</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Initialize variables -List<GCUtility> generic_company_GCs = new ArrayList(); -HashMap<GridConnection, Double> map_GC_to_installedBuildingPV = new HashMap(); - -//Get buildings in scope -List<Building_data> buildingDataGenericCompanies = f_getBuildingsInSubScope(c_companyBuilding_data); - -//Add generic companies to the legend if in model -if(buildingDataGenericCompanies.size()>0){ - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DEFAULT_COMPANY); -} - -//Loop over the remaining buildings in c_CompanyBuilding_data (Survey buildings have been removed from this collection) -for (Building_data genericCompany : buildingDataGenericCompanies) { - - GCUtility companyGC = findFirst(generic_company_GCs, GC -> GC.p_gridConnectionID.equals(genericCompany.address_id())); - - if(companyGC == null){ - //Create new companyGC - companyGC = energyModel.add_UtilityConnections(); - - //Update counter and collections - generic_company_GCs.add(companyGC); - map_GC_to_installedBuildingPV.put(companyGC, 0.0); - - //Set parameters for the Grid Connection - companyGC.p_gridConnectionID = genericCompany.address_id(); - - // Check that is needed until connectioncapacity is no longer in 'Panden' excel - if (genericCompany.contracted_capacity_kw() == null || genericCompany.contracted_capacity_kw() <= 0) { - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - } - else{ - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = genericCompany.contracted_capacity_kw(); - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW; - } - - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - - //set GC Adress - companyGC.p_address = new J_Address(); - companyGC.p_address.setStreetName(genericCompany.streetname()); - if (genericCompany.house_number() == null) { - companyGC.p_address.setHouseNumber(0); - } - else { - companyGC.p_address.setHouseNumber(genericCompany.house_number()); - } - companyGC.p_address.setHouseLetter(genericCompany.house_letter()); - companyGC.p_address.setHouseAddition(genericCompany.house_addition()); - companyGC.p_address.setPostalcode(genericCompany.postalcode()); - companyGC.p_address.setCity(genericCompany.city()); - - - //Set location of GC - companyGC.p_latitude = genericCompany.latitude(); - companyGC.p_longitude = genericCompany.longitude(); - companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); - - //Update remaining totals (AFTER Lat/Lon has been defined!) - p_remainingTotals.adjustTotalNumberOfAnonymousCompanies(companyGC, 1); - p_remainingTotals.adjustTotalFloorSurfaceAnonymousCompanies_m2(companyGC, genericCompany.address_floor_surface_m2()); - - //Connect GC to grid node - companyGC.p_parentNodeElectricID = genericCompany.gridnode_id (); - - - // Create new actor and assign GC to that - ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company - - COC.p_actorID = genericCompany.address_id(); - COC.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; - COC.p_detailedCompany = false; - COC.b_dataSharingAgreed = true; - - companyGC.p_owner = COC; - companyGC.p_ownerID = COC.p_actorID; - } - - //Check wheter this building already exists - GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(genericCompany.building_id())); - - if(existingBuilding == null){//Create new GIS building and connect - GIS_Building b = f_createGISBuilding( genericCompany, companyGC ); - - companyGC.p_roofSurfaceArea_m2 += b.p_roofSurfaceArea_m2; - map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + (genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0)); - - //Style building - b.p_defaultFillColor = zero_Interface.v_companyBuildingColor; - b.p_defaultLineColor = zero_Interface.v_companyBuildingLineColor; - zero_Interface.f_styleAreas(b); - } - else{// Connect with existing building - //Redistribute the PV installed - List<GridConnection> currentConnectedGCWithBuilding_notDetailed = findAll(existingBuilding.c_containedGridConnections, gc -> !gc.p_owner.p_detailedCompany); - int currentAmountOfConnectedGCWithBuilding_notDetailed = currentConnectedGCWithBuilding_notDetailed.size(); - - double buildingPV = genericCompany.pv_installed_kwp() != null ? genericCompany.pv_installed_kwp() : 0; - double newPVDistributionForAllAttachedGC_kW = buildingPV/(currentAmountOfConnectedGCWithBuilding_notDetailed+1); - double deltaPV_earlierConnectedGC_kW = newPVDistributionForAllAttachedGC_kW - (buildingPV/currentAmountOfConnectedGCWithBuilding_notDetailed); - - for(GridConnection earlierConnectedGC : currentConnectedGCWithBuilding_notDetailed){ - map_GC_to_installedBuildingPV.put(earlierConnectedGC, map_GC_to_installedBuildingPV.get(earlierConnectedGC) + deltaPV_earlierConnectedGC_kW); - if(map_GC_to_installedBuildingPV.get(earlierConnectedGC) < 0){ - new RuntimeException("Negative installed PV for GC: " + earlierConnectedGC.p_gridConnectionID + " after redistribution of PV on the building. This should never be possible!"); - } - } - - map_GC_to_installedBuildingPV.put(companyGC, map_GC_to_installedBuildingPV.get(companyGC) + newPVDistributionForAllAttachedGC_kW); - - //Connect to the existing building - f_connectGCToExistingBuilding(companyGC, existingBuilding, genericCompany); - } - - companyGC.p_floorSurfaceArea_m2 += genericCompany.address_floor_surface_m2(); -} - -//Finalize the remaining totals distribution -p_remainingTotals.finalizeRemainingTotalsDistributionCompanies(); - -//Add EA to all generic companies (Has to be after the remaining totals finalization, so cant happen at the same time as the creation of the GC and their buildings) -for (GridConnection GCcompany : generic_company_GCs ) { - f_iEAGenericCompanies(GCcompany, map_GC_to_installedBuildingPV.get(GCcompany)); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GIS_Building</ReturnType> - <Id>1726584205801</Id> - <Name>f_createGISBuilding</Name> - <Description>Creates the GIS object(s) building(s) for the companies and houses</Description> - <X>1547.621</X> - <Y>600</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>buildingData</Name> - <Type>Building_data</Type> - </Parameter> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>GIS_Building b = energyModel.add_pop_GIS_Buildings(); - -b.p_id = buildingData.building_id(); -b.p_GISObjectType = OL_GISObjectType.BUILDING; -b.p_buildingYear = buildingData.build_year(); -b.p_status = buildingData.status(); -b.p_useType = buildingData.purpose(); - -// Adres data -b.p_annotation = buildingData.annotation(); - -//Create gisregion -b.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(buildingData.polygon(), b.p_GISObjectType)); - -//Use the first point of the polygon as lat lon -double[] gisregion_points = b.gisRegion.getPoints(); // get all points of the gisArea of the building in the format lat1,lon1,lat2,lon2, etc. - -//position and coordinates -b.p_latitude = gisregion_points[0]; -b.p_longitude = gisregion_points[1]; - -//Set latlon -b.setLatLon(b.p_latitude, b.p_longitude); - - -//Define roof surface area (with Null checks and gisregion area as back up) -b.p_roofSurfaceArea_m2 = buildingData.polygon_area_m2() != null ? buildingData.polygon_area_m2() : b.gisRegion.area(); - -//Define floor surface area (with Null check, and make it 0 if unkown, else counting errors due to order of loadin of building data) -b.p_floorSurfaceArea_m2 = buildingData.address_floor_surface_m2() != null ? buildingData.address_floor_surface_m2() : 0; - -//Add to collections -b.c_containedGridConnections.add(parentGC); -parentGC.c_connectedGISObjects.add(b); - - -return b;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205803</Id> - <Name>f_addElectricityDemandProfile</Name> - <X>900</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityDemand_kWh</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>pvPower_kW</Name> - <Type>Double</Type> - </Parameter> - <Parameter> - <Name>hasQuarterlyData</Name> - <Type>boolean</Type> - </Parameter> - <Parameter> - <Name>profileName</Name> - <Type>String</Type> - </Parameter> - <Body>if ( hasQuarterlyData == true ) { // Add quarterly electricity data pattern if available - - //Initialize the arrays - List<Double> yearlyElectricityFeedin_kWh_list = null; - List<Double> yearlyElectricityProduction_kWh_list = null; - - //Check for PV, and if so: check for additional quarterhourly values - if(pvPower_kW != null && pvPower_kW > 0){ - //Check for feedin values availability, if available: fill the list, if not, list = null; - try { - if(selectFirstValue(Double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption LIMIT 1;") != null){ - yearlyElectricityFeedin_kWh_list = selectValues(double.class, "SELECT " + profileName + "_feedin FROM comp_elec_consumption;"); - } - } - catch(Exception e) { - //Do nothing, cause initialized with null; - } - - //Check for bruto production values availability, if available: fill the list, if not, list = null; - try { - if(selectFirstValue(Double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption LIMIT 1;") != null){ - yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + profileName + "_production FROM comp_elec_consumption;"); - } - } - catch(Exception e) { - //Do nothing, cause initialized with null; - } - } - - //Get the delivery values - List<Double> yearlyElectricityDelivery_kWh_list = selectValues(double.class, "SELECT " + profileName + "_demand FROM comp_elec_consumption;"); - - - //Convert lists into arrays - double[] yearlyElectricityDelivery_kWh_array = (yearlyElectricityDelivery_kWh_list != null) ? yearlyElectricityDelivery_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - double[] yearlyElectricityFeedin_kWh_array = (yearlyElectricityFeedin_kWh_list != null) ? yearlyElectricityFeedin_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - double[] yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - - - //Preprocess and add the profiles - f_createPreprocessedElectricityProfile_PV(parentGC, yearlyElectricityDelivery_kWh_array, yearlyElectricityFeedin_kWh_array, yearlyElectricityProduction_kWh_array, pvPower_kW, null); - -} - -else { // Add regular electricity and consumption profiles - J_EAConsumption profile = new J_EAConsumption(parentGC, OL_EnergyAssetType.ELECTRICITY_DEMAND, profileName, yearlyElectricityDemand_kWh, OL_EnergyCarriers.ELECTRICITY, energyModel.p_timeStep_h, null); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205807</Id> - <Name>f_createGISParcels</Name> - <Description>Creates "empty" parcels on the gismap, these parcels do not contain buildings or gridconnections. Currently no need for the function to return the GIS_Object.</Description> - <X>1547.621</X> - <Y>620</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Add GISObject type to the legenda -if(c_parcel_data.size()>0){ - zero_Interface.c_modelActiveSpecialGISObjects.add(OL_GISObjectType.PARCEL); -} - -for (Parcel_data dataParcel : c_parcel_data) { - - GIS_Parcel parcel = energyModel.add_pop_GIS_Parcels(); - - parcel.set_p_latitude( dataParcel.latitude() ); - parcel.set_p_longitude( dataParcel.longitude() ); - parcel.setLatLon(parcel.p_latitude, parcel.p_longitude); - parcel.set_p_id( dataParcel.parcel_id() ); - parcel.set_p_GISObjectType(OL_GISObjectType.PARCEL); - - //Building + styling the gisregion and putting it on the map - GISRegion gisregion = zero_Interface.f_createGISObject(f_createGISObjectsTokens( dataParcel.polygon(), parcel.p_GISObjectType)); - parcel.gisRegion = gisregion; - - parcel.set_p_defaultFillColor( zero_Interface.v_parcelColor ); - parcel.set_p_defaultLineColor( zero_Interface.v_parcelLineColor ); - parcel.set_p_defaultLineStyle( LineStyle.LINE_STYLE_DASHED ); - zero_Interface.f_styleAreas(parcel); -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205809</Id> - <Name>f_addEnergyProduction</Name> - <X>900</X> - <Y>200</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>asset_type</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>asset_name</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>installedPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>double assetCapacity_kW = 0; -double timestep_h = energyModel.p_timeStep_h; -J_ProfilePointer profilePointer = null; -OL_EnergyCarriers energyCarrier = OL_EnergyCarriers.ELECTRICITY; -switch (asset_type){ - -case PHOTOVOLTAIC: - energyCarrier = OL_EnergyCarriers.ELECTRICITY; - profilePointer = energyModel.pp_PVProduction35DegSouth_fr; - assetCapacity_kW = installedPower_kW; - break; - -case WINDMILL: - energyCarrier = OL_EnergyCarriers.ELECTRICITY; - profilePointer=energyModel.pp_windProduction_fr; - assetCapacity_kW = installedPower_kW; - break; - -case PHOTOTHERMAL: //NOT USED YET - energyCarrier = OL_EnergyCarriers.HEAT; - profilePointer = energyModel.pp_PVProduction35DegSouth_fr; // Voor nu om te testen! Misschien valt dit wel te gebruiken met bepaalde efficientie factor! - assetCapacity_kW = installedPower_kW; - break; -} - -J_EAProduction production_asset = new J_EAProduction(parentGC, asset_type, asset_name, energyCarrier, assetCapacity_kW, timestep_h, profilePointer); - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GIS_Object</ReturnType> - <Id>1726584205811</Id> - <Name>f_createGISObject</Name> - <Description>Creates the GIS object for the area EA (windfarms, solarparks, electrolysers, batteries, etc.)</Description> - <X>1547.621</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>name</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>latitude</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>longitude</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>polygon</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>GISObjectType</Name> - <Type>OL_GISObjectType</Type> - </Parameter> - <Body>GIS_Object area = energyModel.add_pop_GIS_Objects(); - -area.p_id = name; -area.p_GISObjectType = GISObjectType; - -//position and coordinates -area.p_latitude = latitude; -area.p_longitude = longitude; -area.setLatLon(area.p_latitude, area.p_longitude); - -//Create gisregion -area.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(polygon, area.p_GISObjectType)); - -//Add GISObject type to the legenda -zero_Interface.c_modelActiveSpecialGISObjects.add(area.p_GISObjectType); - -return area; -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205815</Id> - <Name>f_createSurveyCompanies_Zorm</Name> - <X>429.001</X> - <Y>119</Y> - <Label> - <X>10.999</X> - <Y>1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Get the survey data -List<com.zenmo.zummon.companysurvey.Survey> surveys = f_getSurveys(); -traceln("Size of survey List: %s", surveys.size()); - -//Get the building data -try{ - map_buildingData_Vallum = com.zenmo.vallum.PandKt.fetchBagPanden(surveys); -} -catch (Exception e){ //if api of bag is down, leave bag buildings empty and display error message - zero_Interface.f_setErrorScreen("BAG API is offline, het is mogelijk dat bepaalde panden niet zijn ingeladen!", 0, 0); -} - - -traceln("Companies that filled in the survey:"); -for (var survey : surveys) { - - traceln(survey.getCompanyName()); - - //Create connection owner - ConnectionOwner survey_owner = energyModel.add_pop_connectionOwners(); - survey_owner.p_actorID = survey.getCompanyName(); - survey_owner.p_connectionOwnerType = OL_ConnectionOwnerType.COMPANY; - survey_owner.p_detailedCompany = true; - survey_owner.b_dataSharingAgreed = survey.getDataSharingAgreed(); - survey_owner.b_dataIsAccessible = f_getAccessOfSurveyGC(survey.getDataSharingAgreed(), survey.getId()); - - for (var address : survey.getAddresses()) { - - //Update number of survey companies (locations) - v_numberOfSurveyCompanies++; - - for (var gridConnection: address.getGridConnections()) { - - //Check if it has (or will have) a direct connection with the grid (either gas or electric), if not: skip this gc. - boolean hasNaturalGasConnection = (gridConnection.getNaturalGas().getHasConnection() != null)? gridConnection.getNaturalGas().getHasConnection() : false; - boolean hasExpansionRequest = (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null ) ? gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() : false; - - if (!gridConnection.getElectricity().getHasConnection() && !hasExpansionRequest && !hasNaturalGasConnection){ - traceln("surveyGC with sequence: " + gridConnection.getSequence() + " is not created, as it has no connection to the grid, future grid connection or current gas connection."); - continue; - } - - //Create GC - GCUtility companyGC = energyModel.add_UtilityConnections(); - - //Set parameters for the Grid Connection - companyGC.p_ownerID = survey.getCompanyName(); - companyGC.p_gridConnectionID = gridConnection.getSequence().toString() ; - - //Find actor and connect GC - companyGC.p_owner = survey_owner; - - //Adress data - companyGC.p_address = new J_Address(); - companyGC.p_address.setStreetName(address.getStreet().substring(0,1).toUpperCase() + address.getStreet().substring(1).toLowerCase()); - companyGC.p_address.setHouseNumber(address.getHouseNumber()); - companyGC.p_address.setHouseLetter(address.getHouseLetter().equals("") ? null : address.getHouseLetter()); - companyGC.p_address.setHouseAddition(address.getHouseNumberSuffix().equals("") ? null : address.getHouseNumberSuffix()); - companyGC.p_address.setPostalcode(address.getPostalCode().equals("") ? null : address.getPostalCode().toUpperCase().replaceAll("\\s","")); - companyGC.p_address.setCity(address.getCity().substring(0,1).toUpperCase() + address.getCity().substring(1).toLowerCase()); - - //Get attached building info - List<Building_data> buildings = f_getSurveyGCBuildingData(companyGC, gridConnection); - - //Total new additional floor/roof surface area - double totalNewFloorSurfaceAreaGC_m2 = 0; - double totalNewRoofSurfaceAreaGC_m2 = 0; - - //Create the GIS buildings - for (Building_data buildingData : buildings) { - GIS_Building gisBuilding = findFirst(energyModel.pop_GIS_Buildings, b -> b.p_id.equals(buildingData.building_id())); // Check if building already exists in engine - if (gisBuilding != null) { - // Connect GC to existing building in engine - f_connectGCToExistingBuilding(companyGC, gisBuilding, buildingData); - } - else{ - gisBuilding = f_createGISBuilding( buildingData, companyGC); - } - - //Set name of building - if(gisBuilding.p_annotation == null){ - gisBuilding.p_annotation = companyGC.p_ownerID; - } - - //Accumulate surface areas - totalNewFloorSurfaceAreaGC_m2 += buildingData.address_floor_surface_m2(); - totalNewRoofSurfaceAreaGC_m2 += gisBuilding.p_roofSurfaceArea_m2; - - //Set trafo ID - companyGC.p_parentNodeElectricID = buildingData.gridnode_id(); - - //Style building - gisBuilding.p_defaultFillColor = zero_Interface.v_detailedCompanyBuildingColor; - gisBuilding.p_defaultLineColor = zero_Interface.v_detailedCompanyBuildingLineColor; - zero_Interface.f_styleAreas(gisBuilding); - - } - - //Add (combined) building data to GC (latitude and longitude + area) - companyGC.p_floorSurfaceArea_m2 += totalNewFloorSurfaceAreaGC_m2; - companyGC.p_roofSurfaceArea_m2 += totalNewRoofSurfaceAreaGC_m2; - - - if(!companyGC.c_connectedGISObjects.isEmpty()){ - companyGC.p_longitude = companyGC.c_connectedGISObjects.get(0).p_longitude; // Get longitude of first building (only used to get nearest trafo) - companyGC.p_latitude = companyGC.c_connectedGISObjects.get(0).p_latitude; // Get latitude of first building (only used to get nearest trafo) - - if(buildings.isEmpty()){ //GC will not have gotten a gridnode assigned, - for (var PID : gridConnection.getPandIds() ) { - Building_data surveyBuildingData = findFirst(c_surveyCompanyBuilding_data, b -> b.building_id().equals(PID.getValue())); - if(surveyBuildingData != null){ - companyGC.p_parentNodeElectricID = surveyBuildingData.gridnode_id(); - break; - } - } - } - - //In Subscope check - if(companyGC.p_parentNodeElectricID != null && !c_gridNodeIDsInScope.contains(companyGC.p_parentNodeElectricID)){ - //--> Company not in subscope -> PAUSE AND REMOVE FROM ASSIGNED GRIDNODE - companyGC.p_parentNodeElectricID = null; - companyGC.v_isActive = false; - } - } - else{ - traceln("Gridconnection %s with owner %s has no buildings!!!", companyGC.p_gridConnectionID, companyGC.p_ownerID); - } - - //Set lat lon - companyGC.setLatLon(companyGC.p_latitude, companyGC.p_longitude); - - if(user.NBHAccessType != null && user.NBHAccessType != OL_UserNBHAccessType.FULL){ - if(!f_isLocatedInActiveNBH(companyGC.p_latitude, companyGC.p_longitude)){ - companyGC.p_parentNodeElectricID = null; - companyGC.v_isActive = false; - } - } - - //Energy asset initialization - f_iEASurveyCompanies_Zorm(companyGC, gridConnection); - } - } -} - -//If survey companies are present, add to the ui legend -if(v_numberOfSurveyCompanies>0){ - //Add to the legend - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.DETAILED_COMPANY); - - //Pass the number of survey companies to interface for the dynamic legend - zero_Interface.v_numberOfSurveyCompanies = v_numberOfSurveyCompanies; -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<com.zenmo.zummon.companysurvey.Survey></ReturnType> - <Id>1726584205819</Id> - <Name>f_getSurveys</Name> - <X>449</X> - <Y>139</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Connect with API to database -Vallum vallum = new Vallum(user.PROJECT_CLIENT_ID(), user.PROJECT_CLIENT_SECRET()); - - -List<com.zenmo.zummon.companysurvey.Survey> surveys = new ArrayList(); - - -String[] zorm_project_names; -if(project_data.zorm_project_names() != null){ - zorm_project_names = project_data.zorm_project_names(); -} -else{ - zorm_project_names = new String[]{project_data.project_name()}; -} - -surveys = vallum.getEnabledSurveysByProjectNames(zorm_project_names); - -//Clear vallum user data -user.clearVallumUser(); - -return surveys;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205821</Id> - <Name>f_createActors</Name> - <X>90</X> - <Y>231</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Create specific actors like Grid operator, energy supplier, energy coop -f_createEnergyActors();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>OL_GridConnectionHeatingType</ReturnType> - <Id>1726584205825</Id> - <Name>f_getHeatingTypeSurvey</Name> - <Description>This function determines the heatingType (OL_GridConnectionHeatingType) from the list of heating types (zummon.companysurvey.HeatingType)</Description> - <X>480</X> - <Y>280</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>// This function determines a heatingType for the GC, which will be passed on to the function that determines the heating management -OL_GridConnectionHeatingType heatingType = null; - -if (surveyGC.getHeat().getHeatingTypes().size() > 1) { - // We currently only recognize a couple of combinations that we assume are meant as hybrid heatpumps - if (surveyGC.getHeat().getHeatingTypes().size() == 2) { - if (surveyGC.getHeat().getHeatingTypes().contains(HeatingType.GAS_BOILER)) { - if (surveyGC.getHeat().getHeatingTypes().contains(HeatingType.HYBRID_HEATPUMP) || surveyGC.getHeat().getHeatingTypes().contains(HeatingType.ELECTRIC_HEATPUMP)) { - heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; - } - } - } -} -else if (surveyGC.getHeat().getHeatingTypes().size() == 1) { - // We translate the survey enum to the OL_GridConnectionHeatingType - switch(surveyGC.getHeat().getHeatingTypes().get(0)) { - case GAS_BOILER: - heatingType = OL_GridConnectionHeatingType.GAS_BURNER; - break; - case HYBRID_HEATPUMP: - heatingType = OL_GridConnectionHeatingType.HYBRID_HEATPUMP; - break; - case ELECTRIC_HEATPUMP: - heatingType = OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP; - break; - case DISTRICT_HEATING: - heatingType = OL_GridConnectionHeatingType.DISTRICTHEAT; - break; - case COMBINED_HEAT_AND_POWER: - heatingType = OL_GridConnectionHeatingType.GAS_CHP; - break; - case OTHER: - heatingType = OL_GridConnectionHeatingType.CUSTOM; - break; - default: - throw new RuntimeException("Incorrect heating: " + surveyGC.getHeat().getHeatingTypes().get(0) + " detected for '" + engineGC.p_ownerID + "'"); - } -} -else if (surveyGC.getHeat().getHeatingTypes().size() == 0) { - // There is no heating type in the survey, but there is gas consumption (either yearly total or hourly values) - if ( (surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) - || ( surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear() ) ) { - // We assume that all gas consumption is to heat the building(s) - heatingType = OL_GridConnectionHeatingType.GAS_BURNER; - } - else { - heatingType = OL_GridConnectionHeatingType.NONE; - } -} -if (heatingType == null) { - heatingType = OL_GridConnectionHeatingType.CUSTOM; -} - -return heatingType;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_EAEV</ReturnType> - <Id>1726584205827</Id> - <Name>f_addElectricVehicle</Name> - <X>900</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>vehicle_type</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>isDefaultVehicle</Name> - <Type>boolean</Type> - </Parameter> - <Parameter> - <Name>annualTravelDistance_km</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>maxChargingPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>double storageCapacity_kWh = 0; -double energyConsumption_kWhpkm = 0; -double capacityElectricity_kW = 0; -double stateOfCharge_fr = 1; // Initial state of charge -double timestep_h = energyModel.p_timeStep_h; -double vehicleScaling = 1.0; - -switch(vehicle_type){ - - /* - case ELECTRIC_VEHICLE_COMUTERS: // ??? Hoe laad je andere laadprofielen in.?? Deze moet ander laadprofiel dan de Standaard Electric_vehicle - capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - storageCapacity_kWh = avgc_data.p_avgEVStorageCar_kWh; - energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; - break; - */ - - case ELECTRIC_VEHICLE: - capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - storageCapacity_kWh = avgc_data.p_avgEVStorageCar_kWh; - energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionCar_kWhpkm; - break; - - case ELECTRIC_VAN: - capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerVan_kW; - storageCapacity_kWh = avgc_data.p_avgEVStorageVan_kWh; - energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionVan_kWhpkm; - break; - - case ELECTRIC_TRUCK: - capacityElectricity_kW = avgc_data.p_avgEVMaxChargePowerTruck_kW; - storageCapacity_kWh = avgc_data.p_avgEVStorageTruck_kWh; - energyConsumption_kWhpkm = avgc_data.p_avgEVEnergyConsumptionTruck_kWhpkm; - break; - -} - -if (!isDefaultVehicle && maxChargingPower_kW > 0){ - capacityElectricity_kW = maxChargingPower_kW; -} -if (!isDefaultVehicle && maxChargingPower_kW <= 0) { - traceln("Trying to create an EV with no/negative maxChargingPower_kW: %s", maxChargingPower_kW); -} - -//Create the EV vehicle energy asset with the set parameters + links -J_EAEV electricVehicle = new J_EAEV(parentGC, capacityElectricity_kW, storageCapacity_kWh, stateOfCharge_fr, timestep_h, energyConsumption_kWhpkm, vehicleScaling, vehicle_type, null); - -if (!isDefaultVehicle && annualTravelDistance_km > 1000){ - electricVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); -} -else if (vehicle_type == OL_EnergyAssetType.ELECTRIC_VAN){ - electricVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); -} - -return electricVehicle;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_EADieselVehicle</ReturnType> - <Id>1726584205829</Id> - <Name>f_addDieselVehicle</Name> - <X>900</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>vehicle_type</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>isDefaultVehicle</Name> - <Type>Boolean</Type> - </Parameter> - <Parameter> - <Name>annualTravelDistance_km</Name> - <Type>double</Type> - </Parameter> - <Body>double energyConsumption_kWhpkm = 0; -double vehicleScaling = 1.0; - -//Diesel car -switch (vehicle_type){ - - case DIESEL_VEHICLE: - energyConsumption_kWhpkm = roundToDecimal(uniform(0.7, 1.3),2) * avgc_data.p_avgDieselConsumptionCar_kWhpkm; - break; - - case DIESEL_VAN: - energyConsumption_kWhpkm = avgc_data.p_avgDieselConsumptionVan_kWhpkm; - break; - - case DIESEL_TRUCK: - energyConsumption_kWhpkm = avgc_data.p_avgDieselConsumptionTruck_kWhpkm; - break; -} - -//Create EA -J_EADieselVehicle dieselVehicle = new J_EADieselVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); - -//Set annual travel distance -if (!isDefaultVehicle && annualTravelDistance_km > 1000){ - dieselVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); -} -else if (vehicle_type == OL_EnergyAssetType.DIESEL_VAN){ - dieselVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); -} - -return dieselVehicle; - - - -</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205831</Id> - <Name>f_addStorage</Name> - <X>900</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>storagePower_kw</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>storageCapacity_kWh</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>storageType</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Body>J_EAStorage storage = null; - -switch (storageType){ - - case STORAGE_ELECTRIC: - double initialStateOfCharge_fr = 0.5; - storage = new J_EAStorageElectric(parentGC, storagePower_kw, storageCapacity_kWh, initialStateOfCharge_fr, energyModel.p_timeStep_h); - //traceln("Battery with StorageCapacity_kWh: %s", storageCapacity_kWh); - break; - - case STORAGE_HEAT: - double lossFactor_WpK = 0; // For now no losses, waiting for new setup heating assets before this can be implemented correctly (its JEA_Building depedent) - double minTemperature_degC = avgc_data.p_avgMinHeatBufferTemperature_degC; - double maxTemperature_degC = avgc_data.p_avgMaxHeatBufferTemperature_degC; - double initialTemperature_degC = (minTemperature_degC + maxTemperature_degC) / 2; - double setTemperature_degC = initialTemperature_degC; - //double storageCapacity_kg = (storageCapacity_kWh*3.6e6)/(avgc_data.p_waterHeatCapacity_JpkgK * (maxTemperature_degC - minTemperature_degC)); - //double heatCapacity_JpK = avgc_data.p_waterHeatCapacity_JpkgK * storageCapacity_kg; - //in short -> - double heatCapacity_JpK = storageCapacity_kWh*3.6e6 / (maxTemperature_degC - minTemperature_degC); - new J_EAStorageHeat(parentGC, storageType, storagePower_kw, lossFactor_WpK, energyModel.p_timeStep_h, initialTemperature_degC, minTemperature_degC, maxTemperature_degC, setTemperature_degC, heatCapacity_JpK, OL_AmbientTempType.AMBIENT_AIR ); - - break; - - case STORAGE_GAS: - - break; - - default: - - return; -} -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205833</Id> - <Name>f_iEAGenericCompanies</Name> - <Description>Initialisation of the Energy assets using average values for companies that have not filled in the survey (yet) combined with totals (floor surface, electricity/yr, gas/yr and trucks) of the simulated area.</Description> - <X>450</X> - <Y>553</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>pv_installed_kwp</Name> - <Type>Double</Type> - </Parameter> - <Body>//Create current & future scenario parameter list -J_scenario_Current current_scenario_list = new J_scenario_Current(); -zero_Interface.c_scenarioMap_Current.put(companyGC.p_uid, current_scenario_list); - -J_scenario_Future future_scenario_list = new J_scenario_Future(); -zero_Interface.c_scenarioMap_Future.put(companyGC.p_uid, future_scenario_list); - -//Set parent -current_scenario_list.setParentAgent(companyGC); -future_scenario_list.setParentAgent(companyGC); - -//Add current grid capacity to current (and future, feedin, physical, as no data on plans so assumption it is/stays the same) scenario list -current_scenario_list.setCurrentContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); -future_scenario_list.setRequestedContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); -current_scenario_list.setCurrentContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); -future_scenario_list.setRequestedContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); -current_scenario_list.setCurrentPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); -future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); - -//Basic heating and electricity demand profiles -if (companyGC.p_floorSurfaceArea_m2 > 0){ - - if(p_remainingTotals.getRemainingElectricityDeliveryCompanies_kWh(companyGC) > 0){ - //Buidling Base electricity load - double Remaining_electricity_demand_kWh_p_m2_yr = p_remainingTotals.getElectricityDeliveryOfAnonymousCompanies_kWhpm2(companyGC); - double yearlyElectricityDemand_kWh = Remaining_electricity_demand_kWh_p_m2_yr * companyGC.p_floorSurfaceArea_m2; - - //Add base load profile - f_addElectricityDemandProfile(companyGC, yearlyElectricityDemand_kWh, null, false, "default_office_electricity_demand_fr"); - } - - if(p_remainingTotals.getRemainingGasDeliveryCompanies_m3(companyGC) > 0){ - //Building Gas demand profile (purely heating) - double Remaining_gas_demand_m3_p_m2_yr = p_remainingTotals.getGasDeliveryOfAnonymousCompanies_m3pm2(companyGC); - double yearlyGasDemand_m3 = Remaining_gas_demand_m3_p_m2_yr*companyGC.p_floorSurfaceArea_m2; - double ratioGasUsedForHeating = 1; - - //Add heat demand profile - OL_GridConnectionHeatingType heatingType = avgc_data.p_avgCompanyHeatingMethod; - double maxHeatOutputPower_kW = f_createHeatProfileFromAnnualGasTotal(companyGC, heatingType, yearlyGasDemand_m3, ratioGasUsedForHeating); - f_addHeatAsset(companyGC, heatingType, maxHeatOutputPower_kW); - companyGC.f_addHeatManagement(heatingType, false); - - //Set current scenario heating type - current_scenario_list.setCurrentHeatingType(heatingType); - future_scenario_list.setPlannedHeatingType(heatingType); - } -} - - -//Production asset (PV) ??????????????????????????????????????????? willen we die toevoegen aan generieke bedrijven? -if(pv_installed_kwp != null && pv_installed_kwp > 0){ - f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", pv_installed_kwp); -} - - -//add to scenario: current & future -current_scenario_list.setCurrentBatteryPower_kW(0f); -current_scenario_list.setCurrentBatteryCapacity_kWh(0f); -future_scenario_list.setPlannedBatteryPower_kW(0f); -future_scenario_list.setPlannedBatteryCapacity_kWh(0f); - - -//Transport (total remaining cars, vans and trucks (total as defined in project selection - survey company usage) - -//Cars -if(p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.CAR) > 0){ - int nbCars = 0; - int ceiledRemainingNumberOfCarsPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.CAR); - for (int k = 0; k < ceiledRemainingNumberOfCarsPerCompany; k++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.CAR, - 1); - nbCars++; - } - - //Reduce remaining number of anonymous companies that still can get vehicles - p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.CAR, - 1); - - //Set current scenario cars - current_scenario_list.setCurrentDieselCars(nbCars); - //Set planned scenario cars - future_scenario_list.setPlannedEVCars(0); -} - -//Vans -if(p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN) > 0){ - int nbVans = 0; - int ceiledRemainingNumberOfVansPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.VAN); - for (int k = 0; k< ceiledRemainingNumberOfVansPerCompany; k++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, true, 0); - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - 1); - nbVans++; - } - - //Reduce remaining number of anonymous companies that still can get vehicles - p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.VAN, - 1); - - //Set current scenario vans - current_scenario_list.setCurrentDieselVans(nbVans); - //Set planned scenario vans - future_scenario_list.setPlannedEVVans(0); -} - -//Trucks -if (p_remainingTotals.getRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK) > 0){ - int nbTrucks= 0; - int ceiledRemainingNumberOfTrucksPerCompany = p_remainingTotals.getCeiledRemainingNumberOfVehiclesPerCompany(companyGC, OL_VehicleType.TRUCK); - for (int k = 0; k< ceiledRemainingNumberOfTrucksPerCompany; k++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, true, 0); - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK, - 1); - nbTrucks++; - } - - //Reduce remaining number of anonymous companies that still can get vehicles - p_remainingTotals.adjustRemainingNumberOfAnonymousCompaniesForVehicleType(companyGC, OL_VehicleType.TRUCK, - 1); - - //Set current scenario trucks - current_scenario_list.setCurrentDieselTrucks(nbTrucks); - //Set planned scenario trucks - future_scenario_list.setPlannedEVTrucks(0); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205835</Id> - <Name>f_createRemainingBuildings</Name> - <X>1546.739</X> - <Y>659</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//If remaining buildings in model, add to legend -if(c_remainingBuilding_data.size()>0){ - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.REMAINING); -} - -for (Building_data remainingBuilding_data : c_remainingBuilding_data) { - - GIS_Building building = energyModel.add_pop_GIS_Buildings(); - building.p_id = remainingBuilding_data.building_id(); - building.p_longitude = remainingBuilding_data.longitude(); - building.p_latitude = remainingBuilding_data.latitude(); - building.setLatLon(building.p_latitude, building.p_longitude); - building.p_GISObjectType = OL_GISObjectType.REMAINING_BUILDING; - - //Building + styling the gisregion and putting it on the map - building.gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(remainingBuilding_data.polygon(), building.p_GISObjectType)); - - building.p_defaultFillColor = zero_Interface.v_restBuildingColor; - building.p_defaultLineColor = zero_Interface.v_restBuildingLineColor; - zero_Interface.f_styleAreas(building); -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205837</Id> - <Name>f_addTransportHydrogen</Name> - <X>900</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>vehicle_type</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>isDefaultVehicle</Name> - <Type>boolean</Type> - </Parameter> - <Parameter> - <Name>annualTravelDistance_km</Name> - <Type>double</Type> - </Parameter> - <Body>double energyConsumption_kWhpkm = 0; -double vehicleScaling = 1.0; - -//Hydrogen car -switch (vehicle_type){ - - case HYDROGEN_VEHICLE: - energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionCar_kWhpkm; - break; - - case HYDROGEN_VAN: - energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionVan_kWhpkm; - break; - - case HYDROGEN_TRUCK: - energyConsumption_kWhpkm = avgc_data.p_avgHydrogenConsumptionTruck_kWhpkm; - break; -} - -//Create EA -J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); - -//Set annual travel distance -if (!isDefaultVehicle && annualTravelDistance_km > 1000){ - hydrogenVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); -} -else if (vehicle_type == OL_EnergyAssetType.HYDROGEN_VAN){ - hydrogenVehicle.tripTracker.setAnnualDistance_km(avgc_data.p_avgAnnualTravelDistanceVan_km); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205845</Id> - <Name>f_addChargingDemandProfile</Name> - <X>900</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>GC</Name> - <Type>GCPublicCharger</Type> - </Parameter> - <Parameter> - <Name>profileName</Name> - <Type>String</Type> - </Parameter> - <Body>J_EAProfile profile = new J_EAProfile(GC, OL_EnergyCarriers.ELECTRICITY, null, OL_AssetFlowCategories.evChargingPower_kW, energyModel.p_timeStep_h); -profile.energyAssetName = "charging profile"; -List<Double> quarterlyEnergyDemand_kWh = selectValues(double.class, "SELECT " + profileName + " FROM charging_profiles;"); -profile.a_energyProfile_kWh = quarterlyEnergyDemand_kWh.stream().mapToDouble(d -> max(0,d)).map( d -> d / 4).toArray();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GISRegion</ReturnType> - <Id>1726584205847</Id> - <Name>f_createGISRegionChargingStation</Name> - <X>1547.621</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>lat</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>lon</Name> - <Type>double</Type> - </Parameter> - <Body>//create shape Coords -int nb_points = 6; -double[] GISCoords = new double[nb_points * 2]; - -for (int i=0; i < nb_points ; i++){ - double size = 0.00004; - GISCoords[i * 2] = size * cos( i * ( 2 * Math.PI ) / nb_points) + lat; - GISCoords[i * 2 + 1] = 1.64 * size * sin( i * ( 2 * Math.PI ) / nb_points) + lon; -} - -//Create the region -GISRegion gisregion = zero_Interface.f_createGISObject( GISCoords ); - -return gisregion; -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205849</Id> - <Name>f_createChargingStations</Name> - <X>431</X> - <Y>831</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Initialize parameters -int laadpaal_nr = 1; -int laadstation_nr = 1; - -//Loop over charging stations -for (Chargingstation_data dataChargingStation : f_getChargingstationsInSubScope(c_chargingstation_data)){ - - GCPublicCharger chargingStation = energyModel.add_PublicChargers(); - - chargingStation.set_p_gridConnectionID( dataChargingStation.gc_id()); - chargingStation.set_p_name( dataChargingStation.gc_name() ); - - //Electric Capacity - if (dataChargingStation.connection_capacity_kw() != null) { - // Assume the connection capacity is both physical and contracted. - chargingStation.v_liveConnectionMetaData.physicalCapacity_kW = dataChargingStation.connection_capacity_kw(); - chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = dataChargingStation.connection_capacity_kw(); - chargingStation.v_liveConnectionMetaData.physicalCapacityKnown = true; - chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - - //chargingStation.set_p_heatingType( OL_GridConnectionHeatingType.NONE ); - - //Set parent node - chargingStation.p_parentNodeElectricID = dataChargingStation.gridnode_id(); - - //Is active at start? - chargingStation.v_isActive = dataChargingStation.initially_active(); - - //chargingStation.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.SIMPLE); - - //Create and connect owner - ConnectionOwner owner = energyModel.add_pop_connectionOwners(); - - chargingStation.set_p_ownerID( dataChargingStation.owner_id()); - owner.set_p_actorID( chargingStation.p_ownerID ); - //owner.set_p_actorType( OL_ActorType.CONNECTIONOWNER ); - owner.set_p_connectionOwnerType( OL_ConnectionOwnerType.CHARGEPOINT_OP ); - owner.b_dataSharingAgreed = true; - - chargingStation.set_p_owner( owner ); - - - //Check if centre or single - chargingStation.p_isChargingCentre = dataChargingStation.is_charging_centre(); - if (chargingStation.p_isChargingCentre) { - - if (chargingStation.p_ownerID == null){ - chargingStation.p_ownerID = "Publiek laadstation " + laadstation_nr; - laadstation_nr++; - } - - chargingStation.set_p_nbOfChargers( dataChargingStation.number_of_chargers() ); - chargingStation.set_p_maxChargingPower_kW( dataChargingStation.power_per_charger_kw() ); - - //If check on connection capacity to prevent more charging than possible - if(chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW > chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW){ - chargingStation.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = chargingStation.p_nbOfChargers*chargingStation.p_maxChargingPower_kW; - } - - //Set vehicle type - chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); - - //Create vehicles that charge at the charging centre - if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ - List<J_ChargingSession> chargerProfile = f_getChargerProfile(); - boolean V1GCapable = randomTrue(avgc_data.p_v1gProbability); - boolean V2GCapable = randomTrue(avgc_data.p_v2gProbability); - new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); - } - else{ - for(int k = 0; k < chargingStation.p_nbOfChargers*avgc_data.p_avgVehiclesPerChargePoint; k++ ){ - f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); - } - } - - - if (dataChargingStation.polygon() != null) { - //Create EA GIS object (building) for the charging centre - GIS_Object area = f_createGISObject( dataChargingStation.gc_name(), dataChargingStation.latitude(), dataChargingStation.longitude(), dataChargingStation.polygon(), OL_GISObjectType.CHARGER ); - - //Set gis object type - area.p_GISObjectType = OL_GISObjectType.CHARGER; - - //Add to collections - area.c_containedGridConnections.add(chargingStation); - chargingStation.c_connectedGISObjects.add(area); - - //Style building - area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); - area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); - area.set_p_defaultLineWidth( zero_Interface.v_energyAssetLineWidth); - zero_Interface.f_styleAreas(area); - } - else{ - traceln("No gisobject created for charge centre: " + chargingStation.p_name); - } - } - else { - - if (chargingStation.p_ownerID == null){ - chargingStation.p_ownerID = "Publieke laadpaal " + laadpaal_nr; - laadpaal_nr++; - } - - //Set charging power - chargingStation.set_p_maxChargingPower_kW( dataChargingStation.power_per_charger_kw() ); - - //Set vehicle type - chargingStation.p_chargingVehicleType = dataChargingStation.vehicle_type(); - - //Create vehicles that charge at the charging station - if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ - List<J_ChargingSession> chargerProfile = f_getChargerProfile(); - boolean V1GCapable = true; //randomTrue(avgc_data.p_v1gProbability); - boolean V2GCapable = true; //randomTrue(avgc_data.p_v2gProbability); - new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); - } - else{ - for(int k = 0; k < avgc_data.p_avgVehiclesPerChargePoint; k++ ){ - f_addElectricVehicle(chargingStation, chargingStation.p_chargingVehicleType, true, 0, chargingStation.p_maxChargingPower_kW); - } - } - - - //Create GIS object for the chargingStation - GIS_Object area = energyModel.add_pop_GIS_Objects(); - - //position and coordinates - area.p_latitude = dataChargingStation.latitude(); - area.p_longitude = dataChargingStation.longitude(); - area.setLatLon(area.p_latitude, area.p_longitude); - - //Create gisregion - area.gisRegion = f_createGISRegionChargingStation( area.p_latitude, area.p_longitude ); - - //Set area type - area.p_GISObjectType = OL_GISObjectType.CHARGER; - - chargingStation.c_connectedGISObjects.add(area); - area.c_containedGridConnections.add(chargingStation); - if(chargingStation.v_isActive){ - area.set_p_defaultFillColor( zero_Interface.v_chargingStationColor ); - area.set_p_defaultLineColor( zero_Interface.v_chargingStationLineColor ); - } - else{ - area.set_p_defaultFillColor( zero_Interface.v_newChargingStationColor ); - area.set_p_defaultLineColor( zero_Interface.v_newChargingStationLineColor ); - } - zero_Interface.f_styleAreas(area); - - zero_Interface.c_modelActiveSpecialGISObjects.add(area.p_GISObjectType); - } -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205853</Id> - <Name>f_createInterface</Name> - <X>30</X> - <Y>930</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//OVERRIDE THE zero_Interface parameter here -//zero_Interface = YOUR INTERFACE; -throw new RuntimeException("Didnt replace the generic interface with a project interface!");</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205859</Id> - <Name>f_createGISCables</Name> - <X>1547.621</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Create cables -for (Cable_data dataCable : c_cable_data) { - if(dataCable.line().contains("Multi")){ - continue; - } - zero_Interface.f_createGISLine(f_createGISObjectsTokens(dataCable.line(), dataCable.type()), dataCable.type()); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205861</Id> - <Name>f_createPreprocessedElectricityProfile_PV</Name> - <Description>Principe: -verbruik = levering + productie - teruglevering</Description> - <X>920</X> - <Y>130</Y> - <Label> - <X>9</X> - <Y>-1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityDelivery_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityFeedin_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityProduction_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>pvPower_kW</Name> - <Type>Double</Type> - </Parameter> - <Parameter> - <Name>yearlyHeatPumpElectricityConsumption_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Body>//Create the profile -J_EAProfile profile = new J_EAProfile(parentGC, OL_EnergyCarriers.ELECTRICITY, null, OL_AssetFlowCategories.fixedConsumptionElectric_kW, energyModel.p_timeStep_h); -profile.setStartTime_h(v_simStartHour_h); -profile.energyAssetName = parentGC.p_ownerID + " custom profile"; -double extraConsumption_kWh = 0; - -//Initialize parameters -double nettDelivery_kWh; - -//Preprocessing and adding new array to the J_EAProfile -if (yearlyElectricityProduction_kWh != null && yearlyElectricityFeedin_kWh != null) { // When delivery, feedin and production profiles are available - double[] yearlyElectricityConsumption_kWh = new double[yearlyElectricityDelivery_kWh.length]; - for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { - yearlyElectricityConsumption_kWh[i] = yearlyElectricityDelivery_kWh[i] - yearlyElectricityFeedin_kWh[i] + yearlyElectricityProduction_kWh[i]; - extraConsumption_kWh += -min(yearlyElectricityConsumption_kWh[i],0); - yearlyElectricityConsumption_kWh[i] = max(0,yearlyElectricityConsumption_kWh[i]); - } - profile.a_energyProfile_kWh = yearlyElectricityConsumption_kWh; - nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum() - Arrays.stream(yearlyElectricityFeedin_kWh).sum(); - //traceln("Calculating consumption profile on delivery, feedin and production profiles for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); -} else if (pvPower_kW != null && pvPower_kW > 0) { // When only delivery, feedin profiles are available, in addition to PV power, make explicit consumption and production arrays using delivery profile and PV installed power [kW] - double[] yearlyElectricityConsumption_kWh = new double[yearlyElectricityDelivery_kWh.length]; - if (yearlyElectricityFeedin_kWh != null) { // Terugleveringsdata beschikbaar - //traceln("Estimating electricity consumption based on delivery and feedin profiles with pv power estimate for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); - double addedConsumption_kWh = 0; - for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { - double pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); - double estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); - addedConsumption_kWh += max(0, pvPowerEstimate_kW*0.25 - yearlyElectricityFeedin_kWh[i]); - yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); - } - //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); - } else { // Zonder terugleveringsdata, alleen afname - traceln("Estimating electricity consumption based on delivery profile and pv power for company %s with %s kWp PV", parentGC.p_gridConnectionID, pvPower_kW); - double pvPowerEstimate_kW = 0; - double estimatedConsumption_kWh = 0; - double addedConsumption_kWh = 0; - for (int i = 0; i < yearlyElectricityDelivery_kWh.length; i++) { - pvPowerEstimate_kW = pvPower_kW * energyModel.pp_PVProduction35DegSouth_fr.getValue(v_simStartHour_h+i*0.25); - - if (yearlyElectricityDelivery_kWh[i] != 0) { // Only update consumption if delivery is non-zero, otherwise hold previously estimated consumption constant - estimatedConsumption_kWh = yearlyElectricityDelivery_kWh[i] + pvPowerEstimate_kW*0.25; - //addedConsumption_kWh += pvPowerEstimate_kW * 0.25; - } else { - estimatedConsumption_kWh = min(pvPowerEstimate_kW*0.25, estimatedConsumption_kWh); // Take minimum to prevent to much consumption when there is not enough sun in model sun, compared to real sun data!! - - //addedConsumption_kWh += max(0, estimatedConsumption_kWh - pvPowerEstimate_kW*0.25);//* 0.25; - } - yearlyElectricityConsumption_kWh[i] = max(0,estimatedConsumption_kWh); - } - //traceln("Added electricity consumed compared to delivery profile: %s MWh", addedConsumption_kWh/1000); - } - profile.a_energyProfile_kWh = yearlyElectricityConsumption_kWh; - nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); -} else { // No PV production - profile.a_energyProfile_kWh = yearlyElectricityDelivery_kWh; - nettDelivery_kWh = Arrays.stream(yearlyElectricityDelivery_kWh).sum(); -} - -//Adjust remaining totals -p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(parentGC, - nettDelivery_kWh); - -if (extraConsumption_kWh > 1) { - traceln("Preprocessing of delivery and production data led to negative consumption of: %s kWh", extraConsumption_kWh); - traceln("Consumption profile was capped to 0kW"); -} - -if(yearlyHeatPumpElectricityConsumption_kWh != null){ - for(int i = 0; i < yearlyHeatPumpElectricityConsumption_kWh.length; i++){ - yearlyHeatPumpElectricityConsumption_kWh[i] = max(0,yearlyHeatPumpElectricityConsumption_kWh[i]); - } - double[] preProcessedDefaultConsumptionProfile = new double[profile.a_energyProfile_kWh.length]; - for(int i = 0; i < preProcessedDefaultConsumptionProfile.length; i++){ - preProcessedDefaultConsumptionProfile[i] = max(0,profile.a_energyProfile_kWh[i] - yearlyHeatPumpElectricityConsumption_kWh[i]); - } - profile.a_energyProfile_kWh = preProcessedDefaultConsumptionProfile; - - J_EAProfile profileHeatPumpElectricityConsumption = new J_EAProfile(parentGC, OL_EnergyCarriers.ELECTRICITY, yearlyHeatPumpElectricityConsumption_kWh, OL_AssetFlowCategories.heatPumpElectricityConsumption_kW, energyModel.p_timeStep_h); - profileHeatPumpElectricityConsumption.setStartTime_h(v_simStartHour_h); - profileHeatPumpElectricityConsumption.energyAssetName = parentGC.p_ownerID + " custom heat pump electricity consumption profile"; -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205865</Id> - <Name>f_startUpLoader_default</Name> - <X>60</X> - <Y>90</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>traceln("---------------------------"); -traceln("======= STARTING UP ======="); -traceln("---------------------------"); -traceln(""); - -double startTime = System.currentTimeMillis(); -v_timeOfModelStart_ms = startTime; - -//Get simulation start time -f_getSimulationTimeVariables(); - -//Send avgc data to engine -avgc_data.f_setAVGC_data(); - -// Set default heating strategies -f_setDefaultHeatingStrategies(); - -//Import excel data to the anylogic database -f_importExcelTablesToDB(); - -//Fill the record collections -f_readDatabase(); - -//Initialize model totals -p_remainingTotals.initializeModelTotals(project_data, user); - -//Weather market data -f_setEngineProfiles(); - -//Create the project interface -f_createInterface(); - -//Initialize the pointers on the interface -f_initializeInterfacePointers(); - -//Project specific styling (Needs to happen before configuring the engine) -zero_Interface.f_projectSpecificStyling(); - -// Populate the model -f_configureEngine_default(); - -//Start up of the User Interface (Needs to happen after configuring the engine) -zero_Interface.f_UIStartup(); - -//Ending of the start up -double endTime = System.currentTimeMillis(); -double duration = endTime - startTime; -v_modelStartUpDuration_s = roundToDecimal(duration / 1000, 3); - -traceln(" "); -traceln("*** Start up finished *** "); -traceln("*** Start up duration: "+ v_modelStartUpDuration_s + " s ***"); -traceln(" "); - - -//Simulate full year simulation for initial KPIs -if( settings.runHeadlessAtStartup() ){ - energyModel.f_runRapidSimulation(); // Do a full year run to have KPIs right away! - - if(project_data.project_type() == BUSINESSPARK){ - for(GCUtility GC : energyModel.UtilityConnections){ - if(GC.p_owner.p_detailedCompany){ // For now only detailed companies - GC.v_originalRapidRunData = GC.v_rapidRunData; - } - } - } - zero_Interface.gr_simulateYear.setVisible(false); - zero_Interface.gr_loadIconYearSimulation.setVisible(false); - zero_Interface.b_resultsUpToDate = true; - zero_Interface.uI_Results.f_enableNonLivePlotRadioButtons(true); -} -else { - zero_Interface.f_resetSettings(); -} - -zero_Interface.uI_Results.f_updateResultsUI(energyModel); - -//Clear all data record collections after loader is done -f_clearDataRecords();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205867</Id> - <Name>f_readDatabase</Name> - <X>-390</X> - <Y>190</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Override this function and: -//Fill the data parameters and collections using your own functions here</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205869</Id> - <Name>f_clearDataRecords</Name> - <X>-390</X> - <Y>710</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Function used to clear all data record collections after the loader is done -//-> no longer needed, by clearing it is send to the garbage collector -> saves memory - -/* -genericProfiles_data = null; -c_GridNode_data.clear(); -c_SurveyCompanyBuilding_data.clear(); -c_GenericCompanyBuilding_data.clear(); -c_HouseBuilding_data.clear(); -c_remainingBuilding_data.clear(); -c_Solarfarm_data.clear(); -c_Windfarm_data.clear(); -c_Electrolyser_data.clear(); -c_Battery_data.clear(); -c_Chargingstation_data.clear(); -c_Neighbourhood_data.clear(); -c_Parcel_data.clear(); -c_Cable_data_LV.clear(); -c_Cable_data_MV.clear(); -*/ -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205871</Id> - <Name>f_createSurveyCompanies_Excel</Name> - <X>430</X> - <Y>508</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>traceln("Survey companies excel should be overridden with your own code");</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205873</Id> - <Name>f_createCompanies</Name> - <X>420</X> - <Y>100</Y> - <Label> - <X>11</X> - <Y>1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Create survey companies based on survey inload structure -switch(project_data.survey_type()){ - - case ZORM: - f_createSurveyCompanies_Zorm(); - break; - - case EXCEL: - f_createSurveyCompanies_Excel(); - break; - - case NONE: - //Do nothing. - break; -} - -//Create generic companies -f_createGenericCompanies();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1726584205881</Id> - <Name>f_createAdditionalGISObjects</Name> - <X>90</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Parking spaces -f_createParkingSpots(); - -//Parcels -f_createGISParcels(); - -//Remaining buildings (no GC or EA) -f_createRemainingBuildings(); - -//Cables -f_createGISCables();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1727792666396</Id> - <Name>f_overwriteSpecificDatabaseValues</Name> - <X>-390</X> - <Y>140</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//SHOULD BE OVERRIDDEN - -//Function used to overwrite specific database values after the databases have been loaded in -//Usecases for example are adjusting floor surface area to 0, to cause no consumption, etc. -// --> without the loss of data in your database sources itself - -//Example code -/* -//Adjust building floor surface area to 0 to cause no consumption (empty buildings) - -List<String> buildingIDS = new ArrayList<String>(); - -// Define the building ids that need to have no consumption -String buildingID_XXXX = "XXXX"; - -buildingIDS.add(buildingID_XXXX); - - -for(String buildingID : buildingIDS){ - update(buildings) - .where(buildings.building_id.eq(buildingID)) - .set(buildings.cumulative_floor_surface_m2, 0.0) - .execute(); -} -*/</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[]</ReturnType> - <Id>1728035809860</Id> - <Name>f_convertFloatArrayToDoubleArray</Name> - <X>1550</X> - <Y>880</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>floatArray</Name> - <Type>float[]</Type> - </Parameter> - <Body>if (floatArray == null) { - return null; -} -double[] doubleArray = new double[floatArray.length]; -for (int i = 0; i < floatArray.length; i++) { - doubleArray[i] = floatArray[i]; -} -return doubleArray;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1728039545686</Id> - <Name>f_getPreprocessedElectricityConsumptionTotal</Name> - <X>920</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>annualElectricityDelivery_kWh</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>annualElectricityFeedin_kWh</Name> - <Type>Integer</Type> - </Parameter> - <Parameter> - <Name>annualElectricityProduction_kWh</Name> - <Type>Integer</Type> - </Parameter> - <Parameter> - <Name>pvPower_kW</Name> - <Type>Double</Type> - </Parameter> - <Body>double annualElectricityConsumption_kWh = 0; -if(annualElectricityFeedin_kWh != null){ - if(annualElectricityProduction_kWh != null){ - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh - annualElectricityFeedin_kWh + annualElectricityProduction_kWh; - } - else if(pvPower_kW != null && pvPower_kW > 0){ - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh - annualElectricityFeedin_kWh + pvPower_kW*avgc_data.p_avgFullLoadHoursPV_hr; - } - else{//Geen opwek - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; - } -} -else if(pvPower_kW != null && pvPower_kW > 0){ - //WAT HIER?? Voor nu consumption = delivery - //Maar: moet preprocessing van standaard profiel worden, waar gelijktijdigheid gecheckt wordt! - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; -} -else{ - annualElectricityConsumption_kWh = annualElectricityDelivery_kWh; -} -return annualElectricityConsumption_kWh; -</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1732112209863</Id> - <Name>f_createCustomPVAsset</Name> - <X>900</X> - <Y>220</Y> - <Label> - <X>9</X> - <Y>-1</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyElectricityProduction_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>pvPower_kW</Name> - <Type>Double</Type> - </Parameter> - <Body>if (yearlyElectricityProduction_kWh.length != 35040) { - traceln("Skipping creation of PV asset: need 35040 data points, got %d", yearlyElectricityProduction_kWh.length); - return; -} - -// Generate custom PV production asset using production data! -double[] a_arguments = IntStream.range(0, 35040).mapToDouble(i -> v_simStartHour_h + i*0.25).toArray(); // time axis - -// From kWh/quarter to normalized power -double totalProduction_kWh = Arrays.stream(yearlyElectricityProduction_kWh).sum(); -double fullLoadHours_h = totalProduction_kWh / pvPower_kW; -double[] a_normalizedPower_fr = Arrays.stream(yearlyElectricityProduction_kWh).map(i -> 4 * i / totalProduction_kWh * fullLoadHours_h ).toArray(); - -//traceln("Full load hours of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).sum()/4); -//traceln("Max of a_normalizedPower_fr %s: ", Arrays.stream(a_normalizedPower_fr).max()); - -TableFunction tf_customPVproduction_fr = new TableFunction(a_arguments, a_normalizedPower_fr, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); -J_ProfilePointer profilePointer = new J_ProfilePointer((parentGC.p_ownerID + "_PVproduction") , tf_customPVproduction_fr); -energyModel.f_addProfile(profilePointer); -J_EAProduction production_asset = new J_EAProduction(parentGC, OL_EnergyAssetType.PHOTOVOLTAIC, (parentGC.p_ownerID + "_rooftopPV"), OL_EnergyCarriers.ELECTRICITY, (double)pvPower_kW, energyModel.p_timeStep_h, profilePointer); - -traceln("Custom PV asset added to GC: " + parentGC.p_ownerID); -//traceln("Custom PV asset added to %s with installed power %s kW and %s full load hours!", parentGC.p_ownerID, pvPower_kW, fullLoadHours_h); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1732112244908</Id> - <Name>f_iEASurveyCompanies_Zorm</Name> - <X>448</X> - <Y>220</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>gridConnection</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>//Initialize boolean that sets the creation of currently existing electric (demand) EA -boolean createElectricEA = true; - -//Create current scenario parameter list -J_scenario_Current current_scenario_list = new J_scenario_Current(); -zero_Interface.c_scenarioMap_Current.put(companyGC.p_uid, current_scenario_list); - -//Create future scenario parameter list -J_scenario_Future future_scenario_list = new J_scenario_Future(); -zero_Interface.c_scenarioMap_Future.put(companyGC.p_uid, future_scenario_list); - - - -//Get PV power (used for preprocessing and estimating grid capacity if unknown) -Double pvPower_kW = (gridConnection.getSupply().getPvInstalledKwp() != null) ? new Double(gridConnection.getSupply().getPvInstalledKwp()) : null; - - -////Electricity (connection and consumption) -//Initialize contract capacity with 0 for when companies fill in survey already but currently have no connection yet -companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = 0.0; -companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = 0.0; -companyGC.v_liveConnectionMetaData.physicalCapacity_kW = 0.0; - -f_createDieselTractors(companyGC, gridConnection.getTransport().getAgriculture()); - -//Check for electricity connection and data -if (gridConnection.getElectricity().getHasConnection()){ - - //Connection capacities - if(gridConnection.getElectricity().getContractedConnectionCapacityKw() != null && gridConnection.getElectricity().getContractedConnectionCapacityKw() >= 0){ - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = gridConnection.getElectricity().getContractedConnectionCapacityKw(); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = true; - } - else if((gridConnection.getElectricity().getContractedConnectionCapacityKw() == null || - gridConnection.getElectricity().getContractedConnectionCapacityKw() < 0) && - (gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() == null || - gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() <= 0)) { - traceln("SURVEYOWNER HAS NOT FILLED IN DELIVERY OR PHYSICAL CONNECTION CAPACITY!!!"); - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgUtilityConnectionCapacity_kW; - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - else{ - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw()); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - } - - - //Check if contract capacity feedin has been filled in: if not, make the same as pv capacity - if(gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw() >= 0){ - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = ((double)gridConnection.getElectricity().getGrootverbruik().getContractedConnectionSupplyCapacityKw()); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = true; - } - else{ - if(pvPower_kW != null){ - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = pvPower_kW; - } - else{ - companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = 0.0; - } - companyGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - } - - //Check if physical capacity has been filled in: if not, make the same as maximum of contract delivery and feedin - if(gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() != null && gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw() > 0){ - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = (double)gridConnection.getElectricity().getGrootverbruik().getPhysicalCapacityKw(); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.physicalCapacityKnown = true; - } - else{ - companyGC.v_liveConnectionMetaData.physicalCapacity_kW = max(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW, companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); //Contracted connection capacity - companyGC.v_liveConnectionMetaData.physicalCapacityKnown = false; - } - - - //Add to current scenario list - current_scenario_list.setCurrentContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - current_scenario_list.setCurrentContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - current_scenario_list.setCurrentPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); - - - //Electricity consumption profile - String profileName = "default_office_electricity_demand_fr"; - - //Check if quarter hourly values are available in vallum - boolean createdTimeSeriesAssets = f_createElectricityTimeSeriesAssets(companyGC, gridConnection); - - if(createdTimeSeriesAssets){ - if(!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile or total is known. - createElectricEA = false; - } - } - else{ //(!createdTimeSeriesAssets) { // - double yearlyElectricityConsumption_kWh = 0; - try { // Check if quarterly hour values are available in excel database - if(selectFirstValue(Double.class, "SELECT " + "ccid" + gridConnection.getSequence().toString() + "_demand FROM comp_elec_consumption LIMIT 1;") != null){ - companyGC.v_hasQuarterHourlyValues = true; - profileName = "ccid" + companyGC.p_gridConnectionID; - - //Check if solar was already producing in simualtion year (Check for now: if year production = 0 , no solar yet, if year production = null, no data: so assume there was solar already) - if(gridConnection.getElectricity().getAnnualElectricityProduction_kWh() != null && gridConnection.getElectricity().getAnnualElectricityProduction_kWh () == 0){ - pvPower_kW = null; - } - - if (!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile is present. - createElectricEA = false; - } - } - } - catch(Exception e) { - //Data not available, do nothing and leave v_hasQuarterHourlyValues on false. - } - - if(companyGC.v_hasQuarterHourlyValues == false){//Calculate yearly consumption based on yearly delivery (and yearly feedin, production or solarpanels if available) - //Get totals - double yearlyElectricityDelivery_kWh = (gridConnection.getElectricity().getAnnualElectricityDemandKwh() != null) ? gridConnection.getElectricity().getAnnualElectricityDemandKwh() : 0; // Yearly electricity consumption (0 if value is null) - Integer yearlyElectricityFeedin_kWh = gridConnection.getElectricity().getAnnualElectricityFeedIn_kWh(); - Integer yearlyElectricityProduction_kWh = gridConnection.getElectricity().getAnnualElectricityProduction_kWh(); - - //Calculate consumption - yearlyElectricityConsumption_kWh = f_getPreprocessedElectricityConsumptionTotal(companyGC, yearlyElectricityDelivery_kWh, yearlyElectricityFeedin_kWh, yearlyElectricityProduction_kWh, pvPower_kW); - - //If no electricity consumption, determine the consumption based on average values and floor surface and connection capacity - if(yearlyElectricityConsumption_kWh == 0){ - yearlyElectricityConsumption_kWh = avgc_data.p_avgCompanyElectricityConsumption_kWhpm2*companyGC.p_floorSurfaceArea_m2; - - //Check if it is within the contracted limits (peak should at least be 20% lower than contracted capacity - if(yearlyElectricityConsumption_kWh*defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr() > 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW){ - yearlyElectricityConsumption_kWh = 0.8*companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW/defaultProfiles_data.getDefaultOfficeElectricityDemandProfileMaximum_fr(); - } - - } - else if(!settings.createCurrentElectricityEA()){//input boolean: Dont create current electric energy assets if electricity profile or total is known. - createElectricEA = false; - } - - //Update total Yearly electricity consumption (only when no timestep data available, cause when thats avaiable, it happens in the preprocessing function) - if (yearlyElectricityDelivery_kWh != 0){ - p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(companyGC, - yearlyElectricityDelivery_kWh); - } - else{ - p_remainingTotals.adjustRemainingElectricityDeliveryCompanies_kWh(companyGC, - yearlyElectricityConsumption_kWh); - } - } - - //Add base electricity demand profile (with profile if available, with generic pattern if only yearly data is available) - f_addElectricityDemandProfile(companyGC, yearlyElectricityConsumption_kWh, pvPower_kW, companyGC.v_hasQuarterHourlyValues, profileName); - } -} - -//If everything is 0 set the GC as non active -if(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW == 0 && companyGC.v_liveConnectionMetaData.physicalCapacity_kW == 0){ - companyGC.v_isActive = false; -} - -//Grid expansion request -if (gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator() != null && gridConnection.getElectricity().getGridExpansion().getHasRequestAtGridOperator()){ - future_scenario_list.setRequestedContractDeliveryCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - future_scenario_list.setRequestedContractFeedinCapacity_kW(((gridConnection.getElectricity().getGridExpansion().getRequestedKW() != null) ? gridConnection.getElectricity().getGridExpansion().getRequestedKW() : 0) + companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(max(companyGC.v_liveConnectionMetaData.physicalCapacity_kW, max(future_scenario_list.getRequestedContractDeliveryCapacity_kW(), future_scenario_list.getRequestedContractFeedinCapacity_kW()))); -} -else{ - future_scenario_list.setRequestedContractDeliveryCapacity_kW(companyGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW); - future_scenario_list.setRequestedContractFeedinCapacity_kW(companyGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW); - future_scenario_list.setRequestedPhysicalConnectionCapacity_kW(companyGC.v_liveConnectionMetaData.physicalCapacity_kW); -} - - -////Supply (pv, wind, etc.) -if (gridConnection.getSupply().getHasSupply() != null && gridConnection.getSupply().getHasSupply()){ - //gridConnection.getElectricity().getAnnualElectricityProductionKwh() // Staat niet meer in het formulier! - - double[] yearlyElectricityProduction_kWh_array = null; - - var quarterHourlyProduction_kWh = gridConnection.getElectricity().getQuarterHourlyProduction_kWh(); - if (quarterHourlyProduction_kWh != null && quarterHourlyProduction_kWh.hasNumberOfValuesForOneYear()) { - yearlyElectricityProduction_kWh_array = f_timeSeriesToQuarterHourlyDoubleArray(quarterHourlyProduction_kWh); - } - - if(yearlyElectricityProduction_kWh_array == null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ - try { - if(selectFirstValue(Double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption LIMIT 1;") != null){ - List<Double> yearlyElectricityProduction_kWh_list = selectValues(double.class, "SELECT " + "ccid" + companyGC.p_gridConnectionID + "_production FROM comp_elec_consumption;"); - yearlyElectricityProduction_kWh_array = (yearlyElectricityProduction_kWh_list != null) ? yearlyElectricityProduction_kWh_list.stream().mapToDouble(d -> max(0,d)).toArray() : null; - } - } - catch(Exception e) { - } - } - if (yearlyElectricityProduction_kWh_array != null && gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0 && !gridConnection.getHeat().getHeatingTypes().contains(com.zenmo.zummon.companysurvey.HeatingType.COMBINED_HEAT_AND_POWER)){ - f_createCustomPVAsset(companyGC, yearlyElectricityProduction_kWh_array, (double)gridConnection.getSupply().getPvInstalledKwp()); // Create custom PV asset when production data is available! - current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); - } else if (gridConnection.getSupply().getPvInstalledKwp() != null && gridConnection.getSupply().getPvInstalledKwp() > 0){ - //gridConnection.getSupply().getPvOrientation(); // Wat doen we hier mee????? Nog niets! - f_addEnergyProduction(companyGC, OL_EnergyAssetType.PHOTOVOLTAIC, "Rooftop Solar", gridConnection.getSupply().getPvInstalledKwp()); - - //add to scenario: current - current_scenario_list.setCurrentPV_kW(gridConnection.getSupply().getPvInstalledKwp()); - //current_scenario_list.currentPV_orient = gridConnection.getSupply().getPvOrientation(); - } - //Wind - if (gridConnection.getSupply().getWindInstalledKw() != null && gridConnection.getSupply().getWindInstalledKw() > 0){ - f_addEnergyProduction(companyGC, OL_EnergyAssetType.WINDMILL, "Wind mill", gridConnection.getSupply().getWindInstalledKw()); - - //add to scenario: current - current_scenario_list.setCurrentWind_kW(gridConnection.getSupply().getWindInstalledKw()); - } -} - -//Planned supply (PV) -if (gridConnection.getSupply().getPvPlanned() != null && gridConnection.getSupply().getPvPlanned()){ - future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW() + (gridConnection.getSupply().getPvPlannedKwp() != null ? gridConnection.getSupply().getPvPlannedKwp() : 0)); - future_scenario_list.setPlannedPV_year(gridConnection.getSupply().getPvPlannedYear()); - //gridConnection.getSupply().getPvPlannedOrientation(); -} -else{ - future_scenario_list.setPlannedPV_kW(current_scenario_list.getCurrentPV_kW()); -} - -//Planned supply (Wind) -if (gridConnection.getSupply().getWindPlannedKw() != null && gridConnection.getSupply().getWindPlannedKw() > 0){ - future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW() + (gridConnection.getSupply().getWindPlannedKw() != null ? gridConnection.getSupply().getWindPlannedKw() : 0)); - // plannedWind_year // ??? -} -else{ - future_scenario_list.setPlannedWind_kW(current_scenario_list.getCurrentWind_kW()); -} - -////Heating and gas -OL_GridConnectionHeatingType heatingType = f_heatingSurveyCompany(companyGC, gridConnection); - -//add heating type to scenario: current and future -current_scenario_list.setCurrentHeatingType(heatingType); -future_scenario_list.setPlannedHeatingType(heatingType); - - -// Electric Storage -Float battery_power_kW = 0f; -Float battery_capacity_kWh = 0f; - -if (gridConnection.getStorage().getHasBattery() != null && gridConnection.getStorage().getHasBattery() && createElectricEA){ // Check if battery present and if electric demand EA should be created - if (gridConnection.getStorage().getBatteryPowerKw() != null){ - battery_power_kW = gridConnection.getStorage().getBatteryPowerKw(); - } - if (gridConnection.getStorage().getBatteryCapacityKwh() != null){ - battery_capacity_kWh = gridConnection.getStorage().getBatteryCapacityKwh(); - } - - if (battery_power_kW > 0 && battery_capacity_kWh > 0) { - f_addStorage(companyGC, battery_power_kW, battery_capacity_kWh, OL_EnergyAssetType.STORAGE_ELECTRIC); - companyGC.f_setBatteryManagement(new J_BatteryManagementSelfConsumption(companyGC)); - } -} - -//add to scenario: current -current_scenario_list.setCurrentBatteryCapacity_kWh(battery_capacity_kWh); -current_scenario_list.setCurrentBatteryPower_kW(battery_power_kW); - - - -if (gridConnection.getStorage().getHasThermalStorage() != null && gridConnection.getStorage().getHasThermalStorage()){ // Check for thermal storage - //gridConnection.getStorage().getThermalStorageKw() - //J_EAStorageHeat(Agent parentAgent, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { - //J_EAStorageHeat(companyGC, OL_EAStorageTypes heatStorageType, double capacityHeat_kW, double lossFactor_WpK, double timestep_h, double initialTemperature_degC, double minTemperature_degC, double maxTemperature_degC, double setTemperature_degC, double heatCapacity_JpK, String ambientTempType ) { - //Denk ook aan aansturing?!! -} - -if (gridConnection.getStorage().getHasPlannedBattery() != null && gridConnection.getStorage().getHasPlannedBattery()){ // Check for planned battery - future_scenario_list.setPlannedBatteryCapacity_kWh((gridConnection.getStorage().getPlannedBatteryCapacityKwh() != null ? gridConnection.getStorage().getPlannedBatteryCapacityKwh() : 0) + current_scenario_list.getCurrentBatteryCapacity_kWh()); - future_scenario_list.setPlannedBatteryPower_kW((gridConnection.getStorage().getPlannedBatteryPowerKw() != null ? gridConnection.getStorage().getPlannedBatteryPowerKw() : 0) + current_scenario_list.getCurrentBatteryPower_kW()); -} -else{ -future_scenario_list.setPlannedBatteryCapacity_kWh(current_scenario_list.getCurrentBatteryCapacity_kWh()); -future_scenario_list.setPlannedBatteryPower_kW(current_scenario_list.getCurrentBatteryPower_kW()); -} - - - -////Transport - -//Cars of comuters and visitors -int nbDailyCarVisitors_notNull = (gridConnection.getTransport().getNumDailyCarVisitors() != null) ? gridConnection.getTransport().getNumDailyCarVisitors() : 0; -int nbDailyCarCommuters_notNull = (gridConnection.getTransport().getNumDailyCarAndVanCommuters() != null) ? gridConnection.getTransport().getNumDailyCarAndVanCommuters() : 0; - -if (nbDailyCarCommuters_notNull + nbDailyCarVisitors_notNull > 0){ - - int nbEVCarsComute = (gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() != null) ? gridConnection.getTransport().getNumCommuterAndVisitorChargePoints() : 0; // Wat doen we hier mee???? - int nbDieselCarsComute = gridConnection.getTransport().getNumDailyCarAndVanCommuters() + nbDailyCarVisitors_notNull - nbEVCarsComute; - - boolean isDefaultVehicle = true; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - - for (int i = 0; i< nbDieselCarsComute; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, 0); - } - - - //check if charge power is filled in - if (nbEVCarsComute > 0 && gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ - if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() <= 0) { - traceln("Survey data contains no/negative Car maxChargingPower_kW: %s", gridConnection.getTransport().getCars().getPowerPerChargePointKw()); - } - else{ - maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - } - - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVCarsComute; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, 0, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVCars(nbEVCarsComute); - current_scenario_list.setCurrentDieselCars(nbDieselCarsComute); - - //Initialize future cars - future_scenario_list.setPlannedEVCars(current_scenario_list.getCurrentEVCars()); - -} - - -//Business vehicles -if (gridConnection.getTransport().getHasVehicles() != null && gridConnection.getTransport().getHasVehicles()){ - - //Cars - if (gridConnection.getTransport().getCars().getNumCars() != null && gridConnection.getTransport().getCars().getNumCars() != 0){ - - - //Update remaning amount of cars (company owned only) - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - gridConnection.getTransport().getCars().getNumCars()); - - //Get amount of EV and diesel cars - Integer nbEVCars = gridConnection.getTransport().getCars().getNumElectricCars(); - if (nbEVCars == null) { - nbEVCars = 0; - } - int nbDieselCars = gridConnection.getTransport().getCars().getNumCars() - nbEVCars; - - //Initialize parameters - boolean isDefaultVehicle = true; - double annualTravelDistance_km = 0; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerCar_kW; - - //check if annual travel distance is filled in - if (gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm() != null){ - annualTravelDistance_km = gridConnection.getTransport().getCars().getAnnualTravelDistancePerCarKm(); - isDefaultVehicle = false; - } - - //create diesel vehicle - for (int i = 0; i< nbDieselCars; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VEHICLE, isDefaultVehicle, annualTravelDistance_km); - } - - //Get number of chargepoints if filled in - //int numberOfChargepointsBusinessCars = gridConnection.getTransport().getCars().getNumChargePoints() != null ? gridConnection.getTransport().getCars().getNumChargePoints() : 0; - - //check if charge power is filled in - if (nbEVCars > 0 && gridConnection.getTransport().getCars().getPowerPerChargePointKw() != null){ - if (gridConnection.getTransport().getCars().getPowerPerChargePointKw() <= 0) { - traceln("Survey data contains no/negative Car maxChargingPower_kW: %s", gridConnection.getTransport().getCars().getPowerPerChargePointKw()); - } - else{ - maxChargingPower_kW = gridConnection.getTransport().getCars().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - } - - //create EV - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVCars; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VEHICLE, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVCars(((current_scenario_list.getCurrentEVCars() != null) ? current_scenario_list.getCurrentEVCars() : 0) + nbEVCars); - current_scenario_list.setCurrentDieselCars(((current_scenario_list.getCurrentDieselCars() != null) ? current_scenario_list.getCurrentDieselCars() : 0) + nbDieselCars); - current_scenario_list.setCurrentEVCarChargePower_kW(maxChargingPower_kW); - - //Update Planned cars - future_scenario_list.setPlannedEVCars((gridConnection.getTransport().getCars().getNumPlannedElectricCars() != null ? gridConnection.getTransport().getCars().getNumPlannedElectricCars() : 0) + current_scenario_list.getCurrentEVCars()); - future_scenario_list.setPlannedHydrogenCars((gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() != null) ? gridConnection.getTransport().getCars().getNumPlannedHydrogenCars() : 0); - - } - - - //Vans - if (gridConnection.getTransport().getVans().getNumVans() != null && gridConnection.getTransport().getVans().getNumVans() != 0){ - - //Update remaning amount of vans - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.VAN, - gridConnection.getTransport().getVans().getNumVans()); - - Integer nbEVVans = gridConnection.getTransport().getVans().getNumElectricVans(); - if (nbEVVans == null) { - nbEVVans = 0; - } - int nbDieselVans = gridConnection.getTransport().getVans().getNumVans() - nbEVVans; - - boolean isDefaultVehicle = true; - double annualTravelDistance_km = 0; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerVan_kW; - - //check if annual travel distance is filled in - if (gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm() != null){ - annualTravelDistance_km = gridConnection.getTransport().getVans().getAnnualTravelDistancePerVanKm(); - isDefaultVehicle = false; - } - - //create diesel vehicles - for (int i = 0; i< nbDieselVans; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_VAN, isDefaultVehicle, annualTravelDistance_km); - } - - //Get number of chargepoints if filled in - //int numberOfChargepointsVans = gridConnection.getTransport().getVans().getNumChargePoints() != null ? gridConnection.getTransport().getVans().getNumChargePoints() : 0; - - - //check if charge power is filled in - if (nbEVVans > 0 && gridConnection.getTransport().getVans().getPowerPerChargePointKw() != null){ - if (gridConnection.getTransport().getVans().getPowerPerChargePointKw() < 0) { - traceln("Survey data contains no/negative Van maxChargingPower_kW: %s", gridConnection.getTransport().getVans().getPowerPerChargePointKw()); - } - else{ - maxChargingPower_kW = gridConnection.getTransport().getVans().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - } - - //create electric vehicles - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVVans; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_VAN, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVVans(nbEVVans); - current_scenario_list.setCurrentDieselVans(nbDieselVans); - current_scenario_list.setCurrentEVVanChargePower_kW(maxChargingPower_kW); - - //Planned - future_scenario_list.setPlannedEVVans((gridConnection.getTransport().getVans().getNumPlannedElectricVans() != null ? gridConnection.getTransport().getVans().getNumPlannedElectricVans() : 0) + current_scenario_list.getCurrentEVVans()); - future_scenario_list.setPlannedHydrogenVans((gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() != null) ? gridConnection.getTransport().getVans().getNumPlannedHydrogenVans() : 0); - } - - - - //Trucks - if (gridConnection.getTransport().getTrucks().getNumTrucks() != null && gridConnection.getTransport().getTrucks().getNumTrucks() != 0){ - - //Update remaning amount of trucks - p_remainingTotals.adjustRemainingNumberOfVehiclesCompanies(companyGC, OL_VehicleType.TRUCK, - gridConnection.getTransport().getTrucks().getNumTrucks()); - - Integer nbEVTrucks = gridConnection.getTransport().getTrucks().getNumElectricTrucks(); - if (nbEVTrucks == null) { - nbEVTrucks = 0; - } - int nbDieselTrucks = gridConnection.getTransport().getTrucks().getNumTrucks() - nbEVTrucks; - - boolean isDefaultVehicle = true; - double annualTravelDistance_km = 0; - double maxChargingPower_kW = avgc_data.p_avgEVMaxChargePowerTruck_kW; - - //check if annual travel distance is filled in - if (gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm() != null){ - annualTravelDistance_km = gridConnection.getTransport().getTrucks().getAnnualTravelDistancePerTruckKm(); - isDefaultVehicle = false; - } - - //create diesel vehicles - for (int i = 0; i< nbDieselTrucks; i++){ - f_addDieselVehicle(companyGC, OL_EnergyAssetType.DIESEL_TRUCK, isDefaultVehicle, annualTravelDistance_km); - } - - //Get number of chargepoints if filled in - //int numberOfChargepointsVans = gridConnection.getTransport().getTrucks().getNumChargePoints() != null ? gridConnection.getTransport().getTrucks().getNumChargePoints() : 0; - - - //check if charge power is filled in - if (nbEVTrucks > 0 && gridConnection.getTransport().getTrucks().getPowerPerChargePointKw() != null){ - if (gridConnection.getTransport().getTrucks().getPowerPerChargePointKw() <= 0) { - traceln("Survey data contains no/negative Truck maxChargingPower_kW: %s", gridConnection.getTransport().getTrucks().getPowerPerChargePointKw()); - } - else{ - maxChargingPower_kW = gridConnection.getTransport().getTrucks().getPowerPerChargePointKw(); - isDefaultVehicle = false; - } - } - - //create electric vehicles - if (createElectricEA){ // Check if electric demand EA should be created - for (int j = 0; j< nbEVTrucks; j++){ - f_addElectricVehicle(companyGC, OL_EnergyAssetType.ELECTRIC_TRUCK, isDefaultVehicle, annualTravelDistance_km, maxChargingPower_kW); - } - } - - //add to scenario: current - current_scenario_list.setCurrentEVTrucks(nbEVTrucks); - current_scenario_list.setCurrentDieselTrucks(nbDieselTrucks); - current_scenario_list.setCurrentEVTruckChargePower_kW(maxChargingPower_kW); - - //Planned - future_scenario_list.setPlannedEVTrucks((gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() != null ? gridConnection.getTransport().getTrucks().getNumPlannedElectricTrucks() : 0) + current_scenario_list.getCurrentEVTrucks()); - future_scenario_list.setPlannedHydrogenTrucks((gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() != null) ? gridConnection.getTransport().getTrucks().getNumPlannedHydrogenTrucks() : 0); - } - - - //Other - if (Objects.nonNull(gridConnection.getTransport().getOtherVehicles().getHasOtherVehicles())){ - - // Wat doen we hier mee??? - - } -} - -//Save if building is paused at start -current_scenario_list.setIsCurrentlyActive(companyGC.v_isActive); -future_scenario_list.setIsActiveInFuture(companyGC.v_isActive);</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Building_data</ReturnType> - <Id>1737741603780</Id> - <Name>f_createBuildingData_Vallum</Name> - <X>470</X> - <Y>200</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>PandID</Name> - <Type>String</Type> - </Parameter> - <Body>com.zenmo.bag.Pand pand_data_vallum = map_buildingData_Vallum.get(PandID); - -Building_data building_data_record = null; -if(pand_data_vallum != null){ // Only happens if building has been selected in survey, that is no longer available in BAG (Destroyed for example). - //Calculate surface area - GISRegion gisRegion = zero_Interface.f_createGISObject(f_createGISObjectsTokens(pand_data_vallum.getGeometry().toString(), OL_GISObjectType.BUILDING)); - double surfaceArea_m2 = gisRegion.area(); - gisRegion.remove(); - - - //Create a building_data record - building_data_record = Building_data.builder(). - - address_id("verblijfsobject." + PandID). - building_id(PandID). - streetname(companyGC.p_address.getStreetName()). - house_number(companyGC.p_address.getHouseNumber()). - house_letter(companyGC.p_address.getHouseLetter()). - house_addition(companyGC.p_address.getHouseAddition()). - postalcode(companyGC.p_address.getPostalcode()). - city(companyGC.p_address.getPostalcode()). - build_year(pand_data_vallum.getBouwjaar()). - status(pand_data_vallum.getStatus()). - //purpose(row.get( buildings.purpose )). - address_floor_surface_m2(surfaceArea_m2). - polygon_area_m2(surfaceArea_m2). - annotation(companyGC.p_owner.p_actorID). - //extra_info(row.get( buildings.extra_info )). - //gridnode_id(row.get( buildings.gridnode_id )). - //latitude(row.get( buildings.latitude )). - //longitude(row.get( buildings.longitude )). - polygon(pand_data_vallum.getGeometry().toString()). - build(); -} -else{ - traceln("WARNING: SELECTED BUILDING IN SURVEY IS NO LONGER IN THE BAG DATABASE -> BUILDING CAN/HAS NOT BE(EN) CREATED!"); -} - -return building_data_record;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1737712184349</Id> - <Name>f_createDieselTractors</Name> - <X>900</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGridConnection</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>agricultureSurveyData</Name> - <Type>com.zenmo.zummon.companysurvey.Agriculture</Type> - </Parameter> - <Body>final double annualDiesel_L = Optional.ofNullable(agricultureSurveyData.getAnnualDieselUsage_L()).orElse(0.0); -final int numTractors = Optional.ofNullable(agricultureSurveyData.getNumTractors()).orElse(annualDiesel_L > 0.0 ? 1 : 0); - -if (numTractors > 0 && annualDiesel_L <= 0.0) { - // TODO: this should be in Tractor constructor - throw new RuntimeException("Tractor diesel usage missing for " + companyGridConnection.p_gridConnectionID); -} - -CustomProfile_data tractorProfile = findFirst(c_customProfiles_data, profile -> profile.customProfileID().equals("TractorProfile")); ///???? - -for (int i = 0; i < numTractors; i++) { - if(tractorProfile == null){ - throw new RuntimeException("Trying to make a tractor, without having loaded in a tractor profile for GC: " + companyGridConnection.p_gridConnectionID); - } - new J_EADieselTractor(companyGridConnection, annualDiesel_L / numTractors, tractorProfile.getValuesArray(), energyModel.p_timeStep_h); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1738248965949</Id> - <Name>f_createElectricityTimeSeriesAssets</Name> - <X>460</X> - <Y>240</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gridConnection</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>gridConnectionSurvey</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>var electricitySurvey = gridConnectionSurvey.getElectricity(); - -double[] deliveryTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyDelivery_kWh()); -if (deliveryTimeSeries_kWh == null) { - // delivery is the minimum we require to do anything with timeseries data - return false; -} - -double[] feedInTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyFeedIn_kWh()); -double[] productionTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(electricitySurvey.getQuarterHourlyProduction_kWh()); - -Double pvPower_kW = Optional.ofNullable(gridConnectionSurvey.getSupply().getPvInstalledKwp()) - .map(it -> (double) it) - .orElse(null); - -double[] heatPumpElectricityTimeSeries_kWh = f_timeSeriesToQuarterHourlyDoubleArray(gridConnectionSurvey.getHeat().getHeatPumpElectricityConsumptionTimeSeries_kWh()); - -//Preprocess the arrays and create the consumption pattern -f_createPreprocessedElectricityProfile_PV(gridConnection, deliveryTimeSeries_kWh, feedInTimeSeries_kWh, productionTimeSeries_kWh, pvPower_kW, heatPumpElectricityTimeSeries_kWh); - -gridConnection.v_hasQuarterHourlyValues = true; - -return true;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double[]</ReturnType> - <Id>1738572338816</Id> - <Name>f_timeSeriesToQuarterHourlyDoubleArray</Name> - <X>1550</X> - <Y>910</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>timeSeries</Name> - <Type>com.zenmo.zummon.companysurvey.TimeSeries</Type> - </Parameter> - <Body>int targetYear = v_simStartYear; -if (timeSeries == null) { - return null; -} - -if (!timeSeries.hasNumberOfValuesForOneYear()) { - traceln("Time series has too few values for one year"); - return null; -} - -return f_convertFloatArrayToDoubleArray(timeSeries.convertToQuarterHourly().getFullYearOrFudgeIt(targetYear));</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1742915722586</Id> - <Name>f_connectGCToExistingBuilding</Name> - <X>1550</X> - <Y>790</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>connectingGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>existingBuilding</Name> - <Type>GIS_Building</Type> - </Parameter> - <Parameter> - <Name>connectingBuildingData</Name> - <Type>Building_data</Type> - </Parameter> - <Body>//Get the total roof surface of the building -double buildingRoofSurface = existingBuilding.p_roofSurfaceArea_m2; - -//Building roof surface removal from all earlier connected GC (so excluding the new one!) -int currentAmountOfConnectedGCWithBuilding = existingBuilding.c_containedGridConnections.size(); -for(GridConnection earlierConnectedGC : existingBuilding.c_containedGridConnections){ - earlierConnectedGC.p_roofSurfaceArea_m2 -= buildingRoofSurface/currentAmountOfConnectedGCWithBuilding; - - if(earlierConnectedGC.p_roofSurfaceArea_m2 < 0){ - new RuntimeException("Negative roofsurface for GC: " + earlierConnectedGC.p_gridConnectionID + " after removal of earlier distributed building roofsurface. This should never be possible!"); - } -} - -//Connect new GC to the building now -existingBuilding.c_containedGridConnections.add(connectingGC); -connectingGC.c_connectedGISObjects.add(existingBuilding); - - -//Adding the newly distributed roof surfaces to the gc (now including the new one!) -int newAmountOfConnectedGCWithBuilding = currentAmountOfConnectedGCWithBuilding + 1; -for(GridConnection connectedGC : existingBuilding.c_containedGridConnections){ - connectedGC.p_roofSurfaceArea_m2 += buildingRoofSurface/newAmountOfConnectedGCWithBuilding; -} - -//Also add the new connecting building data address floor surface -existingBuilding.p_floorSurfaceArea_m2 += connectingBuildingData.address_floor_surface_m2();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1745336570663</Id> - <Name>f_addHeatAsset</Name> - <X>900</X> - <Y>500</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatAssetType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>maxHeatOutputPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>//Initialize parameters -double heatOutputCapacityGasBurner_kW; -double inputCapacityElectric_kW; -double efficiency; -double baseTemperature_degC; -double outputTemperature_degC; -OL_AmbientTempType ambientTempType; -double sourceAssetHeatPower_kW; -double belowZeroHeatpumpEtaReductionFactor; -if(parentGC.p_BuildingThermalAsset == null){ - maxHeatOutputPower_kW = maxHeatOutputPower_kW*2; // Make the asset capacity twice as high, to make sure it can handle the load in other scenarios with more heat consumption. -} - -switch (heatAssetType){ // There is always only one heatingType, If there are many assets the type is CUSTOM - - case GAS_BURNER: - heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); - J_EAConversionGasBurner gasBurner = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW , avgc_data.p_avgEfficiencyGasBurner_fr, energyModel.p_timeStep_h, 90); - break; - - case HYBRID_HEATPUMP: - - //Add primary heating asset (heatpump) (if its not part of the basic profile already - inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW / 3); //-- /3, kan nog kleiner want is hybride zodat gasbrander ook bij springt, dus kleiner MOETEN aanname voor hoe klein onderzoeken - efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; - baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureHybridHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - J_EAConversionHeatPump heatPumpHybrid = new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType); - - zero_Interface.energyModel.c_ambientDependentAssets.add(heatPumpHybrid); - - //Add secondary heating asset (gasburner) - heatOutputCapacityGasBurner_kW = max(avgc_data.p_minGasBurnerOutputCapacity_kW, maxHeatOutputPower_kW); - efficiency = avgc_data.p_avgEfficiencyGasBurner_fr; - outputTemperature_degC = avgc_data.p_avgOutputTemperatureGasBurner_degC; - - J_EAConversionGasBurner gasBurnerHybrid = new J_EAConversionGasBurner(parentGC, heatOutputCapacityGasBurner_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC); - break; - - case ELECTRIC_HEATPUMP: - //Add primary heating asset (heatpump) - inputCapacityElectric_kW = max(avgc_data.p_minHeatpumpElectricCapacity_kW, maxHeatOutputPower_kW); // Could be a lot smaller due to high cop - efficiency = avgc_data.p_avgEfficiencyHeatpump_fr; - baseTemperature_degC = zero_Interface.energyModel.pp_ambientTemperature_degC.getCurrentValue(); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureElectricHeatpump_degC; - ambientTempType = OL_AmbientTempType.AMBIENT_AIR; - sourceAssetHeatPower_kW = 0; - belowZeroHeatpumpEtaReductionFactor = 1; - - new J_EAConversionHeatPump(parentGC, inputCapacityElectric_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC, baseTemperature_degC, sourceAssetHeatPower_kW, belowZeroHeatpumpEtaReductionFactor, ambientTempType ); - break; - - case GAS_CHP: - - double outputCapacityElectric_kW = (maxHeatOutputPower_kW/avgc_data.p_avgEfficiencyCHP_thermal_fr) * avgc_data.p_avgEfficiencyCHP_electric_fr; - outputTemperature_degC = avgc_data.p_avgOutputTemperatureCHP_degC; - efficiency = avgc_data.p_avgEfficiencyCHP_thermal_fr + avgc_data.p_avgEfficiencyCHP_electric_fr; - - new J_EAConversionGasCHP(parentGC, outputCapacityElectric_kW, maxHeatOutputPower_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC ); - break; - - case DISTRICTHEAT: - double heatOutputCapacityDeliverySet_kW = max(avgc_data.p_minDistrictHeatingDeliverySetOutputCapacity_kW, maxHeatOutputPower_kW); - outputTemperature_degC = avgc_data.p_avgOutputTemperatureDistrictHeatingDeliverySet_degC; - efficiency = avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - - new J_EAConversionHeatDeliverySet(parentGC, heatOutputCapacityDeliverySet_kW, efficiency, energyModel.p_timeStep_h, outputTemperature_degC); - - //Add GC to heat grid - GridNode heatgrid = findFirst(energyModel.pop_gridNodes, node -> node.p_energyCarrier == OL_EnergyCarriers.HEAT); - if(heatgrid == null){ - heatgrid = f_createHeatGridNode(); - } - parentGC.p_parentNodeHeatID = heatgrid.p_gridNodeID; - break; - - case CUSTOM: - f_addCustomHeatAsset(parentGC, maxHeatOutputPower_kW); - break; - - default: - traceln("HEATING TYPE NOT FOUND FOR GC: " + parentGC); -} </Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>GridNode</ReturnType> - <Id>1747300761144</Id> - <Name>f_createHeatGridNode</Name> - <X>50</X> - <Y>600</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>GridNode GN_heat = energyModel.add_pop_gridNodes(); -GN_heat.p_gridNodeID = "Heatgrid"; - -// Check wether transformer capacity is known or estimated -GN_heat.p_capacity_kW = 1000000; -GN_heat.p_realCapacityAvailable = false; - -// Basic GN information -GN_heat.p_description = "Warmtenet"; - -/* -//Owner -GN_heat.p_ownerGridOperator = Grid_Operator; -*/ - -//Define node type -GN_heat.p_nodeType = OL_GridNodeType.HT; -GN_heat.p_energyCarrier = OL_EnergyCarriers.HEAT; - -//Define GN location -GN_heat.p_latitude = 0; -GN_heat.p_longitude = 0; -GN_heat.setLatLon(GN_heat.p_latitude, GN_heat.p_longitude); - -//Create gis region -/* -GN.gisRegion = zero_Interface.f_createGISObject(f_createGISNodesTokens(GN)); -zero_Interface.f_styleGridNodes(GN); -zero_Interface.c_GISNodes.add(GN.gisRegion); -*/ - -return GN_heat;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747829476305</Id> - <Name>f_addSliderSolarfarm</Name> - <X>50</X> - <Y>340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>sliderGCID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>gridNodeID</Name> - <Type>String</Type> - </Parameter> - <Body>c_solarfarm_data.add(0, Solarfarm_data.builder(). -isSliderGC(true). - -gc_id(sliderGCID). -gc_name("Slider solarfarm"). -owner_id("Slider solarfarm owner"). -streetname(null). -house_number(null). -house_letter(null). -house_addition(null). -postalcode(null). -city(null). -gridnode_id(gridNodeID). -initially_active(false). - -capacity_electric_kw(0.0). -connection_capacity_kw(0.0). -contracted_delivery_capacity_kw(0.0). -contracted_feed_in_capacity_kw(0.0). - -latitude(0). -longitude(0). -polygon(null). -build());</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747829476307</Id> - <Name>f_addSliderWindfarm</Name> - <X>50</X> - <Y>360</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>sliderGCID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>gridNodeID</Name> - <Type>String</Type> - </Parameter> - <Body>c_windfarm_data.add(0, Windfarm_data.builder(). -isSliderGC(true). - -gc_id(sliderGCID). -gc_name("Slider windfarm"). -owner_id("Slider windfarm owner"). -streetname(null). -house_number(null). -house_letter(null). -house_addition(null). -postalcode(null). -city(null). -gridnode_id(gridNodeID). -initially_active(false). - -capacity_electric_kw(0.0). -connection_capacity_kw(0.0). -contracted_delivery_capacity_kw(0.0). -contracted_feed_in_capacity_kw(0.0). - -latitude(0). -longitude(0). -polygon(null). -build()); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747829476311</Id> - <Name>f_addSliderBattery</Name> - <X>50</X> - <Y>378</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>sliderGCID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>gridNodeID</Name> - <Type>String</Type> - </Parameter> - <Body>c_battery_data.add(0, Battery_data.builder(). -isSliderGC(true). - -gc_id(sliderGCID). -gc_name("Slider battery"). -owner_id("Slider battery owner"). -streetname(null). -house_number(null). -house_letter(null). -house_addition(null). -postalcode(null). -city(null). -gridnode_id(gridNodeID). -initially_active(false). - -capacity_electric_kw(0.0). -connection_capacity_kw(0.0). -contracted_delivery_capacity_kw(0.0). -contracted_feed_in_capacity_kw(0.0). - -storage_capacity_kwh(0.0). -operation_mode(OL_BatteryOperationMode.PEAK_SHAVING_PARENT_NODE). -latitude(0). -longitude(0). -polygon(null). -build());</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1747830228830</Id> - <Name>f_initializeSpecificSliderGC</Name> - <X>90</X> - <Y>212</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Create slider GC data packages for assetGC that do not have a sliderGC data package yet -Solarfarm_data sliderSolarfarm_data = findFirst(c_solarfarm_data, sf_data -> sf_data.isSliderGC()); -Windfarm_data sliderWindfarm_data = findFirst(c_windfarm_data, wf_data -> wf_data.isSliderGC()); -Battery_data sliderBattery_data = findFirst(c_battery_data, bat_data -> bat_data.isSliderGC()); - -//Get top gridnode id -GridNode_data topGridNode = findFirst(c_gridNode_data, node_data -> node_data.type().equals("HVMV")); -if ( topGridNode == null ) { - throw new RuntimeException("Unable to find top GridNode of type HVMV to create slider assets."); -} -String topGridNodeID = topGridNode.gridnode_id(); - -//Create data package for e-hub dashboard slider gcs -if(project_data.project_type() == OL_ProjectType.BUSINESSPARK){ - f_addSliderSolarfarm(zero_Interface.p_defaultEnergyHubSliderGCName_solarfarm, topGridNodeID); - f_addSliderWindfarm(zero_Interface.p_defaultEnergyHubSliderGCName_windfarm, topGridNodeID); - f_addSliderBattery(zero_Interface.p_defaultEnergyHubSliderGCName_battery, topGridNodeID); -} - -//If no slider data package is present yet for the main: add one as well. -if(sliderSolarfarm_data == null){ - f_addSliderSolarfarm(zero_Interface.p_defaultMainSliderGCName_solarfarm, topGridNodeID); -} -if(sliderWindfarm_data == null){ - f_addSliderWindfarm(zero_Interface.p_defaultMainSliderGCName_windfarm, topGridNodeID); -} -if(project_data.project_type() == OL_ProjectType.RESIDENTIAL){ - for(GridNode_data nodeData : c_gridNode_data){ - f_addSliderBattery(zero_Interface.p_defaultMainSliderGCName_battery, nodeData.gridnode_id()); - } -} -else{ - if(sliderBattery_data == null){ - f_addSliderBattery(zero_Interface.p_defaultMainSliderGCName_battery, topGridNodeID); - } -}</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_ProfilePointer</ReturnType> - <Id>1749125189323</Id> - <Name>f_createEngineProfile</Name> - <Description>Functie van gillis voor inladen weer data!</Description> - <X>99</X> - <Y>150</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>profileID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>arguments</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>values</Name> - <Type>double[]</Type> - </Parameter> - <Body>TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); -J_ProfilePointer profilePointer = new J_ProfilePointer(profileID, tf_profile); -energyModel.f_addProfile(profilePointer); -return profilePointer;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749138089965</Id> - <Name>f_setEngineProfiles</Name> - <Description>Functie van gillis voor inladen weer data!</Description> - <X>80</X> - <Y>130</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Profile Arguments -double[] a_arguments_hr = ListUtil.doubleListToArray(defaultProfiles_data.arguments_hr()); - -//Weather data -double[] a_ambientTemperatureProfile_degC = ListUtil.doubleListToArray(defaultProfiles_data.ambientTemperatureProfile_degC()); -double[] a_PVProductionProfile35DegSouth_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile35DegSouth_fr()); -double[] a_PVProductionProfile15DegEastWest_fr = ListUtil.doubleListToArray(defaultProfiles_data.PVProductionProfile15DegEastWest_fr()); -double[] a_windProductionProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.windProductionProfile_fr()); - -//EPEX data -double[] a_epexProfile_eurpMWh = ListUtil.doubleListToArray(defaultProfiles_data.epexProfile_eurpMWh()); - -//Various demand data -double[] a_defaultHouseElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseElectricityDemandProfile_fr()); -double[] a_defaultHouseHotWaterDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseHotWaterDemandProfile_fr()); -double[] a_defaultHouseCookingDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultHouseCookingDemandProfile_fr()); -double[] a_defaultOfficeElectricityDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultOfficeElectricityDemandProfile_fr()); -double[] a_defaultBuildingHeatDemandProfile_fr = ListUtil.doubleListToArray(defaultProfiles_data.defaultBuildingHeatDemandProfile_fr()); - -//Create Weather engine profiles -energyModel.pp_ambientTemperature_degC = f_createEngineProfile("ambient_temperature_degC", a_arguments_hr, a_ambientTemperatureProfile_degC); -energyModel.pp_PVProduction35DegSouth_fr = f_createEngineProfile("pv_production_south_fr", a_arguments_hr, a_PVProductionProfile35DegSouth_fr); -energyModel.pp_PVProduction15DegEastWest_fr = f_createEngineProfile("pv_production_eastwest_fr", a_arguments_hr, a_PVProductionProfile15DegEastWest_fr); -energyModel.pp_windProduction_fr = f_createEngineProfile("wind_production_fr", a_arguments_hr, a_windProductionProfile_fr); - -//Create Epex engine profile -energyModel.pp_dayAheadElectricityPricing_eurpMWh = f_createEngineProfile("epex_price_eurpMWh", a_arguments_hr, a_epexProfile_eurpMWh); - -//Create Consumption engine profiles: -f_createEngineProfile("default_house_electricity_demand_fr", a_arguments_hr, a_defaultHouseElectricityDemandProfile_fr); -f_createEngineProfile("default_house_hot_water_demand_fr", a_arguments_hr, a_defaultHouseHotWaterDemandProfile_fr); -f_createEngineProfile("default_house_cooking_demand_fr", a_arguments_hr, a_defaultHouseCookingDemandProfile_fr); -f_createEngineProfile("default_office_electricity_demand_fr", a_arguments_hr, a_defaultOfficeElectricityDemandProfile_fr); -f_createEngineProfile("default_building_heat_demand_fr", a_arguments_hr, a_defaultBuildingHeatDemandProfile_fr); - - -//Create custom engine profiles -for(CustomProfile_data customProfile : c_customProfiles_data){ - f_createEngineProfile(customProfile.customProfileID(), customProfile.getArgumentsArray(), customProfile.getValuesArray()); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749628581470</Id> - <Name>f_addGridNodeProfile</Name> - <X>70</X> - <Y>580</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gridnode</Name> - <Type>GridNode</Type> - </Parameter> - <Parameter> - <Name>profile_data_kWh</Name> - <Type>double[]</Type> - </Parameter> - <Body>//Create gridconnection where the profile is attached to -GridConnection GC_GridNode_profile = energyModel.add_pop_gridConnections(); - -//Set GC id -GC_GridNode_profile.p_gridConnectionID = "GridNode " + gridnode.p_gridNodeID + " profile GC"; - -//Set gridnode as parent -GC_GridNode_profile.p_parentNodeElectricID = gridnode.p_gridNodeID; - -//Set capacity same as gridnode -GC_GridNode_profile.v_liveConnectionMetaData.physicalCapacity_kW = gridnode.p_capacity_kW; -GC_GridNode_profile.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = gridnode.p_capacity_kW; -GC_GridNode_profile.v_liveConnectionMetaData.contractedFeedinCapacity_kW = gridnode.p_capacity_kW; - -GC_GridNode_profile.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; -GC_GridNode_profile.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; -GC_GridNode_profile.v_liveConnectionMetaData.physicalCapacityKnown = false; - -//Set lat lon same as gridnode -GC_GridNode_profile.p_latitude = gridnode.p_latitude; // Get latitude of first building (only used to get nearest trafo) -GC_GridNode_profile.p_longitude = gridnode.p_longitude; // Get longitude of first building (only used to get nearest trafo) - -if(project_data.gridnode_profile_timestep_hr() == null){ - new RuntimeException("Trying to load in gridnode profiles, without specifying the timestep of the data in the project_data"); -} - -double profileTimestep_hr = project_data.gridnode_profile_timestep_hr(); - -//Add profile to the GC -J_EAProfile profile = new J_EAProfile(GC_GridNode_profile, OL_EnergyCarriers.ELECTRICITY, profile_data_kWh, OL_AssetFlowCategories.fixedConsumptionElectric_kW, profileTimestep_hr); -profile.setStartTime_h(v_simStartHour_h); -profile.energyAssetName = "GridNode " + gridnode.p_gridNodeID + " profile"; - -//Set boolean has profile data true -gridnode.p_hasProfileData = true; -c_gridNodeIDsWithProfiles.add(gridnode.p_gridNodeID);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_ChargingSession</ReturnType> - <Id>1749648772203</Id> - <Name>f_createChargingSession</Name> - <X>490</X> - <Y>890</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>chargingSessionData</Name> - <Type>String</Type> - </Parameter> - <Body>String[] chargingSessionInfo = chargingSessionData.split("/"); - -double startIndex = Double.parseDouble(chargingSessionInfo[0]); -double endIndex = Double.parseDouble(chargingSessionInfo[1]); -double chargingDemand_kWh = Double.parseDouble(chargingSessionInfo[2]); -double batteryCap_kWh = Double.parseDouble(chargingSessionInfo[3]); -double chargingPower_kW = Double.parseDouble(chargingSessionInfo[5]); -int socket = Integer.parseInt(chargingSessionInfo[6]); - -//Cap charging demand to what is actual possible according to chargetime interval * charge power -chargingDemand_kWh = min(chargingPower_kW * (endIndex - startIndex) * 0.25, chargingDemand_kWh); - -return new J_ChargingSession(startIndex, endIndex, chargingDemand_kWh, batteryCap_kWh, chargingPower_kW, socket, 0.25);</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<J_ChargingSession> </ReturnType> - <Id>1749649169603</Id> - <Name>f_createNewChargerProfile</Name> - <X>470</X> - <Y>870</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>chargerProfileData</Name> - <Type>ChargerProfile_data</Type> - </Parameter> - <Body>// example: 2/54/50.3/72.1/21.8/10.8/2 -List<String> chargerProfileDataValues = chargerProfileData.valuesList(); -List<J_ChargingSession> chargerProfile = new ArrayList<J_ChargingSession>(); - -for(int i = 0; i < chargerProfileDataValues.size(); i++){ - chargerProfile.add(f_createChargingSession(chargerProfileDataValues.get(i))); -} - -return chargerProfile;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<J_ChargingSession> </ReturnType> - <Id>1749649390125</Id> - <Name>f_getChargerProfile</Name> - <X>450</X> - <Y>850</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<J_ChargingSession> chargerProfile; -int randomIndex; - -if(c_chargerProfiles_data.size()>0){ - randomIndex = uniform_discr(0, c_chargerProfiles_data.size() - 1); - chargerProfile = f_createNewChargerProfile(c_chargerProfiles_data.get(randomIndex)); - c_chargerProfiles_data.remove(randomIndex); - energyModel.c_chargerProfiles.add(chargerProfile); -} -else{ - randomIndex = uniform_discr(0, energyModel.c_chargerProfiles.size() - 1); - chargerProfile = energyModel.c_chargerProfiles.get(randomIndex); -} - -return chargerProfile;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749726189312</Id> - <Name>f_addCookingAsset</Name> - <X>900</X> - <Y>620</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>gc</Name> - <Type>GCHouse</Type> - </Parameter> - <Parameter> - <Name>CookingType</Name> - <Type>OL_EnergyAssetType</Type> - </Parameter> - <Parameter> - <Name>cookingDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Body>double yearlyCookingDemand_kWh = cookingDemand_kwhpa; - -if(cookingDemand_kwhpa == 0){ - //yearlyCookingDemand_kWh = uniform_discr(200,600); //way to high compared to referentiewoningen - yearlyCookingDemand_kWh = uniform_discr(70,130); - // traceln("Cooking demand unknown"); -} - -switch(CookingType){ - - case ELECTRIC_HOB: - new J_EAConsumption(gc, OL_EnergyAssetType.ELECTRIC_HOB, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.ELECTRICITY, energyModel.p_timeStep_h, null); - gc.p_cookingMethod = OL_HouseholdCookingMethod.ELECTRIC; - break; - - case GAS_PIT: - new J_EAConsumption(gc, OL_EnergyAssetType.GAS_PIT, "default_house_cooking_demand_fr", yearlyCookingDemand_kWh, OL_EnergyCarriers.METHANE, energyModel.p_timeStep_h, null); - gc.p_cookingMethod = OL_HouseholdCookingMethod.GAS; - break; -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749726279652</Id> - <Name>f_addHotWaterDemand</Name> - <X>900</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>houseGC</Name> - <Type>GCHouse</Type> - </Parameter> - <Parameter> - <Name>surface_m2</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>hotWaterDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Body>double yearlyHWD_kWh = hotWaterDemand_kwhpa; -if(hotWaterDemand_kwhpa == 0){ - int aantalBewoners; - if( surface_m2 > 150){ - aantalBewoners = uniform_discr(2,6); - } - else if (surface_m2 > 50){ - aantalBewoners = uniform_discr(1,4); - } - else { - aantalBewoners = uniform_discr(1,2); - } - - yearlyHWD_kWh = 1000 + aantalBewoners * 150; //Aangepast Naud 13-11-2025 omdat waardes van PBL totaal niet aansloten bij oude aantal bewoners * 600 //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix -} -else if (surface_m2 > 50){ - aantalBewoners = uniform_discr(1,4); -} -else { - aantalBewoners = uniform_discr(1,2); -} - -double yearlyHWD_kWh = aantalBewoners * 600; //12 * surface_m2 * 3 ; Tamelijk willekeurige formule om HWD te schalen tussen 600 - 2400 kWh bij 50m2 tot 200m2, voor een quickfix - -J_EAConsumption hotwaterDemand = new J_EAConsumption( houseGC, OL_EnergyAssetType.HOT_WATER_CONSUMPTION, "default_house_hot_water_demand_fr", yearlyHWD_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, null); - -if( surface_m2 > 200){ - //traceln("House created with " + surface_m2 + "m2 surace area, will have large hot water demand"); -} -if (surface_m2 < 25){ - //traceln("House created with " + surface_m2 + "m2 surace area, will have low hot water demand"); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749727623536</Id> - <Name>f_addBuildingHeatModel</Name> - <X>900</X> - <Y>270</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>floorArea_m2</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>heatDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Body>double maxPowerHeat_kW = 1000; //Dit is hoeveel vermogen het huis kan afgeven/opnemen, mag willekeurige waarden hebben. Wordt alleen gebruikt in rekenstap van ratio of capacity -double lossfactor_WpK; //Dit is wat bepaalt hoeveel warmte het huis verliest/opneemt per tijdstap per delta_T -double initialTemp = uniform_discr(15,22); //starttemperatuur -double heatCapacity_JpK; //hoeveel lucht zit er in je huis dat je moet verwarmen? -double solarAbsorptionFactor_m2; //hoeveel m2 effectieve dak en muur oppervlakte er is dat opwarmt door zonneinstraling - -//Heat demand from PBL referentiewoningen used for HeatCapacity and lossFactor_WpK -if(heatDemand_kwhpa > 0){ //Not missing in data - lossfactor_WpK = heatDemand_kwhpa / 63; // = manually calibrated value tested on 3 neighborhoods -} -else{ - switch (parentGC.p_energyLabel){ - case A: - lossfactor_WpK = 0.35 * floorArea_m2; - break; - case B: - lossfactor_WpK = 0.45 * floorArea_m2; - break; - case C: - lossfactor_WpK = 0.65 * floorArea_m2; - break; - case D: - lossfactor_WpK = 0.85 * floorArea_m2; - break; - case E: - lossfactor_WpK = 1.05 * floorArea_m2; - break; - case F: - lossfactor_WpK = 1.25 * floorArea_m2; - break; - case G: - lossfactor_WpK = 1.45 * floorArea_m2; - break; - case NONE: - default: - lossfactor_WpK = uniform (0.85, 1.2) * floorArea_m2; - } -} -lossfactor_WpK = roundToDecimal(lossfactor_WpK,2); -solarAbsorptionFactor_m2 = floorArea_m2 * 0.01; //solar irradiance [W/m2] - -heatCapacity_JpK = floorArea_m2 * 50000; //What is the 5000 based upon? - -parentGC.p_BuildingThermalAsset = new J_EABuilding( parentGC, maxPowerHeat_kW, lossfactor_WpK, energyModel.p_timeStep_h, initialTemp, heatCapacity_JpK, solarAbsorptionFactor_m2 ); -energyModel.c_ambientDependentAssets.add( parentGC.p_BuildingThermalAsset ); - -//FOR NOW DEFAULT NO INTERIOR/EXTERIOR HEAT BUFFERS -> NOT NECESSARY -/* -double delayHeatReleaseInteriorHeatsink_hr = 0; -double lossToExteriorFromInteriorHeatSink_fr; -if(randomTrue(0.2)){ - delayHeatReleaseInteriorHeatsink_hr = 3; -} -else { - delayHeatReleaseInteriorHeatsink_hr = 0.5; -} - -parentGC.p_BuildingThermalAsset.addInteriorHeatBuffer(delayHeatReleaseInteriorHeatsink_hr); - -double delayHeatReleaseRoofAndWall_hr = 8.0; -parentGC.p_BuildingThermalAsset.addExteriorHeatBuffer(delayHeatReleaseRoofAndWall_hr); -*/</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Building_data></ReturnType> - <Id>1749728889982</Id> - <Name>f_getBuildingsInSubScope</Name> - <X>50</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialBuildingList</Name> - <Type>List<Building_data></Type> - </Parameter> - <Body>List<Building_data> scopedBuildingList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedBuildingList.addAll(initialBuildingList); -} -else{ - for (Building_data dataBuilding : initialBuildingList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataBuilding.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedBuildingList.add(dataBuilding); - } - } - } -} -return scopedBuildingList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749728889984</Id> - <Name>f_createHouses</Name> - <Description>Creates the houses using a single GC, and their building. After creation, they will be simulated using average values.</Description> - <X>420</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<Building_data> buildingDataHouses = f_getBuildingsInSubScope(c_houseBuilding_data); - -traceln("Aantal panden met woonfunctie in BAG data: " + buildingDataHouses.size()); - -int i = 0; - - -if(buildingDataHouses.size()>0){ - //Add houses to the legend if in model - zero_Interface.c_modelActiveDefaultGISBuildings.add(OL_GISBuildingTypes.HOUSE); - - //PreCalculate the probabilities for an additional Car for houses - f_calculateProbabilitiesForAdditionalCar(buildingDataHouses); -} - - - -for (Building_data houseBuildingData : buildingDataHouses) { - GCHouse GCH = energyModel.add_Houses(); - ConnectionOwner COH = energyModel.add_pop_connectionOwners(); - - //Set parameters for the Grid Connection - GCH.p_gridConnectionID = houseBuildingData.address_id(); - GCH.p_ownerID = "Woonhuis" + Integer.toString(i); //aanname : huiseigenaar is eigenbaas - - GCH.p_purposeBAG = houseBuildingData.purpose(); - - //pand gegevens - GCH.p_bouwjaar = houseBuildingData.build_year(); - GCH.p_eigenOprit = houseBuildingData.has_private_parking() != null ? houseBuildingData.has_private_parking() : false; - - //For PBL heating - GCH.p_constructionPeriod_heatingPBL = houseBuildingData.constructionPeriod_int(); - GCH.p_buildingType_heatingPBL = houseBuildingData.buildingType_int(); - GCH.p_ownership_heatingPBL = houseBuildingData.ownership_int(); - GCH.p_localFactor_heatingPBL = houseBuildingData.localFactor(); - GCH.p_regionalClimateCorrectionFactor_heatingPBL = houseBuildingData.regionalClimateCorrectionFactor(); - - - - //Nageisoleerd - if (houseBuildingData.energy_label() != null){ // && houseBuildingData.energy_label() != OL_GridConnectionIsolationLabel.NONE) { - GCH.p_energyLabel = houseBuildingData.energy_label(); - } - else { - if (GCH.p_bouwjaar < 1980) { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.D; - } - else if (GCH.p_bouwjaar < 1996) { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.C; - } - else if (GCH.p_bouwjaar < 2008) { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.B; - } - else { - GCH.p_energyLabel = OL_GridConnectionIsolationLabel.A; - } - } - //aansluiting gegevens - GCH.v_liveConnectionMetaData.physicalCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; - GCH.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; - GCH.v_liveConnectionMetaData.contractedFeedinCapacity_kW = avgc_data.p_avgHouseConnectionCapacity_kW; - - GCH.v_liveConnectionMetaData.physicalCapacityKnown = false; - GCH.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - GCH.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - - // Address data - GCH.p_address = new J_Address(); - GCH.p_address.setStreetName( houseBuildingData.streetname()); - if (houseBuildingData.house_number() == null) { - GCH.p_address.setHouseNumber( 0 ); - } else { - GCH.p_address.setHouseNumber( houseBuildingData.house_number()); - } - GCH.p_address.setHouseLetter( houseBuildingData.house_letter()); - GCH.p_address.setHouseAddition( houseBuildingData.house_addition()); - GCH.p_address.setPostalcode( houseBuildingData.postalcode()); - GCH.p_address.setCity( houseBuildingData.city()); - - //locatie - GCH.p_longitude = houseBuildingData.longitude(); - GCH.p_latitude = houseBuildingData.latitude(); - GCH.setLatLon(GCH.p_latitude, GCH.p_longitude); - - //Connect GC to grid node - GCH.p_parentNodeElectricID = houseBuildingData.gridnode_id(); - - //Set parameters for the Actor: ConnectionOwner - COH.p_actorID = GCH.p_ownerID; - COH.p_connectionOwnerType = OL_ConnectionOwnerType.HOUSEHOLD; - COH.p_detailedCompany = false; - GCH.p_owner = COH; - - - //Check wheter this building already exists - GIS_Building existingBuilding = findFirst(energyModel.pop_GIS_Buildings, gisBuilding -> gisBuilding.p_id.equals(houseBuildingData.building_id())); - - if(existingBuilding == null){//Create new GIS building and connect - GIS_Building b = f_createGISBuilding( houseBuildingData, GCH ); - GCH.p_roofSurfaceArea_m2 = houseBuildingData.polygon_area_m2(); - - //Style building - b.p_defaultFillColor = zero_Interface.v_houseBuildingColor; - b.p_defaultLineColor = zero_Interface.v_houseBuildingLineColor; - zero_Interface.f_styleAreas(b); - } - else{// Connect with existing building - f_connectGCToExistingBuilding(GCH, existingBuilding, houseBuildingData); - } - - //Floor surface of GC - GCH.p_floorSurfaceArea_m2 = houseBuildingData.address_floor_surface_m2(); - - //Instantiate energy assets - double annualElectricityConsumption_kwhpa; - double annualNaturalGasConsumption_kwhpa; - double annualSpaceHeatingConsumption_kwhpa; - double annualDHWConsumption_kwhpa; - double annualCookingConsumption_kwhpa; - try { - annualElectricityConsumption_kwhpa = houseBuildingData.electricity_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualElectricityConsumption_kwhpa = Double.valueOf(uniform_discr(1200, 3800)); - } - try { - annualNaturalGasConsumption_kwhpa = houseBuildingData.gas_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualNaturalGasConsumption_kwhpa = Double.valueOf(uniform_discr(600, 2000)); - } - try { - annualSpaceHeatingConsumption_kwhpa = houseBuildingData.space_heating_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualSpaceHeatingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.85; //assumed share gas space heating - traceln("DOESTHISHAPPEN??"); - } - try { - annualDHWConsumption_kwhpa = houseBuildingData.dhw_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualDHWConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.1; //assumed share gas dhw heating - } - try { - annualCookingConsumption_kwhpa = houseBuildingData.cooking_consumption_kwhpa(); - } - catch (NullPointerException e){ - annualCookingConsumption_kwhpa = annualNaturalGasConsumption_kwhpa * 0.05; //assumed share gas cooking - } - //GCH.p_initialPVpanels = houseBuildingData.pv_default(); - GCH.v_liveAssetsMetaData.initialPV_kW = houseBuildingData.pv_installed_kwp() != null ? houseBuildingData.pv_installed_kwp() : 0; - GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.v_liveAssetsMetaData.initialPV_kW > 0 ? GCH.v_liveAssetsMetaData.initialPV_kW : houseBuildingData.pv_potential_kwp(); // To prevent sliders from changing outcomes - - // TODO: Above we load in data of gas use, but the houses always have a thermal model?? - f_addEnergyAssetsToHouses(GCH, annualElectricityConsumption_kwhpa, annualSpaceHeatingConsumption_kwhpa, annualDHWConsumption_kwhpa, annualCookingConsumption_kwhpa ); - - i ++; -} - -//Backup for when pv_potential kWp is null, needs to be after all houses have been made, so rooftop surface is distributed correctly -for(GCHouse GCH : energyModel.Houses){ - if(GCH.v_liveAssetsMetaData.PVPotential_kW == null){ - GCH.v_liveAssetsMetaData.PVPotential_kW = GCH.p_roofSurfaceArea_m2*avgc_data.p_avgRatioRoofPotentialPV*avgc_data.p_avgPVPower_kWpm2; - } -} - -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749728889986</Id> - <Name>f_addEnergyAssetsToHouses</Name> - <Description>Initialisation of the Energy assets using average values for houses</Description> - <X>440</X> - <Y>680</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>house</Name> - <Type>GCHouse</Type> - </Parameter> - <Parameter> - <Name>electricityDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>spaceHeatingDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>dhwDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>cookingDemand_kwhpa</Name> - <Type>double</Type> - </Parameter> - <Body>//Add generic electricity demand profile -GridNode gn = findFirst(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals( house.p_parentNodeElectricID)); - -if ( ! gn.p_hasProfileData ){ - f_addElectricityDemandProfile(house, electricityDemand_kwhpa, null, false, "default_house_electricity_demand_fr"); -} - -//Add building heat model and asset -f_addBuildingHeatModel(house, house.p_floorSurfaceArea_m2, spaceHeatingDemand_kwhpa); - -//Determine required heating capacity for the heating asset -double maximalTemperatureDifference_K = 30.0; // Approximation -double maxHeatOutputPower_kW = house.p_BuildingThermalAsset.getLossFactor_WpK() * maximalTemperatureDifference_K / 1000; - - -//Add heat demand profile -OL_GridConnectionHeatingType heatingType = avgc_data.p_avgHouseHeatingMethod; -f_addHeatAsset(house, heatingType, maxHeatOutputPower_kW); -house.f_addHeatManagement(heatingType, false); -house.f_setHeatingPreferences(f_getHouseHeatingPreferences()); - -//Add hot water and cooking demand -f_addHotWaterDemand(house, house.p_floorSurfaceArea_m2, dhwDemand_kwhpa); -f_addCookingAsset(house, OL_EnergyAssetType.GAS_PIT, cookingDemand_kwhpa); - - -//Add pv -double installedRooftopSolar_kW = house.v_liveAssetsMetaData.initialPV_kW != null ? house.v_liveAssetsMetaData.initialPV_kW : 0; -if (gn.p_hasProfileData){ //dont count production if there is measured data on Node - installedRooftopSolar_kW = 0; -} - -if (installedRooftopSolar_kW > 0) { - f_addEnergyProduction(house, OL_EnergyAssetType.PHOTOVOLTAIC, "Residential Solar", installedRooftopSolar_kW ); -} - -//Add cars -f_addCarsToHouses(house); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_HeatingPreferences</ReturnType> - <Id>1749728889988</Id> - <Name>f_getHouseHeatingPreferences</Name> - <X>460</X> - <Y>700</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>double nightTimeSetPoint_degC = 18; -double dayTimeSetPoint_degC = 20; -double startOfDayTime_h = 8; -double startOfNightTime_h = 23; - -if( randomTrue(0.5) ){ //50% kans op ochtend ritme - nightTimeSetPoint_degC = uniform_discr(12,18); - dayTimeSetPoint_degC = uniform_discr(18, 24); - startOfDayTime_h = uniform_discr(5,10) + uniform_discr(0,4) / 4.0; - startOfNightTime_h = uniform_discr(21,23); - -} -else if (randomTrue(0.5) ){ // 25% kans op hele dag aan - nightTimeSetPoint_degC = uniform_discr(18,21); - dayTimeSetPoint_degC = nightTimeSetPoint_degC; - startOfDayTime_h = -1; - startOfNightTime_h = 25; - -} -else { // 25% kans op smiddags/savonds aan - nightTimeSetPoint_degC = uniform_discr(14,18); - dayTimeSetPoint_degC = uniform_discr(18, 24); - startOfDayTime_h = uniform_discr(14, 16) + uniform_discr(0,4) / 4.0; - startOfNightTime_h = uniform_discr(21,23); -} - -double maxComfortTemperature_degC = dayTimeSetPoint_degC + 2; -double minComfortTemperature_degC = dayTimeSetPoint_degC - 2; - -//Create heating preferences class -J_HeatingPreferences heatingPreferences = new J_HeatingPreferences(startOfDayTime_h, startOfNightTime_h, dayTimeSetPoint_degC, nightTimeSetPoint_degC, maxComfortTemperature_degC, minComfortTemperature_degC); - -return heatingPreferences;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1749729268458</Id> - <Name>f_createParkingSpots</Name> - <X>430</X> - <Y>950</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>List<GCEnergyProduction> carportGCList = new ArrayList<GCEnergyProduction>(); - -for (ParkingSpace_data dataParkingSpace : f_getParkingSpacesInSubScope(c_parkingSpace_data)){ - - //Create parking gis object - GIS_Object parkingSpace = f_createGISObject(dataParkingSpace.parking_id(), dataParkingSpace.latitude(), dataParkingSpace.longitude(), dataParkingSpace.polygon(), OL_GISObjectType.PARKING); - String parkingSpaceType = dataParkingSpace.type().toString().substring(0, 1).toUpperCase() + dataParkingSpace.type().toString().substring(1).toLowerCase(); - parkingSpace.p_annotation = "Parkeerplek: " + parkingSpaceType + ", " + dataParkingSpace.additional_info(); - - //Set correct color and legend collection based on parking type - switch(dataParkingSpace.type()){ - case PRIVATE: - case DISABLED: - case KISS_AND_RIDE: - parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_private; - parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_private; - zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PRIVATE); - break; - case PUBLIC: - parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_public; - parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_public; - zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.PUBLIC); - break; - case ELECTRIC: - parkingSpace.p_defaultFillColor = zero_Interface.v_parkingSpaceColor_electric; - parkingSpace.p_defaultLineColor = zero_Interface.v_parkingSpaceLineColor_electric; - zero_Interface.c_modelActiveParkingSpaceTypes.add(OL_ParkingSpaceType.ELECTRIC); - break; - } - - //Add to ordered collection on the interface - zero_Interface.c_orderedParkingSpaces.add(parkingSpace); - - //Style gis object - parkingSpace.f_style(null, null, null, null); - - //Get energyProduction GC - GCEnergyProduction carportGC = findFirst(carportGCList, gc -> gc.p_parentNodeElectricID.equals(dataParkingSpace.gridnode_id())); - - if(carportGC == null){ // If non existend -> Create one. - carportGC = energyModel.add_EnergyProductionSites(); - - carportGC.p_gridConnectionID = "Parking space gridconnection: " + dataParkingSpace.parking_id(); - carportGC.v_liveConnectionMetaData.physicalCapacity_kW = dataParkingSpace.pv_potential_kwp(); - carportGC.v_liveConnectionMetaData.contractedDeliveryCapacity_kW = 0.0; - carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW = dataParkingSpace.pv_potential_kwp(); - - carportGC.v_liveConnectionMetaData.physicalCapacityKnown = false; - carportGC.v_liveConnectionMetaData.contractedDeliveryCapacityKnown = false; - carportGC.v_liveConnectionMetaData.contractedFeedinCapacityKnown = false; - - carportGC.p_parentNodeElectricID = dataParkingSpace.gridnode_id(); - - carportGC.p_latitude = dataParkingSpace.latitude(); - carportGC.p_longitude = dataParkingSpace.longitude(); - - //Address - carportGC.p_address = new J_Address(); - carportGC.p_address.setStreetName(dataParkingSpace.street()); - - //CO - ConnectionOwner COC = energyModel.add_pop_connectionOwners(); // Create Connection owner company - - COC.p_actorID = "Parking space connection owner: " + dataParkingSpace.parking_id(); - COC.p_connectionOwnerType = OL_ConnectionOwnerType.PARKINGSPACE_OP; - COC.p_detailedCompany = false; - COC.b_dataSharingAgreed = true; - - carportGC.p_owner = COC; - carportGC.p_ownerID = COC.p_actorID; - - //Add to collections - parkingSpace.c_containedGridConnections.add(carportGC); - carportGC.c_connectedGISObjects.add(parkingSpace); - carportGCList.add(carportGC); - } - else{ - carportGC.v_liveConnectionMetaData.physicalCapacity_kW += dataParkingSpace.pv_potential_kwp(); - carportGC.v_liveConnectionMetaData.contractedFeedinCapacity_kW += dataParkingSpace.pv_potential_kwp(); - - //Add to collections - parkingSpace.c_containedGridConnections.add(carportGC); - carportGC.c_connectedGISObjects.add(parkingSpace); - } - - //Update pv potential of carport energy production site - carportGC.v_liveAssetsMetaData.PVPotential_kW += dataParkingSpace.pv_potential_kwp() != null ? dataParkingSpace.pv_potential_kwp() : 0; -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Solarfarm_data></ReturnType> - <Id>1749739602491</Id> - <Name>f_getSolarfarmsInSubScope</Name> - <X>50</X> - <Y>700</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialSolarfarmsList</Name> - <Type>List<Solarfarm_data></Type> - </Parameter> - <Body>List<Solarfarm_data> scopedSolarfarmsList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedSolarfarmsList.addAll(initialSolarfarmsList); -} -else{ - for (Solarfarm_data dataSolarfarm : initialSolarfarmsList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataSolarfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedSolarfarmsList.add(dataSolarfarm); - } - } - } -} -return scopedSolarfarmsList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Windfarm_data></ReturnType> - <Id>1750857080998</Id> - <Name>f_getWindfarmsInSubScope</Name> - <X>50</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialWindfarmsList</Name> - <Type>List<Windfarm_data></Type> - </Parameter> - <Body>List<Windfarm_data> scopedWindfarmsList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedWindfarmsList.addAll(initialWindfarmsList); -} -else{ - for (Windfarm_data dataWindfarm : initialWindfarmsList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataWindfarm.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedWindfarmsList.add(dataWindfarm); - } - } - } -} -return scopedWindfarmsList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Chargingstation_data></ReturnType> - <Id>1750857082460</Id> - <Name>f_getChargingstationsInSubScope</Name> - <X>50</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialChargingstationsList</Name> - <Type>List<Chargingstation_data></Type> - </Parameter> - <Body>List<Chargingstation_data> scopedChargingstationsList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedChargingstationsList.addAll(initialChargingstationsList); -} -else{ - for (Chargingstation_data dataChargingstation : initialChargingstationsList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataChargingstation.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedChargingstationsList.add(dataChargingstation); - } - } - } -} -return scopedChargingstationsList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Electrolyser_data></ReturnType> - <Id>1750857083468</Id> - <Name>f_getElectrolysersInSubScope</Name> - <X>50</X> - <Y>760</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialElectrolysersList</Name> - <Type>List<Electrolyser_data></Type> - </Parameter> - <Body>List<Electrolyser_data> scopedElectrolysersList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedElectrolysersList.addAll(initialElectrolysersList); -} -else{ - for (Electrolyser_data dataElectrolyser : initialElectrolysersList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataElectrolyser.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedElectrolysersList.add(dataElectrolyser); - } - } - } -} -return scopedElectrolysersList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<ParkingSpace_data></ReturnType> - <Id>1750857084547</Id> - <Name>f_getParkingSpacesInSubScope</Name> - <X>50</X> - <Y>800</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialParkingSpaceList</Name> - <Type>List<ParkingSpace_data></Type> - </Parameter> - <Body>List<ParkingSpace_data> scopedParkingSpacesList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedParkingSpacesList.addAll(initialParkingSpaceList); -} -else{ - for (ParkingSpace_data dataParkingSpace : initialParkingSpaceList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataParkingSpace.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedParkingSpacesList.add(dataParkingSpace); - } - } - } -} -return scopedParkingSpacesList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Battery_data></ReturnType> - <Id>1750861476829</Id> - <Name>f_getBatteriesInSubScope</Name> - <X>50</X> - <Y>780</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>initialBatteriesList</Name> - <Type>List<Battery_data></Type> - </Parameter> - <Body>List<Battery_data> scopedBatteriesList = new ArrayList<>(); - -if(settings.subscopesToSimulate() == null || settings.subscopesToSimulate().size() == 0){ - scopedBatteriesList.addAll(initialBatteriesList); -} -else{ - for (Battery_data dataBattery : initialBatteriesList) { - for (int i = 0; i < c_gridNodeIDsInScope.size() ; i++){ - if (dataBattery.gridnode_id().equals( c_gridNodeIDsInScope.get(i))){ - scopedBatteriesList.add(dataBattery); - } - } - } -} -return scopedBatteriesList;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>List<Building_data></ReturnType> - <Id>1752239414416</Id> - <Name>f_getSurveyGCBuildingData</Name> - <X>450</X> - <Y>180</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>companyGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>vallumGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>List<Building_data> connectedBuildingsData = new ArrayList<Building_data>(); - -if ( vallumGC.getPandIds() != null && !vallumGC.getPandIds().isEmpty()) { - for (var PID : vallumGC.getPandIds() ) { - List<Building_data> buildingsDataSameID = findAll(c_companyBuilding_data, b -> b.building_id().equals(PID.getValue())); - Building_data connectedBuildingData = null; - if(buildingsDataSameID.size() == 1){ // Only one building package with same id, so this building package belongs to this GC - connectedBuildingData = buildingsDataSameID.get(0); - } - else{//Multiple building packages with this building id -> Find the right one based on address, if none are found: pick a package without address - connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() != null && buildingData.house_number() == companyGC.p_address.getHouseNumber()); - if(connectedBuildingData == null){ //If no matching house numbers, find first object that has no house number. - connectedBuildingData = findFirst(buildingsDataSameID, buildingData -> buildingData.house_number() == null); - } - } - - if (connectedBuildingData != null) { - // Remove from company building data and add to survey - c_companyBuilding_data.remove(connectedBuildingData); - c_surveyCompanyBuilding_data.add(connectedBuildingData); - // Set trafo ID - companyGC.p_parentNodeElectricID = connectedBuildingData.gridnode_id(); - } - else if (map_buildingData_Vallum != null && !map_buildingData_Vallum.isEmpty()) { - // Create new building package - connectedBuildingData = f_createBuildingData_Vallum(companyGC, PID.getValue()); - c_vallumBuilding_data.add(connectedBuildingData); - } - - if (connectedBuildingData != null) { - connectedBuildingsData.add(connectedBuildingData); - } - } -} -else {// No building connected in zorm? -> check if it is manually connected in excel (using gc_id column) - connectedBuildingsData = findAll(c_companyBuilding_data, b -> b.gc_id() != null && b.gc_id().equals(companyGC.p_gridConnectionID)); - if(connectedBuildingsData == null || connectedBuildingsData.size() == 0){ - traceln("GC %s has no building in zorm and also no manual connection with building in excel", companyGC.p_gridConnectionID); - } - else{ - c_companyBuilding_data.removeAll(connectedBuildingsData); - } -} - -return connectedBuildingsData;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>J_ProfilePointer</ReturnType> - <Id>1753349205424</Id> - <Name>f_createEngineProfile1</Name> - <Description>Functie van gillis voor inladen weer data!</Description> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2419</X> - <Y>450</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>profileID</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>arguments</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>values</Name> - <Type>double[]</Type> - </Parameter> - <Parameter> - <Name>energyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>TableFunction tf_profile = new TableFunction(arguments, values, TableFunction.InterpolationType.INTERPOLATION_LINEAR, 2, TableFunction.OutOfRangeAction.OUTOFRANGE_REPEAT, 0.0); -J_ProfilePointer profilePointer; -if (energyModel.f_findProfile(profileID)!=null) { - profilePointer=energyModel.f_findProfile(profileID); - profilePointer.setTableFunction(tf_profile); -} else { - profilePointer = new J_ProfilePointer(profileID, tf_profile); - energyModel.f_addProfile(profilePointer); -} -return profilePointer;</Body> - </Function> - <Function AccessType="public" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753349205426</Id> - <Name>f_setEngineInputDataAfterDeserialisation</Name> - <Description>Functie van gillis voor inladen weer data!</Description> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433</X> - <Y>260</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>deserializedEnergyModel.p_truckTripsCsv = inputCSVtruckTrips; -deserializedEnergyModel.p_householdTripsCsv = inputCSVhouseholdTrips; -deserializedEnergyModel.p_cookingPatternCsv = inputCSVcookingActivities; -deserializedEnergyModel.avgc_data = energyModel.avgc_data; -deserializedEnergyModel.c_defaultHeatingStrategies = energyModel.c_defaultHeatingStrategies;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>OL_GridConnectionHeatingType</ReturnType> - <Id>1753799111185</Id> - <Name>f_heatingSurveyCompany</Name> - <X>460</X> - <Y>260</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>// Set heatingType -OL_GridConnectionHeatingType heatingType = f_getHeatingTypeSurvey(engineGC, surveyGC); - -if(heatingType == OL_GridConnectionHeatingType.CUSTOM){ - f_addCustomHeatingSetup(engineGC, surveyGC); -} -else{ - // Create building profiles, peakHeatConsumption_kW is null if there is no heat consumption - Double peakHeatConsumption_kW = f_createSurveyHeatProfiles( engineGC, surveyGC, heatingType ); - - // Create EA conversions - if (peakHeatConsumption_kW != null) { - f_addHeatAsset(engineGC, heatingType, peakHeatConsumption_kW); - } - - if (surveyGC.getStorage() != null && surveyGC.getStorage().getHasThermalStorage() != null) { - //if (surveyGC.getStorage().getThermalStorageKw() != null) { - //double storagePower_kW = surveyGC.getStorage().getThermalStorageKw(); - //} - // TODO: find a way to determine the storage capacity - // f_addStorage(parentGC, storagePower_kw, storageCapacity_kWh, storageType); - } - - // Heating management (needs: heatingType & assets such as building thermal model or profiles, survey companies never have a thermal building mdoel) - boolean isGhost = heatingType != OL_GridConnectionHeatingType.NONE && peakHeatConsumption_kW == null; - - //Add heating management - engineGC.f_addHeatManagement(heatingType, isGhost); -} - -return heatingType;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>Double</ReturnType> - <Id>1753801098736</Id> - <Name>f_createSurveyHeatProfiles</Name> - <X>480</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Body>////Gas and Heating -if (surveyGC.getNaturalGas().getHasConnection() != null && surveyGC.getNaturalGas().getHasConnection() ) { - switch (heatingType) { - case HYBRID_HEATPUMP: - // Exception for hybrid heatpumps, when it will be a ghost asset make gas profile - if (!settings.createCurrentElectricityEA() && (engineGC.v_hasQuarterHourlyValues || f_surveyHasGasData(surveyGC)) ) { - f_createGasProfileFromSurvey( engineGC, surveyGC ); - return null; - } - else { - // We know there is no data, hence we directly call the estimate function - return f_createHeatProfileFromEstimates(engineGC); - } - case GAS_BURNER: - case GAS_CHP: - // heat consumption profiel - return f_createHeatProfileFromGasSurvey( engineGC, surveyGC, heatingType ); - default: - if (surveyGC.getNaturalGas().getPercentageUsedForHeating() != null && surveyGC.getNaturalGas().getPercentageUsedForHeating() != 0.0) { - // TODO: Find a solution to surveys filled in without heatingType that is not this hacky - if (surveyGC.getNaturalGas().getEan().equals("123456789012345678")) { - return null; - } - throw new RuntimeException("Gas data used for heating in survey, but no corresponding heating type"); - } - else { - f_createGasProfileFromSurvey( engineGC, surveyGC ); - return null; - } - } -} -else if ( heatingType == OL_GridConnectionHeatingType.DISTRICTHEAT || heatingType == OL_GridConnectionHeatingType.LT_DISTRICTHEAT ) { - return f_createHeatProfileFromSurvey(engineGC, surveyGC); -} -else if ( heatingType == OL_GridConnectionHeatingType.NONE ) { - return null; -} -else { - if(!settings.createCurrentElectricityEA() && engineGC.v_hasQuarterHourlyValues){ - if(heatingType == OL_GridConnectionHeatingType.HYBRID_HEATPUMP){ - return null; // Could create an estimated gas profile here: not done for now. - } - if(heatingType == OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP){ - return null; - } - } - return f_createHeatProfileFromEstimates(engineGC); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1753803212846</Id> - <Name>f_surveyHasGasData</Name> - <X>500</X> - <Y>340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>if ( surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { - return true; -} -else if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { - return true; -} -else { - return false; -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753804393557</Id> - <Name>f_createGasProfileFromGasTS</Name> - <X>520</X> - <Y>380</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>// Gas delivery profile in m3 -double[] profile_m3 = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getNaturalGas().getHourlyDelivery_m3()); - -//Calculate yearly gas delivery -double yearlyGasDelivery_m3 = Arrays.stream(profile_m3).sum(); - -// We assume all delivery is consumption and convert m3 to kWh -ZeroMath.arrayMultiply(profile_m3, avgc_data.p_gas_kWhpm3); -// Then we create the profile asset and name it -J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.METHANE, profile_m3, null, energyModel.p_timeStep_h); -j_ea.energyAssetName = engineGC.p_ownerID + " custom gas profile"; - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753449467888</Id> - <Name>f_reconstructGridConnections</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433.333</X> - <Y>302</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>ArrayList<GridConnection> allConnections = new ArrayList<>(); -allConnections.addAll(deserializedEnergyModel.c_gridConnections); -allConnections.addAll(deserializedEnergyModel.c_pausedGridConnections); - -for(GridConnection GC : allConnections){ - GC.energyModel = deserializedEnergyModel; - if (GC instanceof GCHouse){ - //toMove.add(GC); - f_reconstructAgent(GC, deserializedEnergyModel.Houses, deserializedEnergyModel); - } else if (GC instanceof GCEnergyProduction) { - f_reconstructAgent(GC, deserializedEnergyModel.EnergyProductionSites, deserializedEnergyModel); - } else if (GC instanceof GCEnergyConversion) { - f_reconstructAgent(GC, deserializedEnergyModel.EnergyConversionSites, deserializedEnergyModel); - } else if (GC instanceof GCGridBattery) { - f_reconstructAgent(GC, deserializedEnergyModel.GridBatteries, deserializedEnergyModel); - } else if (GC instanceof GCNeighborhood) { - f_reconstructAgent(GC, deserializedEnergyModel.Neighborhoods, deserializedEnergyModel); - } else if (GC instanceof GCPublicCharger) { - f_reconstructAgent(GC, deserializedEnergyModel.PublicChargers, deserializedEnergyModel); - } else if (GC instanceof GCUtility) { - f_reconstructAgent(GC, deserializedEnergyModel.UtilityConnections, deserializedEnergyModel); - } - //GC.f_startAfterDeserialisation(); -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753883660006</Id> - <Name>f_createHeatProfileFromAnnualGasTotal</Name> - <X>900</X> - <Y>365</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Parameter> - <Name>yearlyGasDelivery_m3</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>ratioGasUsedForHeating</Name> - <Type>double</Type> - </Parameter> - <Body>// First check what the heat conversion efficiency is from gas -double gasToHeatEfficiency = f_getGasToHeatEfficiency(heatingType); -// Finally, multiply the gas delivery with the total conversion factor to get the heat consumption -double yearlyConsumptionHeat_kWh = yearlyGasDelivery_m3 * avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating; -// We assume the heat consumption follows a standard profile -String profileName = "default_building_heat_demand_fr"; -J_ProfilePointer profilePointer = energyModel.f_findProfile(profileName); -new J_EAConsumption(engineGC, OL_EnergyAssetType.HEAT_DEMAND, profileName, yearlyConsumptionHeat_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, profilePointer); - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -} - -return yearlyConsumptionHeat_kWh * max(profilePointer.getAllValues())/energyModel.p_timeStep_h;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753883738731</Id> - <Name>f_createGasProfileFromAnnualGasTotal</Name> - <X>900</X> - <Y>320</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyGasDelivery_m3</Name> - <Type>double</Type> - </Parameter> - <Body>// We assume all delivery is consumption and convert m3 to kWh -double yearlyGasConsumption_kWh = yearlyGasDelivery_m3 * avgc_data.p_gas_kWhpm3; -// We assume the gas consumption follows a standard heat consumption profile -String profileName = "default_building_heat_demand_fr"; -new J_EAConsumption(engineGC, OL_EnergyAssetType.METHANE_DEMAND, profileName, yearlyGasConsumption_kWh, OL_EnergyCarriers.METHANE, energyModel.p_timeStep_h, null); - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753449467890</Id> - <Name>f_reconstructEnergyModel</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433.333</X> - <Y>282</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>energyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>// Code Instead of Agent.goToPopulation() (which resets all parameters to default!) -/* -try{ // Reflection trick to get to Agent.owner private field - energyModel.forceSetOwner(energyModel, pop_energyModels); -} catch (Exception e) { - e.printStackTrace(); -} -*/ - -Agent root = this.getRootAgent(); -energyModel.restoreOwner(this); - -energyModel.setEngine(getEngine()); -energyModel.instantiateBaseStructure_xjal(); -energyModel.setEnvironment(this.getEnvironment()); - -traceln("EnergyModel owner: %s", energyModel.getOwner()); - -energyModel.create(); // What does this do? Does it affect default values? -//energyModel.start(); // Why is this needed?</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753884183970</Id> - <Name>f_createGasProfileFromSurvey</Name> - <X>500</X> - <Y>360</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { - f_createGasProfileFromGasTS( engineGC, surveyGC ); -} -else if (surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { - double yearlyGasDelivery_m3 = surveyGC.getNaturalGas().getAnnualDelivery_m3(); - f_createGasProfileFromAnnualGasTotal( engineGC, yearlyGasDelivery_m3 ); -} -else { - f_createGasProfileFromEstimates( engineGC ); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753884186444</Id> - <Name>f_createHeatProfileFromGasSurvey</Name> - <X>500</X> - <Y>400</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Body>if (surveyGC.getNaturalGas().getHourlyDelivery_m3() != null && surveyGC.getNaturalGas().getHourlyDelivery_m3().hasNumberOfValuesForOneYear()) { - return f_createHeatProfileFromGasTS( engineGC, surveyGC, heatingType ); -} -else if ( surveyGC.getNaturalGas().getAnnualDelivery_m3() != null && surveyGC.getNaturalGas().getAnnualDelivery_m3() > 0) { - double yearlyGasDelivery_m3 = surveyGC.getNaturalGas().getAnnualDelivery_m3(); - double ratioGasUsedForHeating = f_getRatioGasUsedForHeating(surveyGC); - return f_createHeatProfileFromAnnualGasTotal( engineGC, heatingType, yearlyGasDelivery_m3, ratioGasUsedForHeating ); -} -else { - return f_createHeatProfileFromEstimates( engineGC ); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753949286953</Id> - <Name>f_createHeatProfileFromGasTS</Name> - <X>520</X> - <Y>420</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Body>// Gas profile -double[] profile_m3 = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getNaturalGas().getHourlyDelivery_m3()); - -double yearlyGasDelivery_m3 = Arrays.stream(profile_m3).sum(); - -// First check what the heat conversion efficiency is from gas -double gasToHeatEfficiency = f_getGasToHeatEfficiency(heatingType); -// Then check which part of the gas consumption is used for heating -double ratioGasUsedForHeating = f_getRatioGasUsedForHeating(surveyGC); -// Finally, multiply the gas profile with the total conversion factor to get the heat profile -double[] profile_kWh = ZeroMath.arrayMultiply(profile_m3, avgc_data.p_gas_kWhpm3 * gasToHeatEfficiency * ratioGasUsedForHeating); -// Then we create the profile asset and name it -J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.HEAT, profile_kWh, null , energyModel.p_timeStep_h); -j_ea.energyAssetName = engineGC.p_ownerID + " custom building heat profile"; - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -} - -return max(profile_m3)/energyModel.p_timeStep_h;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753449467892</Id> - <Name>f_reconstructAgent</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2445</X> - <Y>379</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>agent</Name> - <Type>Agent</Type> - </Parameter> - <Parameter> - <Name>pop</Name> - <Type>AgentArrayList</Type> - </Parameter> - <Parameter> - <Name>energyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>/* // Code Instead of Agent.goToPopulation() (which resets many variables to default!) -try{ // Reflection trick to get to Agent.owner private field - if (agent instanceof GridNode) { - ((GridNode)agent).forceSetOwner(agent,pop); - } else if (agent instanceof GridConnection) { - ((GridConnection)agent).forceSetOwner(agent,pop); - } else if (agent instanceof Actor) { - ((Actor)agent).forceSetOwner(agent,pop); - } else if (agent instanceof GIS_Object) { - ((GIS_Object)agent).forceSetOwner(agent,pop); - } -} catch (Exception e) { - e.printStackTrace(); -}*/ - -agent.restoreOwner(energyModel); // simply sets agent.d = root, should replace reflection hack -agent.restoreCollection_xjal(pop); // simple sets agent.j = pop, should replace reflection hack - -agent.setEngine(getEngine()); -agent.instantiateBaseStructure_xjal(); -agent.setEnvironment(pop.getEnvironment()); - -pop._add(agent); // Add to the population -//int popSize = pop.size(); -//pop.callCreate(agent, popSize); // Update population object -agent.create();</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753951013582</Id> - <Name>f_getGasToHeatEfficiency</Name> - <X>920</X> - <Y>385</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>heatingType</Name> - <Type>OL_GridConnectionHeatingType</Type> - </Parameter> - <Body>switch (heatingType){ - case GAS_BURNER: - case HYBRID_HEATPUMP: - return avgc_data.p_avgEfficiencyGasBurner_fr; - case GAS_CHP: - return avgc_data.p_avgEfficiencyCHP_thermal_fr; - default: - throw new RuntimeException("Unable to find Gas to Heat efficiency of heatingType: " + heatingType); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753951039103</Id> - <Name>f_getRatioGasUsedForHeating</Name> - <X>540</X> - <Y>440</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>if (surveyGC.getNaturalGas().getPercentageUsedForHeating() != null) { - return surveyGC.getNaturalGas().getPercentageUsedForHeating() / 100.0; -} -else { - return 1.0; -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753955686832</Id> - <Name>f_createGasProfileFromEstimates</Name> - <X>900</X> - <Y>340</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>double yearlyGasDelivery_m3 = engineGC.p_floorSurfaceArea_m2 * avgc_data.p_avgCompanyGasConsumption_m3pm2; -f_createGasProfileFromAnnualGasTotal(engineGC, yearlyGasDelivery_m3); - -if(engineGC.p_owner.p_detailedCompany){ - p_remainingTotals.adjustRemainingGasDeliveryCompanies_m3(engineGC, - yearlyGasDelivery_m3); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753961830063</Id> - <Name>f_createHeatProfileFromEstimates</Name> - <X>900</X> - <Y>430</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Body>double yearlyGasConsumption_m3 = engineGC.p_floorSurfaceArea_m2 * avgc_data.p_avgCompanyGasConsumption_m3pm2; -double yearlyHeatConsumption_kWh = yearlyGasConsumption_m3 * avgc_data.p_gas_kWhpm3; -return f_createHeatProfileFromAnnualHeatTotal( engineGC, yearlyHeatConsumption_kWh );</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753964366889</Id> - <Name>f_createHeatProfileFromHeatTS</Name> - <X>520</X> - <Y>480</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>// Heat profile -double[] profile = f_timeSeriesToQuarterHourlyDoubleArray(surveyGC.getHeat().getHeatDeliveryTimeSeries_kWh()); -// We multiply by the delivery set efficiency to go from delivery to consumption -// TODO: Fix this for LT_DISTRICTHEAT, they have a different efficiency! -ZeroMath.arrayMultiply(profile, avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr); -// Then we create the profile asset and name it -J_EAProfile j_ea = new J_EAProfile(engineGC, OL_EnergyCarriers.HEAT, profile, null , energyModel.p_timeStep_h); -j_ea.energyAssetName = engineGC.p_ownerID + " custom building heat profile"; - -return max(profile)/energyModel.p_timeStep_h;</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753449467894</Id> - <Name>f_reconstructGridConnections1</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2420</X> - <Y>480</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>energyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>// Code Instead of Agent.goToPopulation() (which resets many variables to default!) -GC.energyModel = energyModel; -try{ // Reflection trick to get to Agent.owner private field - GC.forceSetOwner(GC,pop); -} catch (Exception e) { - e.printStackTrace(); -} - -traceln("GC owner: %s", GC.getOwner()); -GC.setEngine(getEngine()); -GC.instantiateBaseStructure_xjal(); -GC.setEnvironment(pop.getEnvironment()); - -pop._add(GC); // Add to the population -int popSize = pop.size(); -pop.callCreate(GC, popSize); // Update population object -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753451091785</Id> - <Name>f_addMixins_old</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2740</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>v_objectMapper.addMixIn(Agent.class, AgentMixin.class); -v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); -//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); -//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); -//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); -v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); - -v_objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, IgnoreClassMixin.class); -//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); - -// Weirdness regarding material handling toolbox -v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753964605708</Id> - <Name>f_createHeatProfileFromAnnualHeatTotal</Name> - <X>900</X> - <Y>410</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>yearlyConsumptionHeat_kWh</Name> - <Type>double</Type> - </Parameter> - <Body>// We assume the heat consumption follows a standard profile -String profileName = "default_building_heat_demand_fr"; -J_ProfilePointer profilePointer = energyModel.f_findProfile(profileName); -new J_EAConsumption(engineGC, OL_EnergyAssetType.HEAT_DEMAND, profileName, yearlyConsumptionHeat_kWh, OL_EnergyCarriers.HEAT, energyModel.p_timeStep_h, profilePointer); - -return yearlyConsumptionHeat_kWh * max(profilePointer.getAllValues())/energyModel.p_timeStep_h;</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753964654729</Id> - <Name>f_createHeatProfileFromSurvey</Name> - <X>500</X> - <Y>460</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>if (surveyGC.getHeat() != null && surveyGC.getHeat().getHeatDeliveryTimeSeries_kWh() != null) { - return f_createHeatProfileFromHeatTS(engineGC, surveyGC); -} -else if (surveyGC.getHeat() != null && surveyGC.getHeat().getAnnualDistrictHeatingDelivery_GJ() != null) { - double yearlyHeatDelivery_kWh = surveyGC.getHeat().getAnnualDistrictHeatingDelivery_GJ()*277.777778 ; - // TODO: Fix this for LT_DISTRICTHEAT, they have a different efficiency! - double yearlyHeatConsumption_kWh = yearlyHeatDelivery_kWh * avgc_data.p_avgEfficiencyDistrictHeatingDeliverySet_fr; - return f_createHeatProfileFromAnnualHeatTotal(engineGC, yearlyHeatConsumption_kWh); -} -else { - return f_createHeatProfileFromEstimates(engineGC); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753968816374</Id> - <Name>f_setDefaultHeatingStrategies</Name> - <X>80</X> - <Y>170</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>// Triples ( heatingType, hasThermalBuilding, hasHeatBuffer ) -Triple<OL_GridConnectionHeatingType, Boolean, Boolean> triple = null; - -triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.GAS_BURNER, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrol.class ); -triple = Triple.of(OL_GridConnectionHeatingType.ELECTRIC_HEATPUMP, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrol.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementProfileHybridHeatPump.class ); -triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrolHybridHeatpump.class ); -triple = Triple.of(OL_GridConnectionHeatingType.HYBRID_HEATPUMP, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementPIcontrolHybridHeatpump.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.DISTRICTHEAT, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.LT_DISTRICTHEAT, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); - -triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, false, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, true, false); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class ); -triple = Triple.of(OL_GridConnectionHeatingType.HYDROGENBURNER, true, true); -energyModel.c_defaultHeatingStrategies.put( triple, J_HeatingManagementSimple.class );</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754048849906</Id> - <Name>f_addCustomHeatingSetup</Name> - <X>480</X> - <Y>300</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>engineGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>surveyGC</Name> - <Type>com.zenmo.zummon.companysurvey.GridConnection</Type> - </Parameter> - <Body>throw new RuntimeException("HeatingType is CUSTOM. You must override the function: f_addCustomHeatingSetup!");</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753712630322</Id> - <Name>f_reconstructActors</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433</X> - <Y>322</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Body>for(Actor AC : deserializedEnergyModel.c_actors){ - - if (AC instanceof ConnectionOwner) { - ((ConnectionOwner)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_connectionOwners, deserializedEnergyModel); - } else if (AC instanceof EnergySupplier) { - ((EnergySupplier)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_energySuppliers, deserializedEnergyModel); - } else if (AC instanceof EnergyCoop) { - ((EnergyCoop)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_energyCoops, deserializedEnergyModel); - //((EnergyCoop)AC).f_startAfterDeserialisation(); - } else if (AC instanceof GridOperator) { - ((GridOperator)AC).energyModel = deserializedEnergyModel; - f_reconstructAgent(AC, deserializedEnergyModel.pop_gridOperators, deserializedEnergyModel); - } - } -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1754050106254</Id> - <Name>f_addCustomHeatAsset</Name> - <X>920</X> - <Y>520</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>parentGC</Name> - <Type>GridConnection</Type> - </Parameter> - <Parameter> - <Name>maxHeatOutputPower_kW</Name> - <Type>double</Type> - </Parameter> - <Body>throw new RuntimeException("HeatingType is CUSTOM. You must override the function: f_addCustomHeatAsset!");</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753712697685</Id> - <Name>f_reconstructGIS_Objects</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433</X> - <Y>362</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Parameter> - <Name>c_GISObjects</Name> - <Type>ArrayList<GIS_Object></Type> - </Parameter> - <Body>for(GIS_Object GO : c_GISObjects){ - GO.gisRegion = c_GISregions.get(GO.p_id); - - if (GO instanceof GIS_Building) { - ((GIS_Building)GO).energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Buildings, deserializedEnergyModel); - } else if (GO instanceof GIS_Parcel) { - ((GIS_Parcel)GO).energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Parcels, deserializedEnergyModel); - } else { - GO.energyModel = deserializedEnergyModel; - f_reconstructAgent(GO, deserializedEnergyModel.pop_GIS_Objects, deserializedEnergyModel); - //GO.f_startAfterDeserialisation(); - } - GO.f_resetStyle(); -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1753712761420</Id> - <Name>f_reconstructGridNodes</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433</X> - <Y>342</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>deserializedEnergyModel</Name> - <Type>EnergyModel</Type> - </Parameter> - <Parameter> - <Name>c_gridNodes</Name> - <Type>ArrayList<GridNode></Type> - </Parameter> - <Body>for(GridNode GN : c_gridNodes){ - GN.energyModel = deserializedEnergyModel; - f_reconstructAgent(GN, deserializedEnergyModel.pop_gridNodes, deserializedEnergyModel); -} -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1755866291695</Id> - <Name>f_addCarsToHouses</Name> - <X>460</X> - <Y>720</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>house</Name> - <Type>GCHouse</Type> - </Parameter> - <Body>double probabilityForLeftOverCar = house.p_eigenOprit ? v_probabilityForAdditionalCar_privateParking : v_probabilityForAdditionalCar_publicParking; -int amountOfOwnedCars = (int) floor(avgc_data.p_avgNrOfCarsPerHouse) + (randomTrue(probabilityForLeftOverCar) ? 1 : 0); - -////Create Vehicles based on the amount of owned cars -for(int i = 0; i < amountOfOwnedCars ; i++){ - double tripTrackerScaling = 1; - - if(i>0){//If more than 1 car: 2+ cars all have smaller travel average travel distance - tripTrackerScaling *= avgc_data.p_avgAnnualTravelDistanceSecondVSFirstCar_fr; - } - //Oprit? -> only then you should have a chance to start with EV (public ev is not supported by sliders, public chargepoint is then used instead) - if( house.p_eigenOprit){ - if (randomTrue( avgc_data.p_shareOfElectricVehicleOwnership)){ - J_EAEV ev = f_addElectricVehicle(house, OL_EnergyAssetType.ELECTRIC_VEHICLE, true, 0, 0); - ev.tripTracker.setAnnualDistance_km(ev.tripTracker.getAnnualDistance_km()*tripTrackerScaling); - } - else{ - J_EADieselVehicle dieselVehicle = f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); - dieselVehicle.tripTracker.setAnnualDistance_km(dieselVehicle.tripTracker.getAnnualDistance_km()*tripTrackerScaling); - } - } - else { - J_EADieselVehicle dieselVehicle = f_addDieselVehicle(house, OL_EnergyAssetType.DIESEL_VEHICLE, true, 0); - dieselVehicle.tripTracker.setAnnualDistance_km(dieselVehicle.tripTracker.getAnnualDistance_km()*tripTrackerScaling); - } -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1755876470177</Id> - <Name>f_calculateProbabilitiesForAdditionalCar</Name> - <X>440</X> - <Y>660</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>buildingDataHouses</Name> - <Type>List<Building_data></Type> - </Parameter> - <Body>//Precalculate the amount of households and households that have private parking for vehicle distribution -int totalNumberOfHouses = 0; -int numberOfHousesPrivateParking = 0; -for (Building_data houseBuildingData : buildingDataHouses) { - totalNumberOfHouses++; - if(houseBuildingData.has_private_parking() != null && houseBuildingData.has_private_parking()){ - numberOfHousesPrivateParking++; - } -} - -//Determine the total cars in the area based on the average of the area -int totalCars = roundToInt(avgc_data.p_avgNrOfCarsPerHouse * totalNumberOfHouses); -int numberOfHousesPublicParking = totalNumberOfHouses - numberOfHousesPrivateParking; - -//Calculate the base number of cars that everyone gets, and the total leftover cars that should be distributed -int baseCars = (int) floor(avgc_data.p_avgNrOfCarsPerHouse); -int leftOverCars = totalCars - baseCars * totalNumberOfHouses; - -// Determine leftover cars distributed for private and public parking (bias to private parking) -int leftOverForPrivateParking = min(leftOverCars, numberOfHousesPrivateParking); -int leftOverForPublicParking = max(0, leftOverCars - leftOverForPrivateParking); - -//Calculate the leftover car probability for private and public parking -v_probabilityForAdditionalCar_privateParking = ((double) leftOverForPrivateParking) / numberOfHousesPrivateParking; // Calculate probability for leftover car for private parking -v_probabilityForAdditionalCar_publicParking = ((double) leftOverForPublicParking) / numberOfHousesPublicParking; // Calculate probability for leftover car for public parking -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1756395236522</Id> - <Name>f_initializeInterfacePointers</Name> - <X>30</X> - <Y>950</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Set parameters/pointers in the interface -zero_Interface.zero_loader = this; -zero_Interface.energyModel = energyModel; -zero_Interface.uI_Results.energyModel = energyModel; -zero_Interface.project_data = project_data; -zero_Interface.settings = settings; -zero_Interface.user = user; -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1756735137677</Id> - <Name>f_reconstructOrderedCollections</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2430</X> - <Y>400</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>saveObject</Name> - <Type>J_ModelSave</Type> - </Parameter> - <Body>zero_Interface.c_orderedPVSystemsCompanies = saveObject.c_orderedPVSystemsCompanies; -zero_Interface.c_orderedPVSystemsHouses = saveObject.c_orderedPVSystemsHouses; -zero_Interface.c_orderedVehicles = saveObject.c_orderedVehicles; -zero_Interface.c_orderedHeatingSystemsCompanies = saveObject.c_orderedHeatingSystemsCompanies; -zero_Interface.c_orderedHeatingSystemsHouses = saveObject.c_orderedHeatingSystemsHouses; -zero_Interface.c_orderedVehiclesPrivateParking = saveObject.c_orderedVehiclesPrivateParking; -zero_Interface.c_orderedParkingSpaces = saveObject.c_orderedParkingSpaces; -zero_Interface.c_orderedV1GChargers = saveObject.c_orderedV1GChargers; -zero_Interface.c_orderedV2GChargers = saveObject.c_orderedV2GChargers; -zero_Interface.c_orderedPublicChargers = saveObject.c_orderedPublicChargers; -zero_Interface.c_mappingOfVehiclesPerCharger = saveObject.c_mappingOfVehiclesPerCharger; -zero_Interface.c_scenarioMap_Current = saveObject.c_scenarioMap_Current; -zero_Interface.c_scenarioMap_Future = saveObject.c_scenarioMap_Future; - - -/* -List<ConnectionOwner> c_COCompanies = findAll(zero_Interface.energyModel.pop_connectionOwners, p -> p.p_connectionOwnerType == OL_ConnectionOwnerType.COMPANY); - - -int i = 0; -for (ConnectionOwner CO : c_COCompanies) { - UI_company companyUI = zero_Interface.c_companyUIs.get(CO.p_connectionOwnerIndexNr); - companyUI.p_company = CO; - companyUI.c_ownedGridConnections = companyUI.p_company.f_getOwnedGridConnections(); - companyUI.c_additionalVehicles = saveObject.c_additionalVehicleHashMaps.get(i); - companyUI.f_setSelectedGCSliders(); - i++; -} -*/ -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1758714675284</Id> - <Name>f_getSimulationTimeVariables</Name> - <X>80</X> - <Y>110</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//Sim start year -v_simStartYear = getExperiment().getEngine().getStartDate().getYear() + 1900; // 1900 years because of Java convention - -// Create date at start of simulation year to use to calculate v_simStartHour_h -Date d = new Date(); -d.setYear(v_simStartYear - 1900); // 1900 jaar Compenseren door anylogic bug -d.setMonth(0); -d.setHours(0); -d.setSeconds(0); -d.setMinutes(0); -d.setDate(1); - -//Calculate sim start hour -v_simStartHour_h = roundToInt((getExperiment().getEngine().getStartDate().getTime() - d.getTime())/1000.0/60/60); //Get time is in ms -> converted into hours - -//Fix for if start is within summer time, the v_simStartHour_h is not correct anymore -double summerTimeStart_h = avgc_data.map_yearlySummerWinterTimeStartHour.get(v_simStartYear).getFirst(); -double winterTimeStart_h = avgc_data.map_yearlySummerWinterTimeStartHour.get(v_simStartYear).getSecond(); -if(v_simStartHour_h > summerTimeStart_h && v_simStartHour_h < winterTimeStart_h){ - v_simStartHour_h += 1; -} - - - -//Set sim duration if it is set -if(getExperiment().getEngine().getStopDate() != null){ //If experiment has set time, it gets bias - v_simDuration_h = roundToInt(((double)getExperiment().getEngine().getStopDate().getTime() - getExperiment().getEngine().getStartDate().getTime())/1000.0/60/60); //Get time is in ms -> converted into hours - if(v_simStartHour_h > summerTimeStart_h && v_simStartHour_h + v_simDuration_h > winterTimeStart_h){//Compensate if start time is in summer time, and end time is in winter time -> simulation would otherwise have 1 hour too much - v_simDuration_h -= 1; - } - if(v_simStartHour_h < summerTimeStart_h && v_simStartHour_h + v_simDuration_h < winterTimeStart_h){//Compensate if start time is in winter time, and end time is in summer time -> simulation would otherwise have 1 hour too less - v_simDuration_h += 1; - } -} -else if(settings.simDuration_h() != null){//Else if manual set, use that instead - v_simDuration_h = settings.simDuration_h(); -} - -if (v_simStartHour_h % 24 != 0) { - throw new RuntimeException("Impossible to run a model that does not start at midnight. Please check the start in the simulation settings."); -} -if (v_simDuration_h % 24 != 0) { - throw new RuntimeException("Impossible to run a model that does not have a runtime that is an exact multiple of a day. Please check the start and endtime in the simulation settings."); -}</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1759128970777</Id> - <Name>f_addMixins</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2450</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>v_objectMapper.addMixIn(Agent.class, AgentMixin.class); -//v_objectMapper.addMixIn(EnergyModel.class, EnergyModelMixin.class); - -//v_objectMapper.addMixIn(Actor.class, ActorMixin.class); -//v_objectMapper.addMixIn(DataSet.class, DataSetMixin.class); - -//Ignore classes - -v_objectMapper.addMixIn(java.awt.Font.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(java.awt.Color.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(java.awt.Paint.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeLine.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeLineFill.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ShapeText.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(AgentArrayList.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(TextFile.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(EnergyDataViewer.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(DataSet.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(Level.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(TableFunction.class, IgnoreClassMixin.class); -//objectMapper.addMixIn(com.anylogic.engine.TableFunction.class, TableFunctionMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.GISRegion.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ViewArea.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.AgentSpacePosition.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeModelElementsGroup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.presentation.ShapeButton.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.analysis.TimePlot.class, IgnoreClassMixin.class); - - -// Weirdness regarding material handling toolbox -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractWall.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RailwayTrack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.PalletRack.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.RoadNetwork.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AreaNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.AbstractFluidMarkup.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Lift.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.ConveyorNode.class, IgnoreClassMixin.class); -v_objectMapper.addMixIn(com.anylogic.engine.markup.Node.class, IgnoreClassMixin.class); -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1759133710571</Id> - <Name>f_loadScenario</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2430</X> - <Y>230</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>index</Name> - <Type>int</Type> - </Parameter> - <Body>if ( zero_Interface.user.userIdToken() == null || zero_Interface.user.userIdToken() == "") { - zero_Interface.f_setErrorScreen("Niet mogelijk om scenario's in te laden. Er is geen gebruiker ingelogd.", zero_Interface.va_EHubDashboard.getX(), zero_Interface.va_EHubDashboard.getY()); - return; -} -traceln("Loading modelSave..."); -//pauseSimulation(); - -// Collect GIS_Objects into hashmap, to link to new EnergyModel. -zero_Interface.energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -zero_Interface.energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -zero_Interface.energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -pauseSimulation(); -try { - v_objectMapper = new ObjectMapper(); - f_addMixins(); - - var repository = UserScenarioRepository.builder() - .userId(UUID.fromString(zero_Interface.user.userIdToken())) - .modelName(zero_Interface.project_data.project_name()) - .build(); - - var scenarioList = repository.listUserScenarios(); - - // Deserialize the JSON into a new EnergyModel instance: - var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(index).getId()); - - /*int n = 200; // how many characters you want - byte[] buffer = new byte[n]; - int read = jsonStream.read(buffer, 0, n); - - if (read > 0) { - String preview = new String(buffer, 0, read, "UTF-8"); - System.out.println(preview); - }*/ - - //jsonStream.close(); - - //traceln("jsonStream: %s", jsonStream.toString().substring(0,30)); - J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); - //J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); - - EnergyModel deserializedEnergyModel = saveObject.energyModel; - - // Reconstruct all Agents - f_reconstructEnergyModel(deserializedEnergyModel); - f_reconstructGridConnections(deserializedEnergyModel); - f_reconstructActors(deserializedEnergyModel); - f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); - - f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); - - // Get profilePointer tableFunctions from 'original' energyModel - deserializedEnergyModel.c_profiles.forEach(x->{ - J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); - x.setTableFunction(origProfile.getTableFunction()); - }); - // get heatingTypeHashmap from 'old' energyModel. - deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; - - zero_Interface.zero_loader.energyModel = deserializedEnergyModel; - zero_Interface.energyModel = deserializedEnergyModel; - zero_Interface.uI_Results.energyModel = deserializedEnergyModel; - uI_Results.energyModel = deserializedEnergyModel; - - deserializedEnergyModel.f_startAfterDeserialisation(); - - f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); - - - // Putting back the ordered collections in the interface - f_reconstructOrderedCollections(saveObject); - - //zero_Interface.f_clearSelectionAndSelectEnergyModel(); - - /* - zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); - uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); - zero_Interface.f_updateMainInterfaceSliders(); - - zero_Interface.f_resetSettings(); - */ - - ///button_exit.action(); - - ///zero_Interface.uI_Tabs.f_initializeUI_Tabs(zero_Interface.energyModel.f_getGridConnectionsCollectionPointer(), zero_Interface.energyModel.f_getPausedGridConnectionsCollectionPointer()); - // v_energyHubCoop not updated to point to 'new' coop - //uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); - - ///zero_Interface.f_simulateYearFromMainInterface(); - - v_energyHubCoop = findFirst(zero_Interface.energyModel.pop_energyCoops,x->x.p_actorID.equals("eHubConfiguratorCoop")); - if (v_energyHubCoop == null){ - throw new RuntimeException("No energyCoop found with p_actorID = eHubConfiguratorCoop"); - } - zero_Interface.v_customEnergyCoop = v_energyHubCoop; - // Update the E-Hub Dashboard with the loaded E-Hub from savefile - f_initializeEnergyHubMemberNames(); - uI_Tabs.f_initializeUI_Tabs(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer(), null); - uI_Results.f_updateResultsUI(v_energyHubCoop); - - // Update the main interface with the loaded E-Hub from savefile - zero_Interface.c_selectedGridConnections = new ArrayList<>(v_energyHubCoop.f_getMemberGridConnectionsCollectionPointer()); - - // Reset all colors on the GIS map - zero_Interface.energyModel.pop_GIS_Buildings.forEach(x -> zero_Interface.f_styleAreas(x)); - zero_Interface.energyModel.pop_GIS_Objects.forEach(x -> zero_Interface.f_styleAreas(x)); - zero_Interface.energyModel.pop_GIS_Parcels.forEach(x -> zero_Interface.f_styleAreas(x)); - - // Color all selected GC - for (GridConnection gc : zero_Interface.c_selectedGridConnections) { - gc.c_connectedGISObjects.forEach(x -> x.gisRegion.setFillColor(zero_Interface.v_selectionColor)); - } - - // Simulate a year - gr_simulateYearEnergyHub.setVisible(false); - gr_loadIconYearSimulationEnergyHub.setVisible(true); - - - zero_Interface.f_simulateYearFromMainInterface(); - - traceln("ModelSave loaded succesfully!"); - - //zero_Interface.b_inEnergyHubSelectionMode = true; - //zero_Interface.f_finalizeEnergyHubConfiguration(); - - //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); - - /* - Date startDate = getExperiment().getEngine().getStartDate(); - int day = getExperiment().getEngine().getDayOfMonth(); - int month = getExperiment().getEngine().getMonth(); - traceln("day: " + day); - traceln("month: " + month); - startDate.setMonth(startDate.getMonth() - month); - startDate.setDate(startDate.getDate() - day); - getExperiment().getEngine().setStartDate(startDate); - */ - -} catch (IOException e) { - e.printStackTrace(); -} - -</Body> - </Function> - <Function AccessType="protected" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>java.util.UUID</ReturnType> - <Id>1762185034341</Id> - <Name>f_getUserUUID</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2630</X> - <Y>70</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>p_userIdToken</Name> - <Type>String</Type> - </Parameter> - <Body>java.util.UUID usedId = new JWTDecoder().jwtToUserId(p_userIdToken); -return usedId; -</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1763646792610</Id> - <Name>f_getAccessOfSurveyGC</Name> - <X>450</X> - <Y>160</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>dataSharingAgreed</Name> - <Type>boolean</Type> - </Parameter> - <Parameter> - <Name>companyUUID</Name> - <Type>UUID</Type> - </Parameter> - <Body>// If public model: only dataSharingAgreed matters -if (settings.isPublicModel()) { - return dataSharingAgreed; -} - -// If private model: several conditions allow access -return user.GCAccessType == OL_UserGCAccessType.FULL || - dataSharingAgreed || - user.accessibleCompanyIDs.contains(companyUUID.toString());</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>boolean</ReturnType> - <Id>1763648128875</Id> - <Name>f_isLocatedInActiveNBH</Name> - <X>1550</X> - <Y>440</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>lat</Name> - <Type>double</Type> - </Parameter> - <Parameter> - <Name>lon</Name> - <Type>double</Type> - </Parameter> - <Body>if(user.NBHAccessType == OL_UserNBHAccessType.FULL){ - return true; -} -else{ - for(GIS_Object activeNBH : c_activeNBH){ - if(activeNBH.gisRegion.contains(lat, lon)){ - return true; - } - } - return false; -}</Body> - </Function> - <Function AccessType="default" StaticFunction="false"> - <ReturnModificator>VOID</ReturnModificator> - <ReturnType>double</ReturnType> - <Id>1763648249772</Id> - <Name>f_removeObjectsNotInActiveNBH</Name> - <X>1550</X> - <Y>460</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Body>//GridNodes -for(GridNode_data dataGN : new ArrayList<GridNode_data>(c_gridNode_data)){ - if(!dataGN.gridnode_id().equals("T0") && !f_isLocatedInActiveNBH(dataGN.latitude(), dataGN.longitude())){ - c_gridNode_data.remove(dataGN); - } -} - -//Buildings -for(Building_data dataCompanyBuilding : new ArrayList<Building_data>(c_companyBuilding_data)){ - if(!f_isLocatedInActiveNBH(dataCompanyBuilding.latitude(), dataCompanyBuilding.longitude())){ - c_companyBuilding_data.remove(dataCompanyBuilding); - } -} -for(Building_data dataCompanyBuilding : new ArrayList<Building_data>(c_houseBuilding_data)){ - if(!f_isLocatedInActiveNBH(dataCompanyBuilding.latitude(), dataCompanyBuilding.longitude())){ - c_houseBuilding_data.remove(dataCompanyBuilding); - } -} -for(Building_data dataCompanyBuilding : new ArrayList<Building_data>(c_remainingBuilding_data)){ - if(!f_isLocatedInActiveNBH(dataCompanyBuilding.latitude(), dataCompanyBuilding.longitude())){ - c_remainingBuilding_data.remove(dataCompanyBuilding); - } -} - -//EA GCs -for(Solarfarm_data dataSF : new ArrayList<Solarfarm_data>(c_solarfarm_data)){ - if(!f_isLocatedInActiveNBH(dataSF.latitude(), dataSF.longitude())){ - c_solarfarm_data.remove(dataSF); - } -} -for(Windfarm_data dataWF : new ArrayList<Windfarm_data>(c_windfarm_data)){ - if(!f_isLocatedInActiveNBH(dataWF.latitude(), dataWF.longitude())){ - c_windfarm_data.remove(dataWF); - } -} -for(Battery_data dataBattery : new ArrayList<Battery_data>(c_battery_data)){ - if(!f_isLocatedInActiveNBH(dataBattery.latitude(), dataBattery.longitude())){ - c_battery_data.remove(dataBattery); - } -} -for(Chargingstation_data dataCS : new ArrayList<Chargingstation_data>(c_chargingstation_data)){ - if(!f_isLocatedInActiveNBH(dataCS.latitude(), dataCS.longitude())){ - c_chargingstation_data.remove(dataCS); - } -} - -//Additional GIS Objects -for(ParkingSpace_data dataParking : new ArrayList<ParkingSpace_data>(c_parkingSpace_data)){ - if(!f_isLocatedInActiveNBH(dataParking.latitude(), dataParking.longitude())){ - c_parkingSpace_data.remove(dataParking); - } -} -for(Parcel_data dataParcel : new ArrayList<Parcel_data>(c_parcel_data)){ - if(!f_isLocatedInActiveNBH(dataParcel.latitude(), dataParcel.longitude())){ - c_parcel_data.remove(dataParcel); - } -} -for(Cable_data dataCable : new ArrayList<Cable_data>(c_cable_data)){ - if(!f_isLocatedInActiveNBH(dataCable.latitude(), dataCable.longitude())){ - c_cable_data.remove(dataCable); - } -} -</Body> - </Function> - <Function AccessType="private" StaticFunction="false"> - <ReturnModificator>RETURNS_VALUE</ReturnModificator> - <ReturnType>OL_GISObjectType</ReturnType> - <Id>1763648931889</Id> - <Name>f_getNBHGISObjectType</Name> - <X>1570</X> - <Y>560</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <Parameter> - <Name>NBH</Name> - <Type>GIS_Object</Type> - </Parameter> - <Parameter> - <Name>NBHCode</Name> - <Type>String</Type> - </Parameter> - <Parameter> - <Name>defaultGISObjectType</Name> - <Type>OL_GISObjectType</Type> - </Parameter> - <Body>if( defaultGISObjectType == OL_GISObjectType.ANTI_LAYER || - (user.NBHAccessType == OL_UserNBHAccessType.SPECIFIED && !user.accessibleNBH.contains(NBHCode)) - ){ - return OL_GISObjectType.ANTI_LAYER; -} -else{ - c_activeNBH.add(NBH); - return OL_GISObjectType.REGION; -}</Body> - </Function> - </Functions> - <Connectivity> - <TextFile> - <Id>1756980503493</Id> - <Name>inputCSVcookingActivities</Name> - <X>-369</X> - <Y>759</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <FileType>FILE</FileType> - <Url>null</Url> - <ResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>data_Generic/inputECookerPatterns.csv</ClassName> - </ResourceReference> - <FileMode>READ</FileMode> - <CharsetName>null</CharsetName> - <Separators>,</Separators> - </TextFile> - <TextFile> - <Id>1756980506290</Id> - <Name>inputCSVhouseholdTrips</Name> - <X>-369</X> - <Y>799</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <FileType>FILE</FileType> - <Url>null</Url> - <ResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>data_Generic/AlbatrossProcessedVehicleTrips.csv</ClassName> - </ResourceReference> - <FileMode>READ</FileMode> - <CharsetName>null</CharsetName> - <Separators>,</Separators> - </TextFile> - <TextFile> - <Id>1756980507645</Id> - <Name>inputCSVtruckTrips</Name> - <X>-369</X> - <Y>779</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <FileType>FILE</FileType> - <Url>null</Url> - <ResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>data_Generic/inputTruckTripPatterns.csv</ClassName> - </ResourceReference> - <FileMode>READ</FileMode> - <CharsetName>null</CharsetName> - <Separators>,</Separators> - </TextFile> - </Connectivity> - <AgentLinks> - <AgentLink> - <Id>1726584206083</Id> - <Name>connections</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <EmbeddedObjects> - <EmbeddedObject> - <Id>1726584206041</Id> - <Name>energyModel</Name> - <X>30</X> - <Y>890</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zero_engine</PackageName> - <ClassName>EnergyModel</ClassName> - </ActiveObjectClass> - <GenericParameterSubstitute> - <GenericParameterSubstituteReference> - <PackageName>zero_engine</PackageName> - <ClassName>EnergyModel</ClassName> - <ItemName>1658477103138</ItemName> - </GenericParameterSubstituteReference> - </GenericParameterSubstitute> - <Parameters> - <Parameter> - <Name>p_timeStep_h</Name> - </Parameter> - <Parameter> - <Name>p_forecastTime_h</Name> - </Parameter> - <Parameter> - <Name>p_year</Name> - </Parameter> - <Parameter> - <Name>avgc_data</Name> - </Parameter> - <Parameter> - <Name>b_parallelizeConnectionOwners</Name> - </Parameter> - <Parameter> - <Name>b_parallelizeGridConnections</Name> - </Parameter> - <Parameter> - <Name>b_enableDLR</Name> - </Parameter> - <Parameter> - <Name>p_winterWeekNumber</Name> - </Parameter> - <Parameter> - <Name>p_summerWeekNumber</Name> - </Parameter> - <Parameter> - <Name>p_runStartTime_h</Name> - </Parameter> - <Parameter> - <Name>p_runEndTime_h</Name> - </Parameter> - <Parameter> - <Name>b_isInitialized</Name> - </Parameter> - <Parameter> - <Name>b_storePreviousRapidRunData</Name> - </Parameter> - <Parameter> - <Name>p_regionName</Name> - </Parameter> - <Parameter> - <Name>p_truckTripsCsv</Name> - </Parameter> - <Parameter> - <Name>p_householdTripsCsv</Name> - </Parameter> - <Parameter> - <Name>p_cookingPatternCsv</Name> - </Parameter> - <Parameter> - <Name>b_isDeserialised</Name> - </Parameter> - </Parameters> - <ReplicationFlag>false</ReplicationFlag> - <Replication Class="CodeValue"> - <Code>100</Code> - </Replication> - <CollectionType>ARRAY_LIST_BASED</CollectionType> - <InEnvironment>true</InEnvironment> - <InitialLocationType>XYZ</InitialLocationType> - <XCode Class="CodeValue"> - <Code>0</Code> - </XCode> - <YCode Class="CodeValue"> - <Code>0</Code> - </YCode> - <ZCode Class="CodeValue"> - <Code>0</Code> - </ZCode> - <ColumnCode Class="CodeValue"> - <Code>0</Code> - </ColumnCode> - <RowCode Class="CodeValue"> - <Code>0</Code> - </RowCode> - <LocationNameCode Class="CodeValue"> - <Code>""</Code> - </LocationNameCode> - <InitializationType>SPECIFIED_NUMBER</InitializationType> - <InitializationDatabaseTableQuery> - <Id>1658477089957</Id> - <TableReference/> - </InitializationDatabaseTableQuery> - <InitializationDatabaseType>ONE_AGENT_PER_DATABASE_RECORD</InitializationDatabaseType> - <QuantityColumn/> - </EmbeddedObject> - <EmbeddedObject> - <Id>1726584829907</Id> - <Name>avgc_data</Name> - <X>-370</X> - <Y>830</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <ActiveObjectClass> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>AVGC_data</ClassName> - </ActiveObjectClass> - <GenericParameterSubstitute> - <GenericParameterSubstituteReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>AVGC_data</ClassName> - <ItemName>1726584205523</ItemName> - </GenericParameterSubstituteReference> - </GenericParameterSubstitute> - <Parameters> - <Parameter> - <Name>p_avgHouseConnectionCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgHouseHeatingMethod</Name> - </Parameter> - <Parameter> - <Name>p_avgUtilityConnectionCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgUtilityHeatingMethod</Name> - </Parameter> - <Parameter> - <Name>p_avgHouseElectricityConsumption_kWh_yr</Name> - </Parameter> - <Parameter> - <Name>p_avgHouseGasConsumption_m3_yr</Name> - </Parameter> - <Parameter> - <Name>p_shareOfElectricVehicleOwnership</Name> - </Parameter> - <Parameter> - <Name>p_ratioHouseInstalledPV</Name> - </Parameter> - <Parameter> - <Name>p_avgHousePVInstallationPower_kWp</Name> - </Parameter> - <Parameter> - <Name>p_avgEVStorageCar_kWh</Name> - </Parameter> - <Parameter> - <Name>p_avgEVMaxChargePowerCar_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgEVStorageVan_kWh</Name> - </Parameter> - <Parameter> - <Name>p_avgEVStorageTruck_kWh</Name> - </Parameter> - <Parameter> - <Name>p_avgEVMaxChargePowerVan_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgEVMaxChargePowerTruck_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgEVEnergyConsumptionCar_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgEVEnergyConsumptionVan_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgEVEnergyConsumptionTruck_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_gas_kWhpm3</Name> - </Parameter> - <Parameter> - <Name>p_hydrogenEnergyDensity_kWh_Nm3</Name> - </Parameter> - <Parameter> - <Name>p_hydrogenDensity_kg_Nm3</Name> - </Parameter> - <Parameter> - <Name>p_oxygenDensity_kg_Nm3</Name> - </Parameter> - <Parameter> - <Name>p_oxygenProduction_kgO2pkgH2</Name> - </Parameter> - <Parameter> - <Name>p_hydrogenSpecificEnergy_kWh_kg</Name> - </Parameter> - <Parameter> - <Name>p_diesel_kWhpl</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionCar_kmpl</Name> - </Parameter> - <Parameter> - <Name>p_avgGasolineConsumptionCar_kmpl</Name> - </Parameter> - <Parameter> - <Name>p_gasoline_kWhpl</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionCar_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgGasolineConsumptionCar_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionVan_kmpl</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionVan_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionTruck_kmpl</Name> - </Parameter> - <Parameter> - <Name>p_avgDieselConsumptionTruck_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgCOPHeatpump</Name> - </Parameter> - <Parameter> - <Name>p_avgUtilityPVPower_kWp</Name> - </Parameter> - <Parameter> - <Name>p_ratioElectricTrucks</Name> - </Parameter> - <Parameter> - <Name>p_avgCompanyHeatingMethod</Name> - </Parameter> - <Parameter> - <Name>p_avgPVPower_kWpm2</Name> - </Parameter> - <Parameter> - <Name>p_avgRatioBatteryCapacity_v_Power</Name> - </Parameter> - <Parameter> - <Name>p_avgHydrogenConsumptionCar_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgHydrogenConsumptionVan_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgHydrogenConsumptionTruck_kWhpkm</Name> - </Parameter> - <Parameter> - <Name>p_avgRatioRoofPotentialPV</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyHeatpump_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureElectricHeatpump_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyGasBurner_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureGasBurner_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyHydrogenBurner_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureHydrogenBurner_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgVehiclesPerChargePoint</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistanceVan_km</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistanceCompanyCar_km</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistanceTruck_km</Name> - </Parameter> - <Parameter> - <Name>p_avgFullLoadHoursPV_hr</Name> - </Parameter> - <Parameter> - <Name>p_avgCompanyElectricityConsumption_kWhpm2</Name> - </Parameter> - <Parameter> - <Name>p_avgCompanyGasConsumption_m3pm2</Name> - </Parameter> - <Parameter> - <Name>p_avgCompanyHeatConsumption_kWhpm2</Name> - </Parameter> - <Parameter> - <Name>p_avgSolarFieldPower_kWppha</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyCHP_thermal_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyCHP_electric_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureCHP_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgEfficiencyDistrictHeatingDeliverySet_fr</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureDistrictHeatingDeliverySet_degC</Name> - </Parameter> - <Parameter> - <Name>p_v2gProbability</Name> - </Parameter> - <Parameter> - <Name>p_v1gProbability</Name> - </Parameter> - <Parameter> - <Name>p_avgEVsPerPublicCharger</Name> - </Parameter> - <Parameter> - <Name>p_avgPTPower_kWpm2</Name> - </Parameter> - <Parameter> - <Name>p_avgHeatBufferWaterVolumePerHPPower_m3pkW</Name> - </Parameter> - <Parameter> - <Name>p_avgHeatBufferWaterVolumePerPTSurface_m3pm2</Name> - </Parameter> - <Parameter> - <Name>p_waterHeatCapacity_JpkgK</Name> - </Parameter> - <Parameter> - <Name>p_waterDensity_kgpm3</Name> - </Parameter> - <Parameter> - <Name>p_avgMaxHeatBufferTemperature_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgMinHeatBufferTemperature_degC</Name> - </Parameter> - <Parameter> - <Name>p_avgPTPanelSize_m2</Name> - </Parameter> - <Parameter> - <Name>p_avgRatioHouseBatteryStorageCapacity_v_PVPower</Name> - </Parameter> - <Parameter> - <Name>p_avgNrOfCarsPerHouse</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistancePrivateCar_km</Name> - </Parameter> - <Parameter> - <Name>p_avgAnnualTravelDistanceSecondVSFirstCar_fr</Name> - </Parameter> - <Parameter> - <Name>map_yearlySummerWinterTimeStartHour</Name> - </Parameter> - <Parameter> - <Name>p_minHeatpumpElectricCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_minGasBurnerOutputCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_minHydrogenBurnerOutputCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_minDistrictHeatingDeliverySetOutputCapacity_kW</Name> - </Parameter> - <Parameter> - <Name>p_avgOutputTemperatureHybridHeatpump_degC</Name> - </Parameter> - </Parameters> - <ReplicationFlag>false</ReplicationFlag> - <Replication Class="CodeValue"> - <Code>100</Code> - </Replication> - <CollectionType>ARRAY_LIST_BASED</CollectionType> - <InEnvironment>true</InEnvironment> - <InitialLocationType>XYZ</InitialLocationType> - <XCode Class="CodeValue"> - <Code>0</Code> - </XCode> - <YCode Class="CodeValue"> - <Code>0</Code> - </YCode> - <ZCode Class="CodeValue"> - <Code>0</Code> - </ZCode> - <ColumnCode Class="CodeValue"> - <Code>0</Code> - </ColumnCode> - <RowCode Class="CodeValue"> - <Code>0</Code> - </RowCode> - <LocationNameCode Class="CodeValue"> - <Code>""</Code> - </LocationNameCode> - <InitializationType>SPECIFIED_NUMBER</InitializationType> - <InitializationDatabaseTableQuery> - <Id>1658477089956</Id> - <TableReference/> - </InitializationDatabaseTableQuery> - <InitializationDatabaseType>ONE_AGENT_PER_DATABASE_RECORD</InitializationDatabaseType> - <QuantityColumn/> - </EmbeddedObject> - </EmbeddedObjects> - <Presentation> - <Level> - <Id>1726584205903</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - <Presentation> - <Rectangle> - <Id>1726584205905</Id> - <Name>rect_canvas</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16744448</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>1920</Width> - <Height>980</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205907</Id> - <Name>rect_projectDataTracking</Name> - <X>1520</X> - <Y>20</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-65536</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>360</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205909</Id> - <Name>rect_loader</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16744448</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>169</Width> - <Height>40</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205911</Id> - <Name>txt_input</Name> - <X>55</X> - <Y>7</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16744448</Color> - <Text>Loader</Text> - <Font> - <Name>SansSerif</Name> - <Size>18</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205915</Id> - <Name>rect_connectedModels</Name> - <X>0</X> - <Y>840</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-16744448</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>290</Width> - <Height>140</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205917</Id> - <Name>t_connectedModels</Name> - <X>20</X> - <Y>850</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Connected Models</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205921</Id> - <Name>txt_projectDataTracking</Name> - <X>1540</X> - <Y>40</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Time and data Tracking</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205923</Id> - <Name>rect_defaultStartup</Name> - <X>20</X> - <Y>50</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>240</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205925</Id> - <Name>rect_dataCollections</Name> - <X>-440</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-360334</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>437</Width> - <Height>980</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Rectangle> - <Id>1726584205927</Id> - <Name>rect_GridNodeFunctions</Name> - <X>20</X> - <Y>500</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>120</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205929</Id> - <Name>txt_loaderStartupDefault</Name> - <X>40</X> - <Y>60</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Loader default startup:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205931</Id> - <Name>txt_createGridNodes</Name> - <X>40</X> - <Y>510</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Grid node functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205933</Id> - <Name>rect_dataInput</Name> - <X>-440</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>3</LineWidth> - <LineColor>-360334</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>169</Width> - <Height>40</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205935</Id> - <Name>text</Name> - <X>-400</X> - <Y>10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Lock>true</Lock> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-360334</Color> - <Text>Data input</Text> - <Font> - <Name>SansSerif</Name> - <Size>16</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205937</Id> - <Name>t_inputFiles</Name> - <X>-380</X> - <Y>720</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Basic Input files:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205939</Id> - <Name>t_inputFileFunctions</Name> - <X>-400</X> - <Y>60</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Read input files to database:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1726584205941</Id> - <Name>txt_dataCollectionFill</Name> - <X>-400</X> - <Y>160</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Fill the data collections:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205943</Id> - <Name>rect_ActorFunctions</Name> - <X>20</X> - <Y>420</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>60</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205945</Id> - <Name>txt_createActorFunctions</Name> - <X>40</X> - <Y>430</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Actor functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1726584205947</Id> - <Name>rect_createEnergyGC</Name> - <X>400</X> - <Y>740</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>400</Width> - <Height>230</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205949</Id> - <Name>txt_createEnergyGC</Name> - <X>410</X> - <Y>750</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Energy GC functions -</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Group> - <Id>1726584205951</Id> - <Name>gr_consumerGC_residential</Name> - <X>570</X> - <Y>610</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1726584205953</Id> - <Name>rect_createHouses</Name> - <X>-170</X> - <Y>-20</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>400</Width> - <Height>140</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205955</Id> - <Name>txt_createHouses</Name> - <X>-160</X> - <Y>-10</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Houses</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1726584205957</Id> - <Name>gr_consumerGC_businesspark</Name> - <X>570</X> - <Y>230</Y> - <Label> - <X>9.883</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1726584205959</Id> - <Name>rect_createCompanies</Name> - <X>-170</X> - <Y>-180</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>400</Width> - <Height>520</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205961</Id> - <Name>txt_createCompanies</Name> - <X>-158.134</X> - <Y>-168.134</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create Companies</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1726584205963</Id> - <Name>gr_addEAFunctions</Name> - <X>1040</X> - <Y>200</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1726584205965</Id> - <Name>rect_addEA</Name> - <X>-180</X> - <Y>-140</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>450</Width> - <Height>780</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205967</Id> - <Name>txt_addEnergyAssetFunctions</Name> - <X>-160</X> - <Y>-130</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Add EA functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Group> - <Id>1726584205969</Id> - <Name>gr_createGISObjects</Name> - <X>1700</X> - <Y>610</Y> - <Label> - <X>9.938</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Presentation> - <Rectangle> - <Id>1726584205971</Id> - <Name>rect_createGISObjects</Name> - <X>-180</X> - <Y>-120</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>230</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1726584205973</Id> - <Name>txt_createGISObjects</Name> - <X>-161.492</X> - <Y>-109.13</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Create GIS objects</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - </Presentation> - </Group> - <Text> - <Id>1727792637339</Id> - <Name>txt_overwriteDatabaseValues</Name> - <X>-400</X> - <Y>110</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Overwrite specific database values:</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1730217549237</Id> - <Name>rect_supportFunctions</Name> - <X>1520</X> - <Y>830</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>140</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1730217578770</Id> - <Name>txt_supportFunctions</Name> - <X>1540</X> - <Y>840</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Support Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1742919550888</Id> - <Name>rect_connectToFunctions</Name> - <X>1520</X> - <Y>730</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>80</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1742919565761</Id> - <Name>txt_connectToFunctions</Name> - <X>1540</X> - <Y>750</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Connect To Functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Text> - <Id>1744808981703</Id> - <Name>txt_DebuggingDataCollections</Name> - <X>-400</X> - <Y>870</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Data collections used for Debugging</Text> - <Font> - <Name>SansSerif</Name> - <Size>16</Size> - <Style>0</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1747830521606</Id> - <Name>rect_addSpecificSliderGC</Name> - <X>20</X> - <Y>300</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>100</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1747830569531</Id> - <Name>txt_addSpecificSliderGC</Name> - <X>30</X> - <Y>310</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Add specific slider GC</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1750856789809</Id> - <Name>rect_subScopeFunctions</Name> - <X>20</X> - <Y>640</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>180</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1750857047506</Id> - <Name>txt_filterSubScopeFunctions</Name> - <X>40</X> - <Y>650</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>SubScope filter functions</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Rectangle> - <Id>1753349205420</Id> - <Name>rect_defaultStartup1</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2360</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <ZHeight>10</ZHeight> - <LineWidth>2</LineWidth> - <LineColor>-16777216</LineColor> - <LineMaterial>null</LineMaterial> - <LineStyle>SOLID</LineStyle> - <Width>340</Width> - <Height>420</Height> - <Rotation>0.0</Rotation> - <FillColor>-1</FillColor> - <FillMaterial>null</FillMaterial> - </Rectangle> - <Text> - <Id>1753349205422</Id> - <Name>txt_loaderStartupDeserialisation</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2380</X> - <Y>9</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D</DrawMode> - <EmbeddedIcon>false</EmbeddedIcon> - <Z>0</Z> - <Rotation>0.0</Rotation> - <Color>-16777216</Color> - <Text>Loader after deserialisation (OLD)</Text> - <Font> - <Name>SansSerif</Name> - <Size>14</Size> - <Style>1</Style> - </Font> - <Alignment>LEFT</Alignment> - </Text> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1753449467882</Id> - <Name>deserialize2</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2413.333</X> - <Y>172</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="162" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode> -pauseSimulation(); -// Collect GIS_Objects into hashmap, to link to new EnergyModel. -c_GISregions.clear(); -energyModel.pop_GIS_Buildings.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -energyModel.pop_GIS_Objects.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); -energyModel.pop_GIS_Parcels.forEach(x->{c_GISregions.put(x.p_id, x.gisRegion);}); - -try { - v_objectMapper = new ObjectMapper(); - f_addMixins(); - - /* - String userIdToken = "6b87f0f9-fdf6-4c05-9e0f-b75e46950113"; //user.userIdToken(); - - var repository = UserScenarioRepository.builder() - //.userId(UUID.fromString("6b87f0f9-fdf6-4c05-9e0f-b75e46950113")) - .userId(UUID.fromString(userIdToken)) - .modelName("ModelTestName") - .build(); - - var scenarioList = repository.listUserScenarios(); - for (var scenario : scenarioList) { - System.out.println(scenario.getName()); - } - - var jsonStream = repository.fetchUserScenarioContent(scenarioList.get(0).getId()); - J_ModelSave saveObject = v_objectMapper.readValue(jsonStream, J_ModelSave.class); - */ - - // Deserialize the JSON into a new EnergyModel instance: - J_ModelSave saveObject = v_objectMapper.readValue(new File("ModelSave.json"), J_ModelSave.class); - EnergyModel deserializedEnergyModel = saveObject.energyModel; - - // Reconstruct all Agents - f_reconstructEnergyModel(deserializedEnergyModel); - f_reconstructGridConnections(deserializedEnergyModel); - f_reconstructActors(deserializedEnergyModel); - f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); - - f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); - - // Get profilePointer tableFunctions from 'original' energyModel - deserializedEnergyModel.c_profiles.forEach(x->{ - J_ProfilePointer origProfile = zero_Interface.energyModel.f_findProfile(x.name); - x.setTableFunction(origProfile.getTableFunction()); - }); - // get heatingTypeHashmap from 'old' energyModel. - deserializedEnergyModel.c_defaultHeatingStrategies = zero_Interface.energyModel.c_defaultHeatingStrategies; - - energyModel = deserializedEnergyModel; - zero_Interface.energyModel = deserializedEnergyModel; - zero_Interface.uI_Results.energyModel = deserializedEnergyModel; - //zero_Interface.f_clearSelectionAndSelectEnergyModel(); - //uI_Results.energyModel = deserializedEnergyModel; - - deserializedEnergyModel.f_startAfterDeserialisation(); - - f_setEngineInputDataAfterDeserialisation(deserializedEnergyModel); - - // Putting back the ordered collections in the interface - f_reconstructOrderedCollections(saveObject); - - - - - /* - // Reconstruct all Agents - f_reconstructEnergyModel(deserializedEnergyModel); - - - f_reconstructGridConnections(deserializedEnergyModel); - f_reconstructActors(deserializedEnergyModel); - f_reconstructGridNodes(deserializedEnergyModel, saveObject.c_gridNodes); - - f_reconstructGIS_Objects(deserializedEnergyModel, saveObject.c_GISObjects); - - // Get profilePointer tableFunctions from 'original' energyModel - deserializedEnergyModel.c_profiles.forEach(x->{ - J_ProfilePointer origProfile = energyModel.f_findProfile(x.name); - x.setTableFunction(origProfile.getTableFunction()); - }); - - energyModel.f_startAfterDeserialisation(); - - energyModel = deserializedEnergyModel; - zero_Interface.energyModel = deserializedEnergyModel; - zero_Interface.uI_Results.energyModel = deserializedEnergyModel; - - // Reinitialize energy model - //deserializedEnergyModel.b_isInitialized = false; - //deserializedEnergyModel.f_initializeEngine(); - */ - - //zero_Interface.f_clearSelectionAndSelectEnergyModel(); - zero_Interface.uI_Tabs.f_initializeUI_Tabs(energyModel.f_getGridConnectionsCollectionPointer(), energyModel.f_getPausedGridConnectionsCollectionPointer()); - zero_Interface.f_updateMainInterfaceSliders(); - - //zero_Interface.f_updateOrderedListsAfterDeserialising(deserializedEnergyModel); - -} catch (IOException e) { - e.printStackTrace(); -} - -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>deserialize_energy_model</LabelText> - </ExtendedProperties> - </Control> - <Control Type="Button"> - <EmbeddedIcon>false</EmbeddedIcon> - <Id>1753449467884</Id> - <Name>serialize1</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2416.333</X> - <Y>99</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <BasicProperties Width="160" Height="30"> - <EmbeddedIcon>false</EmbeddedIcon> - <TextColor>-16777216</TextColor> - <Enabled>true</Enabled> - <ActionCode>traceln("Starting model serialisation..."); -J_ModelSave saveObject = new J_ModelSave(); -saveObject.energyModel = energyModel; - -energyModel.pop_gridNodes.forEach(x->saveObject.c_gridNodes.add(x)); -energyModel.pop_GIS_Buildings.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); -energyModel.pop_GIS_Objects.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); -energyModel.pop_GIS_Parcels.forEach(x->{saveObject.c_GISObjects.add(x); c_GISregions.put(x.p_id, x.gisRegion);x.f_writeStyleStrings();}); - -/* -saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; -saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; -saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; -saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; -saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; -saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; -saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; -saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; -saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; -saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; -//saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; -*/ - -saveObject.c_orderedPVSystemsCompanies = zero_Interface.c_orderedPVSystemsCompanies; -saveObject.c_orderedPVSystemsHouses = zero_Interface.c_orderedPVSystemsHouses; -saveObject.c_orderedVehicles = zero_Interface.c_orderedVehicles; -saveObject.c_orderedHeatingSystemsCompanies = zero_Interface.c_orderedHeatingSystemsCompanies; -saveObject.c_orderedHeatingSystemsHouses = zero_Interface.c_orderedHeatingSystemsHouses; -saveObject.c_orderedVehiclesPrivateParking = zero_Interface.c_orderedVehiclesPrivateParking; -saveObject.c_orderedParkingSpaces = zero_Interface.c_orderedParkingSpaces; -saveObject.c_orderedV1GChargers = zero_Interface.c_orderedV1GChargers; -saveObject.c_orderedV2GChargers = zero_Interface.c_orderedV2GChargers; -saveObject.c_orderedPublicChargers = zero_Interface.c_orderedPublicChargers; -saveObject.c_mappingOfVehiclesPerCharger = zero_Interface.c_mappingOfVehiclesPerCharger; -saveObject.c_scenarioMap_Current = zero_Interface.c_scenarioMap_Current; -saveObject.c_scenarioMap_Future = zero_Interface.c_scenarioMap_Future; - -List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps = new ArrayList<LinkedHashMap<String, List<J_EAVehicle>>>(); -saveObject.c_additionalVehicleHashMaps = c_additionalVehicleHashMaps; - - -v_objectMapper = new ObjectMapper(); -f_addMixins(); -v_objectMapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.NONE); - -try { - traceln("Trying to save to file"); - //v_objectMapper.writeValue(new File("energyModel.json"), energyModel); - - v_objectMapper.writeValue(new File("ModelSave.json"), saveObject); - /* - String userIdToken = "6b87f0f9-fdf6-4c05-9e0f-b75e46950113"; //user.userIdToken(); - - var repository = UserScenarioRepository.builder() - //.userId(UUID.fromString("6b87f0f9-fdf6-4c05-9e0f-b75e46950113")) - .userId(UUID.fromString(userIdToken)) - .modelName("ModelTestName") - .build(); - - repository.saveUserScenario( - "Test Scenario", - v_objectMapper.writeValueAsBytes(saveObject) - ); - */ - -} catch (IOException e) { - e.printStackTrace(); -} -</ActionCode> - </BasicProperties> - <ExtendedProperties> - <Font Name="Dialog" Size="11" Style="0"/> - <LabelText>serialize_energy_model</LabelText> - </ExtendedProperties> - </Control> - </Presentation> - </Level> - <Level> - <Id>1726584205975</Id> - <Name>level1</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - </Level> - </Presentation> - <Areas> - <Area> - <Id>1726584206081</Id> - <Name>viewArea</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>0</X> - <Y>-10</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <Title/> - <Width>1920</Width> - <Height>980</Height> - </Area> - </Areas> - </ActiveObjectClass> - <ActiveObjectClass> - <Id>1709049506453</Id> - <Name>Z_UnusedAgent</Name> - <ExcludeFromBuild>true</ExcludeFromBuild> - <Generic>false</Generic> - <GenericParameter> - <Id>1709049506459</Id> - <Name>1709049506459</Name> - <GenericParameterValue Class="CodeValue"> - <Code>T extends Agent</Code> - </GenericParameterValue> - <GenericParameterLabel>Generic parameter:</GenericParameterLabel> - </GenericParameter> - <FlowChartsUsage>ENTITY</FlowChartsUsage> - <SamplesToKeep>100</SamplesToKeep> - <LimitNumberOfArrayElements>false</LimitNumberOfArrayElements> - <ElementsLimitValue>100</ElementsLimitValue> - <MakeDefaultViewArea>true</MakeDefaultViewArea> - <SceneGridColor/> - <SceneBackgroundColor>-4144960</SceneBackgroundColor> - <SceneSkybox>null</SceneSkybox> - <AgentProperties> - <EnvironmentDefinesInitialLocation>true</EnvironmentDefinesInitialLocation> - <RotateAnimationTowardsMovement>true</RotateAnimationTowardsMovement> - <RotateAnimationVertically>false</RotateAnimationVertically> - <VelocityCode Class="CodeUnitValue"> - <Code>10</Code> - <Unit Class="SpeedUnits">MPS</Unit> - </VelocityCode> - <PhysicalLength Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalLength> - <PhysicalWidth Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalWidth> - <PhysicalHeight Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="LengthUnits">METER</Unit> - </PhysicalHeight> - </AgentProperties> - <EnvironmentProperties> - <EnableSteps>false</EnableSteps> - <StepDurationCode Class="CodeUnitValue"> - <Code>1.0</Code> - <Unit Class="TimeUnits">SECOND</Unit> - </StepDurationCode> - <SpaceType>CONTINUOUS</SpaceType> - <WidthCode>500</WidthCode> - <HeightCode>500</HeightCode> - <ZHeightCode>0</ZHeightCode> - <ColumnsCountCode>100</ColumnsCountCode> - <RowsCountCode>100</RowsCountCode> - <NeigborhoodType>MOORE</NeigborhoodType> - <LayoutType>USER_DEF</LayoutType> - <NetworkType>USER_DEF</NetworkType> - <ConnectionsPerAgentCode>2</ConnectionsPerAgentCode> - <ConnectionsRangeCode>50</ConnectionsRangeCode> - <NeighborLinkFractionCode>0.95</NeighborLinkFractionCode> - <MCode>10</MCode> - </EnvironmentProperties> - <DatasetsCreationProperties> - <AutoCreate>true</AutoCreate> - <Id>1658477089955</Id> - <OccurrenceAtTime>true</OccurrenceAtTime> - <OccurrenceDate>1709107200000</OccurrenceDate> - <OccurrenceTime Class="CodeUnitValue"> - <Code>0</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </OccurrenceTime> - <RecurrenceCode Class="CodeUnitValue"> - <Code>1</Code> - <Unit Class="TimeUnits">HOUR</Unit> - </RecurrenceCode> - </DatasetsCreationProperties> - <ScaleRuler> - <Id>1709049506456</Id> - <Name>scale</Name> - <X>0</X> - <Y>-150</Y> - <PublicFlag>false</PublicFlag> - <PresentationFlag>false</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Length>100</Length> - <Rotation>0</Rotation> - <ScaleType>BASED_ON_LENGTH</ScaleType> - <ModelLength>10</ModelLength> - <LengthUnits>METER</LengthUnits> - <Scale>10</Scale> - <InheritedFromParentAgentType>true</InheritedFromParentAgentType> - </ScaleRuler> - <CurrentLevel>1709049506460</CurrentLevel> - <ConnectionsId>1709049506454</ConnectionsId> - <AgentLinks> - <AgentLink> - <Id>1709049506454</Id> - <Name>connections</Name> - <X>50</X> - <Y>-50</Y> - <Label> - <X>15</X> - <Y>0</Y> - </Label> - <PublicFlag>false</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>true</ShowLabel> - <HandleReceiveInConnections>false</HandleReceiveInConnections> - <AgentLinkType>COLLECTION_OF_LINKS</AgentLinkType> - <AgentLinkBidirectional>true</AgentLinkBidirectional> - <MessageType>Object</MessageType> - <LineStyle>SOLID</LineStyle> - <LineWidth>1</LineWidth> - <LineColor>-16777216</LineColor> - <LineZOrder>UNDER_AGENTS</LineZOrder> - <LineArrow>NONE</LineArrow> - <LineArrowPosition>END</LineArrowPosition> - </AgentLink> - </AgentLinks> - <Presentation> - <Level> - <Id>1709049506460</Id> - <Name>level</Name> - <X>0</X> - <Y>0</Y> - <Label> - <X>10</X> - <Y>0</Y> - </Label> - <PublicFlag>true</PublicFlag> - <PresentationFlag>true</PresentationFlag> - <ShowLabel>false</ShowLabel> - <DrawMode>SHAPE_DRAW_2D3D</DrawMode> - <Z>0</Z> - <LevelVisibility>DIM_NON_CURRENT</LevelVisibility> - </Level> - </Presentation> - </ActiveObjectClass> - </ActiveObjectClasses> - <DifferentialEquationsMethod>EULER</DifferentialEquationsMethod> - <MixedEquationsMethod>RK45_NEWTON</MixedEquationsMethod> - <AlgebraicEquationsMethod>MODIFIED_NEWTON</AlgebraicEquationsMethod> - <AbsoluteAccuracy>1.0</AbsoluteAccuracy> - <FixedTimeStep>1.0</FixedTimeStep> - <RelativeAccuracy>1.0</RelativeAccuracy> - <TimeAccuracy>0.1</TimeAccuracy> - <InspectionWindowColorTheme>DEFAULT</InspectionWindowColorTheme> - <Frame> - <Id>1658477089982</Id> - <Width>1920</Width> - <Height>980</Height> - </Frame> - <Database> - <Id>1658477089953</Id> - <Logging>false</Logging> - <AutoExport>false</AutoExport> - <ShutdownCompact>false</ShutdownCompact> - <ImportSettings/> - <ExportSettings/> - </Database> - <RunConfiguration ActiveObjectClassId="1658477103140"> - <Id>1658477103163</Id> - <Name>RunConfiguration</Name> - <MaximumMemory>4096</MaximumMemory> - <ModelTimeProperties> - <StopOption>Stop at specified date</StopOption> - <InitialDate>1672531200000</InitialDate> - <InitialTime>0.0</InitialTime> - <FinalDate>1704067200000</FinalDate> - <FinalTime>8760.0</FinalTime> - </ModelTimeProperties> - <AnimationProperties> - <StopNever>false</StopNever> - <ExecutionMode>realTimeScaled</ExecutionMode> - <RealTimeScale>5.0</RealTimeScale> - <EnableZoomAndPanning>false</EnableZoomAndPanning> - <EnableDeveloperPanel>false</EnableDeveloperPanel> - <ShowDeveloperPanelOnStart>false</ShowDeveloperPanelOnStart> - </AnimationProperties> - <Inputs/> - <Outputs/> - </RunConfiguration> - <JavaClasses> - <JavaClass> - <Id>1715862317301</Id> - <Name>J_scenario_Current</Name> - <Folder>1761915047244</Folder> - <Text>/** - * Scenario_future - */ - -import com.fasterxml.jackson.annotation.JsonIdentityInfo; -import com.fasterxml.jackson.annotation.ObjectIdGenerators; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; - - -@JsonAutoDetect( - fieldVisibility = Visibility.ANY, // ✅ only public fields are serialized - getterVisibility = Visibility.NONE, - isGetterVisibility = Visibility.NONE, - setterVisibility = Visibility.NONE, - creatorVisibility = Visibility.NONE -) - -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type" // 👈 this will be the field name in your JSON - ) -@JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = "@id") - -public class J_scenario_Current implements Serializable { - - private Agent parentAgent; - private boolean isCurrentlyActive = true; - private Double currentContractDeliveryCapacity_kW = 0.0; - private Double currentContractFeedinCapacity_kW = 0.0; - private Double currentPhysicalConnectionCapacity_kW = 0.0; - private Integer currentPV_kW = 0; - //String currentPV_orient; - private Float currentWind_kW = 0f; - private Float currentBatteryPower_kW = 0f; - private Float currentBatteryCapacity_kWh = 0f; - private OL_GridConnectionHeatingType currentHeatingType = OL_GridConnectionHeatingType.NONE; - private Integer currentDieselCars = 0; - private Integer currentDieselVans = 0; - private Integer currentDieselTrucks = 0; - private Integer currentHydrogenCars = 0; - private Integer currentHydrogenVans = 0; - private Integer currentHydrogenTrucks = 0; - private Integer currentEVCars = 0; - private Integer currentEVVans = 0; - private Integer currentEVTrucks = 0; - private Double currentEVCarChargePower_kW = 0.0; - private Double currentEVVanChargePower_kW = 0.0; - private Double currentEVTruckChargePower_kW = 0.0; - - - /** - * Default constructor - */ - public J_scenario_Current() { - } - - /** - * Constructor initializing the fields - */ - /* - public J_scenario_Current() { - } - */ - - // Setters - public void setParentAgent(Agent parentAgent) { - this.parentAgent = parentAgent; - } - - public void setIsCurrentlyActive(boolean isCurrentlyActive) { - this.isCurrentlyActive = isCurrentlyActive; - } - - public void setCurrentContractDeliveryCapacity_kW(Double currentContractDeliveryCapacity_kW) { - this.currentContractDeliveryCapacity_kW = currentContractDeliveryCapacity_kW; - } - - public void setCurrentContractFeedinCapacity_kW(Double currentContractFeedinCapacity_kW) { - this.currentContractFeedinCapacity_kW = currentContractFeedinCapacity_kW; - } - - public void setCurrentPhysicalConnectionCapacity_kW(Double currentPhysicalConnectionCapacity_kW) { - this.currentPhysicalConnectionCapacity_kW = currentPhysicalConnectionCapacity_kW; - } - - public void setCurrentPV_kW(int currentPV_kW) { - this.currentPV_kW = currentPV_kW; - } - - /* - public void setCurrentPV_orient(String currentPV_orient) { - this.currentPV_orient = currentPV_orient; - } - */ - public void setCurrentWind_kW(Float currentWind_kW) { - this.currentWind_kW = currentWind_kW; - } - - public void setCurrentBatteryPower_kW(Float currentBatteryPower_kW) { - this.currentBatteryPower_kW = currentBatteryPower_kW; - } - - public void setCurrentBatteryCapacity_kWh(Float currentBatteryCapacity_kWh) { - this.currentBatteryCapacity_kWh = currentBatteryCapacity_kWh; - } - - public void setCurrentHeatingType(OL_GridConnectionHeatingType currentHeatingType) { - this.currentHeatingType = currentHeatingType; - } - - public void setCurrentDieselCars(Integer currentDieselCars) { - this.currentDieselCars = currentDieselCars; - } - - public void setCurrentDieselVans(Integer currentDieselVans) { - this.currentDieselVans = currentDieselVans; - } - - public void setCurrentDieselTrucks(Integer currentDieselTrucks) { - this.currentDieselTrucks = currentDieselTrucks; - } - - public void setCurrentHydrogenCars(Integer currentHydrogenCars) { - this.currentHydrogenCars = currentHydrogenCars; - } - - public void setCurrentHydrogenVans(Integer currentHydrogenVans) { - this.currentHydrogenVans = currentHydrogenVans; - } - - public void setCurrentHydrogenTrucks(Integer currentHydrogenTrucks) { - this.currentHydrogenTrucks = currentHydrogenTrucks; - } - - public void setCurrentEVCars(Integer currentEVCars) { - this.currentEVCars = currentEVCars; - } - - public void setCurrentEVVans(Integer currentEVVans) { - this.currentEVVans = currentEVVans; - } - - public void setCurrentEVTrucks(Integer currentEVTrucks) { - this.currentEVTrucks = currentEVTrucks; - } - - public void setCurrentEVCarChargePower_kW(Double currentEVCarChargePower_kW) { - this.currentEVCarChargePower_kW = currentEVCarChargePower_kW; - } - - public void setCurrentEVVanChargePower_kW(Double currentEVVanChargePower_kW) { - this.currentEVVanChargePower_kW = currentEVVanChargePower_kW; - } - - public void setCurrentEVTruckChargePower_kW(Double currentEVTruckChargePower_kW) { - this.currentEVTruckChargePower_kW = currentEVTruckChargePower_kW; - } - - - // Getters - public Agent getParentAgent() { - return parentAgent; - } - - public boolean getIsCurrentlyActive() { - return isCurrentlyActive; - } - - public Double getCurrentContractDeliveryCapacity_kW() { - return currentContractDeliveryCapacity_kW; - } - - public Double getCurrentContractFeedinCapacity_kW() { - return currentContractFeedinCapacity_kW; - } - - public Double getCurrentPhysicalConnectionCapacity_kW() { - return currentPhysicalConnectionCapacity_kW; - } - - public Integer getCurrentPV_kW() { - if (currentPV_kW == null) { - return 0; - } - return currentPV_kW; - } - - /* - public String getCurrentPV_orient() { - return currentPV_orient; - } - */ - - public Float getCurrentWind_kW() { - return currentWind_kW; - } - - public Float getCurrentBatteryPower_kW() { - return currentBatteryPower_kW; - } - - public Float getCurrentBatteryCapacity_kWh() { - return currentBatteryCapacity_kWh; - } - - public OL_GridConnectionHeatingType getCurrentHeatingType() { - return currentHeatingType; - } - - public Integer getCurrentDieselCars() { - return currentDieselCars; - } - - public Integer getCurrentDieselVans() { - return currentDieselVans; - } - - public Integer getCurrentDieselTrucks() { - return currentDieselTrucks; - } - - public Integer getCurrentHydrogenCars() { - return currentHydrogenCars; - } - - public Integer getCurrentHydrogenVans() { - return currentHydrogenVans; - } - - public Integer getCurrentHydrogenTrucks() { - return currentHydrogenTrucks; - } - - public Integer getCurrentEVCars() { - return currentEVCars; - } - - public Integer getCurrentEVVans() { - return currentEVVans; - } - - public Integer getCurrentEVTrucks() { - return currentEVTrucks; - } - - public Double getCurrentEVCarChargePower_kW() { - return currentEVCarChargePower_kW; - } - - public Double getCurrentEVVanChargePower_kW() { - return currentEVVanChargePower_kW; - } - - public Double getCurrentEVTruckChargePower_kW() { - return currentEVTruckChargePower_kW; - } - - - - @Override - public String toString() { - return super.toString(); - } - - /** - * This number is here for model snapshot storing purpose<br> - * It needs to be changed when this class gets changed - */ - private static final long serialVersionUID = 1L; - -}</Text> - </JavaClass> - <JavaClass> - <Id>1715862317307</Id> - <Name>J_scenario_Future</Name> - <Folder>1761915047244</Folder> - <Text>/** - * Scenario_future - */ - -import com.fasterxml.jackson.annotation.JsonIdentityInfo; -import com.fasterxml.jackson.annotation.ObjectIdGenerators; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; - - -@JsonAutoDetect( - fieldVisibility = Visibility.ANY, // ✅ only public fields are serialized - getterVisibility = Visibility.NONE, - isGetterVisibility = Visibility.NONE, - setterVisibility = Visibility.NONE, - creatorVisibility = Visibility.NONE -) - -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type" // 👈 this will be the field name in your JSON - ) -@JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property = "@id") - -public class J_scenario_Future implements Serializable { - - private Agent parentAgent; - private boolean isActiveInFuture = true; //Boolean used to see if gc is active in future scenario - private Double requestedContractDeliveryCapacity_kW = 0.0; - private Double requestedContractFeedinCapacity_kW = 0.0; - private Double requestedPhysicalConnectionCapacity_kW = 0.0; - private double plannedHeatSavings_pct = 0; - private OL_GridConnectionHeatingType plannedHeatingType = OL_GridConnectionHeatingType.NONE; - private double plannedElectricitySavings_pct = 0; - private boolean plannedCurtailment = false; - private Integer plannedPV_kW = 0; - private Integer plannedPV_year; - private Float plannedWind_kW = 0f; - private Float plannedBatteryPower_kW = 0f; - private Float plannedBatteryCapacity_kWh = 0f; - //Integer plannedWind_year; - private double plannedTransportSavings_pct = 0; - private Integer plannedEVCars = 0; - private Integer plannedEVVans = 0; - private Integer plannedEVTrucks = 0; - private Integer plannedHydrogenCars = 0; - private Integer plannedHydrogenVans = 0; - private Integer plannedHydrogenTrucks = 0; - - /** - * Default constructor - */ - public J_scenario_Future() { - } - - /** - * Constructor initializing the fields - */ - /* - public J_scenario_Future(Agent parentAgent, Integer plannedPV_kW, Integer plannedPV_year, Float plannedWind_kW, Integer plannedEVCars, Integer plannedEVVans, Integer plannedEVTrucks) { - - - } - */ - - // Setters - public void setParentAgent(Agent parentAgent) { - this.parentAgent = parentAgent; - } - - public void setIsActiveInFuture(boolean isActiveInFuture) { - this.isActiveInFuture = isActiveInFuture; - } - - public void setRequestedContractDeliveryCapacity_kW(Double requestedContractDeliveryCapacity_kW) { - this.requestedContractDeliveryCapacity_kW = requestedContractDeliveryCapacity_kW; - } - - public void setRequestedContractFeedinCapacity_kW(Double requestedContractFeedinCapacity_kW) { - this.requestedContractFeedinCapacity_kW = requestedContractFeedinCapacity_kW; - } - - public void setRequestedPhysicalConnectionCapacity_kW(Double requestedPhysicalConnectionCapacity_kW) { - this.requestedPhysicalConnectionCapacity_kW = requestedPhysicalConnectionCapacity_kW; - } - - public void setPlannedHeatSavings_pct(double plannedHeatSavings_pct) { - this.plannedHeatSavings_pct = plannedHeatSavings_pct; - } - - public void setPlannedHeatingType(OL_GridConnectionHeatingType plannedHeatingType) { - this.plannedHeatingType = plannedHeatingType; - } - - public void setPlannedElectricitySavings_pct(double plannedElectricitySavings_pct) { - this.plannedElectricitySavings_pct = plannedElectricitySavings_pct; - } - - public void setPlannedCurtailment(boolean plannedCurtailment) { - this.plannedCurtailment = plannedCurtailment; - } - - public void setPlannedPV_kW(Integer plannedPV_kW) { - this.plannedPV_kW = plannedPV_kW; - } - - public void setPlannedPV_year(Integer plannedPV_year) { - this.plannedPV_year = plannedPV_year; - } - - public void setPlannedWind_kW(Float plannedWind_kW) { - this.plannedWind_kW = plannedWind_kW; - } - - public void setPlannedBatteryPower_kW(Float plannedBatteryPower_kW) { - this.plannedBatteryPower_kW = plannedBatteryPower_kW; - } - - public void setPlannedBatteryCapacity_kWh(Float plannedBatteryCapacity_kWh) { - this.plannedBatteryCapacity_kWh = plannedBatteryCapacity_kWh; - } - - public void setPlannedTransportSavings_pct(double plannedTransportSavings_pct) { - this.plannedTransportSavings_pct = plannedTransportSavings_pct; - } - - public void setPlannedEVCars(Integer plannedEVCars) { - this.plannedEVCars = plannedEVCars; - } - - public void setPlannedEVVans(Integer plannedEVVans) { - this.plannedEVVans = plannedEVVans; - } - - public void setPlannedEVTrucks(Integer plannedEVTrucks) { - this.plannedEVTrucks = plannedEVTrucks; - } - - public void setPlannedHydrogenCars(Integer plannedHydrogenCars) { - this.plannedHydrogenCars = plannedHydrogenCars; - } - - public void setPlannedHydrogenVans(Integer plannedHydrogenVans) { - this.plannedHydrogenVans = plannedHydrogenVans; - } - - public void setPlannedHydrogenTrucks(Integer plannedHydrogenTrucks) { - this.plannedHydrogenTrucks = plannedHydrogenTrucks; - } - - // Getters - public Agent getParentAgent() { - return parentAgent; - } - - public boolean getIsActiveInFuture() { - return isActiveInFuture; - } - - public Double getRequestedContractDeliveryCapacity_kW() { - return requestedContractDeliveryCapacity_kW; - } - - public Double getRequestedContractFeedinCapacity_kW() { - return requestedContractFeedinCapacity_kW; - } - - public Double getRequestedPhysicalConnectionCapacity_kW() { - return requestedPhysicalConnectionCapacity_kW; - } - - public double getPlannedHeatSavings_pct() { - return plannedHeatSavings_pct; - } - - public OL_GridConnectionHeatingType getPlannedHeatingType() { - return plannedHeatingType; - } - - public double getPlannedElectricitySavings_pct() { - return plannedElectricitySavings_pct; - } - - public boolean getPlannedCurtailment() { - return plannedCurtailment; - } - - public Integer getPlannedPV_kW() { - if (plannedPV_kW == null) { - return 0; - } - return plannedPV_kW; - } - - public Integer getPlannedPV_year() { - return plannedPV_year; - } - - public Float getPlannedWind_kW() { - return plannedWind_kW; - } - - public Float getPlannedBatteryPower_kW() { - if (plannedBatteryPower_kW == null) { - return 0f; - } - return plannedBatteryPower_kW; - } - - public Float getPlannedBatteryCapacity_kWh() { - if (plannedBatteryCapacity_kWh == null) { - return 0f; - } - return plannedBatteryCapacity_kWh; - } - - public double getPlannedTransportSavings_pct() { - return plannedTransportSavings_pct; - } - - public Integer getPlannedEVCars() { - return plannedEVCars; - } - - public Integer getPlannedEVVans() { - return plannedEVVans; - } - - public Integer getPlannedEVTrucks() { - return plannedEVTrucks; - } - - public Integer getPlannedHydrogenCars() { - return plannedHydrogenCars; - } - - public Integer getPlannedHydrogenVans() { - return plannedHydrogenVans; - } - - public Integer getPlannedHydrogenTrucks() { - return plannedHydrogenTrucks; - } - - @Override - public String toString() { - return super.toString(); - } - - /** - * This number is here for model snapshot storing purpose<br> - * It needs to be changed when this class gets changed - */ - private static final long serialVersionUID = 1L; - -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206084</Id> - <Name>Battery_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Battery_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Battery_data { - //Database column name - String gc_id; - String gc_name; - String owner_id; - String streetname; - Integer house_number; - String house_letter; - String house_addition; - String postalcode; - String city; - String gridnode_id; - boolean initially_active; - boolean isSliderGC; - double storage_capacity_kwh; - double capacity_electric_kw; - double connection_capacity_kw; - Double contracted_delivery_capacity_kw; - Double contracted_feed_in_capacity_kw; - OL_BatteryOperationMode operation_mode; - double latitude; - double longitude; - String polygon; -} -</Text> - </JavaClass> - <JavaClass> - <Id>1726584206085</Id> - <Name>Building_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Building_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Building_data { - //Database column name - String address_id; - String building_id; - String streetname; - Integer house_number; - String house_letter; - String house_addition; - String postalcode; - String city; - Integer build_year; - String status; - String purpose; - Double address_floor_surface_m2; - Double polygon_area_m2; - String gc_id; - String annotation; - String extra_info; - Double contracted_capacity_kw; - Double electricity_consumption_kwhpa; - Double gas_consumption_kwhpa; - Double space_heating_consumption_kwhpa; - Double dhw_consumption_kwhpa; - Double cooking_consumption_kwhpa; - Double pv_installed_kwp; - Double pv_potential_kwp; - OL_GridConnectionIsolationLabel energy_label; - Boolean has_private_parking; - String gridnode_id; - Double latitude; - Double longitude; - String polygon; - - Integer ownership_int; - Integer constructionPeriod_int; - Integer buildingType_int; - Double localFactor; - Double regionalClimateCorrectionFactor; -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206086</Id> - <Name>Cable_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Cable_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Cable_data { - String fid; - OL_GISObjectType type; // LV_CABLE or MV_CABLE, maybe more in future - boolean status; - Double nominal_voltage_v; - String label; - String description; - double latitude; - double longitude; - String line; -} -</Text> - </JavaClass> - <JavaClass> - <Id>1726584206087</Id> - <Name>Chargingstation_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Chargingstation_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Chargingstation_data { - //Database column name - String gc_id; - String gc_name; - String owner_id; - String streetname; - Integer house_number; - String house_letter; - String house_addition; - String postalcode; - String city; - String gridnode_id; - Double connection_capacity_kw; - boolean is_charging_centre; - OL_EnergyAssetType vehicle_type; - Integer number_of_chargers; - double power_per_charger_kw; - boolean initially_active; - double latitude; - double longitude; - String polygon; -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206088</Id> - <Name>Electrolyser_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Electrolyser_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Electrolyser_data { - String gc_id; - String gc_name; - String owner_id; - String streetname; - Integer house_number; - String house_letter; - String house_addition; - String postalcode; - String city; - String gridnode_id; - boolean initially_active; - double capacity_electric_kw; - double connection_capacity_kw; - Double contracted_delivery_capacity_kw; - Double contracted_feed_in_capacity_kw; - OL_ElectrolyserOperationMode default_operation_mode; - double conversion_efficiency; - double min_production_ratio; - double idle_consumption_power_ratio; - double start_up_time_shutdown_s; - double start_up_time_standby_s; - double start_up_time_idle_s; - double load_change_time_s; - double latitude; - double longitude; - String polygon; -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206089</Id> - <Name>GridNode_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * GridNode_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class GridNode_data { - String gridnode_id; - String fid; - boolean status; - String type; - String description; - double latitude; - double longitude; - String parent_node_id; - boolean is_capacity_available; - double capacity_kw; - String subscope; - String service_area_polygon; - double[] profile_data_kWh; -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206090</Id> - <Name>Neighbourhood_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Neighbourhood_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Neighbourhood_data { - String neighbourhoodcode; - String neighbourhoodname; - String districtcode; - OL_GISObjectType neighbourhoodtype; //REGION OR ANTILAYER (OR IN FUTURE GCNBH) - double latitude; - double longitude; - String polygon; - - //Energy totals - Double avg_house_elec_delivery_kwh_p_yr; - Double avg_house_gas_delivery_m3_p_yr; - Double avg_number_of_cars_per_house; - Double total_comp_elec_delivery_kwh_p_yr; - Double total_comp_gas_delivery_m3_p_yr; - Integer total_nr_comp_cars; - Integer total_nr_comp_vans; - Integer total_nr_comp_trucks; -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206091</Id> - <Name>Parcel_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Parcel_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Parcel_data { - String parcel_id; - String name; - String streetname; - Integer house_number; - String house_letter; - String house_addition; - String postalcode; - String city; - double polygon_area_m2; - double latitude; - double longitude; - String polygon; -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206093</Id> - <Name>Project_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Project_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Project_data { - - //Project settings - String project_name; - OL_ProjectType project_type; - OL_SurveyType survey_type; - - //Zorm project names - String[] zorm_project_names; - - //Database names - List<String[]> databaseNames; - - //Map centre coordinates - Double map_centre_latitude; - Double map_centre_longitude; - Double map_scale; - - //Project specific actors - String grid_operator; - Boolean hasCongestionPricing; - String energy_coop; - String energy_supplier; - - //Project totals - Double total_electricity_consumption_companies_kWh_p_yr; - Double total_gas_consumption_companies_m3_p_yr; - Double avg_electricity_consumption_house_kWh_p_yr; - Double avg_gas_consumption_house_m3_p_yr; - Double avg_number_of_cars_per_house; - Integer total_cars_companies; - Integer total_vans_companies; - Integer total_trucks_companies; - - //Project data parameters - Double gridnode_profile_timestep_hr; -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206094</Id> - <Name>Settings</Name> - <Text>/** - * Settings - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Settings { - - //Simulation settings - boolean reloadDatabase; // Reloads the excels into the project database - boolean createCurrentElectricityEA; // Create current Electric assets if a real electricity profile or total is present. - //--> Put on 'false' to prevent electric assets from being made on top of real - //electricity total or profile, to prevent wrong energy totals. - boolean runHeadlessAtStartup;// Runs year simulation on starting of the model - Boolean showKPISummary; // Setting used to active the KPI summary of the resultsUI. If on true, it will be shown after a year simulation - ArrayList<String> subscopesToSimulate; // Selected subscopes to simulate (used for larger models that have memory/speed problems). - OL_RadioButtonSetup resultsUIRadioButtonSetup; // Selected (radiobuttons -> graphs) setup for the resultsUI. - boolean isPublicModel; // Boolean used to control if the model should be ran in a public version mode: - // Connection owners where dataSharingAgreed = false, cant be clicked. Just like low level gridnodes. - List<OL_MapOverlayTypes> activeMapOverlayTypes; //If defined it will override the default map overlay setup as defined in the generic interface/loader. - //Add all map overlays to this list that you want to be usable in the simulation - Double simDuration_h; // If filled in it will be set as the (rapid) sim duration instead of the default setting (8760 - p_timeStep_h) IF experiment end time is not set!. -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206095</Id> - <Name>Solarfarm_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Solarfarm_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Solarfarm_data { - - String gc_id; - String gc_name; - String owner_id; - String streetname; - Integer house_number; - String house_letter; - String house_addition; - String postalcode; - String city; - String gridnode_id; - boolean initially_active; - boolean isSliderGC; - double capacity_electric_kw; - double connection_capacity_kw; - Double contracted_delivery_capacity_kw; - Double contracted_feed_in_capacity_kw; - double latitude; - double longitude; - String polygon; -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206096</Id> - <Name>User</Name> - <Text>import lombok.Builder; -import lombok.Data; -import lombok.experimental.Accessors; - -@Data -@Builder(toBuilder = true) -@Accessors(fluent = true) -public class User { - - // Vallum - String PROJECT_CLIENT_ID; - String PROJECT_CLIENT_SECRET; - - public void clearVallumUser() { - this.PROJECT_CLIENT_ID = null; - this.PROJECT_CLIENT_SECRET = null; - } - - // User id token (Used for storing scenarios for example) - String userIdToken; - - // User accessible NBH - @Builder.Default - OL_UserNBHAccessType NBHAccessType = OL_UserNBHAccessType.FULL; - - List<String> accessibleNBH; - - //User GC acces type - @Builder.Default - OL_UserGCAccessType GCAccessType = OL_UserGCAccessType.FULL; - - List<String> accessibleCompanyIDs; -}</Text> - </JavaClass> - <JavaClass> - <Id>1726584206097</Id> - <Name>Windfarm_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * Windfarm_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class Windfarm_data { - - String gc_id; - String gc_name; - String owner_id; - String streetname; - Integer house_number; - String house_letter; - String house_addition; - String postalcode; - String city; - String gridnode_id; - boolean initially_active; - boolean isSliderGC; - double capacity_electric_kw; - double connection_capacity_kw; - Double contracted_delivery_capacity_kw; - Double contracted_feed_in_capacity_kw; - double latitude; - double longitude; - String polygon; -}</Text> - </JavaClass> - <JavaClass> - <Id>1737714961123</Id> - <Name>ListUtil</Name> - <Text> -public class ListUtil { - private ListUtil() { - } - - static double[] doubleListToArray(List<Double> list) { - double[] array = new double[list.size()]; - for (int i = 0; i < array.length; i++) { - array[i] = list.get(i); - } - return array; - } -} - - - - - - - - - - - - -</Text> - </JavaClass> - <JavaClass> - <Id>1744204067723</Id> - <Name>J_InfoText</Name> - <Text>/** - * J_InfoText - */ -public class J_InfoText implements Serializable { - - - public String lorumIpsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; - - //// Main Interface \\\\ - // TODO - - //// Public version - public String publicVersionWarning = "In de publieke variant zijn een aantal functionaliteiten uitgezet en zijn bepaalde bedrijven en hun data afgeschermd."; - - //// TABS \\\\ - //// Electricity Tab - public String electricityDemandReduction = "Met deze slider kun je het basisverbruik van stroom voor huizen en bedrijven aanpassen. Een positief percentage betekent dat ze minder verbruiken dan in het basis scenario. Een negatief percentage betekent dat het verbruik is toegenomen. Dit past niet de hoeveelheid stroombehoefte aan voor specifieke apparaten die apart in het model zitten zoals warmtepompen en elektrische auto's. Zie hiervoor de besparingsslider in de tabjes warmte of transport."; - public String householdElectricityDemandReduction = "Met deze slider kun je het basisverbruik van stroom voor huizen aanpassen. Een positief percentage betekent dat ze minder verbruiken dan in het basis scenario. Een negatief percentage betekent dat het verbruik is toegenomen. Dit past niet de hoeveelheid stroombehoefte aan voor specifieke apparaten die apart in het model zitten zoals warmtepompen en elektrische auto's. Zie hiervoor de besparingsslider in de tabjes warmte of transport."; - public String companyElectricityDemandReduction = "Met deze slider kun je het basisverbruik van stroom voor bedrijven aanpassen. Een positief percentage betekent dat ze minder verbruiken dan in het basis scenario. Een negatief percentage betekent dat het verbruik is toegenomen. Dit past niet de hoeveelheid stroombehoefte aan voor specifieke apparaten die apart in het model zitten zoals warmtepompen en elektrische auto's. Zie hiervoor de besparingsslider in de tabjes warmte of transport."; - public String householdRooftopPV = "Met deze slider kun je instellen welk aandeel van de huizen zonnepanelen op hun dak heeft liggen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String companyRooftopPV = "Met deze slider kun je instellen welk deel van alle daken van de bedrijven zonnepanelen bevat. Het aantal zonnepanelen voor een bedrijf wordt geschaald naar het dak oppervlak van het bedrijf. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String landPV = "Met deze slider kun je instellen hoeveel zonneparken er in het model zitten. 1 hectare zonnepark heeft een piek opwek van 1 MW. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String landWind = "Met deze slider kun je instellen hoeveel windmolens er in het model zitten. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String householdBatteries = "Met deze slider kun je instellen welk aandeel van de huizen die zonnepanelen op hun dak hebben liggen een batterij hebben. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String householdElectricCooking = "Met deze slider kun je instellen welk aandeel van de huizen elektrisch koken."; - public String householdElectricityConsumptionGrowth = "Met deze slider kun je het basisverbruik van stroom voor huizen aanpassen. Een positief percentage betekent dat ze meer verbruiken dan in het basis scenario. Een negatief percentage betekent dat het verbruik is afgenomen. Dit past niet de hoeveelheid stroombehoefte aan voor specifieke apparaten die apart in het model zitten zoals warmtepompen en elektrische auto's. Zie hiervoor de besparingsslider in de tabjes warmte of transport."; - public String curtailment = "Met deze knop kun je curtailment van stroom productie door huizen en bedrijven aan of uit zetten. Zet je hem aan, dan wordt alle energie productie die niet in de gecontracteerde teruglevercapaciteit past gecurtailt (oftewel: 'weggegooit')"; - public String gridBattery_default = "Met deze slider kun je instellen hoe groot de buurtbatterij is. Deze batterij probeert het profiel van het gehele model vlak te trekken."; - public String gridBattery_residential = "Met deze slider kun je instellen hoe groot de buurtbatterijen zijn. Stel je hem bijvoorbeeld in op 1 MWh, dan heeft elke trafo in het model een buurtbatterij van 1 MWh. Deze batterijen proberen vervolgens het profiel van hun eigen trafo vlak te trekken."; - - //// Heat Tab - // generic - public String heatDemandReduction = "Met deze slider kun je de behoefte aan warmte voor huizen en bedrijven aanpassen. Een positief percentage betekent dat ze minder warmte nodig hebben dan in het basis scenario. Een negatief percentage betekent dat ze meer warmte nodig hebben. Dit verandert niet de temperatuur in het gebouw, maar de benodigde hoeveelheid energie om te verwarmen. Deze slider gaat bijvoorbeeld over betere isolatie in de gebouwen."; - public String gasBoiler = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen met een gasboiler. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String electricHeatpump = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen met een elektrische warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String hybridHeatpump = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen met een hybride warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String heatGrid = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen via een warmtenet. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String electricBoiler = "Met deze slider kun je instellen welk aandeel van de huizen en bedrijven verwarmen met een elektrische boiler. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - - // household - public String householdHeatDemandReduction = "Met deze slider kun je de behoefte aan warmte voor huizen aanpassen. Een positief percentage betekent dat ze minder warmte nodig hebben dan in het basis scenario. Een negatief percentage betekent dat ze meer warmte nodig hebben. Dit verandert niet de temperatuur in het gebouw, maar de benodigde hoeveelheid energie om te verwarmen. Deze slider gaat bijvoorbeeld over betere isolatie in de gebouwen."; - public String householdGasBoiler = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen met een gasboiler. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String householdElectricHeatpump = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen met een elektrische warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String householdHybridHeatpump = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen met een hybride warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String householdHeatGrid = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen via een warmtenet. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String householdElectricBoiler = "Met deze slider kun je instellen welk aandeel van de huizen verwarmen met een elektrische boiler. Dit heeft betrekking op het verwarmen van de ruimtes en de vraag naar warm water. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String householdHTDistrictHeating = "Met deze knop kun je alle huizen aansluiten op een hoog-temperatuur warmtenet. Als er geen warmtebron ingesteld is voor het warmtenet dan wordt de warmte als import gerekend."; - public String householdLTDistrictHeating = "Met deze knop kun je alle huizen aansluiten op een laag-temperatuur warmtenet. In de huizen wordt een warmtepomp geplaatst om de warmte verder op te waarderen. Als er geen warmtebron ingesteld is voor het warmtenet dan wordt de warmte als import gerekend."; - public String householdAirconditioning = "Met deze slider kun je instellen welk aandeel van de huizen een air conditioning unit hebben."; - public String householdAdditionalInsulation = "Met deze slider kun je instellen welk aandeel van de huizen extra geisoleerd zijn. Deze huizen hebben 30% minder warmtebehoefte voor het verwarmen van ruimtes."; - public String householdRooftopPT = "Met deze slider kun je instellen welk aandeel van de huizen PhotoThermische panelen op hun dak heeft liggen. Maar let op: Als er PT op het dak ligt, is er minder ruimte voor PV panelen, en zal de maximale potentiele opbrengst van PV voor die huizen dus verminderen."; - // company - public String companyHeatDemandReduction = "Met deze slider kun je de behoefte aan warmte voor bedrijven aanpassen. Een positief percentage betekent dat ze minder warmte nodig hebben dan in het basis scenario. Een negatief percentage betekent dat ze meer warmte nodig hebben. Dit verandert niet de temperatuur in het gebouw, maar de benodigde hoeveelheid energie om te verwarmen. Deze slider gaat bijvoorbeeld over betere isolatie in de gebouwen."; - public String companyGasBoiler = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen met een gasboiler. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String companyElectricHeatpump = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen met een elektrische warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String companyHybridHeatpump = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen met een hybride warmtepomp. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String companyHeatGrid = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen via een warmtenet. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String companyElectricBoiler = "Met deze slider kun je instellen welk aandeel van de bedrijven verwarmen met een elektrische boiler. Dit heeft betrekking op het verwarmen van de ruimtes, de vraag naar warm water en eventuele bedrijfsprocessen. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String companyCustomHeating = "Deze slider is puur visueel. In deze slider is weergegeven welk aandeel van de bedrijven verwarmen met een Custom warmte systeem. Een Custom systeem betekent hier een systeem dat bestaat uit meerdere verschillende warmte producerende apparaten of andere complexe situaties. Omdat deze systemen zo complex zijn, zijn ze niet simpelweg te vervangen door een enkel ander systeem. Daarom kan je deze slider ook niet aanpassen."; - - //// Mobility Tab - //DEFAULT - public String mobilityDemandReduction = "Met deze slider kun je de hoeveelheid transportbewegingen van wagens aanpassen. Een positief percentage betekent dat ze minder kilometers per jaar rijden dan in het basis scenario. Een negatief percentage betekent dat ze meer kilometers gaan rijden. Deze slider verandert niet het aantal voertuigen."; - public String chargingBehaviour = "Hier kun je verschillende laadstrategieën selecteren. Standaard wordt er dom geladen, dat wil zeggen dat de wagen op moment van aankomst inprikt en op vol vermogen laad tot de batterij vol is. Bij Max Spread kijkt de wagen op moment van aankomst wanneer hij weer moet vertrekken en verdeelt hij zijn laadbehoefte gelijk over deze tijd. Bij Max Power probeert hij te laden op het maximale vermogen wat nog binnen de aansluiting past, echter als de accu daardoor niet vol zou zijn voordat de wagen vertrekt wordt aan het einde alsnog op vol vermogen geladen. Hierdoor kan de aansluitingscapaciteit alsnog worden overschreden."; - public String mobilitySmartCharging = "Standaard laden autos gewoon met een standaard vermogen. Vink je deze knop aan, dan gaan de autos slim laden: Voertuigen laden op met een zo vlak mogelijk profiel, waardoor ze vervolgens wel hun geplande rit kunnen maken, zonder voor grote pieken te zorgen."; - - // trucks - public String electricTrucks = "Met deze slider kun je instellen welk aandeel van alle vrachtwagens elektrisch is. Als je deze slider verhoogt dan wordt eerst geprobeerd vrachtwagens die rijden op fossiele brandstof te vervangen door elektrische vrachtwagens. Eventueel daarna worden vrachtwagens die rijden op waterstof omgezet in elektrische vrachtwagens. Als je deze slider verlaagt dan worden elektrische vrachtwagens omgezet naar vrachtwagens die rijden op fossiele brandstof. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String hydrogenTrucks = "Met deze slider kun je instellen welk aandeel van alle vrachtwagens op waterstof rijdt. Als je deze slider verhoogt dan wordt eerst geprobeerd vrachtwagens die rijden op fossiele brandstof te vervangen door vrachtwagens die rijden op waterstof. Eventueel daarna worden elektrische vrachtwagens omgezet in vrachtwagens die rijden op waterstof. Als je deze slider verlaagt dan worden vrachtwagens die rijden op waterstof omgezet naar vrachtwagens die rijden op fossiele brandstof. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String fossilTrucks = "Met deze slider kun je instellen welk aandeel van alle vrachtwagens op fossiele brandstof rijdt. Als je deze slider verhoogt dan wordt eerst geprobeerd elektrische vrachtwagens te vervangen door vrachtwagens die rijden op fossiele brandstof. Eventueel daarna worden vrachtwagens die rijden op waterstof omgezet in vrachtwagens die rijden op fossiele brandstof. Als je deze slider verlaagt dan worden vrachtwagens die rijden op fossiele brandstof omgezet naar elektrische vrachtwagens. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - // vans - public String electricVans = "Met deze slider kun je instellen welk aandeel van alle busjes elektrisch is. Als je deze slider verhoogt dan worden busjes die rijden op fossiele brandstof vervangen door elektrische busjes. Als je deze slider verlaagt dan worden elektrische busjes omgezet naar busjes die rijden op fossiele brandstof. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String fossilVans = "Met deze slider kun je instellen welk aandeel van alle busjes op fossiele brandstof rijdt. Als je deze slider verhoogt dan worden elektrische busjes vervangen door busjes die rijden op fossiele brandstof. Als je deze slider verlaagt dan worden busjes die rijden op fossiele brandstof omgezet naar elektrische busjes. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - // cars - public String electricCars = "Met deze slider kun je instellen welk aandeel van alle auto's elektrisch is. Als je deze slider verhoogt dan worden auto's die rijden op fossiele brandstof vervangen door elektrische auto's. Als je deze slider verlaagt dan worden elektrische auto's omgezet naar auto's die rijden op fossiele brandstof. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - public String fossilCars = "Met deze slider kun je instellen welk aandeel van alle auto's op fossiele brandstof rijdt. Als je deze slider verhoogt dan worden elektrische auto's vervangen door auto's die rijden op fossiele brandstof. Als je deze slider verlaagt dan worden auto's die rijden op fossiele brandstof omgezet naar elektrische auto's. De minimum waarde van de slider is gezet op de hoveelheid die al in het huidige scenario aanwezig is."; - - //RESIDENTIAL - public String householdPublicChargersBehaviour = "Met deze knoppen kun je instellen wat het laadgedrag is van de publieke laadpalen. Met V1G wordt uitgesteld laden of 'slim' laden bedoeld. Met V2G kunnen de voertuigen ook terugleveren aan het net."; - public String householdPublicParkingV1G = "Met deze slider kun je instellen welk aandeel van de publieke laadpalen V1G ondersteunen."; - public String householdPublicParkingV2G = "Met deze slider kun je instellen welk aandeel van de publieke laadpalen V2G ondersteunen."; - public String householdPrivateParking = "Met deze slider kun je instellen welk aandeel huizen met een eigen oprit een EV heeft."; - public String householdPublicParking = "Met deze slider kun je instellen hoe veel publieke laadpalen er in het model zitten. Door meer publieke laadpalen toe te voegen verdwijnen er auto's die op fossiele brandstoffen rijden."; - - public String EVsThatSupportV2G = "Met deze slider kun je instellen welk aandeel van EVs de mogelijkheid hebben om te ontladen (V2G)"; - public String activateV2GPrivatePublicChargers = "Met deze knop kun je V2G activeren voor publieke laadpalen. Hierbij zullen alle laadpalen die het ondersteunen V2G toepassen wanneer het volgens de geselecteerde laadstrategie gewenst is."; - public String activateV2GPrivateParkedCars = "Met deze knop kun je V2G activeren voor privé geparkeerde EVs . Hierbij zullen alle EVs die het ondersteunen V2G toepassen wanneer het volgens de geselecteerde laadstrategie gewenst is."; - public String chargingStrategyPublicChargers = "Met dit drop down menu kun je uitkiezen welke laad strategie je wilt toepassen op alle actieve publieke laadpalen."; - public String chargingAttitudePrivateParkedCars = "Met dit drop down menu kun je uitkiezen welke laad strategie je wilt toepassen op alle prive geladen EVs"; - - //// E-Hub Tab - //TODO - - ////Map overlays - - //Congestion - public String i_mapOverlayLegend_congestion_Degrees = "Als een GIS-object (zoals een pand of transformator) groen wordt weergegeven, is er nog voldoende beschikbare capaciteit. Een oranje object duidt erop dat tijdens de jaarsimulatie de grens van 70% van de capaciteit (voor panden: de contractcapaciteit) is overschreden. Een rood object betekent dat de volledige capaciteit (100%) is overschreden."; - public String i_mapOverlayLegend_congestion_Types = "Met deze knoppen kun je selecteren welk type belasting je wilt visualiseren: Afname, teruglevering, of de maximum belasting van beide."; - - /** - * Default constructor - */ - public J_InfoText() { - } - - //public Pair<String, Integer> getLorumIpsum(int width_ch, String descriptionText) { - //return this.restrictWidth(descriptionText, width_ch); - //} - - public Pair<String, Integer> restrictWidth( String txt, int width_ch ) { - StringBuilder output = new StringBuilder(); - int remainingTextSize = txt.length(); - int currentIndex = 0; - int lines = 0; - while (remainingTextSize > width_ch) { - int i = 0; - while (!Character.isWhitespace(txt.charAt(currentIndex + width_ch - i))) { - i++; - if (i > width_ch) { - throw new RuntimeException("Impossible to format string to fit within width."); - } - } - output.append(txt.substring(currentIndex, currentIndex + width_ch - i)); - output.append('\n'); - currentIndex += width_ch - i + 1; - remainingTextSize -= width_ch - i + 1; - lines++; - } - output.append(txt.substring(currentIndex, txt.length())); - lines++; - return new Pair(output.toString(), lines); - } - - @Override - public String toString() { - return super.toString(); - } - - /** - * This number is here for model snapshot storing purpose<br> - * It needs to be changed when this class gets changed - */ - private static final long serialVersionUID = 1L; - -}</Text> - </JavaClass> - <JavaClass> - <Id>1749138380458</Id> - <Name>CustomProfile_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * CustomProfile_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class CustomProfile_data { - - String customProfileID; - List<Double> argumentsList; - List<Double> valuesList; - - public double[] getArgumentsArray() { - return ListUtil.doubleListToArray(argumentsList); - } - public double[] getValuesArray() { - return ListUtil.doubleListToArray(valuesList); - } - -}</Text> - </JavaClass> - <JavaClass> - <Id>1749549699201</Id> - <Name>DefaultProfiles_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * DefaultProfiles_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class DefaultProfiles_data { - - //Arguments - List<Double> arguments_hr; - - // Weather data - List<Double> ambientTemperatureProfile_degC; - List<Double> PVProductionProfile35DegSouth_fr; - List<Double> PVProductionProfile15DegEastWest_fr; - List<Double> windProductionProfile_fr; - - //EPEX data - List<Double> epexProfile_eurpMWh; - - // Various demand profiles - List<Double> defaultHouseElectricityDemandProfile_fr; - List<Double> defaultHouseHotWaterDemandProfile_fr; - List<Double> defaultHouseCookingDemandProfile_fr; - List<Double> defaultOfficeElectricityDemandProfile_fr; - List<Double> defaultBuildingHeatDemandProfile_fr; - - //Maximum getters - public double getDefaultOfficeElectricityDemandProfileMaximum_fr() { - return Collections.max(defaultOfficeElectricityDemandProfile_fr); - } - public double getDefaultBuildingHeatDemandProfileMaximum_fr() { - return Collections.max(defaultBuildingHeatDemandProfile_fr); - } -}</Text> - </JavaClass> - <JavaClass> - <Id>1749649742298</Id> - <Name>ChargerProfile_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * ChargerProfile_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class ChargerProfile_data { - - String chargerProfileID; - List<String> valuesList; - -}</Text> - </JavaClass> - <JavaClass> - <Id>1749738288352</Id> - <Name>ParkingSpace_data</Name> - <Folder>1754045711603</Folder> - <Text>/** - * ParkingSpace_data - */ -@lombok.Builder -@lombok.Value -@lombok.experimental.Accessors(fluent = true) -public class ParkingSpace_data { - //Database column name - String parking_id; - String street; - OL_ParkingSpaceType type; - String additional_info; - - Double pv_potential_kwp; - - String gridnode_id; - - Double latitude; - Double longitude; - String polygon; -}</Text> - </JavaClass> - <JavaClass> - <Id>1753884053162</Id> - <Name>J_ModelSave</Name> - <Folder>1761915047244</Folder> - <Text>/** - * J_ModelSave - */ -public class J_ModelSave implements Serializable { - - public EnergyModel energyModel; - public ArrayList<GridNode> c_gridNodes = new ArrayList<GridNode>(); - public ArrayList<GIS_Object> c_GISObjects = new ArrayList<GIS_Object>(); - - public ArrayList<GCUtility> c_orderedPVSystemsCompanies; - public ArrayList<GCHouse> c_orderedPVSystemsHouses; - public ArrayList<J_EA> c_orderedVehicles; - public ArrayList<GCUtility> c_orderedHeatingSystemsCompanies; - public ArrayList<GCHouse> c_orderedHeatingSystemsHouses; - public ArrayList<J_EADieselVehicle> c_orderedActiveVehiclesPublicParking; - public ArrayList<J_EADieselVehicle> c_orderedNonActiveVehiclesPublicParking; - public ArrayList<J_EAVehicle> c_orderedVehiclesPrivateParking; - public ArrayList<GIS_Object> c_orderedParkingSpaces; - - public ArrayList<J_EAChargePoint> c_orderedV1GChargers; - public ArrayList<J_EAChargePoint> c_orderedV2GChargers; - public ArrayList<GCPublicCharger> c_orderedPublicChargers; - - public LinkedHashMap<String, List<J_EADieselVehicle>> c_mappingOfVehiclesPerCharger; - public LinkedHashMap<String, J_scenario_Current> c_scenarioMap_Current; - public LinkedHashMap<String, J_scenario_Future> c_scenarioMap_Future; - - public List<LinkedHashMap<String, List<J_EAVehicle>>> c_additionalVehicleHashMaps; - - /** - * Default constructor - */ - public J_ModelSave() { - } - - @Override - public String toString() { - return super.toString(); - } - - /** - * This number is here for model snapshot storing purpose<br> - * It needs to be changed when this class gets changed - */ - private static final long serialVersionUID = 1L; - -}</Text> - </JavaClass> - <JavaClass> - <Id>1761122454908</Id> - <Name>J_SliderSettings_Residential</Name> - <Folder>1761915047244</Folder> - <Text>/** - * J_SliderSettings_Residential - */ -public class J_SliderSettings_Residential { - - ////Electricity - private double housesWithPV_pct; - private double pvHousesWithBattery_pct; - private double cooking_pct; - private double electricityDemandIncrease_pct; - private double averageNeighbourhoodBatterySize_kWh; - - ////Heating - private double housesWithGasBurners_pct; - private double housesWithHybridHeatpump_pct; - private double housesWithElectricHeatpump_pct; - private boolean cb_householdHTDistrictHeatingActive; - private boolean cb_householdLTDistrictHeatingActive; - private double housesWithAirco_pct; - private double housesWithImprovedInsulation_pct; - private double nbHousesWithPT_pct; - - ////Mobility - private double privateEVs_pct; - private double privateEVsThatSupportV2G_pct; - private String selectedChargingAttitudeStringPrivateEVs; - private boolean V2GActivePrivateEVs; - private double activePublicChargers_pct; - private double chargersV1G_pct; - private double chargersV2G_pct; - private String selectedChargingAttitudeStringChargers; - private boolean V2GActiveChargers; - - - - /** - * Default constructor - */ - public J_SliderSettings_Residential() { - } - - // ====== Setters ====== - public void setHousesWithPV_pct(double housesWithPV_pct) { - this.housesWithPV_pct = housesWithPV_pct; - } - - public void setPvHousesWithBattery_pct(double pvHousesWithBattery_pct) { - this.pvHousesWithBattery_pct = pvHousesWithBattery_pct; - } - - public void setCooking_pct(double cooking_pct) { - this.cooking_pct = cooking_pct; - } - - public void setElectricityDemandIncrease_pct(double electricityDemandIncrease_pct) { - this.electricityDemandIncrease_pct = electricityDemandIncrease_pct; - } - - public void setAverageNeighbourhoodBatterySize_kWh(double averageNeighbourhoodBatterySize_kWh) { - this.averageNeighbourhoodBatterySize_kWh = averageNeighbourhoodBatterySize_kWh; - } - - // Heating - public void setHousesWithGasBurners_pct(double housesWithGasBurners_pct) { - this.housesWithGasBurners_pct = housesWithGasBurners_pct; - } - - public void setHousesWithHybridHeatpump_pct(double housesWithHybridHeatpump_pct) { - this.housesWithHybridHeatpump_pct = housesWithHybridHeatpump_pct; - } - - public void setHousesWithElectricHeatpump_pct(double housesWithElectricHeatpump_pct) { - this.housesWithElectricHeatpump_pct = housesWithElectricHeatpump_pct; - } - - public void setCb_householdHTDistrictHeatingActive(boolean cb_householdHTDistrictHeatingActive) { - this.cb_householdHTDistrictHeatingActive = cb_householdHTDistrictHeatingActive; - } - - public void setCb_householdLTDistrictHeatingActive(boolean cb_householdLTDistrictHeatingActive) { - this.cb_householdLTDistrictHeatingActive = cb_householdLTDistrictHeatingActive; - } - - public void setHousesWithAirco_pct(double housesWithAirco_pct) { - this.housesWithAirco_pct = housesWithAirco_pct; - } - - public void setHousesWithImprovedInsulation_pct(double housesWithImprovedInsulation_pct) { - this.housesWithImprovedInsulation_pct = housesWithImprovedInsulation_pct; - } - - public void setNbHousesWithPT_pct(double nbHousesWithPT_pct) { - this.nbHousesWithPT_pct = nbHousesWithPT_pct; - } - - // Mobility - public void setPrivateEVs_pct(double privateEVs_pct) { - this.privateEVs_pct = privateEVs_pct; - } - - public void setPrivateEVsThatSupportV2G_pct(double privateEVsThatSupportV2G_pct) { - this.privateEVsThatSupportV2G_pct = privateEVsThatSupportV2G_pct; - } - - public void setSelectedChargingAttitudeStringPrivateEVs(String selectedChargingAttitudeStringPrivateEVs) { - this.selectedChargingAttitudeStringPrivateEVs = selectedChargingAttitudeStringPrivateEVs; - } - - public void setV2GActivePrivateEVs(boolean V2GActivePrivateEVs) { - this.V2GActivePrivateEVs = V2GActivePrivateEVs; - } - - public void setActivePublicChargers_pct(double activePublicChargers_pct) { - this.activePublicChargers_pct = activePublicChargers_pct; - } - - public void setChargersV1G_pct(double chargersV1G_pct) { - this.chargersV1G_pct = chargersV1G_pct; - } - - public void setChargersV2G_pct(double chargersV2G_pct) { - this.chargersV2G_pct = chargersV2G_pct; - } - - public void setSelectedChargingAttitudeStringChargers(String selectedChargingAttitudeStringChargers) { - this.selectedChargingAttitudeStringChargers = selectedChargingAttitudeStringChargers; - } - - public void setV2GActiveChargers(boolean V2GActiveChargers) { - this.V2GActiveChargers = V2GActiveChargers; - } - - // ====== Getters ====== - public double getHousesWithPV_pct() { - return housesWithPV_pct; - } - - public double getPvHousesWithBattery_pct() { - return pvHousesWithBattery_pct; - } - - public double getCooking_pct() { - return cooking_pct; - } - - public double getElectricityDemandIncrease_pct() { - return electricityDemandIncrease_pct; - } - - public double getAverageNeighbourhoodBatterySize_kWh() { - return averageNeighbourhoodBatterySize_kWh; - } - - // Heating - public double getHousesWithGasBurners_pct() { - return housesWithGasBurners_pct; - } - - public double getHousesWithHybridHeatpump_pct() { - return housesWithHybridHeatpump_pct; - } - - public double getHousesWithElectricHeatpump_pct() { - return housesWithElectricHeatpump_pct; - } - - public boolean getCb_householdHTDistrictHeatingActive() { - return cb_householdHTDistrictHeatingActive; - } - - public boolean getCb_householdLTDistrictHeatingActive() { - return cb_householdLTDistrictHeatingActive; - } - - public double getHousesWithAirco_pct() { - return housesWithAirco_pct; - } - - public double getHousesWithImprovedInsulation_pct() { - return housesWithImprovedInsulation_pct; - } - - public double getNbHousesWithPT_pct() { - return nbHousesWithPT_pct; - } - - // Mobility - public double getPrivateEVs_pct() { - return privateEVs_pct; - } - - public double getPrivateEVsThatSupportV2G_pct() { - return privateEVsThatSupportV2G_pct; - } - - public String getSelectedChargingAttitudeStringPrivateEVs() { - return selectedChargingAttitudeStringPrivateEVs; - } - - public boolean getV2GActivePrivateEVs() { - return V2GActivePrivateEVs; - } - - public double getActivePublicChargers_pct() { - return activePublicChargers_pct; - } - - public double getChargersV1G_pct() { - return chargersV1G_pct; - } - - public double getChargersV2G_pct() { - return chargersV2G_pct; - } - - public String getSelectedChargingAttitudeStringChargers() { - return selectedChargingAttitudeStringChargers; - } - - public boolean getV2GActiveChargers() { - return V2GActiveChargers; - } - -}</Text> - </JavaClass> - <JavaClass> - <Id>1761914526110</Id> - <Name>J_RemainingTotals</Name> - <Folder>1761915047244</Folder> - <Text>/** - * J_RemainingTotals - */ -public class J_RemainingTotals { - //Parameters - private String idNBH; - Map<OL_EnergyCarriers, Double> remainingECDeliveryCompanies_kWh = new HashMap<>(); - Map<OL_VehicleType, Integer> remainingNumberOfVehiclesCompanies = new HashMap<>(); - private double totalFloorSurfaceAnonymousCompanies_m2 = 0.0; - private int totalNumberOfAnonymousCompanies = 0; - - //Calculated values - Map<OL_EnergyCarriers, Double> ECDeliveryOfAnonymousCompanies_kWhpm2 = new HashMap<>(); - - //Distribution support values - Map<OL_VehicleType, Integer> remainingNumberOfAnonymousCompaniesPerVehicleType= new HashMap<>(); - - //Class state - private boolean isFinalized = false; - - - //TEMPORARY SOLUTION FOR NOW TO CONVERT GAS IN M3, UNTIL LOMBOK PACKAGE IS IN KWH OR OTHER SOLUTION - private AVGC_data avgc_data; - - public J_RemainingTotals(Neighbourhood_data dataNBH, AVGC_data avgc_data) { - - //TEMPORARY - this.avgc_data = avgc_data; - - this.idNBH = dataNBH.neighbourhoodname(); - - if(dataNBH.total_comp_elec_delivery_kwh_p_yr() != null && dataNBH.total_comp_elec_delivery_kwh_p_yr() >= 0){ - this.remainingECDeliveryCompanies_kWh.put(OL_EnergyCarriers.ELECTRICITY, dataNBH.total_comp_elec_delivery_kwh_p_yr()); - } - if(dataNBH.total_comp_gas_delivery_m3_p_yr() != null && dataNBH.total_comp_gas_delivery_m3_p_yr() >= 0){ - this.remainingECDeliveryCompanies_kWh.put(OL_EnergyCarriers.METHANE, dataNBH.total_comp_gas_delivery_m3_p_yr() * this.avgc_data.p_gas_kWhpm3); - } - if(dataNBH.total_nr_comp_cars() != null && dataNBH.total_nr_comp_cars() >= 0){ - this.remainingNumberOfVehiclesCompanies.put(OL_VehicleType.CAR, dataNBH.total_nr_comp_cars()); - } - if(dataNBH.total_nr_comp_vans() != null && dataNBH.total_nr_comp_vans() >= 0){ - this.remainingNumberOfVehiclesCompanies.put(OL_VehicleType.VAN, dataNBH.total_nr_comp_vans()); - } - if(dataNBH.total_nr_comp_trucks() != null && dataNBH.total_nr_comp_trucks() >= 0){ - this.remainingNumberOfVehiclesCompanies.put(OL_VehicleType.TRUCK, dataNBH.total_nr_comp_trucks()); - } - } - - ////Setters for finalization - public void setECDeliveryOfAnonymousCompanies_kWhpm2(OL_EnergyCarriers EC, double value_kWh) { - if(this.isFinalized) { - throw new RuntimeException("Trying to setECDeliveryOfAnonymousCompanies_kWhpm2 while class is finalized"); - } - if(ECDeliveryOfAnonymousCompanies_kWhpm2.containsKey(EC)) { - throw new RuntimeException("Setting ECDeliveryOfAnonymousCompanies_kWhpm2 for " + EC + " for a second time!"); - } - this.ECDeliveryOfAnonymousCompanies_kWhpm2.put(EC, value_kWh); - } - - public void setStartingNumberOfAnonymousCompaniesForVehicleDistribution() { - if(this.isFinalized) { - throw new RuntimeException("Trying to setStartingNumberOfAnonymousCompaniesForVehicleDistribution while class is finalized"); - } - //Set the starting number of anonymous companies for the vehicle distribution - for(OL_VehicleType vehicleType : remainingNumberOfVehiclesCompanies.keySet()) { - remainingNumberOfAnonymousCompaniesPerVehicleType.put(vehicleType, this.totalNumberOfAnonymousCompanies); - } - } - - public void finalize() { - //Finalize the maps - this.remainingECDeliveryCompanies_kWh = Collections.unmodifiableMap(this.remainingECDeliveryCompanies_kWh); - this.ECDeliveryOfAnonymousCompanies_kWhpm2 = Collections.unmodifiableMap(this.ECDeliveryOfAnonymousCompanies_kWhpm2); - - this.isFinalized = true; - } - - - ////Adjustment functions - public void adjustTotalFloorSurfaceAnonymousCompanies_m2(double deltaFloorSurface_m2) { - if(this.isFinalized) { - throw new RuntimeException("Trying to adjustTotalFloorSurfaceAnonymousCompanies_m2 while class is finalized"); - } - this.totalFloorSurfaceAnonymousCompanies_m2 += deltaFloorSurface_m2; - } - - public void adjustTotalNumberOfAnonymousCompanies(int deltaNumberOfAnonymousCompanies) { - if(this.isFinalized) { - throw new RuntimeException("Trying to adjustTotalNumberOfAnonymousCompanies while class is finalized"); - } - this.totalNumberOfAnonymousCompanies += deltaNumberOfAnonymousCompanies; - } - - public void adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers EC, double adjustment_kWh) { - if(this.isFinalized) { - throw new RuntimeException("Trying to adjustRemainingECDeliveryCompanies_kWh while class is finalized"); - } - remainingECDeliveryCompanies_kWh.put(EC, this.remainingECDeliveryCompanies_kWh.get(EC) + adjustment_kWh); - } - - public void adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType vehicleType, int deltaNumberOfVehicles) { - this.remainingNumberOfVehiclesCompanies.put(vehicleType, this.remainingNumberOfVehiclesCompanies.get(vehicleType) + deltaNumberOfVehicles); - } - - public void adjustRemainingNumberOfAnonymousCompaniesForVehicleType(OL_VehicleType vehicleType, int deltaNumberOfAnonymousCompanies) { - this.remainingNumberOfAnonymousCompaniesPerVehicleType.put(vehicleType, this.remainingNumberOfAnonymousCompaniesPerVehicleType.get(vehicleType) + deltaNumberOfAnonymousCompanies); - } - - - ////Getters - public String getIdNBH() { - return this.idNBH; - } - public double getTotalFloorSurfaceAnonymousCompanies_m2() { - return this.totalFloorSurfaceAnonymousCompanies_m2; - } - public int getTotalNumberOfAnonymousCompanies() { - return this.totalNumberOfAnonymousCompanies; - } - - public Double getRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers EC) { - return this.remainingECDeliveryCompanies_kWh.get(EC); - } - - public Double getECDeliveryOfAnonymousCompanies_kWhpm2(OL_EnergyCarriers EC) { - return this.ECDeliveryOfAnonymousCompanies_kWhpm2.get(EC); - } - - public Integer getRemainingNumberOfVehiclesCompanies(OL_VehicleType vehicleType) { - return this.remainingNumberOfVehiclesCompanies.get(vehicleType); - } - public Integer getRemainingNumberOfAnonymousCompaniesForVehicleType(OL_VehicleType vehicleType) { - return this.remainingNumberOfAnonymousCompaniesPerVehicleType.get(vehicleType); - } - - - @Override - public String toString() { - String completeToString = idNBH + ":"; - for(OL_EnergyCarriers EC : remainingECDeliveryCompanies_kWh.keySet()) { - if(this.remainingECDeliveryCompanies_kWh.get(EC) != null) { - completeToString += "\n" + "remaining " + EC + " DeliveryCompanies: " + this.remainingECDeliveryCompanies_kWh.get(EC) + " kWh"; - } - } - for(OL_EnergyCarriers EC : ECDeliveryOfAnonymousCompanies_kWhpm2.keySet()) { - if(this.ECDeliveryOfAnonymousCompanies_kWhpm2.get(EC) != null) { - completeToString += "\n" + EC + " Delivery Of Anonymous Companies: " + this.ECDeliveryOfAnonymousCompanies_kWhpm2.get(EC) + " kWh/m2"; - } - } - for(OL_VehicleType vehicleType : remainingNumberOfVehiclesCompanies.keySet()) { - if(this.remainingNumberOfVehiclesCompanies.get(vehicleType) != null) { - completeToString += "\n" + "remainingNumberOf" + vehicleType + "Companies: " + this.remainingNumberOfVehiclesCompanies.get(vehicleType); - } - } - completeToString += "\n" + "totalFloorSurfaceAnonymousCompanies_m2: " + this.totalFloorSurfaceAnonymousCompanies_m2; - completeToString += "\n" + "totalNumberOfAnonymousCompanies: " + this.totalNumberOfAnonymousCompanies; - return completeToString; - } -}</Text> - </JavaClass> - <JavaClass> - <Id>1762351349700</Id> - <Name>J_RemainingTotalsManager</Name> - <Text>/** - * J_RemainingTotalsManager - */ -public class J_RemainingTotalsManager { - - //Supported EC and vehicle types - List<OL_EnergyCarriers> supportedEnergyCarriers= new ArrayList<>(Arrays.asList(OL_EnergyCarriers.ELECTRICITY, - OL_EnergyCarriers.METHANE)); - List<OL_VehicleType> supportedVehicleTypes = new ArrayList<>(Arrays.asList(OL_VehicleType.CAR, - OL_VehicleType.VAN, - OL_VehicleType.TRUCK)); - - //Original Model total - private final String originalModelTotalName = "Original model total"; - - //Remaining Model total (used as backup for gc that are not in an area) - private final String remainingModelTotalName = "Remaining model total"; - - //Initialize the remainingTotalsMap - private Map<String, J_RemainingTotals> remainingTotalsMap = new HashMap<>(); - - //Class State - private boolean isInitialized = false; - private boolean isFinalized = false; - - //Total value is added total or manual input - private boolean totalElectricityConsumptionCompaniesTotalIsManualInput = false; - private boolean totalGasConsumptionCompaniesTotalIsManualInput = false; - private boolean totalCarsCompaniesTotalIsManualInput = false; - private boolean totalVansCompaniesTotalIsManualInput = false; - private boolean totalTrucksCompaniesTotalIsManualInput = false; - - //TEMPORARY SOLUTION FOR NOW TO CONVERT GAS IN M3, UNTIL LOMBOK PACKAGE IS IN KWH OR OTHER SOLUTION - private AVGC_data avgc_data; - - /** - * Default constructor - */ - public J_RemainingTotalsManager(AVGC_data avgc_data) { - this.avgc_data = avgc_data; - } - - //Initialize model totals - public void initializeModelTotals(Project_data project_data, User user) { - double avg_house_elec_delivery_kwh_p_yr = 0; - double avg_house_gas_delivery_m3_p_yr = 0; - double avg_number_of_cars_per_house = 0; - double total_comp_elec_delivery_kwh_p_yr = 0; - double total_comp_gas_delivery_m3_p_yr = 0; - int total_nr_comp_cars = 0; - int total_nr_comp_vans = 0; - int total_nr_comp_trucks = 0; - - //Energy totals - if(user.NBHAccessType == OL_UserNBHAccessType.FULL) { //Only allow total input if all NBH are loaded in, else you get a skewed distribution. - if(project_data.total_electricity_consumption_companies_kWh_p_yr() != null && project_data.total_electricity_consumption_companies_kWh_p_yr() > 0){ - total_comp_elec_delivery_kwh_p_yr = project_data.total_electricity_consumption_companies_kWh_p_yr(); - this.totalElectricityConsumptionCompaniesTotalIsManualInput = true; - } - if(project_data.total_gas_consumption_companies_m3_p_yr() != null && project_data.total_gas_consumption_companies_m3_p_yr() > 0){ - total_comp_gas_delivery_m3_p_yr = project_data.total_gas_consumption_companies_m3_p_yr(); - this.totalGasConsumptionCompaniesTotalIsManualInput = true; - } - if(project_data.total_cars_companies() != null && project_data.total_cars_companies() > 0){ - total_nr_comp_cars = project_data.total_cars_companies(); - this.totalCarsCompaniesTotalIsManualInput = true; - } - if(project_data.total_vans_companies() != null && project_data.total_vans_companies() > 0){ - total_nr_comp_vans = project_data.total_vans_companies(); - this.totalVansCompaniesTotalIsManualInput = true; - } - if(project_data.total_trucks_companies() != null && project_data.total_trucks_companies() > 0){ - total_nr_comp_trucks = project_data.total_trucks_companies(); - this.totalTrucksCompaniesTotalIsManualInput = true; - } - } - - //Initialize default remaining model total instances - List<String> defaultRemainingModelTotalNames = new ArrayList<>(List.of(this.originalModelTotalName, this.remainingModelTotalName)); - for(String defaultModelTotalInstance : defaultRemainingModelTotalNames) { - remainingTotalsMap.put(defaultModelTotalInstance, new J_RemainingTotals( - Neighbourhood_data.builder() - .neighbourhoodname(defaultModelTotalInstance) - //Energy totals - .avg_house_elec_delivery_kwh_p_yr(avg_house_elec_delivery_kwh_p_yr) - .avg_house_gas_delivery_m3_p_yr(avg_house_gas_delivery_m3_p_yr) - .avg_number_of_cars_per_house(avg_number_of_cars_per_house) - .total_comp_elec_delivery_kwh_p_yr(total_comp_elec_delivery_kwh_p_yr) - .total_comp_gas_delivery_m3_p_yr(total_comp_gas_delivery_m3_p_yr) - .total_nr_comp_cars(total_nr_comp_cars) - .total_nr_comp_vans(total_nr_comp_vans) - .total_nr_comp_trucks(total_nr_comp_trucks) - .build(), - this.avgc_data - )); - } - this.isInitialized = true; - } - - - //Initialize remaining totals for each NBH - public void addNBH(Neighbourhood_data dataNBH) { - if(!isInitialized) { - throw new RuntimeException("Adding NBH to J_RemainingTotalsManager, while the class has not been initialized, this will cause energy total mismatches and therefor is not allowed!"); - } - if(remainingTotalsMap.containsKey(dataNBH.neighbourhoodname())) { - throw new RuntimeException("Adding NBH: " + dataNBH.neighbourhoodname() + " to J_RemainingTotalsManager for the second time, This will cause energy total mismatches and therefor is not allowed!"); - } - if(isFinalized) { - throw new RuntimeException("Adding NBH: " + dataNBH.neighbourhoodname() + " to J_RemainingTotalsManager after the J_RemainingTotals has been finalized, This will cause energy total mismatches and therefor is not allowed!"); - } - - //Create remaining totals instance for the NBH and add to Map - remainingTotalsMap.put(dataNBH.neighbourhoodname(), new J_RemainingTotals(dataNBH, this.avgc_data)); - - //Manage model totals and backup - if(dataNBH.total_comp_elec_delivery_kwh_p_yr() != null && dataNBH.total_comp_elec_delivery_kwh_p_yr() >= 0){ - if(totalElectricityConsumptionCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' - remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers.ELECTRICITY, -dataNBH.total_comp_elec_delivery_kwh_p_yr()); - } - else { - remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers.ELECTRICITY, dataNBH.total_comp_elec_delivery_kwh_p_yr()); - } - } - if(dataNBH.total_comp_gas_delivery_m3_p_yr() != null && dataNBH.total_comp_gas_delivery_m3_p_yr() >= 0){ - if(totalGasConsumptionCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' - remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers.METHANE, -dataNBH.total_comp_gas_delivery_m3_p_yr()); - } - else { - remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingECDeliveryCompanies_kWh(OL_EnergyCarriers.METHANE, dataNBH.total_comp_gas_delivery_m3_p_yr()); - } - } - if(dataNBH.total_nr_comp_cars() != null && dataNBH.total_nr_comp_cars() >= 0){ - if(totalCarsCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' - remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.CAR, -dataNBH.total_nr_comp_cars()); - } - else { - remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.CAR, dataNBH.total_nr_comp_cars()); - } - } - if(dataNBH.total_nr_comp_vans() != null && dataNBH.total_nr_comp_vans() >= 0){ - if(totalVansCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' - remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.VAN, -dataNBH.total_nr_comp_vans()); - } - else { - remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.VAN, dataNBH.total_nr_comp_vans()); - } - } - if(dataNBH.total_nr_comp_trucks() != null && dataNBH.total_nr_comp_trucks() >= 0){ - if(totalTrucksCompaniesTotalIsManualInput) { // Remove total of this nb from the 'backup total' - remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.TRUCK, -dataNBH.total_nr_comp_trucks()); - } - else { - remainingTotalsMap.get(this.originalModelTotalName).adjustRemainingNumberOfVehiclesCompanies(OL_VehicleType.TRUCK, dataNBH.total_nr_comp_trucks()); - } - } - } - - - //Adjust remaining totals - public void adjustRemainingElectricityDeliveryCompanies_kWh(GridConnection GC, double adjustment_kWh) { - adjustRemainingECDeliveryCompanies_kWh(GC, OL_EnergyCarriers.ELECTRICITY, adjustment_kWh); - } - public void adjustRemainingGasDeliveryCompanies_m3(GridConnection GC, double adjustment_m3) { - adjustRemainingECDeliveryCompanies_kWh(GC, OL_EnergyCarriers.METHANE, adjustment_m3 * avgc_data.p_gas_kWhpm3); - } - private void adjustRemainingECDeliveryCompanies_kWh(GridConnection GC, OL_EnergyCarriers EC, double adjustment_kWh) { - if(!supportedEnergyCarriers.contains(EC)) { - throw new RuntimeException("Trying to adjustRemainingECDeliveryCompanies_kWh for an unsupported EC"); - } - - String idNBH = getNBHIdOfGC(GC); - if(remainingTotalsMap.get(idNBH).getRemainingECDeliveryCompanies_kWh(EC) == null) { - idNBH = this.remainingModelTotalName; - } - remainingTotalsMap.get(idNBH).adjustRemainingECDeliveryCompanies_kWh(EC, adjustment_kWh); - - } - - public void adjustRemainingNumberOfVehiclesCompanies(GridConnection GC, OL_VehicleType vehicleType, int deltaNumberOfVehicles) { - if(!supportedVehicleTypes.contains(vehicleType)) { - throw new RuntimeException("Trying to adjustRemainingNumberOfVehiclesCompanies for an unsupported vehicleType"); - } - - String idNBH = getNBHIdOfGC(GC); - if(remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType) == null) { - idNBH = this.remainingModelTotalName; - } - remainingTotalsMap.get(idNBH).adjustRemainingNumberOfVehiclesCompanies(vehicleType, deltaNumberOfVehicles); - } - - public void adjustTotalFloorSurfaceAnonymousCompanies_m2(GridConnection GC, double deltaFloorSurface_m2) { - remainingTotalsMap.get(getNBHIdOfGC(GC)).adjustTotalFloorSurfaceAnonymousCompanies_m2(deltaFloorSurface_m2); - - //Update model total as well - remainingTotalsMap.get(this.originalModelTotalName).adjustTotalFloorSurfaceAnonymousCompanies_m2(deltaFloorSurface_m2); - } - - public void adjustTotalNumberOfAnonymousCompanies(GridConnection GC, int deltaNumberOfAnonymousCompanies) { - remainingTotalsMap.get(getNBHIdOfGC(GC)).adjustTotalNumberOfAnonymousCompanies(deltaNumberOfAnonymousCompanies); - - //Update model total as well - remainingTotalsMap.get(this.originalModelTotalName).adjustTotalNumberOfAnonymousCompanies(deltaNumberOfAnonymousCompanies); - } - - ////Getters - - //EnergyCarrier delivery getters - public double getRemainingElectricityDeliveryCompanies_kWh(GridConnection GC) { - return getRemainingECDeliveryOfAnonymousCompanies_kWh(GC, OL_EnergyCarriers.ELECTRICITY); - } - public double getRemainingGasDeliveryCompanies_m3(GridConnection GC) { - return getRemainingECDeliveryOfAnonymousCompanies_kWh(GC, OL_EnergyCarriers.METHANE); - } - private double getRemainingECDeliveryOfAnonymousCompanies_kWh(GridConnection GC, OL_EnergyCarriers EC) { - if(!supportedEnergyCarriers.contains(EC)) { - throw new RuntimeException("Trying to getRemainingECDeliveryOfAnonymousCompanies_kWh for an unsupported EC"); - } - String idNBH = getNBHIdOfGC(GC); - if(remainingTotalsMap.get(idNBH).getRemainingECDeliveryCompanies_kWh(EC) == null) { - idNBH = this.remainingModelTotalName; - } - return remainingTotalsMap.get(idNBH).getRemainingECDeliveryCompanies_kWh(EC); - } - - //Vehicle getters - public Integer getRemainingNumberOfVehiclesCompanies(GridConnection GC, OL_VehicleType vehicleType) { - if(!supportedVehicleTypes.contains(vehicleType)) { - throw new RuntimeException("Trying to getRemainingNumberOfVehiclesCompanies for an unsupported VehicleType"); - } - String idNBH = getNBHIdOfGC(GC); - if(remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType) == null) { - idNBH = this.remainingModelTotalName; - } - return remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType); - } - - //Default getters - public double getTotalFloorSurfaceAnonymousCompanies_m2(GridConnection GC) { - return remainingTotalsMap.get(getNBHIdOfGC(GC)).getTotalFloorSurfaceAnonymousCompanies_m2(); - } - public int getTotalNumberOfAnonymousCompanies(GridConnection GC) { - return remainingTotalsMap.get(getNBHIdOfGC(GC)).getTotalNumberOfAnonymousCompanies(); - } - - - ////Finalize the classes - public void finalizeRemainingTotalsDistributionCompanies() { - if(this.isFinalized) { - throw new RuntimeException("Trying to finalizeRemainingTotalsDistributionCompanies for a second time"); - } - - //Finalize the EC per m2 calculation - this.finalizeRemainingECTotalsPerM2Calculation(); - - //Set the starting number of anonymous companies for the vehicle distribution - this.setStartingNumberOfAnonymousCompaniesForVehicleDistribution(); - - //Set class state to finalized - this.remainingTotalsMap.values().forEach(remainingTotals -> remainingTotals.finalize()); - this.isFinalized = true; - } - - //Set the starting number of anonymous companies for the vehicle distribution - private void setStartingNumberOfAnonymousCompaniesForVehicleDistribution() { - if(this.isFinalized) { - throw new RuntimeException("Trying to setStartingNumberOfAnonymousCompaniesForVehicleDistribution after finalization."); - } - //Set setStartingNumberOfAnonymousCompaniesForVehicleDistribution for all that have specific vehicle totals - this.remainingTotalsMap.values().forEach(remainingTotals -> remainingTotals.setStartingNumberOfAnonymousCompaniesForVehicleDistribution()); - - //If NBH doesnt have specific vehicle total, add its total anonymous companies to the 'backup' - for(J_RemainingTotals remainingTotalsNBH : this.remainingTotalsMap.values()) { - for(OL_VehicleType vehicleType : supportedVehicleTypes) { - if(remainingTotalsNBH.getRemainingNumberOfVehiclesCompanies(vehicleType) == null) { - this.remainingTotalsMap.get(this.remainingModelTotalName).adjustRemainingNumberOfAnonymousCompaniesForVehicleType(vehicleType, remainingTotalsNBH.getTotalNumberOfAnonymousCompanies()); - } - } - } - } - - //Calculate certain remaining totals per m2 and finalize the nbh totals -> no longer adjustable - private void finalizeRemainingECTotalsPerM2Calculation() { - if(this.isFinalized) { - throw new RuntimeException("Trying to finalizeRemainingECTotalsPerM2Calculation after finalization."); - } - //Calculate the remaining EC delivery per m2 for all EC, where uknown NBH are grouped together with the backup to define the average - Map<OL_EnergyCarriers, Double> totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2= new HashMap<>(); - for(OL_EnergyCarriers supportedEC : supportedEnergyCarriers) { - totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.put(supportedEC, 0.0); - } - - for(J_RemainingTotals remainingTotalsNBH : this.remainingTotalsMap.values()) { - for(OL_EnergyCarriers EC : totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.keySet()) { - if(remainingTotalsNBH.getRemainingECDeliveryCompanies_kWh(EC) == null) { - totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.put(EC, totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.get(EC) + remainingTotalsNBH.getTotalFloorSurfaceAnonymousCompanies_m2()); - } - } - } - - for(J_RemainingTotals remainingTotalsNBH : this.remainingTotalsMap.values()) { - for(OL_EnergyCarriers EC : totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.keySet()) { - if(remainingTotalsNBH.getRemainingECDeliveryCompanies_kWh(EC) != null) { - double floorSurfaceAnonymousCompanies_m2 = remainingTotalsNBH.getTotalFloorSurfaceAnonymousCompanies_m2(); - if(remainingTotalsNBH.getIdNBH().equals(this.remainingModelTotalName)) { - floorSurfaceAnonymousCompanies_m2 += totalRemainingAnonymousCompaniesFloorSurfacePerEC_m2.get(EC); - } - if(floorSurfaceAnonymousCompanies_m2 > 0) { - remainingTotalsNBH.setECDeliveryOfAnonymousCompanies_kWhpm2(EC, remainingTotalsNBH.getRemainingECDeliveryCompanies_kWh(EC) / floorSurfaceAnonymousCompanies_m2); - } - } - } - } - } - - - ////After finalization getters - public double getElectricityDeliveryOfAnonymousCompanies_kWhpm2(GridConnection GC) { - return getECDeliveryOfAnonymousCompanies_kWhpm2(GC, OL_EnergyCarriers.ELECTRICITY); - } - public double getGasDeliveryOfAnonymousCompanies_m3pm2(GridConnection GC) { - return getECDeliveryOfAnonymousCompanies_kWhpm2(GC, OL_EnergyCarriers.METHANE) / avgc_data.p_gas_kWhpm3; - } - private double getECDeliveryOfAnonymousCompanies_kWhpm2(GridConnection GC, OL_EnergyCarriers EC) { - if(this.isFinalized){ - if(!supportedEnergyCarriers.contains(EC)) { - throw new RuntimeException("Trying to getECDeliveryOfAnonymousCompanies_kWhpm2 for an unsupported EC"); - } - - String idNBH = getNBHIdOfGC(GC); - if(remainingTotalsMap.get(idNBH).getECDeliveryOfAnonymousCompanies_kWhpm2(EC) == null) { - idNBH = this.remainingModelTotalName; - } - return remainingTotalsMap.get(idNBH).getECDeliveryOfAnonymousCompanies_kWhpm2(EC); - } - else { - throw new RuntimeException("The getter 'getEnergyCarrierDeliveryOfAnonymousCompanies_kWhpm2' is called while the calculation has not been finalized yet."); - } - } - - //Get vehicles per company per nbh - public int getCeiledRemainingNumberOfVehiclesPerCompany(GridConnection GC, OL_VehicleType vehicleType) { - if(this.isFinalized){ - if(!supportedVehicleTypes.contains(vehicleType)) { - throw new RuntimeException("Trying to getCeiledRemainingNumberOfVehiclesPerCompany for an unsupported VehicleType"); - } - String idNBH = getNBHIdOfGC(GC); - if(remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType) == null) { - idNBH = this.remainingModelTotalName; - } - - //Get remaining number of vehicles and total nr of anonymous companies left for those vehicles - int remainingNumberOfVehicles = remainingTotalsMap.get(idNBH).getRemainingNumberOfVehiclesCompanies(vehicleType); - int remainingNumberOfAnonymousCompaniesForVehicleType = remainingTotalsMap.get(idNBH).getRemainingNumberOfAnonymousCompaniesForVehicleType(vehicleType); // -> += to add anonymous companies for remainingModelTotalName as well - - //Initialize the ceiledRemainingNumberOfCarsPerCompany - int ceiledRemainingNumberOfVehiclesPerCompany = 0; - if(remainingNumberOfVehicles != 0 && remainingNumberOfAnonymousCompaniesForVehicleType != 0) { - ceiledRemainingNumberOfVehiclesPerCompany = roundToInt(ceil((double)remainingNumberOfVehicles/(double)remainingNumberOfAnonymousCompaniesForVehicleType)); - } - - return ceiledRemainingNumberOfVehiclesPerCompany; - } - else { - throw new RuntimeException("The getter 'getCeiledRemainingNumberOfVehiclesPerCompany' is called while the RemainingTotalsClass has not been finalized yet."); - } - } - - public void adjustRemainingNumberOfAnonymousCompaniesForVehicleType(GridConnection GC, OL_VehicleType vehicleType, int deltaNumberOfAnonymousCompanies) { - if(this.isFinalized) { - if(!supportedVehicleTypes.contains(vehicleType)) { - throw new RuntimeException("Trying to adjustRemainingNumberOfAnonymousCompaniesForVehicleType for an unsupported VehicleType"); - } - - String idNBH = getNBHIdOfGC(GC); - if(remainingTotalsMap.get(idNBH).getRemainingNumberOfAnonymousCompaniesForVehicleType(vehicleType) == null) { - idNBH = this.remainingModelTotalName; - } - remainingTotalsMap.get(idNBH).adjustRemainingNumberOfAnonymousCompaniesForVehicleType(vehicleType, deltaNumberOfAnonymousCompanies); - } - else { - - } - } - - - - ////Get NBH id where GC is located in that has a 'J_RemainingTotals', if not: return backup. - private String getNBHIdOfGC(GridConnection GC) { - String idNBH = this.remainingModelTotalName; - if(GC != null) { - GIS_Object area = findFirst(GC.energyModel.pop_GIS_Objects, nbh -> nbh.p_GISObjectType == OL_GISObjectType.REGION && nbh.gisRegion.contains(GC.p_latitude, GC.p_longitude)); - if(area != null && remainingTotalsMap.containsKey(area.p_id)){ - idNBH = area.p_id; - } - } - return idNBH; - } - - - @Override - public String toString() { - String completeToString = ""; - //Put model original and remaining totals on top. - completeToString += remainingTotalsMap.get(originalModelTotalName).toString(); - completeToString += "\n" + "\n" + remainingTotalsMap.get(remainingModelTotalName).toString(); - - for(J_RemainingTotals remainingTotalsNBH : this.remainingTotalsMap.values()) { - if(remainingTotalsNBH.getIdNBH().equals(this.originalModelTotalName) || remainingTotalsNBH.getIdNBH().equals(this.remainingModelTotalName)) { - continue; - } - completeToString += "\n" + "\n" + remainingTotalsNBH.toString(); - } - return completeToString; - } -}</Text> - </JavaClass> - </JavaClasses> - <RequiredLibraryReference> - <LibraryName>zero_engine</LibraryName> - <VersionMajor>0</VersionMajor> - <VersionMinor>0</VersionMinor> - <VersionBuild>0</VersionBuild> - </RequiredLibraryReference> - <RequiredLibraryReference> - <LibraryName>digital_twin_results</LibraryName> - <VersionMajor>0</VersionMajor> - <VersionMinor>0</VersionMinor> - <VersionBuild>0</VersionBuild> - </RequiredLibraryReference> - <ClassPathEntry> - <ResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>lombok.jar</ClassName> - </ResourceReference> - <Imported>true</Imported> - <Folder>false</Folder> - </ClassPathEntry> - <ClassPathEntry> - <ResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>vallum-production-741-d257d2f-all.jar</ClassName> - </ResourceReference> - <Imported>true</Imported> - <Folder>false</Folder> - </ClassPathEntry> - <ClassPathEntry> - <ResourceReference> - <PackageName>zerointerfaceloader</PackageName> - <ClassName>uplux-3.jar</ClassName> - </ResourceReference> - <Imported>true</Imported> - <Folder>false</Folder> - </ClassPathEntry> - <CloudModelUuid>ebade042-5518-4162-8eb5-f55439c67c64</CloudModelUuid> - <ModelResources> - <Resource> - <Id>1658477089983</Id> - <Path>Export_ModelData.xlsx</Path> - <ReferencedFromUserCode>true</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183265</Id> - <Path>icon_greater_than.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183266</Id> - <Path>icon_i.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183267</Id> - <Path>icon_loading.gif</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183268</Id> - <Path>load_icon.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183270</Id> - <Path>logo_lux-energy-twin.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183271</Id> - <Path>logo_TUe_red.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183272</Id> - <Path>logo_TUe_white.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183274</Id> - <Path>lombok.jar</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183275</Id> - <Path>noun-car-1777731.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183276</Id> - <Path>noun-electricity-3408805.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183277</Id> - <Path>noun-fire-2429630.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183279</Id> - <Path>save_icon.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756975183289</Id> - <Path>vallum-production-741-d257d2f-all.jar</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756980508229</Id> - <Path>data_Generic/inputECookerPatterns.csv</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756980508234</Id> - <Path>data_Generic/AlbatrossProcessedVehicleTrips.csv</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1756980508238</Id> - <Path>data_Generic/inputTruckTripPatterns.csv</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1761557538487</Id> - <Path>logo_zenmo.png</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - <Resource> - <Id>1762182388058</Id> - <Path>uplux-3.jar</Path> - <ReferencedFromUserCode>false</ReferencedFromUserCode> - <Location>FILE_SYSTEM</Location> - </Resource> - </ModelResources> - </Model> - <ConvertersApplied> - <Uuid>9f7858c9-b2c8-4ead-9244-fd08833f642b</Uuid> - <Uuid>404652e6-561a-404c-aab2-ab7415f40ef5</Uuid> - <Uuid>6fd6cd57-6dfe-4fc6-be0b-c74065351957</Uuid> - <Uuid>3325dc48-3ad4-41e3-836f-dfd0e98fe1ed</Uuid> - <Uuid>3f69ef3d-706e-41a6-8af0-11658c5eef68</Uuid> - <Uuid>3f6fe405-e047-4304-91d6-6eee206d1106</Uuid> - <Uuid>820d2b51-5b4a-48e7-b0b6-e46418e3c0f2</Uuid> - <Uuid>630818fa-8975-4b70-976f-03180dce01db</Uuid> - <Uuid>7c7e471c-004e-495e-a4ad-d840620ab38e</Uuid> - <Uuid>3e38ff63-1f70-4ec0-b42c-e879b146785d</Uuid> - <Uuid>b1eb86e4-14b3-405c-8257-56b80f1b485d</Uuid> - <Uuid>d55f9fb6-86bb-45ea-9db1-79cecfa0ce91</Uuid> - <Uuid>ab77aafd-8f02-4354-b789-928d45b1f73c</Uuid> - <Uuid>e4f14fd7-1c4a-42e9-b91d-db2415f475db</Uuid> - <Uuid>6d208120-6c7a-45a6-b411-402f18890d9b</Uuid> - <Uuid>1816cdd0-177c-4973-9e88-dd8b95318556</Uuid> - <Uuid>5c23f62f-06dc-46ad-8ead-688ec434e3e5</Uuid> - <Uuid>5c7d7990-3f35-41eb-ae16-d0c16098acc6</Uuid> - <Uuid>02a16c52-a834-4f30-b6af-a6aee51a294e</Uuid> - <Uuid>f0988929-2718-4984-a1b6-c1f2ce152f1f</Uuid> - <Uuid>1c9d9cfe-ea2b-43f9-8f62-dc31d8ed3ae1</Uuid> - <Uuid>34cb742a-8ba4-47a7-87e6-f2685fe69e97</Uuid> - <Uuid>4fe10751-c399-4752-94b7-30113ad45070</Uuid> - <Uuid>c13fe5ac-6466-446e-886a-12df1431b1eb</Uuid> - <Uuid>714f9ca2-426e-4bff-8569-2d18f58fdcf8</Uuid> - <Uuid>045aeb5f-1087-4ac7-9702-a49404e7f7e8</Uuid> - <Uuid>840e9a0a-de98-4b7d-a172-f9bbda2d6b98</Uuid> - <Uuid>e342358b-75ed-4812-9376-6043fb6cb473</Uuid> - <Uuid>f3d5ccdc-1bb3-466f-871d-f6b92a26cbb4</Uuid> - <Uuid>59acb6fb-561c-4038-b722-a596a748b3c7</Uuid> - <Uuid>be7e6726-05c0-4228-821d-a8df91aeb5bc</Uuid> - <Uuid>df4a6a60-9ce8-4c6c-91c0-ad5a5d732259</Uuid> - <Uuid>47491eb9-4606-42bd-8399-125a2b95fded</Uuid> - <Uuid>9b2d1306-5d19-439a-8f2c-b144dd7e22fa</Uuid> - <Uuid>ef421152-8732-4f97-9acb-c8e9a6890d5e</Uuid> - <Uuid>d48f8080-25b1-44f5-8322-7bf2712ff974</Uuid> - <Uuid>6c4de826-daad-4cd4-b703-51dfe803e822</Uuid> - <Uuid>01af22d6-6889-4e98-a3df-e6eddc40fc92</Uuid> - <Uuid>ea3b3dbe-cca2-4bde-957b-feaef7e18789</Uuid> - <Uuid>e737c8c6-b526-4f88-b89e-554e205b0614</Uuid> - <Uuid>efd24e87-d7f7-425f-9cb0-3ee17c7b2116</Uuid> - <Uuid>a62607e6-047e-4910-a1ec-5426bf9283b5</Uuid> - <Uuid>64dceb5b-de05-47c7-8e40-e9b293e80d75</Uuid> - <Uuid>8d51c652-6aee-4de8-ba03-47b289a13ec5</Uuid> - <Uuid>51d7b5ce-5664-4750-b1a0-fabcdc31e49a</Uuid> - <Uuid>6522e3af-aa9e-421c-b667-e11db73cd8ca</Uuid> - <Uuid>9ac073a0-7abf-4dff-826f-9c44d4780590</Uuid> - <Uuid>2da9c21c-adc7-405a-a36e-46fbd9dfcd42</Uuid> - <Uuid>fe4d1053-9c84-4221-bac7-cb489a7064ff</Uuid> - <Uuid>1f005f88-e6d7-4bdc-81fa-3acf4c89cf64</Uuid> - <Uuid>42dc5a7c-d7b1-4653-92b9-9359b46cc2d4</Uuid> - <Uuid>e25721a9-34f9-479c-a4c3-31f5ec9e117d</Uuid> - <Uuid>506d1de3-06df-4131-9e88-e43f1768e3d8</Uuid> - <Uuid>e6625695-25a2-43d0-9056-1e9a1a594b1e</Uuid> - <Uuid>91990287-4edf-4e38-aa6c-66d0e906807b</Uuid> - <Uuid>2216cdd0-177c-5678-9e88-dd8b95312234</Uuid> - <Uuid>1737c8c6-b526-4dd8-589e-ee4e205b06f4</Uuid> - <Uuid>6a43bef6-8b70-4253-a828-82c3ab399655</Uuid> - <Uuid>0a27038a-0f3a-48bb-b235-4a44066a1402</Uuid> - </ConvertersApplied> -</AnyLogicWorkspace> diff --git a/_alp/Agents/AVGC_data/Code/Functions.java b/_alp/Agents/AVGC_data/Code/Functions.java index 6f777c1..738aaa7 100644 --- a/_alp/Agents/AVGC_data/Code/Functions.java +++ b/_alp/Agents/AVGC_data/Code/Functions.java @@ -81,5 +81,6 @@ dataAVGC.p_avgAnnualTravelDistanceCompanyCar_km = p_avgAnnualTravelDistanceCompanyCar_km; dataAVGC.p_avgAnnualTravelDistanceVan_km = p_avgAnnualTravelDistanceVan_km; dataAVGC.p_avgAnnualTravelDistanceTruck_km = p_avgAnnualTravelDistanceTruck_km; +dataAVGC.p_minAnnualTravelDistanceSurveyVehicle_km = p_minAnnualTravelDistanceSurveyVehicle_km; /*ALCODEEND*/} diff --git a/_alp/Agents/AVGC_data/Levels/Level.level.xml b/_alp/Agents/AVGC_data/Levels/Level.level.xml index ce9c9b2..23cc7da 100644 --- a/_alp/Agents/AVGC_data/Levels/Level.level.xml +++ b/_alp/Agents/AVGC_data/Levels/Level.level.xml @@ -83,7 +83,7 @@ <Id>1726584205542</Id> <Name><![CDATA[txt_avgCompanies]]></Name> <X>40</X> - <Y>280</Y> + <Y>440</Y> <Label> <X>0</X> <Y>-10</Y> @@ -286,7 +286,7 @@ <Id>1726584205558</Id> <Name><![CDATA[txt_Heatassets]]></Name> <X>40</X> - <Y>470</Y> + <Y>630</Y> <Label> <X>0</X> <Y>-10</Y> @@ -311,7 +311,7 @@ <Id>1726584205560</Id> <Name><![CDATA[txt_avgPV]]></Name> <X>40</X> - <Y>990</Y> + <Y>1150</Y> <Label> <X>0</X> <Y>-10</Y> @@ -336,7 +336,7 @@ <Id>1726584205562</Id> <Name><![CDATA[txt_avgBat]]></Name> <X>40</X> - <Y>1095</Y> + <Y>1255</Y> <Label> <X>0</X> <Y>-10</Y> @@ -386,7 +386,7 @@ <Id>1726584205566</Id> <Name><![CDATA[txt_heatpumps]]></Name> <X>60</X> - <Y>490</Y> + <Y>650</Y> <Label> <X>0</X> <Y>-10</Y> @@ -411,7 +411,7 @@ <Id>1726584205568</Id> <Name><![CDATA[txt_gasburners]]></Name> <X>60</X> - <Y>620</Y> + <Y>780</Y> <Label> <X>0</X> <Y>-10</Y> @@ -436,7 +436,7 @@ <Id>1726584205570</Id> <Name><![CDATA[txt_hydrogenburners]]></Name> <X>60</X> - <Y>710</Y> + <Y>870</Y> <Label> <X>0</X> <Y>-10</Y> @@ -539,7 +539,7 @@ <Id>1726743791200</Id> <Name><![CDATA[text]]></Name> <X>40</X> - <Y>1160</Y> + <Y>1320</Y> <Label> <X>0</X> <Y>-10</Y> @@ -589,7 +589,7 @@ <Id>1745316061345</Id> <Name><![CDATA[txt_CHP]]></Name> <X>60</X> - <Y>800</Y> + <Y>960</Y> <Label> <X>0</X> <Y>-10</Y> @@ -614,7 +614,7 @@ <Id>1747314897311</Id> <Name><![CDATA[txt_districtHeatingDeliverySet]]></Name> <X>60</X> - <Y>890</Y> + <Y>1050</Y> <Label> <X>0</X> <Y>-10</Y> @@ -639,7 +639,7 @@ <Id>1751906160194</Id> <Name><![CDATA[txt_avgHeatBuffer]]></Name> <X>560</X> - <Y>980</Y> + <Y>1020</Y> <Label> <X>0</X> <Y>-10</Y> @@ -664,7 +664,7 @@ <Id>1751906173848</Id> <Name><![CDATA[txt_avgPT]]></Name> <X>560</X> - <Y>900</Y> + <Y>940</Y> <Label> <X>0</X> <Y>-10</Y> @@ -710,4 +710,29 @@ </Font> <Alignment>LEFT</Alignment> </Text> + <Text> + <Id>1768315329120</Id> + <Name><![CDATA[txt_thermalModelParameters]]></Name> + <X>40</X> + <Y>280</Y> + <Label> + <X>0</X> + <Y>-10</Y> + </Label> + <PublicFlag>true</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>false</ShowLabel> + <DrawMode>SHAPE_DRAW_2D</DrawMode> + <EmbeddedIcon>false</EmbeddedIcon> + <Z>0</Z> + <Rotation>0.0</Rotation> + <Color>-16777216</Color> + <Text><![CDATA[Thermal model parameters]]></Text> + <Font> + <Name><![CDATA[SansSerif]]></Name> + <Size>12</Size> + <Style>0</Style> + </Font> + <Alignment>LEFT</Alignment> + </Text> </Presentation> diff --git a/_alp/Agents/AVGC_data/Variables.xml b/_alp/Agents/AVGC_data/Variables.xml index 0c13915..2d51547 100644 --- a/_alp/Agents/AVGC_data/Variables.xml +++ b/_alp/Agents/AVGC_data/Variables.xml @@ -89,7 +89,7 @@ --> 17.25 is way to small -> 3x80 is taken : 55 kW]]></Description> <X>50</X> - <Y>330</Y> + <Y>490</Y> <Label> <X>10</X> <Y>0</Y> @@ -117,7 +117,7 @@ <Id>1726584205588</Id> <Name><![CDATA[p_avgUtilityHeatingMethod]]></Name> <X>50</X> - <Y>310</Y> + <Y>470</Y> <Label> <X>10</X> <Y>0</Y> @@ -1064,7 +1064,7 @@ For now: Picking 3.33 km per l]]></Description> Gemiddelde COP is 4.]]></Description> <X>70</X> - <Y>520</Y> + <Y>680</Y> <Label> <X>10</X> <Y>0</Y> @@ -1093,7 +1093,7 @@ Gemiddelde COP is 4.]]></Description> <Name><![CDATA[p_avgUtilityPVPower_kWp]]></Name> <Description><![CDATA[FIND SOURCE!!! ????????]]></Description> <X>50</X> - <Y>350</Y> + <Y>510</Y> <Label> <X>10</X> <Y>0</Y> @@ -1124,7 +1124,7 @@ Gemiddelde COP is 4.]]></Description> ??? https://nos.nl/artikel/2483604-elektrische-vrachtwagens-blijven-achter-door-complexe-serie-aan-uitdagingen --> 'volgens cbs nog geen half procent.']]></Description> <X>50</X> - <Y>370</Y> + <Y>530</Y> <Label> <X>10</X> <Y>0</Y> @@ -1153,7 +1153,7 @@ https://nos.nl/artikel/2483604-elektrische-vrachtwagens-blijven-achter-door-comp <Name><![CDATA[p_avgCompanyHeatingMethod]]></Name> <Description><![CDATA[Source?? --> Should definatly be still the case in 2024]]></Description> <X>50</X> - <Y>390</Y> + <Y>550</Y> <Label> <X>10</X> <Y>0</Y> @@ -1184,7 +1184,7 @@ https://nos.nl/artikel/2483604-elektrische-vrachtwagens-blijven-achter-door-comp https://www.zonneplan.nl/kenniscentrum/zonnepanelen/vermogen --> 212 W/m2 https://www.zonnepanelennoord.nl/vermogen-zonnepanelen/ --> 215 W/m2]]></Description> <X>50</X> - <Y>1020</Y> + <Y>1180</Y> <Label> <X>10</X> <Y>0</Y> @@ -1214,7 +1214,7 @@ https://www.zonnepanelennoord.nl/vermogen-zonnepanelen/ --> 215 W/m2]]></Descrip <Description><![CDATA[Average ratio of battery capacity over battery power. --> If battery capacity (in kWh) is twice the battery power (in kW) --> ratio = 2.]]></Description> <X>50</X> - <Y>1120</Y> + <Y>1280</Y> <Label> <X>10</X> <Y>0</Y> @@ -1337,7 +1337,7 @@ https://www.zonnepanelennoord.nl/vermogen-zonnepanelen/ --> 215 W/m2]]></Descrip <Name><![CDATA[p_avgRatioRoofPotentialPV]]></Name> <Description><![CDATA[value for the ratio of the avg Usable Roof Area For PV fr]]></Description> <X>50</X> - <Y>1040</Y> + <Y>1200</Y> <Label> <X>10</X> <Y>0</Y> @@ -1368,7 +1368,7 @@ https://www.zonnepanelennoord.nl/vermogen-zonnepanelen/ --> 215 W/m2]]></Descrip '0.5' comes from old code, no source found for it yet.]]></Description> <X>70</X> - <Y>540</Y> + <Y>700</Y> <Label> <X>10</X> <Y>0</Y> @@ -1400,7 +1400,7 @@ https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 gra -> Voor nu gemiddeld 40 genomen.]]></Description> <X>70</X> - <Y>580</Y> + <Y>740</Y> <Label> <X>10</X> <Y>0</Y> @@ -1430,7 +1430,7 @@ https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 gra <Description><![CDATA[Average heating efficiency of a gas burner. https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas energy density of 8.8 kWh/m3 (lower heating value), we use higher heating value: 9.77 -> 8.8*1.04/9.77 = 0.94]]></Description> <X>70</X> - <Y>650</Y> + <Y>810</Y> <Label> <X>10</X> <Y>0</Y> @@ -1461,7 +1461,7 @@ https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas en --> Source?]]></Description> <X>70</X> - <Y>670</Y> + <Y>830</Y> <Label> <X>10</X> <Y>0</Y> @@ -1494,7 +1494,7 @@ https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas en - https://www.csrf.ac.uk/blog/hydrogen-for-heating/]]></Description> <X>70</X> - <Y>740</Y> + <Y>900</Y> <Label> <X>10</X> <Y>0</Y> @@ -1525,7 +1525,7 @@ https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas en --> Source?]]></Description> <X>70</X> - <Y>760</Y> + <Y>920</Y> <Label> <X>10</X> <Y>0</Y> @@ -1553,7 +1553,7 @@ https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas en <Id>1726746753360</Id> <Name><![CDATA[p_avgVehiclesPerChargePoint]]></Name> <X>50</X> - <Y>1190</Y> + <Y>1350</Y> <Label> <X>10</X> <Y>0</Y> @@ -1670,7 +1670,7 @@ https://www.mdpi.com/1999-4893/18/7/416 -> 100-104 % efficiency, based on gas en <Description><![CDATA[Parameter used to estimate the total solar production in a year in a function like: p_avgFullLoadHoursPV_hr * kWp_of_PV_panels = XXX kWh pv production in a year.]]></Description> <X>50</X> - <Y>1060</Y> + <Y>1220</Y> <Label> <X>10</X> <Y>0</Y> @@ -1701,7 +1701,7 @@ p_avgFullLoadHoursPV_hr * kWp_of_PV_panels = XXX kWh pv production in a year.]]> --> 188 kWh/m2 for offices in NL]]></Description> <X>50</X> - <Y>410</Y> + <Y>570</Y> <Label> <X>10</X> <Y>0</Y> @@ -1736,7 +1736,7 @@ to 18 m3 p m2 for label G --> take 7 for now.]]></Description> <X>50</X> - <Y>430</Y> + <Y>590</Y> <Label> <X>10</X> <Y>0</Y> @@ -1767,7 +1767,7 @@ to 18 m3 p m2 for label G --> estimated benchmark 100 kWh/m2]]></Description> <X>50</X> - <Y>450</Y> + <Y>610</Y> <Label> <X>10</X> <Y>0</Y> @@ -1796,7 +1796,7 @@ to 18 m3 p m2 for label G <Name><![CDATA[p_avgSolarFieldPower_kWppha]]></Name> <Description><![CDATA[1000]]></Description> <X>50</X> - <Y>1080</Y> + <Y>1240</Y> <Label> <X>10</X> <Y>0</Y> @@ -1826,7 +1826,7 @@ to 18 m3 p m2 for label G <Description><![CDATA[50% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf]]></Description> <X>70</X> - <Y>830</Y> + <Y>990</Y> <Label> <X>10</X> <Y>0</Y> @@ -1856,7 +1856,7 @@ Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_ <Description><![CDATA[42% -> blijkt uit aangeleverde data door "kas als energiebron". (https://www.kasalsenergiebron.nl/) Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_Rapport_WKK_Barometer_2023.pdf]]></Description> <X>70</X> - <Y>850</Y> + <Y>1010</Y> <Label> <X>10</X> <Y>0</Y> @@ -1887,7 +1887,7 @@ Ook te vinden hier: https://www.kasalsenergiebron.nl/content/nieuws/2023/E22001_ --> Source?]]></Description> <X>70</X> - <Y>870</Y> + <Y>1030</Y> <Label> <X>10</X> <Y>0</Y> @@ -1919,7 +1919,7 @@ Set as 0.8 to account for the losses of the heatgrid, as they are not yet part o https://www.grundfos.com/nl/learn/research-and-insights/pipe-heat-loss https://www.klimaat030.nl/warmteverlies-van-stadsverwarming-gigantisch/]]></Description> <X>70</X> - <Y>920</Y> + <Y>1080</Y> <Label> <X>10</X> <Y>0</Y> @@ -1950,7 +1950,7 @@ https://www.klimaat030.nl/warmteverlies-van-stadsverwarming-gigantisch/]]></Desc 70 -> https://www.nplw.nl/warmtenet/warmtetechnieken/middentemperatuur-warmtenet]]></Description> <X>70</X> - <Y>940</Y> + <Y>1100</Y> <Label> <X>10</X> <Y>0</Y> @@ -2037,7 +2037,7 @@ https://www.klimaat030.nl/warmteverlies-van-stadsverwarming-gigantisch/]]></Desc <Name><![CDATA[p_avgEVsPerPublicCharger]]></Name> <Description><![CDATA[TODO: Determine this value]]></Description> <X>570</X> - <Y>860</Y> + <Y>900</Y> <Label> <X>10</X> <Y>0</Y> @@ -2065,7 +2065,7 @@ https://www.klimaat030.nl/warmteverlies-van-stadsverwarming-gigantisch/]]></Desc <Id>1751893521012</Id> <Name><![CDATA[p_avgPTPower_kWpm2]]></Name> <X>570</X> - <Y>930</Y> + <Y>970</Y> <Label> <X>10</X> <Y>0</Y> @@ -2094,7 +2094,7 @@ https://www.klimaat030.nl/warmteverlies-van-stadsverwarming-gigantisch/]]></Desc <Name><![CDATA[p_avgHeatBufferWaterVolumePerHPPower_m3pkW]]></Name> <Description><![CDATA[https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 25 liter per kW warmtepomp vermogen = 0.025 m3/kW]]></Description> <X>570</X> - <Y>1080</Y> + <Y>1120</Y> <Label> <X>10</X> <Y>0</Y> @@ -2123,7 +2123,7 @@ https://www.klimaat030.nl/warmteverlies-van-stadsverwarming-gigantisch/]]></Desc <Name><![CDATA[p_avgHeatBufferWaterVolumePerPTSurface_m3pm2]]></Name> <Description><![CDATA[https://www.kachelplaats.nl/buffervaten-cv-houtkachels/ -> 50 liter per m2 zonnecollector = 0.050 m3/m2]]></Description> <X>570</X> - <Y>1060</Y> + <Y>1100</Y> <Label> <X>10</X> <Y>0</Y> @@ -2215,7 +2215,7 @@ Voor nu gekozen voor 4185. <Name><![CDATA[p_avgMaxHeatBufferTemperature_degC]]></Name> <Description><![CDATA[???]]></Description> <X>570</X> - <Y>1010</Y> + <Y>1050</Y> <Label> <X>10</X> <Y>0</Y> @@ -2243,7 +2243,7 @@ Voor nu gekozen voor 4185. <Id>1751906126857</Id> <Name><![CDATA[p_avgMinHeatBufferTemperature_degC]]></Name> <X>570</X> - <Y>1030</Y> + <Y>1070</Y> <Label> <X>10</X> <Y>0</Y> @@ -2272,7 +2272,7 @@ Voor nu gekozen voor 4185. <Name><![CDATA[p_avgPTPanelSize_m2]]></Name> <Description><![CDATA[https://www.econo.nl/m24hpcpc-400-h2-heatpipe-zonnecollector-prisma-pro-24-cpc -> +- 4 m2]]></Description> <X>570</X> - <Y>950</Y> + <Y>990</Y> <Label> <X>10</X> <Y>0</Y> @@ -2301,7 +2301,7 @@ Voor nu gekozen voor 4185. <Name><![CDATA[p_avgRatioHouseBatteryStorageCapacity_v_PVPower]]></Name> <Description><![CDATA[https://www.essent.nl/thuisbatterij/capaciteit-thuisbatterij : Essent: "Over het algemeen kun je ervan uitgaan dat een thuisbatterij zo'n 1 à 1,5 kWh capaciteit nodig heeft per kWp zonnepanelen vermogen. " ]]></Description> <X>50</X> - <Y>1140</Y> + <Y>1300</Y> <Label> <X>10</X> <Y>0</Y> @@ -2455,7 +2455,7 @@ https://www.dewarmte.nl/all-electric-warmtepomp/ -> thermisch vermogen van 2-8 k -> (4+5+2)/3 -> Gemiddeld ongeveer 3.6 thermisch-> 3.6/3 = 1.2 elektrisch]]></Description> <X>70</X> - <Y>600</Y> + <Y>760</Y> <Label> <X>10</X> <Y>0</Y> @@ -2484,7 +2484,7 @@ https://www.dewarmte.nl/all-electric-warmtepomp/ -> thermisch vermogen van 2-8 k <Name><![CDATA[p_minGasBurnerOutputCapacity_kW]]></Name> <Description><![CDATA[https://www.warmteservice.nl/Verwarming/CV-ketel/HR-Combiketel/c/163 -> Minimum ranged van 4 - 7.8 -> gekozen voor 6 ]]></Description> <X>70</X> - <Y>690</Y> + <Y>850</Y> <Label> <X>10</X> <Y>0</Y> @@ -2513,7 +2513,7 @@ https://www.dewarmte.nl/all-electric-warmtepomp/ -> thermisch vermogen van 2-8 k <Name><![CDATA[p_minHydrogenBurnerOutputCapacity_kW]]></Name> <Description><![CDATA[Zelfde gekozen als gasbrander.]]></Description> <X>70</X> - <Y>780</Y> + <Y>940</Y> <Label> <X>10</X> <Y>0</Y> @@ -2542,7 +2542,7 @@ https://www.dewarmte.nl/all-electric-warmtepomp/ -> thermisch vermogen van 2-8 k <Name><![CDATA[p_minDistrictHeatingDeliverySetOutputCapacity_kW]]></Name> <Description><![CDATA[25 kw is a default set: https://www.acm.nl/nl/energie/warmte-en-koude/warmtetarieven/tarieven-warmte-en-koude]]></Description> <X>70</X> - <Y>960</Y> + <Y>1120</Y> <Label> <X>10</X> <Y>0</Y> @@ -2569,12 +2569,12 @@ https://www.dewarmte.nl/all-electric-warmtepomp/ -> thermisch vermogen van 2-8 k <Variable Class="Parameter"> <Id>1763396237774</Id> <Name><![CDATA[p_avgOutputTemperatureHybridHeatpump_degC]]></Name> - <Description><![CDATA[https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/?utm_source=chatgpt.com - max 45-55 -https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 graden afgifte bij -10 graden. + <Description><![CDATA[https://www.milieucentraal.nl/energie-besparen/duurzaam-verwarmen-en-koelen/volledige-warmtepomp/? -> max 45-55 +https://warmtepomp-panel.nl/afgiftesysteem.html? -> 35 graden afgifte bij -10 graden. --> Voor nu gemiddeld 40 genomen.]]></Description> +-> Voor nu gemiddeld 45 genomen.]]></Description> <X>70</X> - <Y>560</Y> + <Y>720</Y> <Label> <X>10</X> <Y>0</Y> @@ -2587,7 +2587,7 @@ https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 gra <UnitType>NONE</UnitType> <SdArray>false</SdArray> <DefaultValue Class="CodeValue"> - <Code><![CDATA[40]]></Code> + <Code><![CDATA[45]]></Code> </DefaultValue> <ParameterEditor> <Id>1763396237772</Id> @@ -2598,4 +2598,126 @@ https://warmtepomp-panel.nl/afgiftesysteem.html?utm_source=chatgpt.com -> 35 gra </ParameterEditor> </Properties> </Variable> + <Variable Class="Parameter"> + <Id>1768313557052</Id> + <Name><![CDATA[p_minAnnualTravelDistanceSurveyVehicle_km]]></Name> + <X>570</X> + <Y>840</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type><![CDATA[double]]></Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code><![CDATA[1000]]></Code> + </DefaultValue> + <ParameterEditor> + <Id>1768313557050</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1768313716401</Id> + <Name><![CDATA[p_PBL_HeatingLossFactor]]></Name> + <Description><![CDATA[Manually calibrated value tested on 3 neighborhoods to get the total nbh yearly total to match with the expected outcome.]]></Description> + <X>50</X> + <Y>310</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type><![CDATA[double]]></Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code><![CDATA[67.0]]></Code> + </DefaultValue> + <ParameterEditor> + <Id>1768313716399</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1768314112512</Id> + <Name><![CDATA[map_energyLabel_lossfactorPerFloorSurface_WpKm2]]></Name> + <X>50</X> + <Y>330</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type><![CDATA[Map<OL_GridConnectionIsolationLabel, Double>]]></Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code><![CDATA[Map.of( +OL_GridConnectionIsolationLabel.A, 0.35, +OL_GridConnectionIsolationLabel.B, 0.45, +OL_GridConnectionIsolationLabel.C, 0.65, +OL_GridConnectionIsolationLabel.D, 0.85, +OL_GridConnectionIsolationLabel.E, 1.05, +OL_GridConnectionIsolationLabel.F, 1.25, +OL_GridConnectionIsolationLabel.G, 1.45 +) +]]></Code> + </DefaultValue> + <ParameterEditor> + <Id>1768314112510</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> + <Variable Class="Parameter"> + <Id>1768314894157</Id> + <Name><![CDATA[p_solarAbsorptionFloorSurfaceScalingFactor_fr]]></Name> + <X>50</X> + <Y>350</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" ModificatorType="STATIC"> + <Type><![CDATA[double]]></Type> + <UnitType>NONE</UnitType> + <SdArray>false</SdArray> + <DefaultValue Class="CodeValue"> + <Code><![CDATA[0.01]]></Code> + </DefaultValue> + <ParameterEditor> + <Id>1768314894155</Id> + <EditorContolType>TEXT_BOX</EditorContolType> + <MinSliderValue>0</MinSliderValue> + <MaxSliderValue>100</MaxSliderValue> + <DelimeterType>NO_DELIMETER</DelimeterType> + </ParameterEditor> + </Properties> + </Variable> </Variables> diff --git a/_alp/Agents/Zero_Loader/AOC.Zero_Loader.xml b/_alp/Agents/Zero_Loader/AOC.Zero_Loader.xml index a87eb76..eb3812d 100644 --- a/_alp/Agents/Zero_Loader/AOC.Zero_Loader.xml +++ b/_alp/Agents/Zero_Loader/AOC.Zero_Loader.xml @@ -149,7 +149,7 @@ import java.util.UUID;]]></Import> <Id>1756980503493</Id> <Name><![CDATA[inputCSVcookingActivities]]></Name> <X>-369</X> - <Y>759</Y> + <Y>784</Y> <Label> <X>10</X> <Y>0</Y> @@ -171,7 +171,7 @@ import java.util.UUID;]]></Import> <Id>1756980506290</Id> <Name><![CDATA[inputCSVhouseholdTrips]]></Name> <X>-369</X> - <Y>799</Y> + <Y>824</Y> <Label> <X>10</X> <Y>0</Y> @@ -193,7 +193,7 @@ import java.util.UUID;]]></Import> <Id>1756980507645</Id> <Name><![CDATA[inputCSVtruckTrips]]></Name> <X>-369</X> - <Y>779</Y> + <Y>804</Y> <Label> <X>10</X> <Y>0</Y> @@ -288,7 +288,7 @@ import java.util.UUID;]]></Import> <PresentationFlag>true</PresentationFlag> <ShowLabel>false</ShowLabel> <Title/> - <Width>1920</Width> + <Width>2200</Width> <Height>980</Height> </Area> </Areas> diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index 789a8b4..7eacfe9 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -236,13 +236,6 @@ else if(RegionCoords.startsWith("LineString")){ double f_importExcelTablesToDB() {/*ALCODESTART::1726584205779*/ -//inputHouseholdTrips.readFile(); -//inputCookingActivities.readFile(); -//inputTruckTrips.readFile(); - -//inputCSVcookingActivities.readFile(); -//inputCSVcookingActivities. - if(settings.reloadDatabase()){ //Get the database names that are selected for reloading @@ -1392,7 +1385,7 @@ J_EAEV f_addElectricVehicle(GridConnection parentGC,OL_EnergyAssetType vehicle_t //Create the EV vehicle energy asset with the set parameters + links J_EAEV electricVehicle = new J_EAEV(parentGC, capacityElectricity_kW, storageCapacity_kWh, stateOfCharge_fr, timestep_h, energyConsumption_kWhpkm, vehicleScaling, vehicle_type, null); -if (!isDefaultVehicle && annualTravelDistance_km > 1000){ +if (!isDefaultVehicle && annualTravelDistance_km > avgc_data.p_minAnnualTravelDistanceSurveyVehicle_km){ electricVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); } else if (vehicle_type == OL_EnergyAssetType.ELECTRIC_VAN){ @@ -1427,7 +1420,7 @@ J_EAPetroleumFuelVehicle f_addPetroleumFuelVehicle(GridConnection parentGC,OL_En J_EAPetroleumFuelVehicle petroleumFuelVehicle = new J_EAPetroleumFuelVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); //Set annual travel distance -if (!isDefaultVehicle && annualTravelDistance_km > 1000){ +if (!isDefaultVehicle && annualTravelDistance_km > avgc_data.p_minAnnualTravelDistanceSurveyVehicle_km){ petroleumFuelVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); } else if (vehicle_type == OL_EnergyAssetType.PETROLEUM_FUEL_VAN){ @@ -1653,7 +1646,7 @@ else if (vehicle_type == OL_EnergyAssetType.PETROLEUM_FUEL_VAN){ J_EAHydrogenVehicle hydrogenVehicle = new J_EAHydrogenVehicle(parentGC, energyConsumption_kWhpkm, energyModel.p_timeStep_h, vehicleScaling, vehicle_type, null); //Set annual travel distance -if (!isDefaultVehicle && annualTravelDistance_km > 1000){ +if (!isDefaultVehicle && annualTravelDistance_km > avgc_data.p_minAnnualTravelDistanceSurveyVehicle_km){ hydrogenVehicle.tripTracker.setAnnualDistance_km(annualTravelDistance_km); } else if (vehicle_type == OL_EnergyAssetType.HYDROGEN_VAN){ @@ -2047,20 +2040,19 @@ String f_createChargerPolygon(double lat,double lon) /* genericProfiles_data = null; -c_GridNode_data.clear(); -c_SurveyCompanyBuilding_data.clear(); -c_GenericCompanyBuilding_data.clear(); -c_HouseBuilding_data.clear(); +c_gridNode_data.clear(); +c_companyBuilding_data.clear(); +c_houseBuilding_data.clear(); c_remainingBuilding_data.clear(); -c_Solarfarm_data.clear(); -c_Windfarm_data.clear(); -c_Electrolyser_data.clear(); -c_Battery_data.clear(); -c_Chargingstation_data.clear(); -c_Neighbourhood_data.clear(); -c_Parcel_data.clear(); -c_Cable_data_LV.clear(); -c_Cable_data_MV.clear(); +c_solarfarm_data.clear(); +c_windfarm_data.clear(); +c_electrolyser_data.clear(); +c_battery_data.clear(); +c_chargingstation_data.clear(); +c_neighbourhood_data.clear(); +c_parkingSpace_data.clear(); +c_parcel_data.clear(); +c_cable_data.clear(); */ /*ALCODEEND*/} @@ -3376,48 +3368,34 @@ else if (surface_m2 > 50){ double heatCapacity_JpK; //hoeveel lucht zit er in je huis dat je moet verwarmen? double solarAbsorptionFactor_m2; //hoeveel m2 effectieve dak en muur oppervlakte er is dat opwarmt door zonneinstraling -//Heat demand from PBL referentiewoningen used for HeatCapacity and lossFactor_WpK -if(heatDemand_kwhpa > 0){ //Not missing in data - lossfactor_WpK = heatDemand_kwhpa / 67; // = manually calibrated value tested on 3 neighborhoods +//Determine the heat loss factor based on yearly energy energy consumption for heating or energyLabel +if(heatDemand_kwhpa > 0){ + lossfactor_WpK = roundToDecimal(heatDemand_kwhpa / avgc_data.p_PBL_HeatingLossFactor , 2); } else{ switch (parentGC.p_energyLabel){ - case A: - lossfactor_WpK = 0.35 * floorArea_m2; - break; - case B: - lossfactor_WpK = 0.45 * floorArea_m2; - break; - case C: - lossfactor_WpK = 0.65 * floorArea_m2; - break; - case D: - lossfactor_WpK = 0.85 * floorArea_m2; - break; - case E: - lossfactor_WpK = 1.05 * floorArea_m2; - break; - case F: - lossfactor_WpK = 1.25 * floorArea_m2; - break; - case G: - lossfactor_WpK = 1.45 * floorArea_m2; - break; case NONE: case UNKNOWN: + lossfactor_WpK = uniform (avgc_data.map_energyLabel_lossfactorPerFloorSurface_WpKm2.get(OL_GridConnectionIsolationLabel.D), avgc_data.map_energyLabel_lossfactorPerFloorSurface_WpKm2.get(OL_GridConnectionIsolationLabel.G)) * floorArea_m2; + break; default: - lossfactor_WpK = uniform (0.85, 1.2) * floorArea_m2; + lossfactor_WpK = avgc_data.map_energyLabel_lossfactorPerFloorSurface_WpKm2.get(parentGC.p_energyLabel); } } -lossfactor_WpK = roundToDecimal(lossfactor_WpK,2); -solarAbsorptionFactor_m2 = floorArea_m2 * 0.01; //solar irradiance [W/m2] - -heatCapacity_JpK = ((25000 * 100) + floorArea_m2 * 25000) * 5; //oud 50k was te groot verschil per floor area, 100 is avg floor area deel fixed, 2de deel o.b.v. floor area +//Determine the solar absortion factor_m2 based on floor surface. +solarAbsorptionFactor_m2 = floorArea_m2 * avgc_data.p_solarAbsorptionFloorSurfaceScalingFactor_fr; //solar irradiance [W/m2] +//Determine the heat capacity of the building based on the floor surface +heatCapacity_JpK = ((25000 * 100) + floorArea_m2 * 25000) * 5; //oud 50k was te groot verschil per floor area, 100 is avg floor area deel fixed, 2de deel o.b.v. floor area + +//Create the thermal building asset parentGC.p_BuildingThermalAsset = new J_EABuilding( parentGC, maxPowerHeat_kW, lossfactor_WpK, energyModel.p_timeStep_h, initialTemp, heatCapacity_JpK, solarAbsorptionFactor_m2 ); energyModel.c_ambientDependentAssets.add( parentGC.p_BuildingThermalAsset ); + + + //FOR NOW DEFAULT NO INTERIOR/EXTERIOR HEAT BUFFERS -> NOT NECESSARY /* double delayHeatReleaseInteriorHeatsink_hr = 0; @@ -3490,6 +3468,7 @@ List<Building_data> f_getBuildingsInSubScope(List<Building_data> initialBuilding //For PBL heating if(houseBuildingData.pbl_data_available()){ + GCH.p_PBLParameters = new J_PBLParameters() GCH.p_constructionPeriod_heatingPBL = houseBuildingData.constructionPeriod_int(); GCH.p_schillabel_heatingPBL = houseBuildingData.energy_label(); GCH.p_buildingType_heatingPBL = houseBuildingData.buildingType_int(); @@ -3643,14 +3622,20 @@ else if (GCH.p_bouwjaar < 2008) { double maxHeatOutputPower_kW = house.p_BuildingThermalAsset.getLossFactor_WpK() * maximalTemperatureDifference_K / 1000; -//Add heat demand profile +//Add heating asset and management OL_GridConnectionHeatingType heatingType = avgc_data.p_avgHouseHeatingMethod; f_addHeatAsset(house, heatingType, maxHeatOutputPower_kW); house.f_addHeatManagement(heatingType, false); house.f_setHeatingPreferences(f_getHouseHeatingPreferences()); //Add hot water and cooking demand -f_addHotWaterDemand(house, house.p_floorSurfaceArea_m2, dhwDemand_kwhpa); +//Get +if(house.p) +PBL_DHWAndCooking_data DHWAndCookingDataObject = f_getPBLObject_DHWAndCooking(constructionPeriod, floorSurfaceArea_m2, householdSize); +double hotWaterDemand_kWhpa = DHWAndCookingDataObject.dhw_gas_demand_m3pa() * avgc_data.p_gas_kWhpm3; +double cookingDemand_kWhpa = DHWAndCookingDataObject.cooking_gas_demand_m3pa() * avgc_data.p_gas_kWhpm3; + +f_addHotWaterDemand(house, house.p_floorSurfaceArea_m2, hotWaterDemand_kWhpa); f_addCookingAsset(house, OL_EnergyAssetType.GAS_PIT, cookingDemand_kwhpa); @@ -4972,3 +4957,152 @@ OL_GISObjectType f_getNBHGISObjectType(GIS_Object NBH,String NBHCode,OL_GISObjec } /*ALCODEEND*/} +double f_getSpaceHeatingDemand_PBL_kWh(double floorSurfaceArea_m2,PBL_SpaceHeating_data spaceHeatingObjectPBL,double localFactor,double regionalClimateCorrectionFactor) +{/*ALCODESTART::1768308906995*/ +double slope_GJpm2pa = spaceHeatingObjectPBL.slope_space_heating_gjpm2a(); +double constant_GJpa = spaceHeatingObjectPBL.constant_space_heating_gjpa(); + +// space heating demand +double functionalSpaceHeatingDemand_GJpa = floorSurfaceArea_m2 * slope_GJpm2pa + constant_GJpa; + +// Multiply final factors: +double GJtokWh = 1e9 / 3.6e6; // GJ is 1e9J, kWh is 3.6e6J +double functionalSpaceHeatingDemand_kWh = functionalSpaceHeatingDemand_GJpa * GJtokWh * localFactor * regionalClimateCorrectionFactor ; +return functionalSpaceHeatingDemand_kWh; +/*ALCODEEND*/} + +double f_getHeatDemand_PBL1(OL_PBL_BuildingType buildingType,OL_PBL_ConstructionPeriod constructionPeriod,OL_PBL_OwnershipType ownership,OL_GridConnectionIsolationLabel energyLabel,double surfaceArea_m2,double localFactor,double regionalClimateCorrectionFactor) +{/*ALCODESTART::1768317546933*/ +String schillabel; + +int population; +if (energyLabel == null || energyLabel == OL_GridConnectionIsolationLabel.NONE){ // || schillabel.isEmpty() || schillabel.equals("x")) { // If label unknown - this is based on PBL + schillabel = "x"; + population = 3; +} else { + schillabel = energyLabel.toString(); + if( buildingType == 1){ //If vrijstaand huis + population = 2; + } else { + population = 1; + } +} + +List<Tuple> rows = selectFrom(reg_coef_space_heating_demand) + .where(reg_coef_space_heating_demand.woningtype.eq(buildingType)) + .where(reg_coef_space_heating_demand.bouwperiode.eq(constructionPeriod)) + .where(reg_coef_space_heating_demand.eigendomstype.eq(ownership)) + .where(reg_coef_space_heating_demand.schillabel.eq(schillabel)) + .where(reg_coef_space_heating_demand.population.eq(population)) + .list(); + +// Check for no rows +if (rows.isEmpty() || rows.size() > 1) { + System.out.println("Error: no matching row found with conditions:"); + System.out.println(" woningtype = " + buildingType); + System.out.println(" bouwperiode = " + constructionPeriod); + System.out.println(" eigendom = " + ownership); + System.out.println(" schillabel = " + schillabel); + System.out.println(" population = " + population); + throw new RuntimeException("No matching row found!"); +} + +Tuple row = rows.get(0); +double slope_GJpm2pa = row.get(reg_coef_space_heating_demand.helling); +double constant_GJpa = row.get(reg_coef_space_heating_demand.constante); +double inhabitants = row.get(reg_coef_space_heating_demand.) +// space heating demand +double functionalSpaceHeatingDemand_GJpa = surfaceArea_m2 * slope_GJpm2pa + constant_GJpa; + +// Multiply final factors: +double GJtokWh = 1e9 / 3.6e6; // GJ is 1e9J, kWh is 3.6e6J +double functionalSpaceHeatingDemand_kWh = functionalSpaceHeatingDemand_GJpa * GJtokWh * localFactor * regionalClimateCorrectionFactor ; +return functionalSpaceHeatingDemand_kWh; + +/*ALCODEEND*/} + +PBL_SpaceHeating_data f_getPBLObject_spaceHeating(OL_PBL_BuildingType buildingType,OL_PBL_ConstructionPeriod constructionPeriod,OL_PBL_OwnershipType ownershipType,OL_GridConnectionIsolationLabel insulationLabel) +{/*ALCODESTART::1768319865034*/ +String schillabel; + +PBL_SpaceHeating_data PBLObject_spaceHeating = findFirst(c_lookupTablePBL_spaceHeating, pbl -> pbl.building_type() == buildingType && + pbl.construction_period() == constructionPeriod && + pbl.ownership_type() == ownershipType && + pbl.insulation_label() == insulationLabel + ); + +// Check for no rows +if (PBLObject_spaceHeating == null) { + System.out.println("Error: no matching pbl object found for spaceheating with conditions:"); + System.out.println(" buildingType = " + buildingType); + System.out.println(" constructionPeriod = " + constructionPeriod); + System.out.println(" ownershipType = " + ownershipType); + System.out.println(" insulationLabel = " + insulationLabel); + throw new RuntimeException("No matching PBL object found!"); +} + +return PBLObject_spaceHeating; +/*ALCODEEND*/} + +PBL_DHWAndCooking_data f_getPBLObject_DHWAndCooking(OL_PBL_ConstructionPeriod constructionPeriod,double floorSurfaceArea_m2,int householdSize) +{/*ALCODESTART::1768319890191*/ +int surfaceCode = f_getTNOSurfaceCode(floorSurfaceArea_m2); + +PBL_DHWAndCooking_data PBLObject_DHWAndCooking = findFirst(c_lookupTablePBL_DHWAndCooking, pbl -> pbl.construction_period() == constructionPeriod && + pbl.surface_code() == surfaceCode && + pbl.household_size() == householdSize); + +// Check for no matches +if (PBLObject_DHWAndCooking == null) { + System.out.println("Error: no matching PBL object found for PBL DHW and Cooking demand with conditions:"); + System.out.println(" constructionPeriod = " + constructionPeriod); + System.out.println(" floorSurfaceArea_m2 = " + floorSurfaceArea_m2); + System.out.println(" surfaceCode = " + surfaceCode); + System.out.println(" householdSize = " + householdSize); + throw new RuntimeException("No matching PBL object found!"); // Misschien wat een te harde error? + // Hij kan altijd nog terug vallen op de backup toch? +} + +return PBLObject_DHWAndCooking; +/*ALCODEEND*/} + +int f_getTNOSurfaceCode(double surfaceArea_m2) +{/*ALCODESTART::1768321972904*/ +if(surfaceArea_m2 < 75){ + return 1; +} +else if(75 <= surfaceArea_m2 && surfaceArea_m2 < 100){ + return 2; +} +else if(100 <= surfaceArea_m2 && surfaceArea_m2 < 125){ + return 3; +} +else if(125 <= surfaceArea_m2 && surfaceArea_m2 < 150){ + return 4; +} +else{// if(surfaceArea_m2 > 150){ + return 5; +} +/*ALCODEEND*/} + +double f_modelPopBackup() +{/*ALCODESTART::1768322522139*/ +int population; +if (energyLabel == null || energyLabel == OL_GridConnectionIsolationLabel.NONE){ // || schillabel.isEmpty() || schillabel.equals("x")) { // If label unknown - this is based on PBL + schillabel = "x"; + population = 3; +} else { + schillabel = energyLabel.toString(); + if( buildingType == 1){ //If vrijstaand huis + population = 2; + } else { + population = 1; + } +} +/*ALCODEEND*/} + +double f_addHeatingToHouses() +{/*ALCODESTART::1768324153032*/ + +/*ALCODEEND*/} + diff --git a/_alp/Agents/Zero_Loader/Code/Functions.xml b/_alp/Agents/Zero_Loader/Code/Functions.xml index c9d32d6..6f3ce9a 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.xml +++ b/_alp/Agents/Zero_Loader/Code/Functions.xml @@ -6,8 +6,8 @@ <Id>1726584205769</Id> <Name><![CDATA[f_createGISRegions]]></Name> <Description><![CDATA[Creates the outline of the simulated area]]></Description> - <X>1546.739</X> - <Y>539</Y> + <X>1786.739</X> + <Y>569</Y> <Label> <X>10</X> <Y>0</Y> @@ -76,8 +76,8 @@ <ReturnType>double[]</ReturnType> <Id>1726584205777</Id> <Name><![CDATA[f_createGISObjectTokens]]></Name> - <X>1565.241</X> - <Y>680</Y> + <X>1805.241</X> + <Y>710</Y> <Label> <X>10</X> <Y>0</Y> @@ -122,7 +122,7 @@ <Name><![CDATA[f_createSolarParks]]></Name> <Description><![CDATA[Function used to generate solar parks: grid connections and park owner (connection owner actor)]]></Description> <X>430.001</X> - <Y>790.001</Y> + <Y>770.001</Y> <Label> <X>10</X> <Y>0</Y> @@ -139,7 +139,7 @@ <Name><![CDATA[f_createBatteries]]></Name> <Description><![CDATA[Function used to create (neighborhood) battery grid connection and actor]]></Description> <X>430.001</X> - <Y>930</Y> + <Y>910</Y> <Label> <X>10</X> <Y>0</Y> @@ -156,7 +156,7 @@ <Name><![CDATA[f_createElectrolysers]]></Name> <Description><![CDATA[Function used to create electrolyser grid connections and actors]]></Description> <X>430</X> - <Y>910</Y> + <Y>890</Y> <Label> <X>10</X> <Y>0</Y> @@ -173,7 +173,7 @@ <Name><![CDATA[f_createWindFarms]]></Name> <Description><![CDATA[Function used to create all windfarm grid connections, actors, EAs and GISObjects]]></Description> <X>430.001</X> - <Y>810</Y> + <Y>790</Y> <Label> <X>10</X> <Y>0</Y> @@ -227,7 +227,7 @@ <Name><![CDATA[f_createGenericCompanies]]></Name> <Description><![CDATA[Creating the companies (using a single GC) + owned buildings, that have not filled in the survey. If created, they will be simulated using average values, scaled with the totals (CBS data) of the area.]]></Description> <X>430</X> - <Y>533</Y> + <Y>553</Y> <Label> <X>10</X> <Y>0</Y> @@ -243,8 +243,8 @@ <Id>1726584205801</Id> <Name><![CDATA[f_createGISBuilding]]></Name> <Description><![CDATA[Creates the GIS object(s) building(s) for the companies and houses]]></Description> - <X>1547.621</X> - <Y>600</Y> + <X>1787.621</X> + <Y>630</Y> <Label> <X>10</X> <Y>0</Y> @@ -267,8 +267,8 @@ <ReturnType>double</ReturnType> <Id>1726584205803</Id> <Name><![CDATA[f_addElectricityDemandProfile]]></Name> - <X>900</X> - <Y>110</Y> + <X>1320</X> + <Y>100</Y> <Label> <X>10</X> <Y>0</Y> @@ -304,8 +304,8 @@ <Id>1726584205807</Id> <Name><![CDATA[f_createGISParcels]]></Name> <Description><![CDATA[Creates "empty" parcels on the gismap, these parcels do not contain buildings or gridconnections. Currently no need for the function to return the GIS_Object.]]></Description> - <X>1547.621</X> - <Y>620</Y> + <X>1787.621</X> + <Y>650</Y> <Label> <X>10</X> <Y>0</Y> @@ -320,8 +320,8 @@ <ReturnType>double</ReturnType> <Id>1726584205809</Id> <Name><![CDATA[f_addEnergyProduction]]></Name> - <X>900</X> - <Y>200</Y> + <X>1320</X> + <Y>190</Y> <Label> <X>10</X> <Y>0</Y> @@ -353,8 +353,8 @@ <Id>1726584205811</Id> <Name><![CDATA[f_createGISObject]]></Name> <Description><![CDATA[Creates the GIS object for the area EA (windfarms, solarparks, electrolysers, batteries, etc.)]]></Description> - <X>1547.621</X> - <Y>580</Y> + <X>1787.621</X> + <Y>610</Y> <Label> <X>10</X> <Y>0</Y> @@ -462,8 +462,8 @@ <ReturnType>J_EAEV</ReturnType> <Id>1726584205827</Id> <Name><![CDATA[f_addElectricVehicle]]></Name> - <X>900</X> - <Y>740</Y> + <X>1320</X> + <Y>650</Y> <Label> <X>10</X> <Y>0</Y> @@ -498,8 +498,8 @@ <ReturnType>J_EAPetroleumFuelVehicle</ReturnType> <Id>1726584205829</Id> <Name><![CDATA[f_addPetroleumFuelVehicle]]></Name> - <X>900</X> - <Y>760</Y> + <X>1320</X> + <Y>670</Y> <Label> <X>10</X> <Y>0</Y> @@ -530,8 +530,8 @@ <ReturnType>double</ReturnType> <Id>1726584205831</Id> <Name><![CDATA[f_addStorage]]></Name> - <X>900</X> - <Y>680</Y> + <X>1320</X> + <Y>590</Y> <Label> <X>10</X> <Y>0</Y> @@ -564,7 +564,7 @@ <Name><![CDATA[f_iEAGenericCompanies]]></Name> <Description><![CDATA[Initialisation of the Energy assets using average values for companies that have not filled in the survey (yet) combined with totals (floor surface, electricity/yr, gas/yr and trucks) of the simulated area.]]></Description> <X>450</X> - <Y>553</Y> + <Y>573</Y> <Label> <X>10</X> <Y>0</Y> @@ -587,8 +587,8 @@ <ReturnType>double</ReturnType> <Id>1726584205835</Id> <Name><![CDATA[f_createRemainingBuildings]]></Name> - <X>1546.739</X> - <Y>639</Y> + <X>1786.739</X> + <Y>669</Y> <Label> <X>10</X> <Y>0</Y> @@ -603,8 +603,8 @@ <ReturnType>double</ReturnType> <Id>1726584205837</Id> <Name><![CDATA[f_addTransportHydrogen]]></Name> - <X>900</X> - <Y>780</Y> + <X>1320</X> + <Y>690</Y> <Label> <X>10</X> <Y>0</Y> @@ -635,8 +635,8 @@ <ReturnType>double</ReturnType> <Id>1726584205845</Id> <Name><![CDATA[f_addChargingDemandProfile]]></Name> - <X>900</X> - <Y>720</Y> + <X>1320</X> + <Y>630</Y> <Label> <X>10</X> <Y>0</Y> @@ -659,8 +659,8 @@ <ReturnType>String</ReturnType> <Id>1726584205847</Id> <Name><![CDATA[f_createChargerPolygon]]></Name> - <X>1565</X> - <Y>700</Y> + <X>1805</X> + <Y>730</Y> <Label> <X>10</X> <Y>0</Y> @@ -684,7 +684,7 @@ <Id>1726584205849</Id> <Name><![CDATA[f_createChargingStations]]></Name> <X>431</X> - <Y>831</Y> + <Y>811</Y> <Label> <X>10</X> <Y>0</Y> @@ -715,8 +715,8 @@ <ReturnType>double</ReturnType> <Id>1726584205859</Id> <Name><![CDATA[f_createGISCables]]></Name> - <X>1547.621</X> - <Y>660</Y> + <X>1787.621</X> + <Y>690</Y> <Label> <X>10</X> <Y>0</Y> @@ -733,8 +733,8 @@ <Name><![CDATA[f_createPreprocessedElectricityProfile_PV]]></Name> <Description><![CDATA[Principe: verbruik = levering + productie - teruglevering]]></Description> - <X>920</X> - <Y>130</Y> + <X>1340</X> + <Y>120</Y> <Label> <X>9</X> <Y>-1</Y> @@ -806,7 +806,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1726584205869</Id> <Name><![CDATA[f_clearDataRecords]]></Name> <X>-390</X> - <Y>710</Y> + <Y>730</Y> <Label> <X>10</X> <Y>0</Y> @@ -822,7 +822,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1726584205871</Id> <Name><![CDATA[f_createSurveyCompanies_Excel]]></Name> <X>430</X> - <Y>508</Y> + <Y>528</Y> <Label> <X>10</X> <Y>0</Y> @@ -885,8 +885,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double[]</ReturnType> <Id>1728035809860</Id> <Name><![CDATA[f_convertFloatArrayToDoubleArray]]></Name> - <X>1550</X> - <Y>880</Y> + <X>1790</X> + <Y>910</Y> <Label> <X>10</X> <Y>0</Y> @@ -905,8 +905,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1728039545686</Id> <Name><![CDATA[f_getPreprocessedElectricityConsumptionTotal]]></Name> - <X>920</X> - <Y>150</Y> + <X>1340</X> + <Y>140</Y> <Label> <X>10</X> <Y>0</Y> @@ -941,8 +941,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1732112209863</Id> <Name><![CDATA[f_createCustomPVAsset]]></Name> - <X>900</X> - <Y>220</Y> + <X>1320</X> + <Y>210</Y> <Label> <X>9</X> <Y>-1</Y> @@ -1017,8 +1017,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1737712184349</Id> <Name><![CDATA[f_createPetroleumFuelTractors]]></Name> - <X>900</X> - <Y>800</Y> + <X>1320</X> + <Y>710</Y> <Label> <X>10</X> <Y>0</Y> @@ -1065,8 +1065,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double[]</ReturnType> <Id>1738572338816</Id> <Name><![CDATA[f_timeSeriesToQuarterHourlyDoubleArray]]></Name> - <X>1550</X> - <Y>910</Y> + <X>1790</X> + <Y>940</Y> <Label> <X>10</X> <Y>0</Y> @@ -1085,8 +1085,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1742915722586</Id> <Name><![CDATA[f_connectGCToExistingBuilding]]></Name> - <X>1550</X> - <Y>790</Y> + <X>1790</X> + <Y>810</Y> <Label> <X>10</X> <Y>0</Y> @@ -1113,8 +1113,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1745336570663</Id> <Name><![CDATA[f_addHeatAsset]]></Name> - <X>900</X> - <Y>500</Y> + <X>1320</X> + <Y>460</Y> <Label> <X>10</X> <Y>0</Y> @@ -1316,7 +1316,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1749648772203</Id> <Name><![CDATA[f_createChargingSession]]></Name> <X>490</X> - <Y>890</Y> + <Y>870</Y> <Label> <X>10</X> <Y>0</Y> @@ -1336,7 +1336,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1749649169603</Id> <Name><![CDATA[f_createNewChargerProfile]]></Name> <X>470</X> - <Y>870</Y> + <Y>850</Y> <Label> <X>10</X> <Y>0</Y> @@ -1356,7 +1356,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1749649390125</Id> <Name><![CDATA[f_getChargerProfile]]></Name> <X>450</X> - <Y>850</Y> + <Y>830</Y> <Label> <X>10</X> <Y>0</Y> @@ -1371,8 +1371,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1749726189312</Id> <Name><![CDATA[f_addCookingAsset]]></Name> - <X>900</X> - <Y>620</Y> + <X>1320</X> + <Y>530</Y> <Label> <X>10</X> <Y>0</Y> @@ -1399,8 +1399,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1749726279652</Id> <Name><![CDATA[f_addHotWaterDemand]]></Name> - <X>900</X> - <Y>640</Y> + <X>1320</X> + <Y>550</Y> <Label> <X>10</X> <Y>0</Y> @@ -1427,8 +1427,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1749727623536</Id> <Name><![CDATA[f_addBuildingHeatModel]]></Name> - <X>900</X> - <Y>270</Y> + <X>1320</X> + <Y>260</Y> <Label> <X>10</X> <Y>0</Y> @@ -1476,8 +1476,8 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1749728889984</Id> <Name><![CDATA[f_createHouses]]></Name> <Description><![CDATA[Creates the houses using a single GC, and their building. After creation, they will be simulated using average values.]]></Description> - <X>420</X> - <Y>640</Y> + <X>850</X> + <Y>100</Y> <Label> <X>10</X> <Y>0</Y> @@ -1493,8 +1493,8 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1749728889986</Id> <Name><![CDATA[f_addEnergyAssetsToHouses]]></Name> <Description><![CDATA[Initialisation of the Energy assets using average values for houses]]></Description> - <X>440</X> - <Y>680</Y> + <X>870</X> + <Y>140</Y> <Label> <X>10</X> <Y>0</Y> @@ -1529,8 +1529,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>J_HeatingPreferences</ReturnType> <Id>1749728889988</Id> <Name><![CDATA[f_getHouseHeatingPreferences]]></Name> - <X>460</X> - <Y>700</Y> + <X>890</X> + <Y>190</Y> <Label> <X>10</X> <Y>0</Y> @@ -1546,7 +1546,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1749729268458</Id> <Name><![CDATA[f_createParkingSpots]]></Name> <X>430</X> - <Y>950</Y> + <Y>930</Y> <Label> <X>10</X> <Y>0</Y> @@ -1707,7 +1707,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Name><![CDATA[f_createEngineProfile1]]></Name> <Description><![CDATA[Functie van gillis voor inladen weer data!]]></Description> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2419</X> + <X>2859</X> <Y>450</Y> <Label> <X>10</X> @@ -1741,7 +1741,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Name><![CDATA[f_setEngineInputDataAfterDeserialisation]]></Name> <Description><![CDATA[Functie van gillis voor inladen weer data!]]></Description> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433</X> + <X>2873</X> <Y>260</Y> <Label> <X>10</X> @@ -1858,7 +1858,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1753449467888</Id> <Name><![CDATA[f_reconstructGridConnections]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433.333</X> + <X>2873.333</X> <Y>302</Y> <Label> <X>10</X> @@ -1878,8 +1878,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1753883660006</Id> <Name><![CDATA[f_createHeatProfileFromAnnualGasTotal]]></Name> - <X>900</X> - <Y>365</Y> + <X>1320</X> + <Y>355</Y> <Label> <X>10</X> <Y>0</Y> @@ -1910,8 +1910,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1753883738731</Id> <Name><![CDATA[f_createGasProfileFromAnnualGasTotal]]></Name> - <X>900</X> - <Y>320</Y> + <X>1320</X> + <Y>310</Y> <Label> <X>10</X> <Y>0</Y> @@ -1935,7 +1935,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1753449467890</Id> <Name><![CDATA[f_reconstructEnergyModel]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433.333</X> + <X>2873.333</X> <Y>282</Y> <Label> <X>10</X> @@ -2036,7 +2036,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1753449467892</Id> <Name><![CDATA[f_reconstructAgent]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2445</X> + <X>2885</X> <Y>379</Y> <Label> <X>10</X> @@ -2064,8 +2064,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1753951013582</Id> <Name><![CDATA[f_getGasToHeatEfficiency]]></Name> - <X>920</X> - <Y>385</Y> + <X>1340</X> + <Y>375</Y> <Label> <X>10</X> <Y>0</Y> @@ -2104,8 +2104,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1753955686832</Id> <Name><![CDATA[f_createGasProfileFromEstimates]]></Name> - <X>900</X> - <Y>340</Y> + <X>1320</X> + <Y>330</Y> <Label> <X>10</X> <Y>0</Y> @@ -2124,8 +2124,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1753961830063</Id> <Name><![CDATA[f_createHeatProfileFromEstimates]]></Name> - <X>900</X> - <Y>430</Y> + <X>1320</X> + <Y>420</Y> <Label> <X>10</X> <Y>0</Y> @@ -2169,7 +2169,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1753449467894</Id> <Name><![CDATA[f_reconstructGridConnections1]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2420</X> + <X>2860</X> <Y>480</Y> <Label> <X>10</X> @@ -2190,7 +2190,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1753451091785</Id> <Name><![CDATA[f_addMixins_old]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2740</X> + <X>3180</X> <Y>70</Y> <Label> <X>10</X> @@ -2206,8 +2206,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1753964605708</Id> <Name><![CDATA[f_createHeatProfileFromAnnualHeatTotal]]></Name> - <X>900</X> - <Y>410</Y> + <X>1320</X> + <Y>400</Y> <Label> <X>10</X> <Y>0</Y> @@ -2295,7 +2295,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1753712630322</Id> <Name><![CDATA[f_reconstructActors]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433</X> + <X>2873</X> <Y>322</Y> <Label> <X>10</X> @@ -2315,8 +2315,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1754050106254</Id> <Name><![CDATA[f_addCustomHeatAsset]]></Name> - <X>920</X> - <Y>520</Y> + <X>1340</X> + <Y>480</Y> <Label> <X>10</X> <Y>0</Y> @@ -2340,7 +2340,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1753712697685</Id> <Name><![CDATA[f_reconstructGIS_Objects]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433</X> + <X>2873</X> <Y>362</Y> <Label> <X>10</X> @@ -2365,7 +2365,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1753712761420</Id> <Name><![CDATA[f_reconstructGridNodes]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2433</X> + <X>2873</X> <Y>342</Y> <Label> <X>10</X> @@ -2389,8 +2389,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1755866291695</Id> <Name><![CDATA[f_addCarsToHouses]]></Name> - <X>460</X> - <Y>720</Y> + <X>890</X> + <Y>390</Y> <Label> <X>10</X> <Y>0</Y> @@ -2409,8 +2409,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1755876470177</Id> <Name><![CDATA[f_calculateProbabilitiesForAdditionalCar]]></Name> - <X>440</X> - <Y>660</Y> + <X>870</X> + <Y>120</Y> <Label> <X>10</X> <Y>0</Y> @@ -2446,7 +2446,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1756735137677</Id> <Name><![CDATA[f_reconstructOrderedCollections]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2430</X> + <X>2870</X> <Y>400</Y> <Label> <X>10</X> @@ -2483,7 +2483,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1759128970777</Id> <Name><![CDATA[f_addMixins]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2450</X> + <X>2890</X> <Y>70</Y> <Label> <X>10</X> @@ -2500,7 +2500,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1759133710571</Id> <Name><![CDATA[f_loadScenario]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2430</X> + <X>2870</X> <Y>230</Y> <Label> <X>10</X> @@ -2521,7 +2521,7 @@ verbruik = levering + productie - teruglevering]]></Description> <Id>1762185034341</Id> <Name><![CDATA[f_getUserUUID]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2630</X> + <X>3070</X> <Y>70</Y> <Label> <X>10</X> @@ -2565,8 +2565,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>boolean</ReturnType> <Id>1763648128875</Id> <Name><![CDATA[f_isLocatedInActiveNBH]]></Name> - <X>1550</X> - <Y>440</Y> + <X>1790</X> + <Y>470</Y> <Label> <X>10</X> <Y>0</Y> @@ -2589,8 +2589,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>double</ReturnType> <Id>1763648249772</Id> <Name><![CDATA[f_removeObjectsNotInActiveNBH]]></Name> - <X>1550</X> - <Y>460</Y> + <X>1790</X> + <Y>490</Y> <Label> <X>10</X> <Y>0</Y> @@ -2605,8 +2605,8 @@ verbruik = levering + productie - teruglevering]]></Description> <ReturnType>OL_GISObjectType</ReturnType> <Id>1763648931889</Id> <Name><![CDATA[f_getNBHGISObjectType]]></Name> - <X>1570</X> - <Y>560</Y> + <X>1810</X> + <Y>590</Y> <Label> <X>10</X> <Y>0</Y> @@ -2628,4 +2628,193 @@ verbruik = levering + productie - teruglevering]]></Description> </Parameter> <Body xmlns:al="http://anylogic.com"/> </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1768308906995</Id> + <Name><![CDATA[f_getSpaceHeatingDemand_PBL_kWh]]></Name> + <X>890</X> + <Y>270</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name><![CDATA[floorSurfaceArea_m2]]></Name> + <Type><![CDATA[double]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[spaceHeatingObjectPBL]]></Name> + <Type><![CDATA[PBL_SpaceHeating_data]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[localFactor]]></Name> + <Type><![CDATA[double]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[regionalClimateCorrectionFactor]]></Name> + <Type><![CDATA[double]]></Type> + </Parameter> + <Body xmlns:al="http://anylogic.com"/> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1768317546933</Id> + <Name><![CDATA[f_getHeatDemand_PBL1]]></Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>910</X> + <Y>410</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name><![CDATA[buildingType]]></Name> + <Type><![CDATA[OL_PBL_BuildingType]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[constructionPeriod]]></Name> + <Type><![CDATA[OL_PBL_ConstructionPeriod]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[ownership]]></Name> + <Type><![CDATA[OL_PBL_OwnershipType]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[energyLabel]]></Name> + <Type><![CDATA[OL_GridConnectionIsolationLabel]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[surfaceArea_m2]]></Name> + <Type><![CDATA[double]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[localFactor]]></Name> + <Type><![CDATA[double]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[regionalClimateCorrectionFactor]]></Name> + <Type><![CDATA[double]]></Type> + </Parameter> + <Body xmlns:al="http://anylogic.com"/> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>PBL_SpaceHeating_data</ReturnType> + <Id>1768319865034</Id> + <Name><![CDATA[f_getPBLObject_spaceHeating]]></Name> + <X>890</X> + <Y>250</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name><![CDATA[buildingType]]></Name> + <Type><![CDATA[OL_PBL_BuildingType]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[constructionPeriod]]></Name> + <Type><![CDATA[OL_PBL_ConstructionPeriod]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[ownershipType]]></Name> + <Type><![CDATA[OL_PBL_OwnershipType]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[insulationLabel]]></Name> + <Type><![CDATA[OL_GridConnectionIsolationLabel]]></Type> + </Parameter> + <Body xmlns:al="http://anylogic.com"/> + </Function> + <Function AccessType="public" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>PBL_DHWAndCooking_data</ReturnType> + <Id>1768319890191</Id> + <Name><![CDATA[f_getPBLObject_DHWAndCooking]]></Name> + <X>890</X> + <Y>290</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name><![CDATA[constructionPeriod]]></Name> + <Type><![CDATA[OL_PBL_ConstructionPeriod]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[floorSurfaceArea_m2]]></Name> + <Type><![CDATA[double]]></Type> + </Parameter> + <Parameter> + <Name><![CDATA[householdSize]]></Name> + <Type><![CDATA[int]]></Type> + </Parameter> + <Body xmlns:al="http://anylogic.com"/> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>RETURNS_VALUE</ReturnModificator> + <ReturnType>int</ReturnType> + <Id>1768321972904</Id> + <Name><![CDATA[f_getTNOSurfaceCode]]></Name> + <X>910</X> + <Y>310</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Parameter> + <Name><![CDATA[surfaceArea_m2]]></Name> + <Type><![CDATA[double]]></Type> + </Parameter> + <Body xmlns:al="http://anylogic.com"/> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1768322522139</Id> + <Name><![CDATA[f_modelPopBackup]]></Name> + <ExcludeFromBuild>true</ExcludeFromBuild> + <X>910</X> + <Y>430</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Body xmlns:al="http://anylogic.com"/> + </Function> + <Function AccessType="default" StaticFunction="false"> + <ReturnModificator>VOID</ReturnModificator> + <ReturnType>double</ReturnType> + <Id>1768324153032</Id> + <Name><![CDATA[f_addHeatingToHouses]]></Name> + <X>890</X> + <Y>160</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + </Function> </Functions> diff --git a/_alp/Agents/Zero_Loader/EmbeddedObjects.xml b/_alp/Agents/Zero_Loader/EmbeddedObjects.xml index e58d26f..f3799c9 100644 --- a/_alp/Agents/Zero_Loader/EmbeddedObjects.xml +++ b/_alp/Agents/Zero_Loader/EmbeddedObjects.xml @@ -122,7 +122,7 @@ <Id>1726584829907</Id> <Name><![CDATA[avgc_data]]></Name> <X>-370</X> - <Y>830</Y> + <Y>850</Y> <Label> <X>10</X> <Y>0</Y> @@ -397,6 +397,18 @@ <Parameter> <Name><![CDATA[p_avgOutputTemperatureHybridHeatpump_degC]]></Name> </Parameter> + <Parameter> + <Name><![CDATA[p_minAnnualTravelDistanceSurveyVehicle_km]]></Name> + </Parameter> + <Parameter> + <Name><![CDATA[p_PBL_HeatingLossFactor]]></Name> + </Parameter> + <Parameter> + <Name><![CDATA[map_energyLabel_lossfactorPerFloorSurface_WpKm2]]></Name> + </Parameter> + <Parameter> + <Name><![CDATA[p_solarAbsorptionFloorSurfaceScalingFactor_fr]]></Name> + </Parameter> </Parameters> <ReplicationFlag>false</ReplicationFlag> <Replication Class="CodeValue"> diff --git a/_alp/Agents/Zero_Loader/Levels/Level.level.xml b/_alp/Agents/Zero_Loader/Levels/Level.level.xml index 9004d5a..d1d17f0 100644 --- a/_alp/Agents/Zero_Loader/Levels/Level.level.xml +++ b/_alp/Agents/Zero_Loader/Levels/Level.level.xml @@ -21,7 +21,7 @@ <LineColor>-16744448</LineColor> <LineMaterial>null</LineMaterial> <LineStyle>SOLID</LineStyle> - <Width>1920</Width> + <Width>2200</Width> <Height>980</Height> <Rotation>0.0</Rotation> <FillColor>-1</FillColor> @@ -30,8 +30,8 @@ <Rectangle> <Id>1726584205907</Id> <Name><![CDATA[rect_projectDataTracking]]></Name> - <X>1520</X> - <Y>20</Y> + <X>1760</X> + <Y>50</Y> <Label> <X>10</X> <Y>10</Y> @@ -47,7 +47,7 @@ <LineColor>-65536</LineColor> <LineMaterial>null</LineMaterial> <LineStyle>SOLID</LineStyle> - <Width>380</Width> + <Width>420</Width> <Height>360</Height> <Rotation>0.0</Rotation> <FillColor>-1</FillColor> @@ -160,8 +160,8 @@ <Text> <Id>1726584205921</Id> <Name><![CDATA[txt_projectDataTracking]]></Name> - <X>1540</X> - <Y>40</Y> + <X>1780</X> + <Y>60</Y> <Label> <X>0</X> <Y>-10</Y> @@ -367,7 +367,7 @@ <Id>1726584205937</Id> <Name><![CDATA[t_inputFiles]]></Name> <X>-380</X> - <Y>720</Y> + <Y>750</Y> <Label> <X>0</X> <Y>-10</Y> @@ -493,7 +493,7 @@ <Id>1726584205947</Id> <Name><![CDATA[rect_createEnergyGC]]></Name> <X>400</X> - <Y>740</Y> + <Y>720</Y> <Label> <X>10</X> <Y>10</Y> @@ -510,7 +510,7 @@ <LineMaterial>null</LineMaterial> <LineStyle>SOLID</LineStyle> <Width>400</Width> - <Height>230</Height> + <Height>250</Height> <Rotation>0.0</Rotation> <FillColor>-1</FillColor> <FillMaterial>null</FillMaterial> @@ -519,7 +519,7 @@ <Id>1726584205949</Id> <Name><![CDATA[txt_createEnergyGC]]></Name> <X>410</X> - <Y>750</Y> + <Y>730</Y> <Label> <X>0</X> <Y>-10</Y> @@ -544,8 +544,8 @@ <Group> <Id>1726584205951</Id> <Name><![CDATA[gr_consumerGC_residential]]></Name> - <X>570</X> - <Y>610</Y> + <X>1000</X> + <Y>70</Y> <Label> <X>10</X> <Y>0</Y> @@ -579,7 +579,7 @@ <LineMaterial>null</LineMaterial> <LineStyle>SOLID</LineStyle> <Width>400</Width> - <Height>140</Height> + <Height>520</Height> <Rotation>0.0</Rotation> <FillColor>-1</FillColor> <FillMaterial>null</FillMaterial> @@ -649,7 +649,7 @@ <LineMaterial>null</LineMaterial> <LineStyle>SOLID</LineStyle> <Width>400</Width> - <Height>520</Height> + <Height>570</Height> <Rotation>0.0</Rotation> <FillColor>-1</FillColor> <FillMaterial>null</FillMaterial> @@ -684,8 +684,8 @@ <Group> <Id>1726584205963</Id> <Name><![CDATA[gr_addEAFunctions]]></Name> - <X>1040</X> - <Y>200</Y> + <X>1460</X> + <Y>190</Y> <Label> <X>10</X> <Y>0</Y> @@ -719,7 +719,7 @@ <LineMaterial>null</LineMaterial> <LineStyle>SOLID</LineStyle> <Width>450</Width> - <Height>780</Height> + <Height>690</Height> <Rotation>0.0</Rotation> <FillColor>-1</FillColor> <FillMaterial>null</FillMaterial> @@ -754,8 +754,8 @@ <Group> <Id>1726584205969</Id> <Name><![CDATA[gr_createGISObjects]]></Name> - <X>1700</X> - <Y>610</Y> + <X>1940</X> + <Y>640</Y> <Label> <X>9.938</X> <Y>0</Y> @@ -788,7 +788,7 @@ <LineColor>-16777216</LineColor> <LineMaterial>null</LineMaterial> <LineStyle>SOLID</LineStyle> - <Width>380</Width> + <Width>420</Width> <Height>230</Height> <Rotation>0.0</Rotation> <FillColor>-1</FillColor> @@ -849,8 +849,8 @@ <Rectangle> <Id>1730217549237</Id> <Name><![CDATA[rect_supportFunctions]]></Name> - <X>1520</X> - <Y>830</Y> + <X>1760</X> + <Y>860</Y> <Label> <X>10</X> <Y>10</Y> @@ -866,8 +866,8 @@ <LineColor>-16777216</LineColor> <LineMaterial>null</LineMaterial> <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>140</Height> + <Width>420</Width> + <Height>100</Height> <Rotation>0.0</Rotation> <FillColor>-1</FillColor> <FillMaterial>null</FillMaterial> @@ -875,8 +875,8 @@ <Text> <Id>1730217578770</Id> <Name><![CDATA[txt_supportFunctions]]></Name> - <X>1540</X> - <Y>840</Y> + <X>1780</X> + <Y>870</Y> <Label> <X>0</X> <Y>-10</Y> @@ -900,8 +900,8 @@ <Rectangle> <Id>1742919550888</Id> <Name><![CDATA[rect_connectToFunctions]]></Name> - <X>1520</X> - <Y>730</Y> + <X>1760</X> + <Y>760</Y> <Label> <X>10</X> <Y>10</Y> @@ -917,8 +917,8 @@ <LineColor>-16777216</LineColor> <LineMaterial>null</LineMaterial> <LineStyle>SOLID</LineStyle> - <Width>380</Width> - <Height>80</Height> + <Width>420</Width> + <Height>90</Height> <Rotation>0.0</Rotation> <FillColor>-1</FillColor> <FillMaterial>null</FillMaterial> @@ -926,8 +926,8 @@ <Text> <Id>1742919565761</Id> <Name><![CDATA[txt_connectToFunctions]]></Name> - <X>1540</X> - <Y>750</Y> + <X>1780</X> + <Y>770</Y> <Label> <X>0</X> <Y>-10</Y> @@ -952,7 +952,7 @@ <Id>1744808981703</Id> <Name><![CDATA[txt_DebuggingDataCollections]]></Name> <X>-400</X> - <Y>870</Y> + <Y>880</Y> <Label> <X>0</X> <Y>-10</Y> @@ -1079,7 +1079,7 @@ <Id>1753349205420</Id> <Name><![CDATA[rect_defaultStartup1]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2360</X> + <X>2800</X> <Y>0</Y> <Label> <X>10</X> @@ -1106,7 +1106,7 @@ <Id>1753349205422</Id> <Name><![CDATA[txt_loaderStartupDeserialisation]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2380</X> + <X>2820</X> <Y>9</Y> <Label> <X>0</X> @@ -1133,7 +1133,7 @@ <Id>1753449467882</Id> <Name><![CDATA[deserialize2]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2413.333</X> + <X>2853.333</X> <Y>172</Y> <Label> <X>0</X> @@ -1263,7 +1263,7 @@ try { <Id>1753449467884</Id> <Name><![CDATA[serialize1]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2416.333</X> + <X>2856.333</X> <Y>99</Y> <Label> <X>0</X> diff --git a/_alp/Agents/Zero_Loader/Variables.xml b/_alp/Agents/Zero_Loader/Variables.xml index 0d27d21..2eb2912 100644 --- a/_alp/Agents/Zero_Loader/Variables.xml +++ b/_alp/Agents/Zero_Loader/Variables.xml @@ -3,8 +3,8 @@ <Variable Class="PlainVariable"> <Id>1726584205883</Id> <Name><![CDATA[v_timeOfModelStart_ms]]></Name> - <X>1560</X> - <Y>140</Y> + <X>1800</X> + <Y>170</Y> <Label> <X>10</X> <Y>0</Y> @@ -22,8 +22,8 @@ <Variable Class="PlainVariable"> <Id>1726584205885</Id> <Name><![CDATA[v_modelStartUpDuration_s]]></Name> - <X>1560</X> - <Y>160</Y> + <X>1800</X> + <Y>190</Y> <Label> <X>10</X> <Y>0</Y> @@ -44,8 +44,8 @@ <Variable Class="PlainVariable"> <Id>1726584205887</Id> <Name><![CDATA[v_simStartYear]]></Name> - <X>1560</X> - <Y>70</Y> + <X>1800</X> + <Y>100</Y> <Label> <X>10</X> <Y>0</Y> @@ -66,8 +66,8 @@ <Variable Class="PlainVariable"> <Id>1733235094633</Id> <Name><![CDATA[v_numberOfSurveyCompanies]]></Name> - <X>1560</X> - <Y>240</Y> + <X>1800</X> + <Y>270</Y> <Label> <X>10</X> <Y>0</Y> @@ -86,8 +86,8 @@ <Id>1733389557748</Id> <Name><![CDATA[v_simStartHour_h]]></Name> <Description><![CDATA[The hour 0 is defined as january 1st, 00:00h in the year energyModel.p_year]]></Description> - <X>1560</X> - <Y>90</Y> + <X>1800</X> + <Y>120</Y> <Label> <X>10</X> <Y>0</Y> @@ -108,8 +108,8 @@ <Variable Class="PlainVariable"> <Id>1733390702422</Id> <Name><![CDATA[v_simDuration_h]]></Name> - <X>1560</X> - <Y>110</Y> + <X>1800</X> + <Y>140</Y> <Label> <X>10</X> <Y>0</Y> @@ -150,7 +150,7 @@ <Id>1753450969530</Id> <Name><![CDATA[v_objectMapper]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2450</X> + <X>2890</X> <Y>49</Y> <Label> <X>10</X> @@ -169,8 +169,8 @@ <Variable Class="PlainVariable"> <Id>1755876520422</Id> <Name><![CDATA[v_probabilityForAdditionalCar_privateParking]]></Name> - <X>1560</X> - <Y>190</Y> + <X>1800</X> + <Y>220</Y> <Label> <X>10</X> <Y>0</Y> @@ -188,8 +188,8 @@ <Variable Class="PlainVariable"> <Id>1755876547633</Id> <Name><![CDATA[v_probabilityForAdditionalCar_publicParking]]></Name> - <X>1560</X> - <Y>210</Y> + <X>1800</X> + <Y>240</Y> <Label> <X>10</X> <Y>0</Y> @@ -335,7 +335,7 @@ <Id>1762184918471</Id> <Name><![CDATA[p_userIdToken]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2630</X> + <X>3070</X> <Y>50</Y> <Label> <X>10</X> @@ -360,8 +360,8 @@ <Variable Class="Parameter"> <Id>1761907535651</Id> <Name><![CDATA[p_remainingTotals]]></Name> - <X>1560</X> - <Y>290</Y> + <X>1800</X> + <Y>320</Y> <Label> <X>10</X> <Y>0</Y> @@ -388,8 +388,8 @@ <Variable Class="CollectionVariable"> <Id>1726584205737</Id> <Name><![CDATA[c_gridNodeIDsInScope]]></Name> - <X>1560</X> - <Y>320</Y> + <X>1800</X> + <Y>350</Y> <Label> <X>10</X> <Y>0</Y> @@ -443,7 +443,7 @@ <Id>1726584205743</Id> <Name><![CDATA[c_surveyCompanyBuilding_data]]></Name> <X>-380</X> - <Y>910</Y> + <Y>920</Y> <Label> <X>10</X> <Y>0</Y> @@ -641,7 +641,7 @@ <Id>1737744140895</Id> <Name><![CDATA[c_vallumBuilding_data]]></Name> <X>-380</X> - <Y>930</Y> + <Y>940</Y> <Label> <X>10</X> <Y>0</Y> @@ -676,8 +676,8 @@ <Variable Class="CollectionVariable"> <Id>1749631164240</Id> <Name><![CDATA[c_gridNodeIDsWithProfiles]]></Name> - <X>1560</X> - <Y>350</Y> + <X>1800</X> + <Y>380</Y> <Label> <X>10</X> <Y>0</Y> @@ -731,7 +731,7 @@ <Id>1759135072429</Id> <Name><![CDATA[c_GISregions]]></Name> <ExcludeFromBuild>true</ExcludeFromBuild> - <X>2450</X> + <X>2890</X> <Y>149</Y> <Label> <X>10</X> @@ -749,8 +749,8 @@ <Variable Class="CollectionVariable"> <Id>1763648784984</Id> <Name><![CDATA[c_activeNBH]]></Name> - <X>1540</X> - <Y>420</Y> + <X>1780</X> + <Y>450</Y> <Label> <X>10</X> <Y>0</Y> @@ -764,4 +764,40 @@ <ValueElementClass>GISRegion</ValueElementClass> </Properties> </Variable> + <Variable Class="CollectionVariable"> + <Id>1768319045952</Id> + <Name><![CDATA[c_lookupTablePBL_spaceHeating]]></Name> + <X>-370</X> + <Y>680</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>PBL_SpaceHeating_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> + <Variable Class="CollectionVariable"> + <Id>1768319047453</Id> + <Name><![CDATA[c_lookupTablePBL_DHWAndCooking]]></Name> + <X>-370</X> + <Y>700</Y> + <Label> + <X>10</X> + <Y>0</Y> + </Label> + <PublicFlag>false</PublicFlag> + <PresentationFlag>true</PresentationFlag> + <ShowLabel>true</ShowLabel> + <Properties SaveInSnapshot="true" AccessType="public" StaticVariable="false"> + <CollectionClass>ArrayList</CollectionClass> + <ElementClass>PBL_DHWAndCooking_data</ElementClass> + <ValueElementClass>String</ValueElementClass> + </Properties> + </Variable> </Variables> diff --git a/_alp/Classes/Class.PBL_DHWAndCooking_data.java b/_alp/Classes/Class.PBL_DHWAndCooking_data.java new file mode 100644 index 0000000..89c874e --- /dev/null +++ b/_alp/Classes/Class.PBL_DHWAndCooking_data.java @@ -0,0 +1,13 @@ +/** + * PBL_DHWAndCooking_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class PBL_DHWAndCooking_data { + OL_PBL_ConstructionPeriod construction_period; + int surface_code; + int household_size; + double cooking_gas_demand_m3pa; + double dhw_gas_demand_m3pa; +} diff --git a/_alp/Classes/Class.PBL_SpaceHeating_data.java b/_alp/Classes/Class.PBL_SpaceHeating_data.java new file mode 100644 index 0000000..ba99b5b --- /dev/null +++ b/_alp/Classes/Class.PBL_SpaceHeating_data.java @@ -0,0 +1,17 @@ +/** + * PBL_SpaceHeating_data + */ +@lombok.Builder +@lombok.Value +@lombok.experimental.Accessors(fluent = true) +public class PBL_SpaceHeating_data { + OL_PBL_BuildingType building_type; + OL_PBL_ConstructionPeriod construction_period; + OL_PBL_OwnershipType ownership_type; + OL_GridConnectionIsolationLabel insulation_label; + //model_population; + double slope_space_heating_gjpm2a; + double constant_space_heating_gjpa; + double slope_residents; + double constant_residents; +}